LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "LArHierarchyHelper.h"
Public Member Functions | |
MCMatches (const MCHierarchy::Node *pMCParticle) | |
Constructor. More... | |
void | AddRecoMatch (const RecoHierarchy::Node *pReco, const int nSharedHits) |
Add a reconstructed node as a match for this MC node. More... | |
const MCHierarchy::Node * | GetMC () const |
Retrieve the MC node. More... | |
const RecoHierarchy::NodeVector & | GetRecoMatches () const |
Retrieve the vector of matched reco nodes. More... | |
unsigned int | GetSharedHits (const RecoHierarchy::Node *pReco) const |
Retrieve the number of shared hits in the match. More... | |
float | GetPurity (const RecoHierarchy::Node *pReco, const bool adcWeighted=false) const |
Retrieve the purity of the match. More... | |
float | GetPurity (const RecoHierarchy::Node *pReco, const pandora::HitType view, const bool adcWeighted=false) const |
Retrieve the purity of the match. More... | |
float | GetCompleteness (const RecoHierarchy::Node *pReco, const bool adcWeighted=false) const |
Retrieve the completeness of the match. More... | |
float | GetCompleteness (const RecoHierarchy::Node *pReco, const pandora::HitType view, const bool adcWeighted=false) const |
Retrieve the completeness of the match. More... | |
size_t | GetNRecoMatches () const |
Get the number of reco nodes matched (both above and below quality cut thresholds) to the MC node. More... | |
bool | IsQuality (const QualityCuts &qualityCuts) const |
Get whether this match passes quality cuts. More... | |
Private Member Functions | |
float | GetPurity (const pandora::CaloHitVector &intersection, const pandora::CaloHitList &recoHits, const bool adcWeighted) const |
Core purity calculation given intersecting hits and reco hits. More... | |
float | GetCompleteness (const pandora::CaloHitVector &intersection, const pandora::CaloHitList &mcHits, const bool adcWeighted) const |
Core completeness calculation given intersecting hits and MC hits. More... | |
Private Attributes | |
const MCHierarchy::Node * | m_pMCParticle |
MC node associated with any matches. More... | |
RecoHierarchy::NodeVector | m_recoNodes |
Matched reco nodes. More... | |
pandora::IntVector | m_sharedHits |
Number of shared hits for each match. More... | |
MCMatches class.
Definition at line 604 of file LArHierarchyHelper.h.
lar_content::LArHierarchyHelper::MCMatches::MCMatches | ( | const MCHierarchy::Node * | pMCParticle | ) |
Constructor.
pMCParticle | The MCParticle being matched |
Definition at line 1088 of file LArHierarchyHelper.cc.
void lar_content::LArHierarchyHelper::MCMatches::AddRecoMatch | ( | const RecoHierarchy::Node * | pReco, |
const int | nSharedHits | ||
) |
Add a reconstructed node as a match for this MC node.
pReco | The reconstructed node that matches this MC node |
nSharedHits | The number of hits shared betweeb reco and MC nodes |
Definition at line 1095 of file LArHierarchyHelper.cc.
References m_recoNodes, and m_sharedHits.
Referenced by lar_content::LArHierarchyHelper::MatchInfo::Match().
float lar_content::LArHierarchyHelper::MCMatches::GetCompleteness | ( | const RecoHierarchy::Node * | pReco, |
const bool | adcWeighted = false |
||
) | const |
Retrieve the completeness of the match.
pReco | The reco node to consider |
adcWeighted | Whether or not to weight completeness according to the charge contribution |
Definition at line 1154 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::MCHierarchy::Node::GetCaloHits(), lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits(), GetPurity(), m_pMCParticle, and m_recoNodes.
Referenced by IsQuality().
float lar_content::LArHierarchyHelper::MCMatches::GetCompleteness | ( | const RecoHierarchy::Node * | pReco, |
const pandora::HitType | view, | ||
const bool | adcWeighted = false |
||
) | const |
Retrieve the completeness of the match.
pReco | The reco node to consider |
view | The view for which purity should be calculated |
adcWeighted | Whether or not to weight completeness according to the charge contribution |
|
private |
Core completeness calculation given intersecting hits and MC hits.
intersection | The intersecting reco and MC hits |
mcHits | The MC hits |
adcWeighted | Whether or not to weight completeness according to the charge contribution |
|
inline |
Retrieve the MC node.
Definition at line 987 of file LArHierarchyHelper.h.
Referenced by lar_content::LArHierarchyHelper::MatchInfo::Match().
|
inline |
Get the number of reco nodes matched (both above and below quality cut thresholds) to the MC node.
Definition at line 1001 of file LArHierarchyHelper.h.
float lar_content::LArHierarchyHelper::MCMatches::GetPurity | ( | const RecoHierarchy::Node * | pReco, |
const bool | adcWeighted = false |
||
) | const |
Retrieve the purity of the match.
pReco | The reco node to consider |
adcWeighted | Whether or not to weight purity according to the charge contribution |
Definition at line 1115 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::MCHierarchy::Node::GetCaloHits(), lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits(), m_pMCParticle, and m_recoNodes.
Referenced by GetCompleteness(), and IsQuality().
float lar_content::LArHierarchyHelper::MCMatches::GetPurity | ( | const RecoHierarchy::Node * | pReco, |
const pandora::HitType | view, | ||
const bool | adcWeighted = false |
||
) | const |
Retrieve the purity of the match.
pReco | The reco node to consider |
view | The view for which purity should be calculated |
adcWeighted | Whether or not to weight purity according to the charge contribution |
|
private |
Core purity calculation given intersecting hits and reco hits.
intersection | The intersecting reco and MC hits |
recoHits | The reco hits |
adcWeighted | Whether or not to weight purity according to the charge contribution |
|
inline |
Retrieve the vector of matched reco nodes.
Definition at line 994 of file LArHierarchyHelper.h.
unsigned int lar_content::LArHierarchyHelper::MCMatches::GetSharedHits | ( | const RecoHierarchy::Node * | pReco | ) | const |
Retrieve the number of shared hits in the match.
pReco | The reco node to consider |
Definition at line 1103 of file LArHierarchyHelper.cc.
References m_recoNodes, and m_sharedHits.
bool lar_content::LArHierarchyHelper::MCMatches::IsQuality | ( | const QualityCuts & | qualityCuts | ) | const |
Get whether this match passes quality cuts.
qualityCuts | The quality cuts to pass |
Definition at line 1249 of file LArHierarchyHelper.cc.
References GetCompleteness(), GetPurity(), lar_content::LArHierarchyHelper::QualityCuts::m_minCompleteness, lar_content::LArHierarchyHelper::QualityCuts::m_minPurity, and m_recoNodes.
|
private |
MC node associated with any matches.
Definition at line 726 of file LArHierarchyHelper.h.
Referenced by GetCompleteness(), and GetPurity().
|
private |
Matched reco nodes.
Definition at line 727 of file LArHierarchyHelper.h.
Referenced by AddRecoMatch(), GetCompleteness(), GetPurity(), GetSharedHits(), and IsQuality().
|
private |
Number of shared hits for each match.
Definition at line 728 of file LArHierarchyHelper.h.
Referenced by AddRecoMatch(), and GetSharedHits().