![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "LArHierarchyHelper.h"
Public Member Functions | |
Node (const RecoHierarchy &hierarchy, const pandora::ParticleFlowObject *pPfo, const int tier=1) | |
Create a node with a primary PFO. More... | |
Node (const RecoHierarchy &hierarchy, const pandora::PfoList &pfoList, const pandora::CaloHitList &caloHitList, const int tier=1) | |
Create a node from a list of PFOs. More... | |
virtual | ~Node () |
Destructor. More... | |
void | FillHierarchy (const pandora::ParticleFlowObject *pRoot, const FoldingParameters &foldParameters) |
Recursively fill the hierarchy based on the criteria established for this RecoHierarchy. More... | |
void | FillFlat (const pandora::ParticleFlowObject *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... | |
const pandora::PfoList & | GetRecoParticles () const |
Retrieve the PFOs associated with this node. More... | |
const pandora::ParticleFlowObject * | GetLeadingPfo () const |
Retrieve the leading reco particle for 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 Note, for reco objects the PDG codes represent tracks (muon PDG) and showers (electron PDG) More... | |
int | GetHierarchyTier () const |
Retrieve the hierarchy tier of this node. More... | |
const std::string | ToString (const std::string &prefix) const |
Produce a string representation of the hierarchy. More... | |
Private Attributes | |
const RecoHierarchy & | m_hierarchy |
The parent reco hierarchy. More... | |
pandora::PfoList | m_pfos |
The list of PFOs 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::ParticleFlowObject * | m_mainPfo |
The leading particle flow object for this node. More... | |
int | m_tier |
The hierarchy tier for this node. More... | |
int | m_pdg |
The particle ID (track = muon, shower = electron) More... | |
Node class.
Definition at line 435 of file LArHierarchyHelper.h.
lar_content::LArHierarchyHelper::RecoHierarchy::Node::Node | ( | const RecoHierarchy & | hierarchy, |
const pandora::ParticleFlowObject * | pPfo, | ||
const int | tier = 1 |
||
) |
Create a node with a primary PFO.
hierarchy | The parent hierarchy of this node |
pPfo | The primary PFO with which this node should be created |
tier | The tier that should be assigned to this node |
Definition at line 967 of file LArHierarchyHelper.cc.
References m_caloHits, m_hierarchy, m_mainPfo, m_pdg, m_pfos, m_tier, and lar_content::LArPfoHelper::SortByNHits().
Referenced by FillFlat(), and FillHierarchy().
lar_content::LArHierarchyHelper::RecoHierarchy::Node::Node | ( | const RecoHierarchy & | hierarchy, |
const pandora::PfoList & | pfoList, | ||
const pandora::CaloHitList & | caloHitList, | ||
const int | tier = 1 |
||
) |
Create a node from a list of PFOs.
hierarchy | The parent hierarchy of this node |
pfoList | The PFO 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 1001 of file LArHierarchyHelper.cc.
References m_caloHits, m_children, and m_pfos.
void lar_content::LArHierarchyHelper::RecoHierarchy::Node::FillFlat | ( | const pandora::ParticleFlowObject * | pRoot | ) |
Fill this node by folding all descendent particles to this node.
pRoot | The PFO acting as the root of the current branch of the hierarchy |
Definition at line 1046 of file LArHierarchyHelper.cc.
References lar_content::LArPfoHelper::GetAllCaloHits(), lar_content::LArPfoHelper::GetAllDownstreamPfos(), m_children, m_hierarchy, m_tier, and Node().
void lar_content::LArHierarchyHelper::RecoHierarchy::Node::FillHierarchy | ( | const pandora::ParticleFlowObject * | pRoot, |
const FoldingParameters & | foldParameters | ||
) |
Recursively fill the hierarchy based on the criteria established for this RecoHierarchy.
pRoot | The PFO acting as the root of the current branch of the hierarchy |
foldParameters | The folding parameters |
Definition at line 1012 of file LArHierarchyHelper.cc.
References util::abs(), lar_content::LArPfoHelper::GetAllCaloHits(), lar_content::LArPfoHelper::GetAllDownstreamPfos(), lar_content::LArPfoHelper::GetHierarchyTier(), m_children, lar_content::LArHierarchyHelper::FoldingParameters::m_foldToLeadingShowers, lar_content::LArHierarchyHelper::FoldingParameters::m_foldToTier, m_hierarchy, lar_content::LArHierarchyHelper::FoldingParameters::m_tier, m_tier, and Node().
const CaloHitList & lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits | ( | ) | const |
Retrieve the CaloHits associated with this node.
Definition at line 1066 of file LArHierarchyHelper.cc.
References m_caloHits.
Referenced by lar_content::LArHierarchyHelper::MCMatches::GetSelectedRecoHits(), lar_content::LArHierarchyHelper::MatchInfo::GetSelectedRecoHits(), and lar_content::LArHierarchyHelper::MatchInfo::Match().
|
inline |
Return the vector of children for this node.
Definition at line 1007 of file LArHierarchyHelper.h.
|
inline |
Retrieve the hierarchy tier of this node.
Definition at line 1022 of file LArHierarchyHelper.h.
References lar_content::LArHierarchyHelper::FoldingParameters::m_tier.
|
inline |
Retrieve the leading reco particle for this node.
return The leading reco particle for this node
Definition at line 1014 of file LArHierarchyHelper.h.
int lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetParticleId | ( | ) | const |
Retrieve the PDG code for the leading particle in this node Note, for reco objects the PDG codes represent tracks (muon PDG) and showers (electron PDG)
Definition at line 1073 of file LArHierarchyHelper.cc.
References m_pdg.
const PfoList & lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetRecoParticles | ( | ) | const |
Retrieve the PFOs associated with this node.
Definition at line 1059 of file LArHierarchyHelper.cc.
References m_pfos.
const std::string lar_content::LArHierarchyHelper::RecoHierarchy::Node::ToString | ( | const std::string & | prefix | ) | const |
Produce a string representation of the hierarchy.
Definition at line 1080 of file LArHierarchyHelper.cc.
References m_caloHits, m_children, m_pdg, m_tier, and util::to_string().
|
private |
The list of calo hits of which this node is composed.
Definition at line 530 of file LArHierarchyHelper.h.
Referenced by GetCaloHits(), Node(), ToString(), and ~Node().
|
private |
The child nodes of this node.
Definition at line 531 of file LArHierarchyHelper.h.
Referenced by FillFlat(), FillHierarchy(), ToString(), and ~Node().
|
private |
The parent reco hierarchy.
Definition at line 528 of file LArHierarchyHelper.h.
Referenced by FillFlat(), FillHierarchy(), and Node().
|
private |
The leading particle flow object for this node.
Definition at line 532 of file LArHierarchyHelper.h.
Referenced by Node().
|
private |
The particle ID (track = muon, shower = electron)
Definition at line 534 of file LArHierarchyHelper.h.
Referenced by GetParticleId(), Node(), and ToString().
|
private |
The list of PFOs of which this node is composed.
Definition at line 529 of file LArHierarchyHelper.h.
Referenced by GetRecoParticles(), Node(), and ~Node().
|
private |
The hierarchy tier for this node.
Definition at line 533 of file LArHierarchyHelper.h.
Referenced by FillFlat(), FillHierarchy(), Node(), and ToString().