LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TwoDSlidingFitSplittingAndSwitchingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_TWO_D_SLIDING_FIT_SPLITTING_AND_SWITCHING_ALGORITHM_H
9 #define LAR_TWO_D_SLIDING_FIT_SPLITTING_AND_SWITCHING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 namespace lar_content
16 {
17 
21 class TwoDSlidingFitSplittingAndSwitchingAlgorithm : public pandora::Algorithm
22 {
23 public:
28 
29 protected:
30  virtual pandora::StatusCode Run();
31  virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
32 
38  virtual pandora::StatusCode PreparationStep(const pandora::ClusterVector &clusterVector);
39 
43  virtual pandora::StatusCode TidyUpStep();
44 
54  virtual pandora::StatusCode FindBestSplitPosition(const TwoDSlidingFitResult &slidingFit1, const TwoDSlidingFitResult &slidingFit2,
55  pandora::CartesianVector &splitPosition, pandora::CartesianVector &direction1, pandora::CartesianVector &direction2) const = 0;
56 
57 private:
64  void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
65 
72  void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const;
73 
83  void SplitCluster(const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition,
84  const pandora::CartesianVector &splitDirection, pandora::CaloHitList &firstCaloHitList,
85  pandora::CaloHitList &secondCaloHitList) const;
86 
96  pandora::StatusCode ReplaceClusters(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2,
97  const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &firstDirection,
98  const pandora::CartesianVector &secondDirection) const;
99 
100  unsigned int m_halfWindowLayers;
102 };
103 
104 } // namespace lar_content
105 
106 #endif // #ifndef LAR_TWO_D_SLIDING_FIT_SPLITTING_AND_SWITCHING_ALGORITHM_H
unsigned int m_halfWindowLayers
half window layers for sliding linear fot
std::unordered_map< const pandora::Cluster *, TwoDSlidingFitResult > TwoDSlidingFitResultMap
virtual pandora::StatusCode FindBestSplitPosition(const TwoDSlidingFitResult &slidingFit1, const TwoDSlidingFitResult &slidingFit2, pandora::CartesianVector &splitPosition, pandora::CartesianVector &direction1, pandora::CartesianVector &direction2) const =0
Find the best split position and direction for a pair of clusters.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
virtual pandora::StatusCode TidyUpStep()
Tidy up any information cached in e.g. the preparation step.
pandora::StatusCode ReplaceClusters(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &firstDirection, const pandora::CartesianVector &secondDirection) const
Replace crossed clusters with un-crossed clusters.
Header file for the lar two dimensional sliding fit result class.
void SplitCluster(const pandora::Cluster *const pCluster, const pandora::CartesianVector &splitPosition, const pandora::CartesianVector &splitDirection, pandora::CaloHitList &firstCaloHitList, pandora::CaloHitList &secondCaloHitList) const
Split cluster at a given position and direction.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
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...
virtual pandora::StatusCode PreparationStep(const pandora::ClusterVector &clusterVector)
Perform any preparatory actions, such as caching information for subsequent expensive calculations...
void BuildSlidingFitResultMap(const pandora::ClusterVector &clusterVector, TwoDSlidingFitResultMap &slidingFitResultMap) const
Build the map of sliding fit results.