MCHierarchy class. More...
#include <LArHierarchyHelper.h>
Classes | |
class | Node |
Node class. More... | |
class | ReconstructabilityCriteria |
ReconstructabilityCriteria class. More... | |
Public Types | |
typedef std::vector< const Node * > | NodeVector |
typedef std::list< const Node * > | NodeList |
Public Member Functions | |
MCHierarchy () | |
Default constructor. More... | |
MCHierarchy (const ReconstructabilityCriteria &recoCriteria) | |
Construct a new MCHierarchy object using specified reconstructability criteria. More... | |
virtual | ~MCHierarchy () |
Destructor. More... | |
void | FillHierarchy (const pandora::MCParticleList &mcParticleList, const pandora::CaloHitList &caloHitList, const FoldingParameters &foldParameters) |
Creates an MC hierarchy representation. Without folding this will be a mirror image of the standard MCParticle relationships. However, with folding options selected the hierarchy structure will group together MC particles into nodes based on the folding requirements. More... | |
void | InterpretHierarchy (const pandora::MCParticle *const pRoot, pandora::MCParticleList &leadingParticles, pandora::MCParticleList &childParticles, const float cosAngleTolerance) const |
Interpret the hierarchy below a particular particle to determine if and how it should be folded. Folded particles are added to the leadingParticles list and child particles are added to the childParticles list. More... | |
const pandora::MCParticle * | GetNeutrino () const |
Retrieve the neutrino at the root of the hierarchy if it exists. More... | |
const NodeVector & | GetRootNodes () const |
Retrieve the root nodes in this hierarchy. More... | |
void | GetFlattenedNodes (NodeVector &nodeVector) const |
Retrieve a flat vector of the ndoes in the hierarchy. More... | |
void | RegisterNode (const Node *pNode) |
Register a node with the hierarchy. More... | |
const std::string | ToString () const |
Produce a string representation of the hierarchy. More... | |
bool | IsNeutrinoHierarchy () const |
Check if this is a neutrino hierarchy. More... | |
bool | IsTestBeamHierarchy () const |
Check if this is a test beam hierarchy. More... | |
Private Member Functions | |
void | CollectContinuations (const pandora::MCParticle *pRoot, pandora::MCParticleList &continuingParticles, pandora::MCParticleList &childParticles, const float cosAngleTolerance) const |
Identify downstream particles that represent continuations of the parent particle from a reconstruction perspective. More... | |
bool | IsReconstructable (const pandora::MCParticle *pMCParticle) const |
Checks if an individual particle meets reconstructability criteria. More... | |
bool | IsReconstructable (const pandora::CaloHitList &caloHits) const |
Checks if a set of hits meet reconstructability criteria. More... | |
Private Attributes | |
NodeVector | m_rootNodes |
The leading nodes (e.g. primary particles, cosmic rays, ...) More... | |
ReconstructabilityCriteria | m_recoCriteria |
The criteria used to determine if the node is reconstructable. More... | |
const pandora::MCParticle * | m_pNeutrino |
The incident neutrino, if it exists. More... | |
std::map< const pandora::MCParticle *, pandora::CaloHitList > | m_mcToHitsMap |
The map between MC particles and calo hits. More... | |
std::map< const Node *, int > | m_nodeToIdMap |
A map from nodes to unique ids. More... | |
int | m_nextNodeId |
The ID to use for the next node. More... | |
MCHierarchy class.
Definition at line 88 of file LArHierarchyHelper.h.
typedef std::list<const Node *> lar_content::LArHierarchyHelper::MCHierarchy::NodeList |
Definition at line 126 of file LArHierarchyHelper.h.
typedef std::vector<const Node *> lar_content::LArHierarchyHelper::MCHierarchy::NodeVector |
Definition at line 124 of file LArHierarchyHelper.h.
lar_content::LArHierarchyHelper::MCHierarchy::MCHierarchy | ( | ) |
Default constructor.
Definition at line 75 of file LArHierarchyHelper.cc.
lar_content::LArHierarchyHelper::MCHierarchy::MCHierarchy | ( | const ReconstructabilityCriteria & | recoCriteria | ) |
Construct a new MCHierarchy object using specified reconstructability criteria.
recoCriteria | The reconstructability criteria to be applied |
Definition at line 81 of file LArHierarchyHelper.cc.
|
virtual |
Destructor.
Definition at line 90 of file LArHierarchyHelper.cc.
|
private |
Identify downstream particles that represent continuations of the parent particle from a reconstruction perspective.
pRoot | The root MC particle |
continuingParticles | An output list of the particles identified as continuations |
childParticles | An output list of the particles identified as child particles given any continuations |
cosAngleTolerance | The cosine of the maximum angle for which trajectories are considered continuous |
Definition at line 339 of file LArHierarchyHelper.cc.
void lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy | ( | const pandora::MCParticleList & | mcParticleList, |
const pandora::CaloHitList & | caloHitList, | ||
const FoldingParameters & | foldParameters | ||
) |
Creates an MC hierarchy representation. Without folding this will be a mirror image of the standard MCParticle relationships. However, with folding options selected the hierarchy structure will group together MC particles into nodes based on the folding requirements.
If only folding back to primaries, the hierarchy will be relatively flat, with a top-level neutrino or test beam particle, if appropriate, and then a set of leaf nodes, one for each primary particles also containing the MC particles (and corresponding hits) from daughter particles. If only folding back to leading shower particles, the hierarchy will largely mirror the standard MCParticle hierarchy, but, when a shower particle is reached (for this purpose an electron or photon), this particle and all daughter particles will be represented by a single leaf node. If folding back to both primary and leading shower particles the hierarchy will again be rather flat, but in this case, if a primary track-like particle (i.e. not an electron or photon) has a downstream shower particle then all downstream particles above the shower-like particle will be folded into the primary node, but a new, daughter leaf node will be created for the shower-like particle and all of its daughters, and a parent-child relationship will be formed between the primary node and shower node.
mcParticleList | The list of MC particles with which to fill the hierarchy |
caloHitList | The list of hits with which to fill the hierarchy |
foldParameters | The folding parameters to use for the hierarchy |
Definition at line 99 of file LArHierarchyHelper.cc.
void lar_content::LArHierarchyHelper::MCHierarchy::GetFlattenedNodes | ( | NodeVector & | nodeVector | ) | const |
Retrieve a flat vector of the ndoes in the hierarchy.
nodeVector | The output vector for the nodes in the hierarchy in breadth first order |
Definition at line 404 of file LArHierarchyHelper.cc.
|
inline |
Retrieve the neutrino at the root of the hierarchy if it exists.
Definition at line 948 of file LArHierarchyHelper.h.
|
inline |
Retrieve the root nodes in this hierarchy.
Definition at line 955 of file LArHierarchyHelper.h.
void lar_content::LArHierarchyHelper::MCHierarchy::InterpretHierarchy | ( | const pandora::MCParticle *const | pRoot, |
pandora::MCParticleList & | leadingParticles, | ||
pandora::MCParticleList & | childParticles, | ||
const float | cosAngleTolerance | ||
) | const |
Interpret the hierarchy below a particular particle to determine if and how it should be folded. Folded particles are added to the leadingParticles list and child particles are added to the childParticles list.
pRoot | The root of the hierarchy to interpret |
leadingParticles | The output list of particles that should be folded into the root particle |
childParticles | The output list of particles that should be considered children of the folded particle |
cosAngleTolerance | The cosine of the maximum angle for which trajectories are considered continuous |
Definition at line 249 of file LArHierarchyHelper.cc.
|
inline |
Check if this is a neutrino hierarchy.
Definition at line 962 of file LArHierarchyHelper.h.
|
private |
Checks if an individual particle meets reconstructability criteria.
pMCParticle | The MC particle to assess |
Definition at line 445 of file LArHierarchyHelper.cc.
|
private |
Checks if a set of hits meet reconstructability criteria.
caloHits | The calo hits to assess |
|
inline |
Check if this is a test beam hierarchy.
Definition at line 969 of file LArHierarchyHelper.h.
void lar_content::LArHierarchyHelper::MCHierarchy::RegisterNode | ( | const Node * | pNode | ) |
Register a node with the hierarchy.
pNode | The node to register |
Definition at line 426 of file LArHierarchyHelper.cc.
const std::string lar_content::LArHierarchyHelper::MCHierarchy::ToString | ( | ) | const |
Produce a string representation of the hierarchy.
Definition at line 434 of file LArHierarchyHelper.cc.
|
private |
The map between MC particles and calo hits.
Definition at line 418 of file LArHierarchyHelper.h.
|
private |
The ID to use for the next node.
Definition at line 420 of file LArHierarchyHelper.h.
|
private |
A map from nodes to unique ids.
Definition at line 419 of file LArHierarchyHelper.h.
|
private |
The incident neutrino, if it exists.
Definition at line 417 of file LArHierarchyHelper.h.
|
private |
The criteria used to determine if the node is reconstructable.
Definition at line 416 of file LArHierarchyHelper.h.
|
private |
The leading nodes (e.g. primary particles, cosmic rays, ...)
Definition at line 415 of file LArHierarchyHelper.h.