![]() |
LArSoft
v10_06_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "LArHierarchyHelper.h"
Public Member Functions | |
| Node (MCHierarchy &hierarchy, const pandora::MCParticle *pMCParticle, const int tier=1) | |
| Create a node with a primary MC particle. More... | |
| Node (MCHierarchy &hierarchy, const pandora::MCParticleList &mcParticleList, const pandora::CaloHitList &caloHitList, const int tier=1) | |
| Create a node from a list of MC particles. More... | |
| virtual | ~Node () |
| Destructor. More... | |
| bool | IsReconstructable () const |
| Return whether or not this node should be considered reconstructable. More... | |
| void | FillHierarchy (const pandora::MCParticle *pRoot, const FoldingParameters &foldParameters) |
| Recursively fill the hierarchy based on the criteria established for this MCHierarchy. More... | |
| void | FillFlat (const pandora::MCParticle *pRoot) |
| Fill this node by folding all descendent particles to this node. More... | |
| const NodeVector & | GetChildren () const |
| Return the vector of children for this node. More... | |
| int | GetId () const |
| Retrieve the unique ID of this node. More... | |
| const pandora::MCParticle * | GetLeadingMCParticle () const |
| Retrieve the leading MC particle associated with this node. More... | |
| const pandora::MCParticleList & | GetMCParticles () const |
| Retrieve the MC particles associated with this node. More... | |
| const pandora::CaloHitList & | GetCaloHits () const |
| Retrieve the CaloHits associated with this node. More... | |
| int | GetParticleId () const |
| Retrieve the PDG code for the leading particle in this node. More... | |
| int | GetHierarchyTier () const |
| Retrieve the hierarchy tier of this node. More... | |
| bool | IsNeutrinoInduced () const |
| Check if this is a particle induced by a neutrino interaction. More... | |
| bool | IsTestBeamParticle () const |
| Check if this is a test beam particle. More... | |
| bool | IsCosmicRay () const |
| Check if this is a cosmic ray particle. More... | |
| bool | IsLeadingLepton () const |
| Returns whether or not this particle is the leading lepton in the event. More... | |
| const std::string | ToString (const std::string &prefix) const |
| Produce a string representation of the hierarchy. More... | |
Private Member Functions | |
| void | SetLeadingLepton () |
| Tags the particle as the leading lepton. More... | |
Private Attributes | |
| MCHierarchy & | m_hierarchy |
| The parent MC hierarchy. More... | |
| pandora::MCParticleList | m_mcParticles |
| The list of MC particles of which this node is composed. More... | |
| pandora::CaloHitList | m_caloHits |
| The list of calo hits of which this node is composed. More... | |
| NodeVector | m_children |
| The child nodes of this node. More... | |
| const pandora::MCParticle * | m_mainParticle |
| The leading MC particle for this node. More... | |
| int | m_tier |
| The hierarchy tier for this node. More... | |
| int | m_pdg |
| The PDG code of the leading MC particle for this node. More... | |
| bool | m_isLeadingLepton |
| Whether or not this node is the leading lepton. More... | |
Friends | |
| class | MCHierarchy |
Node class.
Definition at line 134 of file LArHierarchyHelper.h.
| lar_content::LArHierarchyHelper::MCHierarchy::Node::Node | ( | MCHierarchy & | hierarchy, |
| const pandora::MCParticle * | pMCParticle, | ||
| const int | tier = 1 |
||
| ) |
Create a node with a primary MC particle.
| hierarchy | The parent hierarchy of this node |
| pMCParticle | The primary MC particle with which this node should be created |
| tier | The tier that should be assigned to this node |
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::IsReconstructable().
| lar_content::LArHierarchyHelper::MCHierarchy::Node::Node | ( | MCHierarchy & | hierarchy, |
| const pandora::MCParticleList & | mcParticleList, | ||
| const pandora::CaloHitList & | caloHitList, | ||
| const int | tier = 1 |
||
| ) |
Create a node from a list of MC particles.
| hierarchy | The parent hierarchy of this node |
| mcParticleList | The MC particle list with which this node should be created |
| caloHitList | The CaloHit list with which this node should be created |
| tier | The tier that should be assigned to this node |
|
virtual |
Destructor.
Definition at line 586 of file LArHierarchyHelper.cc.
| void lar_content::LArHierarchyHelper::MCHierarchy::Node::FillFlat | ( | const pandora::MCParticle * | pRoot | ) |
Fill this node by folding all descendent particles to this node.
| pRoot | The MC particle acting as the root of the current branch of the hierarchy |
Definition at line 668 of file LArHierarchyHelper.cc.
References lar_content::LArMCParticleHelper::GetAllDescendentMCParticles(), and lcvn::neutrons.
| void lar_content::LArHierarchyHelper::MCHierarchy::Node::FillHierarchy | ( | const pandora::MCParticle * | pRoot, |
| const FoldingParameters & | foldParameters | ||
| ) |
Recursively fill the hierarchy based on the criteria established for this MCHierarchy.
| pRoot | The MC particle acting as the root of the current branch of the hierarchy |
| foldParameters | The folding parameters |
Definition at line 597 of file LArHierarchyHelper.cc.
References util::abs(), FillHierarchy(), lar_content::LArMCParticleHelper::GetAllDescendentMCParticles(), lar_content::LArMCParticleHelper::GetHierarchyTier(), lar_content::LArHierarchyHelper::FoldingParameters::m_cosAngleTolerance, lar_content::LArHierarchyHelper::FoldingParameters::m_foldDynamic, lar_content::LArHierarchyHelper::FoldingParameters::m_foldToLeadingShowers, lar_content::LArHierarchyHelper::FoldingParameters::m_foldToTier, and lar_content::LArHierarchyHelper::FoldingParameters::m_tier.
Referenced by FillHierarchy().
|
inline |
Retrieve the CaloHits associated with this node.
Definition at line 957 of file LArHierarchyHelper.h.
Referenced by lar_content::LArHierarchyHelper::MCMatches::GetCompleteness(), lar_content::LArHierarchyHelper::MCMatches::GetPurity(), and lar_content::LArHierarchyHelper::MatchInfo::Match().
|
inline |
Return the vector of children for this node.
Definition at line 943 of file LArHierarchyHelper.h.
|
inline |
Retrieve the hierarchy tier of this node.
Definition at line 978 of file LArHierarchyHelper.h.
References lar_content::LArHierarchyHelper::FoldingParameters::m_tier.
| int lar_content::LArHierarchyHelper::MCHierarchy::Node::GetId | ( | ) | const |
Retrieve the unique ID of this node.
Definition at line 699 of file LArHierarchyHelper.cc.
|
inline |
Retrieve the leading MC particle associated with this node.
Definition at line 964 of file LArHierarchyHelper.h.
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy(), lar_content::LArHierarchyHelper::MatchInfo::Print(), and lar_content::HierarchyValidationAlgorithm::Run().
|
inline |
Retrieve the MC particles associated with this node.
Definition at line 950 of file LArHierarchyHelper.h.
|
inline |
Retrieve the PDG code for the leading particle in this node.
Definition at line 971 of file LArHierarchyHelper.h.
Referenced by lar_content::LArHierarchyHelper::MatchInfo::Print().
| bool lar_content::LArHierarchyHelper::MCHierarchy::Node::IsCosmicRay | ( | ) | const |
Check if this is a cosmic ray particle.
Definition at line 758 of file LArHierarchyHelper.cc.
References lar_content::LArMCParticleHelper::IsCosmicRay().
Referenced by IsNeutrinoInduced().
|
inline |
Returns whether or not this particle is the leading lepton in the event.
Definition at line 992 of file LArHierarchyHelper.h.
|
inline |
Check if this is a particle induced by a neutrino interaction.
Definition at line 985 of file LArHierarchyHelper.h.
References IsCosmicRay(), and IsTestBeamParticle().
| bool lar_content::LArHierarchyHelper::MCHierarchy::Node::IsReconstructable | ( | ) | const |
Return whether or not this node should be considered reconstructable.
Definition at line 706 of file LArHierarchyHelper.cc.
| bool lar_content::LArHierarchyHelper::MCHierarchy::Node::IsTestBeamParticle | ( | ) | const |
Check if this is a test beam particle.
Definition at line 748 of file LArHierarchyHelper.cc.
References lar_content::LArMCParticleHelper::IsBeamParticle().
Referenced by IsNeutrinoInduced().
|
inlineprivate |
Tags the particle as the leading lepton.
Definition at line 999 of file LArHierarchyHelper.h.
Referenced by lar_content::LArHierarchyHelper::MCHierarchy::FillHierarchy().
| const std::string lar_content::LArHierarchyHelper::MCHierarchy::Node::ToString | ( | const std::string & | prefix | ) | const |
Produce a string representation of the hierarchy.
Definition at line 768 of file LArHierarchyHelper.cc.
References util::to_string().
|
friend |
Definition at line 282 of file LArHierarchyHelper.h.
|
private |
The list of calo hits of which this node is composed.
Definition at line 275 of file LArHierarchyHelper.h.
|
private |
The child nodes of this node.
Definition at line 276 of file LArHierarchyHelper.h.
|
private |
The parent MC hierarchy.
Definition at line 273 of file LArHierarchyHelper.h.
|
private |
Whether or not this node is the leading lepton.
Definition at line 280 of file LArHierarchyHelper.h.
|
private |
The leading MC particle for this node.
Definition at line 277 of file LArHierarchyHelper.h.
|
private |
The list of MC particles of which this node is composed.
Definition at line 274 of file LArHierarchyHelper.h.
|
private |
The PDG code of the leading MC particle for this node.
Definition at line 279 of file LArHierarchyHelper.h.
|
private |
The hierarchy tier for this node.
Definition at line 278 of file LArHierarchyHelper.h.