LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
EventValidationBaseAlgorithm class. More...
#include "EventValidationBaseAlgorithm.h"
Classes | |
class | ValidationInfo |
ValidationInfo class. More... | |
Protected Member Functions | |
EventValidationBaseAlgorithm () | |
Default constructor. More... | |
~EventValidationBaseAlgorithm () | |
Destructor. More... | |
virtual void | FillValidationInfo (const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, ValidationInfo &validationInfo) const =0 |
Fill the validation info containers. More... | |
virtual void | ProcessOutput (const ValidationInfo &validationInfo, const bool useInterpretedMatching, const bool printToScreen, const bool fillTree) const =0 |
Print matching information in a provided validation info object, and write information to tree if configured to do so. More... | |
void | InterpretMatching (const ValidationInfo &validationInfo, LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap) const |
Apply an interpretative matching procedure to the comprehensive matches in the provided validation info object. More... | |
bool | GetStrongestPfoMatch (const ValidationInfo &validationInfo, const pandora::MCParticleVector &mcPrimaryVector, pandora::PfoSet &usedPfos, LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap) const |
Get the strongest pfo match (most matched hits) between an available mc primary and an available pfo. More... | |
void | GetRemainingPfoMatches (const ValidationInfo &validationInfo, const pandora::MCParticleVector &mcPrimaryVector, const pandora::PfoSet &usedPfos, LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap) const |
Get the best matches for any pfos left-over after the strong matching procedure. More... | |
bool | IsGoodMatch (const pandora::CaloHitList &trueHits, const pandora::CaloHitList &recoHits, const pandora::CaloHitList &sharedHits) const |
Whether a provided mc primary and pfo are deemed to be a good match. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Protected Attributes | |
LArMCParticleHelper::PrimaryParameters | m_primaryParameters |
The mc particle primary selection parameters. More... | |
int | m_fileIdentifier |
The input file identifier. More... | |
int | m_eventNumber |
The event number. More... | |
std::string | m_treeName |
Name of output tree. More... | |
Private Member Functions | |
pandora::StatusCode | Run () |
void | PrintAllMatches (const ValidationInfo &validationInfo) const |
Print all/raw matching information to screen. More... | |
void | PrintInterpretedMatches (const ValidationInfo &validationInfo) const |
Print interpreted matching information to screen. More... | |
void | WriteInterpretedMatches (const ValidationInfo &validationInfo) const |
Write interpreted matching information to tree. More... | |
Private Attributes | |
std::string | m_caloHitListName |
Name of input calo hit list. More... | |
std::string | m_mcParticleListName |
Name of input MC particle list. More... | |
std::string | m_pfoListName |
Name of input Pfo list. More... | |
bool | m_printAllToScreen |
Whether to print all/raw matching details to screen. More... | |
bool | m_printMatchingToScreen |
Whether to print matching output to screen. More... | |
bool | m_writeToTree |
Whether to write all/raw matching details to tree. More... | |
bool | m_useSmallPrimaries |
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits. More... | |
unsigned int | m_matchingMinSharedHits |
The minimum number of shared hits used in matching scheme. More... | |
float | m_matchingMinCompleteness |
The minimum particle completeness to declare a match. More... | |
float | m_matchingMinPurity |
The minimum particle purity to declare a match. More... | |
std::string | m_fileName |
Name of output file. More... | |
EventValidationBaseAlgorithm class.
Definition at line 27 of file EventValidationBaseAlgorithm.h.
|
protected |
Default constructor.
Definition at line 24 of file EventValidationBaseAlgorithm.cc.
|
protected |
Destructor.
Definition at line 39 of file EventValidationBaseAlgorithm.cc.
References m_fileName, m_treeName, and m_writeToTree.
|
protectedpure virtual |
Fill the validation info containers.
pMCParticleList | the address of the mc particle list |
pCaloHitList | the address of the calo hit list |
pPfoList | the address of the pfo list |
validationInfo | to receive the validation info |
Implemented in lar_content::NeutrinoEventValidationAlgorithm, lar_content::TestBeamEventValidationAlgorithm, lar_content::TestBeamHierarchyEventValidationAlgorithm, and lar_content::MuonLeadingEventValidationAlgorithm.
Referenced by Run().
|
protected |
Get the best matches for any pfos left-over after the strong matching procedure.
validationInfo | the validation info |
mcPrimaryVector | the mc primary vector |
usedPfos | the set of previously used pfos |
interpretedMCToPfoHitSharingMap | the output, interpreted mc particle to pfo hit sharing map |
Definition at line 155 of file EventValidationBaseAlgorithm.cc.
References lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetMCToPfoHitSharingMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetTargetMCParticleToHitsMap(), and m_useSmallPrimaries.
Referenced by InterpretMatching().
|
protected |
Get the strongest pfo match (most matched hits) between an available mc primary and an available pfo.
validationInfo | the validation info |
mcPrimaryVector | the mc primary vector |
usedPfos | the set of previously used pfos |
interpretedMCToPfoHitSharingMap | the output, interpreted mc particle to pfo hit sharing map |
Definition at line 111 of file EventValidationBaseAlgorithm.cc.
References lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetAllMCParticleToHitsMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetMCToPfoHitSharingMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetPfoToHitsMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetTargetMCParticleToHitsMap(), IsGoodMatch(), and m_useSmallPrimaries.
Referenced by InterpretMatching().
|
protected |
Apply an interpretative matching procedure to the comprehensive matches in the provided validation info object.
validationInfo | the validation info |
interpretedMCToPfoHitSharingMap | the output, interpreted mc particle to pfo hit sharing map |
Definition at line 86 of file EventValidationBaseAlgorithm.cc.
References lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetAllMCParticleToHitsMap(), lar_content::LArMonitoringHelper::GetOrderedMCParticleVector(), GetRemainingPfoMatches(), GetStrongestPfoMatch(), and lar_content::LArPfoHelper::SortByNHits().
Referenced by lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), and lar_content::MuonLeadingEventValidationAlgorithm::PerformUnfoldedMatching().
|
protected |
Whether a provided mc primary and pfo are deemed to be a good match.
trueHits | the list of true hits |
recoHits | the list of reco hits |
sharedHits | the list of shared hits |
Definition at line 203 of file EventValidationBaseAlgorithm.cc.
References f, m_matchingMinCompleteness, m_matchingMinPurity, and m_matchingMinSharedHits.
Referenced by lar_content::MuonLeadingEventValidationAlgorithm::DetermineIncorrectlyReconstructedCosmicRays(), GetStrongestPfoMatch(), lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), and lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput().
|
inlineprivate |
Print all/raw matching information to screen.
validationInfo | the validation info |
Definition at line 313 of file EventValidationBaseAlgorithm.h.
References ProcessOutput().
Referenced by Run().
|
inlineprivate |
Print interpreted matching information to screen.
validationInfo | the validation info |
Definition at line 320 of file EventValidationBaseAlgorithm.h.
References ProcessOutput().
Referenced by Run().
|
protectedpure virtual |
Print matching information in a provided validation info object, and write information to tree if configured to do so.
validationInfo | the validation info |
useInterpretedMatching | whether to use the interpreted (rather than raw) matching information |
printToScreen | whether to print the information to screen |
fillTree | whether to write the information to tree |
Implemented in lar_content::MuonLeadingEventValidationAlgorithm, lar_content::NeutrinoEventValidationAlgorithm, lar_content::TestBeamEventValidationAlgorithm, and lar_content::TestBeamHierarchyEventValidationAlgorithm.
Referenced by PrintAllMatches(), PrintInterpretedMatches(), and WriteInterpretedMatches().
|
protected |
Definition at line 213 of file EventValidationBaseAlgorithm.cc.
References m_caloHitListName, m_fileIdentifier, m_fileName, lar_content::LArMCParticleHelper::PrimaryParameters::m_foldBackHierarchy, m_matchingMinCompleteness, m_matchingMinPurity, m_matchingMinSharedHits, lar_content::LArMCParticleHelper::PrimaryParameters::m_maxPhotonPropagation, m_mcParticleListName, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitsForGoodView, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitSharingFraction, lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodHits, lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodViews, m_pfoListName, m_primaryParameters, m_printAllToScreen, m_printMatchingToScreen, lar_content::LArMCParticleHelper::PrimaryParameters::m_selectInputHits, m_treeName, m_useSmallPrimaries, and m_writeToTree.
Referenced by lar_content::NeutrinoEventValidationAlgorithm::ReadSettings(), and lar_content::MuonLeadingEventValidationAlgorithm::ReadSettings().
|
private |
Definition at line 56 of file EventValidationBaseAlgorithm.cc.
References FillValidationInfo(), m_caloHitListName, m_eventNumber, m_mcParticleListName, m_pfoListName, m_printAllToScreen, m_printMatchingToScreen, m_writeToTree, PrintAllMatches(), PrintInterpretedMatches(), and WriteInterpretedMatches().
|
inlineprivate |
Write interpreted matching information to tree.
validationInfo | the validation info |
Definition at line 327 of file EventValidationBaseAlgorithm.h.
References ProcessOutput().
Referenced by Run().
|
private |
Name of input calo hit list.
Definition at line 222 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
protected |
The event number.
Definition at line 194 of file EventValidationBaseAlgorithm.h.
Referenced by lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), and Run().
|
protected |
The input file identifier.
Definition at line 193 of file EventValidationBaseAlgorithm.h.
Referenced by lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), and ReadSettings().
|
private |
Name of output file.
Definition at line 235 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), and ~EventValidationBaseAlgorithm().
|
private |
The minimum particle completeness to declare a match.
Definition at line 232 of file EventValidationBaseAlgorithm.h.
Referenced by IsGoodMatch(), and ReadSettings().
|
private |
The minimum particle purity to declare a match.
Definition at line 233 of file EventValidationBaseAlgorithm.h.
Referenced by IsGoodMatch(), and ReadSettings().
|
private |
The minimum number of shared hits used in matching scheme.
Definition at line 231 of file EventValidationBaseAlgorithm.h.
Referenced by IsGoodMatch(), and ReadSettings().
|
private |
Name of input MC particle list.
Definition at line 223 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Name of input Pfo list.
Definition at line 224 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
protected |
The mc particle primary selection parameters.
Definition at line 192 of file EventValidationBaseAlgorithm.h.
Referenced by lar_content::NeutrinoEventValidationAlgorithm::FillValidationInfo(), and ReadSettings().
|
private |
Whether to print all/raw matching details to screen.
Definition at line 226 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to print matching output to screen.
Definition at line 227 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
protected |
Name of output tree.
Definition at line 196 of file EventValidationBaseAlgorithm.h.
Referenced by lar_content::NeutrinoEventValidationAlgorithm::ProcessOutput(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), ReadSettings(), and ~EventValidationBaseAlgorithm().
|
private |
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits.
Definition at line 230 of file EventValidationBaseAlgorithm.h.
Referenced by GetRemainingPfoMatches(), GetStrongestPfoMatch(), and ReadSettings().
|
private |
Whether to write all/raw matching details to tree.
Definition at line 228 of file EventValidationBaseAlgorithm.h.
Referenced by ReadSettings(), Run(), and ~EventValidationBaseAlgorithm().