All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TwoDSlidingFitMultiSplitAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTwoDReco/LArClusterSplitting/TwoDSlidingFitMultiSplitAlgorithm.h
3  *
4  * @brief Header file for the 2D sliding fit multi-split algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_TWO_D_SLIDING_FIT_MULTI_SPLIT_ALGORITHM_H
9 #define LAR_TWO_D_SLIDING_FIT_MULTI_SPLIT_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 namespace lar_content
16 {
17 
18 /**
19  * @brief TwoDTrackSplittingAlgorithm class
20  */
21 class TwoDSlidingFitMultiSplitAlgorithm : public pandora::Algorithm
22 {
23 public:
24  /**
25  * @brief Default constructor
26  */
28 
29 protected:
30  typedef std::unordered_map<const pandora::Cluster *, pandora::CartesianPointVector> ClusterPositionMap;
31 
32  /**
33  * @brief Populate cluster vector with subset of cluster list, containing clusters judged to be clean
34  *
35  * @param pClusterList address of the cluster list
36  * @param clusterVector to receive the populated cluster vector
37  */
38  virtual void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const = 0;
39 
40  /**
41  * @brief Determine best split positions based on sliding fit result
42  *
43  * @param slidingFitResultMap mapping from clusters to sliding fit results
44  * @param clusterSplittingMap mapping from clusters to split positions
45  */
46  virtual void FindBestSplitPositions(const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterPositionMap &clusterSplittingMap) const = 0;
47 
48  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
49 
50 private:
51  pandora::StatusCode Run();
52 
53  /**
54  * @brief Build the map of sliding fit results
55  *
56  * @param clusterVector the vector of selected clusters
57  * @param halfWindowLayers the half-window to use for the sliding fits
58  * @param slidingFitResultMap the sliding fit result map
59  */
60  void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, const unsigned int halfWindowLayers,
61  TwoDSlidingFitResultMap &slidingFitResultMap) const;
62 
63  /**
64  * @brief Split clusters
65  *
66  * @param slidingFitResultMap mapping from clusters to sliding fit results
67  * @param clusterSplittingMap mapping from clusters to split positions
68  */
69  pandora::StatusCode SplitClusters(const TwoDSlidingFitResultMap &slidingFitResultMap, const ClusterPositionMap &clusterSplittingMap) const;
70 
71  /**
72  * @brief Split cluster
73  *
74  * @param slidingFitResult input sliding fit result
75  * @param splitPositionList vector of split positions
76  */
77  pandora::StatusCode SplitCluster(const TwoDSlidingFitResult &slidingFitResult, const pandora::CartesianPointVector &splitPositionList) const;
78 
79  unsigned int m_slidingFitHalfWindow; ///<
80  std::string m_inputClusterList; ///<
81 };
82 
83 } // namespace lar_content
84 
85 #endif // #ifndef LAR_TWO_D_SLIDING_FIT_MULTI_SPLIT_ALGORITHM_H
virtual void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const =0
Populate cluster vector with subset of cluster list, containing clusters judged to be clean...
pandora::StatusCode SplitClusters(const TwoDSlidingFitResultMap &slidingFitResultMap, const ClusterPositionMap &clusterSplittingMap) const
Split clusters.
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, const unsigned int halfWindowLayers, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.
std::unordered_map< const pandora::Cluster *, pandora::CartesianPointVector > ClusterPositionMap
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Header file for the lar two dimensional sliding fit result class.
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
virtual void FindBestSplitPositions(const TwoDSlidingFitResultMap &slidingFitResultMap, ClusterPositionMap &clusterSplittingMap) const =0
Determine best split positions based on sliding fit result.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
pandora::StatusCode SplitCluster(const TwoDSlidingFitResult &slidingFitResult, const pandora::CartesianPointVector &splitPositionList) const
Split cluster.