All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OvershootSplittingAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTwoDReco/LArClusterSplitting/OvershootSplittingAlgorithm.h
3  *
4  * @brief Header file for the overshoot splitting algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_OVERSHOOT_SPLITTING_ALGORITHM_H
9 #define LAR_OVERSHOOT_SPLITTING_ALGORITHM_H 1
10 
12 
13 namespace lar_content
14 {
15 
16 /**
17  * @brief OvershootSplittingAlgorithm class
18  */
20 {
21 public:
22  /**
23  * @brief Default constructor
24  */
26 
27 private:
28  void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
29  void FindBestSplitPositions(const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterPositionMap &clusterSplittingMap) const;
30 
31  typedef std::pair<float, pandora::CartesianVector> MyTrajectoryPoint;
32  typedef std::vector<MyTrajectoryPoint> MyTrajectoryPointList;
33 
34  /**
35  * @brief Use sliding fit results to calculate intersections of clusters
36  *
37  * @param slidingFitResultMap the sliding fit result map
38  * @param clusterIntersectionMap the map of cluster intersection points
39  */
40  void BuildIntersectionMap(const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterPositionMap &clusterIntersectionMap) const;
41 
42  /**
43  * @brief Use intersection points to decide on splitting points
44  *
45  * @param slidingFitResultMap the sliding fit result map
46  * @param clusterIntersectionMap the input map of cluster intersection points
47  * @param sortedIntersectionMap the output map of sorted cluster intersection points
48  */
49  void BuildSortedIntersectionMap(const TwoDSlidingFitResultMap &slidingFitResultMap, const ClusterPositionMap &clusterIntersectionMap,
50  ClusterPositionMap &sortedIntersectionMap) const;
51 
52  /**
53  * @brief Select split positions from sorted list of candidate positions
54  *
55  * @param sortedIntersectionMap the input map of candidate split positions
56  * @param clusterSplittingMap the output map of selected split positions
57  */
58  void PopulateSplitPositionMap(const ClusterPositionMap &sortedIntersectionMap, ClusterPositionMap &clusterSplittingMap) const;
59 
60  /**
61  * @brief Sort pfos by number of constituent hits
62  *
63  * @param pLhs address of first pfo
64  * @param pRhs address of second pfo
65  */
66  static bool SortByHitProjection(const MyTrajectoryPoint &lhs, const MyTrajectoryPoint &rhs);
67 
68  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
69 
70  float m_minClusterLength; ///<
75 };
76 
77 } // namespace lar_content
78 
79 #endif // #ifndef LAR_OVERSHOOT_SPLITTING_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...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > ClusterPositionMap
void BuildIntersectionMap(const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterPositionMap &clusterIntersectionMap) const
Use sliding fit results to calculate intersections of clusters.
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
void FindBestSplitPositions(const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterPositionMap &clusterSplittingMap) const
Determine best split positions based on sliding fit result.
std::vector< MyTrajectoryPoint > MyTrajectoryPointList
Header file for the 2D sliding fit multi-split algorithm class.
std::pair< float, pandora::CartesianVector > MyTrajectoryPoint
static bool SortByHitProjection(const MyTrajectoryPoint &lhs, const MyTrajectoryPoint &rhs)
Sort pfos by number of constituent hits.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
void PopulateSplitPositionMap(const ClusterPositionMap &sortedIntersectionMap, ClusterPositionMap &clusterSplittingMap) const
Select split positions from sorted list of candidate positions.
void BuildSortedIntersectionMap(const TwoDSlidingFitResultMap &slidingFitResultMap, const ClusterPositionMap &clusterIntersectionMap, ClusterPositionMap &sortedIntersectionMap) const
Use intersection points to decide on splitting points.