![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "LArHierarchyHelper.h"
Public Member Functions | |
MatchInfo (const MCHierarchy &mcHierarchy, const RecoHierarchy &recoHierarchy) | |
Default constructor. More... | |
MatchInfo (const MCHierarchy &mcHierarchy, const RecoHierarchy &recoHierarchy, const QualityCuts &qualityCuts) | |
Constructor. More... | |
void | Match () |
Match the nodes in the MC and reco hierarchies. More... | |
const MCMatchesVector & | GetMatches (const pandora::MCParticle *const pRoot) const |
Retrieve the vector of matches (this will include null matches - i.e. MC nodes with no corresponding reco) More... | |
const RecoHierarchy::NodeVector & | GetUnmatchedReco () const |
Retrieve the vector of unmatched reco nodes. More... | |
unsigned int | GetNMCNodes (const pandora::MCParticle *const pRoot) const |
Retrieve the number of MC nodes available to match. More... | |
unsigned int | GetNNeutrinoMCNodes (const pandora::MCParticle *const pRoot) const |
Retrieve the number of neutrino interaction derived MC nodes available to match. More... | |
unsigned int | GetNCosmicRayMCNodes (const pandora::MCParticle *const pRoot) const |
Retrieve the number of cosmic ray derived MC nodes available to match. More... | |
unsigned int | GetNTestBeamMCNodes (const pandora::MCParticle *const pRoot) const |
Retrieve the number of test beam derived MC nodes available to match. More... | |
const MCHierarchy & | GetMCHierarchy () const |
Retrieve the MC hierarchy used for the matching. More... | |
const RecoHierarchy & | GetRecoHierarchy () const |
Retrieve the reco hierarchy used for the matching. More... | |
void | GetRootMCParticles (pandora::MCParticleList &rootMCParticles) const |
Retrieve the root MC particles of the interaction hierarchies. More... | |
const QualityCuts & | GetQualityCuts () const |
Retrieve the quality cuts for matching. More... | |
const pandora::CaloHitList | GetSelectedRecoHits (const RecoHierarchy::Node *pRecoNode, const pandora::CaloHitList &allMCHits) const |
Get the selected reco node hits that are contained in the allMCHits list. More... | |
void | Print (const MCHierarchy &mcHierarchy) const |
Prints information about which reco nodes are matched to the MC nodes, information about hit sharing, purity and completeness. More... | |
Private Attributes | |
const MCHierarchy & | m_mcHierarchy |
The MC hierarchy for the matching procedure. More... | |
const RecoHierarchy & | m_recoHierarchy |
The Reco hierarchy for the matching procedure. More... | |
InteractionInfo | m_matches |
The map between an interaction and the vector of good matches from MC to reco. More... | |
RecoHierarchy::NodeVector | m_unmatchedReco |
The vector of unmatched reco nodes. More... | |
QualityCuts | m_qualityCuts |
The quality cuts to be applied to matches. More... | |
MatchInfo class.
Definition at line 762 of file LArHierarchyHelper.h.
lar_content::LArHierarchyHelper::MatchInfo::MatchInfo | ( | const MCHierarchy & | mcHierarchy, |
const RecoHierarchy & | recoHierarchy | ||
) |
Default constructor.
mcHierarchy | The MC hierarchy |
recoHierarchy | The reco hierarchy |
Definition at line 1293 of file LArHierarchyHelper.cc.
lar_content::LArHierarchyHelper::MatchInfo::MatchInfo | ( | const MCHierarchy & | mcHierarchy, |
const RecoHierarchy & | recoHierarchy, | ||
const QualityCuts & | qualityCuts | ||
) |
Constructor.
mcHierarchy | The MC hierarchy |
recoHierarchy | The reco hierarchy |
qualityCuts | The quality cuts to be applied to matched nodes |
Definition at line 1300 of file LArHierarchyHelper.cc.
References m_qualityCuts, and m_recoHierarchy.
|
inline |
Retrieve the vector of matches (this will include null matches - i.e. MC nodes with no corresponding reco)
pRoot | The root of the interaction hierarchy |
Definition at line 1052 of file LArHierarchyHelper.h.
Referenced by Print(), lar_content::HierarchyValidationAlgorithm::Run(), and lar_content::HierarchyMonitoringAlgorithm::Run().
|
inline |
Retrieve the MC hierarchy used for the matching.
Definition at line 1069 of file LArHierarchyHelper.h.
Referenced by lar_content::HierarchyMonitoringAlgorithm::Run().
unsigned int lar_content::LArHierarchyHelper::MatchInfo::GetNCosmicRayMCNodes | ( | const pandora::MCParticle *const | pRoot | ) | const |
Retrieve the number of cosmic ray derived MC nodes available to match.
pRoot | The root of the interaction hierarchy |
Definition at line 1460 of file LArHierarchyHelper.cc.
References m_matches.
Referenced by Print().
unsigned int lar_content::LArHierarchyHelper::MatchInfo::GetNMCNodes | ( | const pandora::MCParticle *const | pRoot | ) | const |
Retrieve the number of MC nodes available to match.
pRoot | The root of the interaction hierarchy |
Definition at line 1432 of file LArHierarchyHelper.cc.
References m_matches.
Referenced by lar_content::HierarchyValidationAlgorithm::Run().
unsigned int lar_content::LArHierarchyHelper::MatchInfo::GetNNeutrinoMCNodes | ( | const pandora::MCParticle *const | pRoot | ) | const |
Retrieve the number of neutrino interaction derived MC nodes available to match.
pRoot | The root of the interaction hierarchy |
Definition at line 1442 of file LArHierarchyHelper.cc.
References m_matches.
Referenced by Print().
unsigned int lar_content::LArHierarchyHelper::MatchInfo::GetNTestBeamMCNodes | ( | const pandora::MCParticle *const | pRoot | ) | const |
Retrieve the number of test beam derived MC nodes available to match.
pRoot | The root of the interaction hierarchy |
Definition at line 1478 of file LArHierarchyHelper.cc.
References m_matches.
Referenced by Print().
|
inline |
Retrieve the quality cuts for matching.
Definition at line 1083 of file LArHierarchyHelper.h.
Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().
|
inline |
Retrieve the reco hierarchy used for the matching.
Definition at line 1076 of file LArHierarchyHelper.h.
Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().
void lar_content::LArHierarchyHelper::MatchInfo::GetRootMCParticles | ( | pandora::MCParticleList & | rootMCParticles | ) | const |
Retrieve the root MC particles of the interaction hierarchies.
rootMCParticles | The output list of root MC particles |
Definition at line 1638 of file LArHierarchyHelper.cc.
References m_matches.
Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().
const CaloHitList lar_content::LArHierarchyHelper::MatchInfo::GetSelectedRecoHits | ( | const RecoHierarchy::Node * | pRecoNode, |
const pandora::CaloHitList & | allMCHits | ||
) | const |
Get the selected reco node hits that are contained in the allMCHits list.
pRecoNode | The reco node pointer |
allMCHits | The CaloHit list of all of the MC particles that will be used for the selection |
Definition at line 1496 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits().
Referenced by Match().
|
inline |
Retrieve the vector of unmatched reco nodes.
Definition at line 1062 of file LArHierarchyHelper.h.
Referenced by Print().
void lar_content::LArHierarchyHelper::MatchInfo::Match | ( | ) |
Match the nodes in the MC and reco hierarchies.
Definition at line 1309 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::MCMatches::AddRecoMatch(), util::begin(), util::end(), lar_content::LArHierarchyHelper::MCHierarchy::Node::GetCaloHits(), lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits(), lar_content::LArHierarchyHelper::MCHierarchy::GetFlattenedNodes(), lar_content::LArHierarchyHelper::RecoHierarchy::GetFlattenedNodes(), lar_content::LArHierarchyHelper::MCMatches::GetMC(), lar_content::LArHierarchyHelper::MCHierarchy::GetRootMCParticles(), lar_content::LArHierarchyHelper::RecoHierarchy::GetRootPfos(), GetSelectedRecoHits(), m_matches, m_mcHierarchy, m_qualityCuts, m_recoHierarchy, lar_content::LArHierarchyHelper::QualityCuts::m_selectRecoHits, and m_unmatchedReco.
Referenced by lar_content::LArHierarchyHelper::MatchHierarchies().
void lar_content::LArHierarchyHelper::MatchInfo::Print | ( | const MCHierarchy & | mcHierarchy | ) | const |
Prints information about which reco nodes are matched to the MC nodes, information about hit sharing, purity and completeness.
mcHierarchy | The MC hierarchy |
Definition at line 1522 of file LArHierarchyHelper.cc.
References f, lar_content::LArInteractionTypeHelper::GetInteractionDescriptor(), lar_content::LArHierarchyHelper::MCHierarchy::Node::GetLeadingMCParticle(), GetMatches(), GetNCosmicRayMCNodes(), GetNNeutrinoMCNodes(), GetNTestBeamMCNodes(), lar_content::LArHierarchyHelper::MCHierarchy::Node::GetParticleId(), lar_content::LArHierarchyHelper::MCHierarchy::GetRootMCParticles(), GetUnmatchedReco(), lar_content::LArMCParticleHelper::IsBeamParticle(), lar_content::LArMCParticleHelper::IsCosmicRay(), lar_content::LArMCParticleHelper::IsNeutrino(), m_matches, lar_content::LArMCParticleHelper::SortByMomentum(), and util::to_string().
Referenced by lar_content::HierarchyMonitoringAlgorithm::Run(), and lar_content::HierarchyValidationAlgorithm::Run().
|
private |
The map between an interaction and the vector of good matches from MC to reco.
Definition at line 887 of file LArHierarchyHelper.h.
Referenced by GetNCosmicRayMCNodes(), GetNMCNodes(), GetNNeutrinoMCNodes(), GetNTestBeamMCNodes(), GetRootMCParticles(), Match(), and Print().
|
private |
The MC hierarchy for the matching procedure.
Definition at line 885 of file LArHierarchyHelper.h.
Referenced by Match().
|
private |
The quality cuts to be applied to matches.
Definition at line 889 of file LArHierarchyHelper.h.
Referenced by Match(), and MatchInfo().
|
private |
The Reco hierarchy for the matching procedure.
Definition at line 886 of file LArHierarchyHelper.h.
Referenced by Match(), and MatchInfo().
|
private |
The vector of unmatched reco nodes.
Definition at line 888 of file LArHierarchyHelper.h.
Referenced by Match().