![]() |
LArSoft
v10_06_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, const pandora::CaloHitList &selectedRecoHits) |
| 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... | |
| const pandora::CaloHitList | GetSelectedRecoHits (const RecoHierarchy::Node *pReco) const |
| Retrieve the selected hits for the given reco node. 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... | |
| SelectedRecoHitsMap | m_selectedRecoHitsMap |
| Map storing the selected CaloHits for a given reco node. More... | |
MCMatches class.
Definition at line 618 of file LArHierarchyHelper.h.
| lar_content::LArHierarchyHelper::MCMatches::MCMatches | ( | const MCHierarchy::Node * | pMCParticle | ) |
Constructor.
| pMCParticle | The MCParticle being matched |
Definition at line 1093 of file LArHierarchyHelper.cc.
| void lar_content::LArHierarchyHelper::MCMatches::AddRecoMatch | ( | const RecoHierarchy::Node * | pReco, |
| const int | nSharedHits, | ||
| const pandora::CaloHitList & | selectedRecoHits | ||
| ) |
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 between reco and MC nodes |
| selectedRecoHits | The reco node hits that are selected from the MC particle hits |
Definition at line 1100 of file LArHierarchyHelper.cc.
References m_recoNodes, m_selectedRecoHitsMap, 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 1171 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::MCHierarchy::Node::GetCaloHits(), GetPurity(), GetSelectedRecoHits(), 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 1030 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 1044 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 1132 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::MCHierarchy::Node::GetCaloHits(), GetSelectedRecoHits(), 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 1037 of file LArHierarchyHelper.h.
| const CaloHitList lar_content::LArHierarchyHelper::MCMatches::GetSelectedRecoHits | ( | const RecoHierarchy::Node * | pReco | ) | const |
Retrieve the selected hits for the given reco node.
| pReco | The reco node pointer |
Definition at line 1109 of file LArHierarchyHelper.cc.
References lar_content::LArHierarchyHelper::RecoHierarchy::Node::GetCaloHits(), and m_selectedRecoHitsMap.
Referenced by GetCompleteness(), and GetPurity().
| 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 1120 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 1266 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 750 of file LArHierarchyHelper.h.
Referenced by GetCompleteness(), and GetPurity().
|
private |
Matched reco nodes.
Definition at line 751 of file LArHierarchyHelper.h.
Referenced by AddRecoMatch(), GetCompleteness(), GetPurity(), GetSharedHits(), and IsQuality().
|
private |
Map storing the selected CaloHits for a given reco node.
Definition at line 753 of file LArHierarchyHelper.h.
Referenced by AddRecoMatch(), and GetSelectedRecoHits().
|
private |
Number of shared hits for each match.
Definition at line 752 of file LArHierarchyHelper.h.
Referenced by AddRecoMatch(), and GetSharedHits().