LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
LArEventTopology.h
Go to the documentation of this file.
1 
8 #ifndef LAR_EVENT_TOPOLOGY_H
9 #define LAR_EVENT_TOPOLOGY_H 1
10 
11 #include "Objects/MCParticle.h"
12 
13 #include <map>
14 
15 namespace lar_content
16 {
17 
22 {
23 private:
24  typedef std::map<const pandora::MCParticle *, pandora::CaloHitList> MCHitMap;
25 
26  class Particle
27  {
28  public:
32  Particle(const pandora::MCParticle *const pRoot);
33 
40  Particle(const pandora::MCParticle *const pRoot, const pandora::CaloHitList &caloHitList);
41 
45  virtual ~Particle();
46 
52  void AddChild(Particle *pChild);
53 
57  void GetVertices(pandora::CartesianPointVector &vertices) const;
58 
65  void Parse(const MCHitMap &mcHitMap);
66 
70  void Prune();
71 
80  const std::string Print(const MCHitMap &mcHitMap, const std::string &indent) const;
81 
82  private:
83  pandora::MCParticleList m_particles;
84  pandora::CaloHitList m_caloHits;
85  std::list<Particle *> m_children;
86  bool m_fold;
87  };
88 
89 public:
95  LArEventTopology(const pandora::CaloHitList &caloHitList2D);
96 
100  virtual ~LArEventTopology();
101 
106 
110  void GetVertices(pandora::CartesianPointVector &vertices) const;
111 
115  void PruneHierarchy();
116 
120  void Print() const;
121 
122 private:
129  void ConstructVisibleHierarchy(Particle *pParticle, const pandora::MCParticle *const pRootMC);
130 
131  MCHitMap m_mcHitMap;
132  const pandora::MCParticle *m_pRoot;
134 };
135 
136 } // namespace lar_content
137 
138 #endif // #ifndef LAR_EVENT_TOPOLOGY_H
void Parse(const MCHitMap &mcHitMap)
Assess this child particle and its descendents to see if it is topologically significant either indep...
void AddChild(Particle *pChild)
Add a child particle to this particle.
LArEventTopology class.
void ConstructVisibleHierarchy()
Construct a particle hierarchy based on the key topological features in an event. ...
const pandora::MCParticle * m_pRoot
virtual ~LArEventTopology()
Destructor.
std::string indent(std::size_t const i)
LArEventTopology(const pandora::CaloHitList &caloHitList2D)
Constructor.
Particle(const pandora::MCParticle *const pRoot)
Default constructor.
void Prune()
Prune particles from the hierarchy if they are not deemed topologically significant.
const std::string Print(const MCHitMap &mcHitMap, const std::string &indent) const
Print the visible hierarchy.
std::map< const pandora::MCParticle *, pandora::CaloHitList > MCHitMap
void PruneHierarchy()
Fold or remove particles that aren&#39;t substantive parts of the hierarchy.
void GetVertices(pandora::CartesianPointVector &vertices) const
Extract the clear topological vertices from the event.