SimpleClusterCreationAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTwoDReco/LArClusterCreation/SimpleClusterCreationAlgorithm.h
3  *
4  * @brief Header file for the cluster creation algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_SIMPLE_CLUSTER_CREATION_ALGORITHM_H
9 #define LAR_SIMPLE_CLUSTER_CREATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
13 #include <unordered_map>
14 
15 namespace lar_content
16 {
17 
18 /**
19  * @brief SimpleClusterCreationAlgorithm class
20  */
21 class SimpleClusterCreationAlgorithm : public pandora::Algorithm
22 {
23 public:
24  /**
25  * @brief Default constructor
26  */
28 
29 private:
30  pandora::StatusCode Run();
31 
32  typedef std::unordered_map<const pandora::CaloHit *, pandora::CaloHitList> HitAssociationMap;
33 
34  /**
35  * @brief Select calo hits for clustering
36  *
37  * @param pInputList The input list of calo hits
38  * @param outputList The output list of selected calo hits
39  */
40  void SelectCaloHits(const pandora::CaloHitList *const pInputList, pandora::CaloHitList &outputList) const;
41 
42  /**
43  * @brief Create map of associations between calo hits
44  *
45  * @param caloHitList The input list of calo hits
46  * @param hitAssociationMap The map of associations between calo hits
47  */
48  void BuildAssociationMap(const pandora::CaloHitList &caloHitList, HitAssociationMap &hitAssociationMap) const;
49 
50  /**
51  * @brief Create clusters from selected calo hits and their associations
52  *
53  * @param caloHitList The input list of calo hits
54  * @param hitAssociationMap The map of associations between calo hits
55  */
56  void CreateClusters(const pandora::CaloHitList &caloHitList, const HitAssociationMap &hitAssociationMap) const;
57 
58  /**
59  * @brief For a given seed calo hits, collect up all the associated calo hits
60  *
61  * @param pSeedCaloHit the seed calo hits
62  * @param pCurrentCaloHit a possible associated calo hit
63  * @param hitAssociationMap the map of associations between hits
64  * @param vetoList the list of used calo hits
65  * @param mergeList the list of hits associated with the seed hit
66  */
67  void CollectAssociatedHits(const pandora::CaloHit *const pSeedCaloHit, const pandora::CaloHit *const pCurrentCaloHit,
68  const HitAssociationMap &hitAssociationMap, const pandora::CaloHitSet &vetoList, pandora::CaloHitList &mergeList) const;
69 
70  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
71 
72  float m_clusteringWindowSquared; ///< Maximum distance (squared) for two hits to be joined
73 };
74 
75 } // namespace lar_content
76 
77 #endif // #ifndef LAR_SIMPLE_CLUSTER_CREATION_ALGORITHM_H
void BuildAssociationMap(const pandora::CaloHitList &caloHitList, HitAssociationMap &hitAssociationMap) const
Create map of associations between calo hits.
void SelectCaloHits(const pandora::CaloHitList *const pInputList, pandora::CaloHitList &outputList) const
Select calo hits for clustering.
void CreateClusters(const pandora::CaloHitList &caloHitList, const HitAssociationMap &hitAssociationMap) const
Create clusters from selected calo hits and their associations.
std::unordered_map< const pandora::CaloHit *, pandora::CaloHitList > HitAssociationMap
float m_clusteringWindowSquared
Maximum distance (squared) for two hits to be joined.
void CollectAssociatedHits(const pandora::CaloHit *const pSeedCaloHit, const pandora::CaloHit *const pCurrentCaloHit, const HitAssociationMap &hitAssociationMap, const pandora::CaloHitSet &vetoList, pandora::CaloHitList &mergeList) const
For a given seed calo hits, collect up all the associated calo hits.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)