MCMatches class.
More...
#include <LArHierarchyHelper.h>
|
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...
|
|
MCMatches class.
Definition at line 590 of file LArHierarchyHelper.h.
lar_content::LArHierarchyHelper::MCMatches::MCMatches |
( |
const MCHierarchy::Node * |
pMCParticle | ) |
|
Constructor.
- Parameters
-
pMCParticle | The MCParticle being matched |
Definition at line 999 of file LArHierarchyHelper.cc.
const MCHierarchy::Node * m_pMCParticle
MC node associated with any matches.
void lar_content::LArHierarchyHelper::MCMatches::AddRecoMatch |
( |
const RecoHierarchy::Node * |
pReco, |
|
|
const int |
nSharedHits |
|
) |
| |
Add a reconstructed node as a match for this MC node.
- Parameters
-
pReco | The reconstructed node that matches this MC node |
nSharedHits | The number of hits shared betweeb reco and MC nodes |
Definition at line 1005 of file LArHierarchyHelper.cc.
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
pandora::IntVector m_sharedHits
Number of shared hits for each match.
float lar_content::LArHierarchyHelper::MCMatches::GetCompleteness |
( |
const RecoHierarchy::Node * |
pReco, |
|
|
const bool |
adcWeighted = false |
|
) |
| const |
Retrieve the completeness of the match.
- Parameters
-
pReco | The reco node to consider |
adcWeighted | Whether or not to weight completeness according to the charge contribution |
- Returns
- The completeness of the match
Definition at line 1065 of file LArHierarchyHelper.cc.
1069 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
1071 const CaloHitList &recoHits{pReco->GetCaloHits()};
1073 CaloHitVector intersection;
1074 std::set_intersection(mcHits.begin(), mcHits.end(), recoHits.begin(), recoHits.end(), std::back_inserter(intersection));
const MCHierarchy::Node * m_pMCParticle
MC node associated with any matches.
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
const pandora::CaloHitList & GetCaloHits() const
Retrieve the CaloHits associated with this node.
float GetCompleteness(const RecoHierarchy::Node *pReco, const bool adcWeighted=false) const
Retrieve the completeness of the match.
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.
- Parameters
-
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 |
- Returns
- The completeness of the match
float lar_content::LArHierarchyHelper::MCMatches::GetCompleteness |
( |
const pandora::CaloHitVector & |
intersection, |
|
|
const pandora::CaloHitList & |
mcHits, |
|
|
const bool |
adcWeighted |
|
) |
| const |
|
private |
Core completeness calculation given intersecting hits and MC hits.
- Parameters
-
intersection | The intersecting reco and MC hits |
mcHits | The MC hits |
adcWeighted | Whether or not to weight completeness according to the charge contribution |
- Returns
- The completeness of the match
Retrieve the MC node.
- Returns
- The MC node
Definition at line 1000 of file LArHierarchyHelper.h.
const MCHierarchy::Node * m_pMCParticle
MC node associated with any matches.
size_t lar_content::LArHierarchyHelper::MCMatches::GetNRecoMatches |
( |
| ) |
const |
|
inline |
Get the number of reco nodes matched (both above and below quality cut thresholds) to the MC node.
- Returns
- The number of reco nodes matched to the MC node
Definition at line 1014 of file LArHierarchyHelper.h.
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
float lar_content::LArHierarchyHelper::MCMatches::GetPurity |
( |
const RecoHierarchy::Node * |
pReco, |
|
|
const bool |
adcWeighted = false |
|
) |
| const |
Retrieve the purity of the match.
- Parameters
-
pReco | The reco node to consider |
adcWeighted | Whether or not to weight purity according to the charge contribution |
- Returns
- The purity of the match
Definition at line 1025 of file LArHierarchyHelper.cc.
1029 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
1031 const CaloHitList &recoHits{pReco->GetCaloHits()};
1033 CaloHitVector intersection;
1034 std::set_intersection(mcHits.begin(), mcHits.end(), recoHits.begin(), recoHits.end(), std::back_inserter(intersection));
1036 return this->
GetPurity(intersection, recoHits, adcWeighted);
const MCHierarchy::Node * m_pMCParticle
MC node associated with any matches.
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
const pandora::CaloHitList & GetCaloHits() const
Retrieve the CaloHits associated with this node.
float GetPurity(const RecoHierarchy::Node *pReco, const bool adcWeighted=false) const
Retrieve the purity of the match.
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.
- Parameters
-
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 |
- Returns
- The purity of the match
float lar_content::LArHierarchyHelper::MCMatches::GetPurity |
( |
const pandora::CaloHitVector & |
intersection, |
|
|
const pandora::CaloHitList & |
recoHits, |
|
|
const bool |
adcWeighted |
|
) |
| const |
|
private |
Core purity calculation given intersecting hits and reco hits.
- Parameters
-
intersection | The intersecting reco and MC hits |
recoHits | The reco hits |
adcWeighted | Whether or not to weight purity according to the charge contribution |
- Returns
- The purity of the match
Retrieve the vector of matched reco nodes.
- Returns
- The vector of matched reco nodes
Definition at line 1007 of file LArHierarchyHelper.h.
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
unsigned int lar_content::LArHierarchyHelper::MCMatches::GetSharedHits |
( |
const RecoHierarchy::Node * |
pReco | ) |
const |
Retrieve the number of shared hits in the match.
- Parameters
-
pReco | The reco node to consider |
- Returns
- The number of shared hits
Definition at line 1013 of file LArHierarchyHelper.cc.
1017 throw StatusCodeException(STATUS_CODE_NOT_FOUND);
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
pandora::IntVector m_sharedHits
Number of shared hits for each match.
bool lar_content::LArHierarchyHelper::MCMatches::IsQuality |
( |
const QualityCuts & |
qualityCuts | ) |
const |
Get whether this match passes quality cuts.
- Parameters
-
qualityCuts | The quality cuts to pass |
- Returns
- Whether or not this match passes quality cuts
Definition at line 1161 of file LArHierarchyHelper.cc.
RecoHierarchy::NodeVector m_recoNodes
Matched reco nodes.
float GetPurity(const RecoHierarchy::Node *pReco, const bool adcWeighted=false) const
Retrieve the purity of the match.
float GetCompleteness(const RecoHierarchy::Node *pReco, const bool adcWeighted=false) const
Retrieve the completeness of the match.
The documentation for this class was generated from the following files: