LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CrossGapsAssociationAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_CROSS_GAPS_ASSOCIATION_ALGORITHM_H
9 #define LAR_CROSS_GAPS_ASSOCIATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
16 
17 namespace lar_content
18 {
19 
24 {
25 public:
30 
31 private:
32  void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
33  void PopulateClusterAssociationMap(const pandora::ClusterVector &clusterVector, ClusterAssociationMap &clusterAssociationMap) const;
34  bool IsExtremalCluster(const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const;
35 
44  bool AreClustersAssociated(const TwoDSlidingFitResult &innerFitResult, const TwoDSlidingFitResult &outerFitResult) const;
45 
55  bool IsAssociated(const pandora::CartesianVector &startPosition, const pandora::CartesianVector &startDirection,
56  const TwoDSlidingFitResult &targetFitResult) const;
57 
66  bool IsNearCluster(const pandora::CartesianVector &samplingPoint, const TwoDSlidingFitResult &targetFitResult) const;
67 
68  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
69 
70  unsigned int m_minClusterHits;
71  unsigned int m_minClusterLayers;
72  unsigned int m_slidingFitWindow;
73  unsigned int m_maxSamplingPoints;
75  unsigned int m_maxUnmatchedSampleRun;
80 };
81 
82 } // namespace lar_content
83 
84 #endif // #ifndef LAR_CROSS_GAPS_ASSOCIATION_ALGORITHM_H
float m_minMatchedSamplingFraction
Minimum ratio between matched sampling points and expectation to declare association.
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.
std::unordered_map< const pandora::Cluster *, ClusterAssociation > ClusterAssociationMap
unsigned int m_minClusterLayers
The minimum allowed number of layers for a clean cluster.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
unsigned int m_minClusterHits
The minimum allowed number of hits in a clean cluster.
unsigned int m_maxSamplingPoints
The maximum number of extension sampling points considered per association check. ...
bool IsAssociated(const pandora::CartesianVector &startPosition, const pandora::CartesianVector &startDirection, const TwoDSlidingFitResult &targetFitResult) const
Sample points along the extrapolation from a starting position to a target fit result to declare clus...
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.
float m_gapTolerance
The tolerance to use when querying whether a sampling point is in a gap, units cm.
unsigned int m_maxUnmatchedSampleRun
The maximum run of unmatched (and non-gap) samples to consider before stopping.
Header file for the lar two dimensional sliding fit result class.
Header file for the cluster association algorithm class.
float m_maxOnClusterDistance
The maximum distance between a sampling point and sliding fit to target cluster.
unsigned int m_minMatchedSamplingPoints
Minimum number of matched sampling points to declare association.
bool AreClustersAssociated(const TwoDSlidingFitResult &innerFitResult, const TwoDSlidingFitResult &outerFitResult) const
Determine whether two clusters are associated.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
bool IsNearCluster(const pandora::CartesianVector &samplingPoint, const TwoDSlidingFitResult &targetFitResult) const
Whether a sampling point lies near a target 2d sliding fit result.
bool IsExtremalCluster(const bool isForward, const pandora::Cluster *const pCurrentCluster, const pandora::Cluster *const pTestCluster) const
Determine which of two clusters is extremal.
float m_sampleStepSize
The sampling step size used in association checks, units cm.