IsolatedClusterMopUpAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTwoDReco/LArClusterMopUp/IsolatedClusterMopUpAlgorithm.h
3  *
4  * @brief Header file for the isolated cluster mop up algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_ISOLATED_CLUSTER_MOP_UP_ALGORITHM_H
9 #define LAR_ISOLATED_CLUSTER_MOP_UP_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 #include <unordered_map>
16 
17 namespace lar_content
18 {
19 
20 template <typename, unsigned int>
21 class KDTreeLinkerAlgo;
22 template <typename, unsigned int>
23 class KDTreeNodeInfoT;
24 
25 //------------------------------------------------------------------------------------------------------------------------------------------
26 
27 /**
28  * @brief IsolatedClusterMopUpAlgorithm class
29  */
31 {
32 public:
33  /**
34  * @brief Default constructor
35  */
37 
38 private:
39  void ClusterMopUp(const pandora::ClusterList &pfoClusters, const pandora::ClusterList &remnantClusters) const;
40 
41  /**
42  * @brief Examine a list of clusters, identify and delete remnants; receive the list of newly available hits
43  *
44  * @param clusterList the list of clusters to consider
45  * @param caloHitList to receive the list of newly available hits
46  */
47  void DissolveClustersToHits(const pandora::ClusterList &clusterList, pandora::CaloHitList &caloHitList) const;
48 
49  typedef std::unordered_map<const pandora::CaloHit *, const pandora::Cluster *> CaloHitToClusterMap;
50 
51  /**
52  * @brief Look for isolated hit additions, considering a list of candidate hits and a list of host clusters
53  *
54  * @param caloHitList the list of hits to consider
55  * @param clusterList the list of clusters to consider
56  * @param caloHitToClusterMap to receive the calo hit to cluster map
57  */
59  const pandora::CaloHitList &caloHitList, const pandora::ClusterList &clusterList, CaloHitToClusterMap &caloHitToClusterMap) const;
60 
61  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
62 
65  typedef std::vector<HitKDNode2D> HitKDNode2DList;
66 
67  unsigned int m_maxCaloHitsInCluster; ///< The maximum number of hits in a cluster to be dissolved
68  float m_maxHitClusterDistance; ///< The maximum hit to cluster distance for isolated hit merging
69  bool m_addHitsAsIsolated; ///< Whether to add hits to clusters as "isolated" (don't contribute to spatial properties)
70 };
71 
72 } // namespace lar_content
73 
74 #endif // #ifndef LAR_ISOLATED_CLUSTER_MOP_UP_ALGORITHM_H
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
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...
std::unordered_map< const pandora::CaloHit *, const pandora::Cluster * > CaloHitToClusterMap
unsigned int m_maxCaloHitsInCluster
The maximum number of hits in a cluster to be dissolved.
void DissolveClustersToHits(const pandora::ClusterList &clusterList, pandora::CaloHitList &caloHitList) const
Examine a list of clusters, identify and delete remnants; receive the list of newly available hits...
KDTreeLinkerAlgo< const pandora::CaloHit *, 2 > HitKDTree2D
Data stored in each KDTree node. The dim1/dim2 fields are usually the duplication of some PFRecHit va...
bool m_addHitsAsIsolated
Whether to add hits to clusters as "isolated" (don&#39;t contribute to spatial properties) ...
KDTreeNodeInfoT< const pandora::CaloHit *, 2 > HitKDNode2D
Header file for the cluster mop up algorithm base class.
float m_maxHitClusterDistance
The maximum hit to cluster distance for isolated hit merging.
void GetCaloHitToClusterMap(const pandora::CaloHitList &caloHitList, const pandora::ClusterList &clusterList, CaloHitToClusterMap &caloHitToClusterMap) const
Look for isolated hit additions, considering a list of candidate hits and a list of host clusters...