LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
CrossedTrackSplittingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_CROSSED_TRACK_SPLITTING_ALGORITHM_H
9 #define LAR_CROSSED_TRACK_SPLITTING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 namespace lar_content
16 {
17 
18 template<typename, unsigned int> class KDTreeLinkerAlgo;
19 template<typename, unsigned int> class KDTreeNodeInfoT;
20 
21 //------------------------------------------------------------------------------------------------------------------------------------------
22 
27 {
28 public:
33 
34 private:
37  typedef std::vector<HitKDNode2D> HitKDNode2DList;
38 
39  typedef std::unordered_map<const pandora::Cluster*, pandora::ClusterSet> ClusterToClustersMap;
40  typedef std::unordered_map<const pandora::CaloHit*, const pandora::Cluster*> HitToClusterMap;
41 
42  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
43  pandora::StatusCode PreparationStep(const pandora::ClusterVector &clusterVector);
44  pandora::StatusCode TidyUpStep();
45  pandora::StatusCode FindBestSplitPosition(const TwoDSlidingFitResult &slidingFit1, const TwoDSlidingFitResult &slidingFit2,
46  pandora::CartesianVector &splitPosition, pandora::CartesianVector &direction1, pandora::CartesianVector &direction2) const;
47 
55  void FindCandidateSplitPositions(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2,
56  pandora::CartesianPointVector &candidateVector) const;
57 
61 
63  ClusterToClustersMap m_nearbyClusters;
64 };
65 
66 } // namespace lar_content
67 
68 #endif // #ifndef LAR_CROSSED_TRACK_SPLITTING_ALGORITHM_H
pandora::StatusCode FindBestSplitPosition(const TwoDSlidingFitResult &slidingFit1, const TwoDSlidingFitResult &slidingFit2, pandora::CartesianVector &splitPosition, pandora::CartesianVector &direction1, pandora::CartesianVector &direction2) const
Find the best split position and direction for a pair of clusters.
Class that implements the KDTree partition of 2D space and a closest point search algorithm...
float m_minCosRelativeAngle
maximum relative angle between tracks after un-crossing
float m_maxClusterSeparationSquared
maximum separation of two clusters (squared)
std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > HitToClusterMap
Data stored in each KDTree node. The dim1/dim2 fields are usually the duplication of some PFRecHit va...
std::unordered_map< const pandora::Cluster *, pandora::ClusterSet > ClusterToClustersMap
KDTreeNodeInfoT< const pandora::CaloHit *, 2 > HitKDNode2D
pandora::StatusCode TidyUpStep()
Tidy up any information cached in e.g. the preparation step.
void FindCandidateSplitPositions(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, pandora::CartesianPointVector &candidateVector) const
Find average positions of pairs of hits within a maximum separation.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
pandora::StatusCode PreparationStep(const pandora::ClusterVector &clusterVector)
Perform any preparatory actions, such as caching information for subsequent expensive calculations...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_maxClusterSeparation
maximum separation of two clusters
ClusterToClustersMap m_nearbyClusters
The nearby clusters map.
float m_searchRegion1D
Search region, applied to each dimension, for look-up from kd-trees.
KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > HitKDTree2D
Header file for the two dimensional sliding fit splitting and switching algorithm class...