LongitudinalAssociationAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTwoDReco/LArClusterAssociation/LongitudinalAssociationAlgorithm.h
3  *
4  * @brief Header file for the longitudinal association algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_LONGITUDINAL_ASSOCIATION_ALGORITHM_H
9 #define LAR_LONGITUDINAL_ASSOCIATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
13 #include "Helpers/ClusterFitHelper.h"
14 
16 
17 namespace lar_content
18 {
19 
20 /**
21  * @brief LongitudinalAssociationAlgorithm class
22  */
24 {
25 public:
26  /**
27  * @brief Default constructor
28  */
30 
31 private:
32  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
33  void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
34  void PopulateClusterAssociationMap(const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const;
35  bool IsExtremalCluster(const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const;
36 
37  /**
38  * @brief Determine whether two clusters are associated
39  *
40  * @param pInnerCluster address of the inner cluster
41  * @param pOuterCluster address of the outer cluster
42  *
43  * @return whether the clusters are associated
44  */
45  bool AreClustersAssociated(const pandora::Cluster *const pInnerCluster, const pandora::Cluster *const pOuterCluster) const;
46 
47  /**
48  * @brief Determine whether two clusters are associated
49  *
50  * @param innerClusterEnd inner cluster end position
51  * @param outerClusterStart outer cluster start position
52  * @param innerFit inner cluster fit result
53  * @param outerFit outer cluster fit result
54  *
55  * @return whether the clusters are associated
56  */
57  bool AreClustersAssociated(const pandora::CartesianVector &innerClusterEnd, const pandora::CartesianVector &outerClusterStart,
58  const pandora::ClusterFitResult &innerFit, const pandora::ClusterFitResult &outerFit) const;
59 
60  unsigned int m_minClusterLayers; ///< minimum allowed number of layers for a clean cluster
61  unsigned int m_maxGapLayers; ///< maximum allowed number of layers between associated clusters
62  unsigned int m_fitLayers; ///< number of layers to fit at start and end of cluster
63  float m_maxGapDistanceSquared; ///< maximum allowed distance (squared) between associated clusters
64  float m_minCosRelativeAngle; ///< maximum allowed relative angle between associated clusters
65  float m_maxTransverseDisplacement; ///< maximum allowed transverse displacement after extrapolation (normalised to cell size)
66  float m_maxLongitudinalDisplacement; ///< maximum allowed longitudinal displacement after extrapolation (normalised to cell size)
67  float m_hitSizeZ; ///< estimated hit size in z (wire number) dimension, units cm
68  float m_hitSizeX; ///< estimated hit size in x (drift time) dimension, units cm
69 };
70 
71 } // namespace lar_content
72 
73 #endif // #ifndef LAR_LONGITUDINAL_ASSOCIATION_ALGORITHM_H
void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const
Populate cluster vector with subset of cluster list, containing clusters judged to be clean...
void PopulateClusterAssociationMap(const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const
Populate the cluster association map.
float m_maxLongitudinalDisplacement
maximum allowed longitudinal displacement after extrapolation (normalised to cell size) ...
float m_minCosRelativeAngle
maximum allowed relative angle between associated clusters
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::unordered_map< const pandora::Cluster *, ClusterAssociation > ClusterAssociationMap
unsigned int m_minClusterLayers
minimum allowed number of layers for a clean cluster
Header file for the cluster association algorithm class.
float m_hitSizeX
estimated hit size in x (drift time) dimension, units cm
float m_maxGapDistanceSquared
maximum allowed distance (squared) between associated clusters
bool IsExtremalCluster(const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const
Determine which of two clusters is extremal.
unsigned int m_maxGapLayers
maximum allowed number of layers between associated clusters
float m_hitSizeZ
estimated hit size in z (wire number) dimension, units cm
bool AreClustersAssociated(const pandora::Cluster *const pInnerCluster, const pandora::Cluster *const pOuterCluster) const
Determine whether two clusters are associated.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
unsigned int m_fitLayers
number of layers to fit at start and end of cluster
float m_maxTransverseDisplacement
maximum allowed transverse displacement after extrapolation (normalised to cell size) ...