LArSoft  v09_93_00
Liquid Argon Software toolkit - https://larsoft.org/
BoundedRegionClusterMergingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_BOUNDED_REGION_CLUSTER_MERGING_ALGORITHM_H
9 #define LAR_BOUNDED_REGION_CLUSTER_MERGING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
13 
14 #include <unordered_map>
15 
16 namespace lar_content
17 {
18 
23 {
24 public:
26 
27 protected:
28  virtual pandora::StatusCode Run();
29  virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
30 
31  typedef std::unordered_map<const pandora::Cluster *, pandora::ClusterList> ClusterMergeMap;
32 
39  void GetListOfBoundedRegionClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
40 
49  bool AreClustersAssociated(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const;
50 
57  void GetListOfCleanClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const;
58 
65  void PopulateClusterMergeMap(const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const;
66 
67 private:
68  float m_xRegionMin;
69  float m_xRegionMax;
70  float m_zRegionMin;
71  float m_zRegionMax;
72  float m_maxDistance;
73  unsigned int m_minClusterHits;
74 };
75 
76 } // namespace lar_content
77 
78 #endif // #ifndef LAR_BOUNDED_REGION_CLUSTER_MERGING_ALGORITHM_H
std::unordered_map< const pandora::Cluster *, pandora::ClusterList > ClusterMergeMap
void GetListOfBoundedRegionClusters(const pandora::ClusterList *const pClusterList, pandora::ClusterVector &clusterVector) const
Populate cluster vector with all clusters starting in the defined region.
void PopulateClusterMergeMap(const pandora::ClusterVector &clusterVector, ClusterMergeMap &clusterMergeMap) const
Form associations between pointing clusters.
virtual pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
float m_maxDistance
Maximum distance below which clusters can be associated.
float m_xRegionMin
Minimum x value of the bounded region box.
float m_zRegionMax
Maximum z value (wire dimension) of the bounded region box.
float m_xRegionMax
Maximum x value of the bounded region box.
unsigned int m_minClusterHits
Threshold on the size of clusters to be considered for merging.
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...
float m_zRegionMin
Minimum z value (wire dimension) of the bounded region box.
bool AreClustersAssociated(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2) const
Compare two clusters and decide if they should be associated with each other.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
ClusterMergingAlgorithm class.
Header file for the cluster merging algorithm class.