BoundedClusterMopUpAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTwoDReco/LArClusterMopUp/BoundedClusterMopUpAlgorithm.h
3  *
4  * @brief Header file for the bounded cluster mop up algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_BOUNDED_CLUSTER_MOP_UP_ALGORITHM_H
9 #define LAR_BOUNDED_CLUSTER_MOP_UP_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
16 
17 namespace lar_content
18 {
19 
20 /**
21  * @brief BoundedClusterMopUpAlgorithm class
22  */
23 
25 {
26 public:
27  /**
28  * @brief Default constructor
29  */
31 
32 private:
33  /**
34  * @brief XSampling class
35  */
36  class XSampling
37  {
38  public:
39  /**
40  * @brief Constructor
41  *
42  * @param fitResult the sliding fit result
43  */
44  XSampling(const TwoDSlidingFitResult &fitResult);
45 
46  /**
47  * @brief Convert an x position into a sampling bin
48  *
49  * @param x the input x coordinate
50  */
51  int GetBin(const float x) const;
52 
53  float m_minX; ///< The min x value
54  float m_maxX; ///< The max x value
55  int m_nPoints; ///< The number of sampling points to be used
56  };
57 
58  void ClusterMopUp(const pandora::ClusterList &pfoClusters, const pandora::ClusterList &remnantClusters) const;
59 
60  /**
61  * @brief Get the shower position map containing high and low edge z positions in bins of x
62  *
63  * @param fitResult the sliding shower fit result
64  * @param xSampling the x sampling details
65  * @param showerPositionMap to receive the shower position map
66  */
67  void GetShowerPositionMap(const TwoDSlidingShowerFitResult &fitResult, const XSampling &xSampling, ShowerPositionMap &showerPositionMap) const;
68 
69  /**
70  * @brief Get the fraction of hits in a cluster bounded by a specified shower position map
71  *
72  * @param pCluster address of the cluster
73  * @param xSampling the x sampling details
74  * @param showerPositionMap the shower position map
75  *
76  * @return the fraction of bounded hits
77  */
78  float GetBoundedFraction(const pandora::Cluster *const pCluster, const XSampling &xSampling, const ShowerPositionMap &showerPositionMap) const;
79 
80  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
81 
82  unsigned int m_slidingFitWindow; ///< The layer window for the sliding linear fits
83  float m_showerEdgeMultiplier; ///< Artificially tune width of shower envelope so as to make it more/less inclusive
84  float m_minBoundedFraction; ///< The minimum cluster bounded fraction for merging
85 };
86 
87 } // namespace lar_content
88 
89 #endif // #ifndef LAR_BOUNDED_CLUSTER_MOP_UP_ALGORITHM_H
Header file for the lar two dimensional sliding shower fit result class.
XSampling(const TwoDSlidingFitResult &fitResult)
Constructor.
void ClusterMopUp(const pandora::ClusterList &pfoClusters, const pandora::ClusterList &remnantClusters) const
Cluster mop up for a single view. This function is responsible for instructing pandora to make cluste...
float m_minBoundedFraction
The minimum cluster bounded fraction for merging.
void GetShowerPositionMap(const TwoDSlidingShowerFitResult &fitResult, const XSampling &xSampling, ShowerPositionMap &showerPositionMap) const
Get the shower position map containing high and low edge z positions in bins of x.
std::map< int, ShowerExtent > ShowerPositionMap
int GetBin(const float x) const
Convert an x position into a sampling bin.
float m_showerEdgeMultiplier
Artificially tune width of shower envelope so as to make it more/less inclusive.
float GetBoundedFraction(const pandora::Cluster *const pCluster, const XSampling &xSampling, const ShowerPositionMap &showerPositionMap) const
Get the fraction of hits in a cluster bounded by a specified shower position map. ...
Header file for the cluster mop up algorithm base class.
int m_nPoints
The number of sampling points to be used.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
list x
Definition: train.py:276
unsigned int m_slidingFitWindow
The layer window for the sliding linear fits.