LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "LArHierarchyHelper.h"
Public Member Functions | |
Node (const RecoHierarchy &hierarchy, const pandora::ParticleFlowObject *pPfo) | |
Create a node with a primary PFO. More... | |
Node (const RecoHierarchy &hierarchy, const pandora::PfoList &pfoList, const pandora::CaloHitList &caloHitList) | |
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... | |
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 nodea. More... | |
const pandora::ParticleFlowObject * | m_mainPfo |
The leading particle flow object for this node. More... | |
int | m_pdg |
The particle ID (track = muon, shower = electron) More... | |
Node class.
Definition at line 433 of file LArHierarchyHelper.h.
lar_content::LArHierarchyHelper::RecoHierarchy::Node::Node | ( | const RecoHierarchy & | hierarchy, |
const pandora::ParticleFlowObject * | pPfo | ||
) |
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 |
Definition at line 965 of file LArHierarchyHelper.cc.
References m_caloHits, m_hierarchy, m_mainPfo, m_pdg, m_pfos, 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 | ||
) |
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 |
|
virtual |
Destructor.
Definition at line 997 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 1042 of file LArHierarchyHelper.cc.
References lar_content::LArPfoHelper::GetAllCaloHits(), lar_content::LArPfoHelper::GetAllDownstreamPfos(), m_children, m_hierarchy, 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 1008 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, and Node().
const CaloHitList & lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits | ( | ) | const |
Retrieve the CaloHits associated with this node.
Definition at line 1062 of file LArHierarchyHelper.cc.
References m_caloHits.
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 972 of file LArHierarchyHelper.h.
|
inline |
Retrieve the leading reco particle for this node.
return The leading reco particle for this node
Definition at line 979 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 1069 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 1055 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 1076 of file LArHierarchyHelper.cc.
References m_caloHits, m_children, m_pdg, and util::to_string().
|
private |
The list of calo hits of which this node is composed.
Definition at line 519 of file LArHierarchyHelper.h.
Referenced by GetCaloHits(), Node(), ToString(), and ~Node().
|
private |
The child nodes of this nodea.
Definition at line 520 of file LArHierarchyHelper.h.
Referenced by FillFlat(), FillHierarchy(), ToString(), and ~Node().
|
private |
The parent reco hierarchy.
Definition at line 517 of file LArHierarchyHelper.h.
Referenced by FillFlat(), FillHierarchy(), and Node().
|
private |
The leading particle flow object for this node.
Definition at line 521 of file LArHierarchyHelper.h.
Referenced by Node().
|
private |
The particle ID (track = muon, shower = electron)
Definition at line 522 of file LArHierarchyHelper.h.
Referenced by GetParticleId(), Node(), and ToString().
|
private |
The list of PFOs of which this node is composed.
Definition at line 518 of file LArHierarchyHelper.h.
Referenced by GetRecoParticles(), Node(), and ~Node().