LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
CheatingClusterCreationAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_CHEATING_CLUSTER_CREATION_ALGORITHM_H
9 #define LAR_CHEATING_CLUSTER_CREATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 #include <unordered_map>
16 
17 namespace lar_content
18 {
19 
23 class CheatingClusterCreationAlgorithm : public pandora::Algorithm
24 {
25 public:
30 
31 private:
32  pandora::StatusCode Run();
33  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
34 
35  typedef std::unordered_map<const pandora::MCParticle*, pandora::CaloHitList> MCParticleToHitListMap;
36 
42  void GetMCParticleToHitListMap(MCParticleToHitListMap &mcParticleToHitListMap) const;
43 
51  void SimpleMCParticleCollection(const pandora::CaloHit *const pCaloHit, const LArMCParticleHelper::MCRelationMap &mcPrimaryMap,
52  MCParticleToHitListMap &mcParticleToHitListMap) const;
53 
61  bool SelectMCParticlesForClustering(const pandora::MCParticle *const pMCParticle) const;
62 
68  void CreateClusters(const MCParticleToHitListMap &mcParticleToHitListMap) const;
69 
71  std::string m_mcParticleListName;
72 
74 };
75 
76 } // namespace lar_content
77 
78 #endif // #ifndef LAR_CHEATING_CLUSTER_CREATION_ALGORITHM_H
pandora::IntVector m_particleIdList
list of particle ids of MCPFOs to be selected
void GetMCParticleToHitListMap(MCParticleToHitListMap &mcParticleToHitListMap) const
Create map between each (primary) MC particle and associated calo hits.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCParticleToHitListMap
std::string m_mcParticleListName
The mc particle list name, required if want to collapse mc particle hierarchy.
void SimpleMCParticleCollection(const pandora::CaloHit *const pCaloHit, const LArMCParticleHelper::MCRelationMap &mcPrimaryMap, MCParticleToHitListMap &mcParticleToHitListMap) const
Simple mc particle collection, using main mc particle associated with each calo hit.
std::vector< int > IntVector
bool SelectMCParticlesForClustering(const pandora::MCParticle *const pMCParticle) const
Check whether mc particle is of a type specified for inclusion in cheated clustering.
Header file for the lar monte carlo particle helper helper class.
bool m_collapseToPrimaryMCParticles
Whether to collapse mc particle hierarchies to primary particles.
void CreateClusters(const MCParticleToHitListMap &mcParticleToHitListMap) const
Create clusters based on information in the mc particle to hit list map.
std::unordered_map< const pandora::MCParticle *, const pandora::MCParticle * > MCRelationMap