LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
NeutrinoEventValidationAlgorithm class. More...
#include "NeutrinoEventValidationAlgorithm.h"
Public Member Functions | |
NeutrinoEventValidationAlgorithm () | |
Default constructor. More... | |
~NeutrinoEventValidationAlgorithm () | |
Destructor. More... | |
Protected Member Functions | |
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... | |
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 Types | |
typedef std::unordered_map< const pandora::ParticleFlowObject *, unsigned int > | PfoToIdMap |
typedef std::vector< pandora::HitType > | HitTypeVector |
Private Member Functions | |
void | FillValidationInfo (const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, ValidationInfo &validationInfo) const |
Fill the validation info containers. More... | |
void | ProcessOutput (const ValidationInfo &validationInfo, const bool useInterpretedMatching, const bool printToScreen, const bool fillTree) const |
Print matching information in a provided validation info object, and write information to tree if configured to do so. More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
bool | m_useTrueNeutrinosOnly |
Whether to consider only mc particles that were neutrino induced. More... | |
NeutrinoEventValidationAlgorithm class.
Definition at line 29 of file NeutrinoEventValidationAlgorithm.h.
|
private |
Definition at line 68 of file NeutrinoEventValidationAlgorithm.h.
|
private |
Definition at line 54 of file NeutrinoEventValidationAlgorithm.h.
lar_content::NeutrinoEventValidationAlgorithm::NeutrinoEventValidationAlgorithm | ( | ) |
Default constructor.
Definition at line 24 of file NeutrinoEventValidationAlgorithm.cc.
lar_content::NeutrinoEventValidationAlgorithm::~NeutrinoEventValidationAlgorithm | ( | ) |
|
privatevirtual |
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 |
Implements lar_content::EventValidationBaseAlgorithm.
Definition at line 37 of file NeutrinoEventValidationAlgorithm.cc.
References lar_content::LArPfoHelper::GetAllConnectedPfos(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetAllMCParticleToHitsMap(), lar_content::LArMonitoringHelper::GetOrderedMCParticleVector(), lar_content::LArMCParticleHelper::GetPfoMCParticleHitSharingMaps(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetPfoToHitsMap(), lar_content::LArMCParticleHelper::GetPfoToReconstructable2DHitsMap(), lar_content::EventValidationBaseAlgorithm::InterpretMatching(), lar_content::LArMCParticleHelper::IsBeamNeutrinoFinalState(), lar_content::LArMCParticleHelper::IsCosmicRay(), lar_content::LArPfoHelper::IsFinalState(), lar_content::LArMCParticleHelper::PrimaryParameters::m_foldBackHierarchy, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitsForGoodView, lar_content::LArMCParticleHelper::PrimaryParameters::m_minHitSharingFraction, lar_content::LArMCParticleHelper::PrimaryParameters::m_minPrimaryGoodHits, lar_content::EventValidationBaseAlgorithm::m_primaryParameters, m_useTrueNeutrinosOnly, lar_content::LArMCParticleHelper::SelectReconstructableMCParticles(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::SetAllMCParticleToHitsMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::SetInterpretedMCToPfoHitSharingMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::SetMCToPfoHitSharingMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::SetPfoToHitsMap(), and lar_content::EventValidationBaseAlgorithm::ValidationInfo::SetTargetMCParticleToHitsMap().
|
protectedinherited |
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 lar_content::EventValidationBaseAlgorithm::m_useSmallPrimaries.
Referenced by lar_content::EventValidationBaseAlgorithm::InterpretMatching().
|
protectedinherited |
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(), lar_content::EventValidationBaseAlgorithm::IsGoodMatch(), and lar_content::EventValidationBaseAlgorithm::m_useSmallPrimaries.
Referenced by lar_content::EventValidationBaseAlgorithm::InterpretMatching().
|
protectedinherited |
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(), lar_content::EventValidationBaseAlgorithm::GetRemainingPfoMatches(), lar_content::EventValidationBaseAlgorithm::GetStrongestPfoMatch(), and lar_content::LArPfoHelper::SortByNHits().
Referenced by FillValidationInfo(), and lar_content::MuonLeadingEventValidationAlgorithm::PerformUnfoldedMatching().
|
protectedinherited |
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, lar_content::EventValidationBaseAlgorithm::m_matchingMinCompleteness, lar_content::EventValidationBaseAlgorithm::m_matchingMinPurity, and lar_content::EventValidationBaseAlgorithm::m_matchingMinSharedHits.
Referenced by lar_content::MuonLeadingEventValidationAlgorithm::DetermineIncorrectlyReconstructedCosmicRays(), lar_content::EventValidationBaseAlgorithm::GetStrongestPfoMatch(), ProcessOutput(), and lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput().
|
privatevirtual |
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 |
Implements lar_content::EventValidationBaseAlgorithm.
Definition at line 109 of file NeutrinoEventValidationAlgorithm.cc.
References lar_content::LArMonitoringHelper::CountHitsByType(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetAllMCParticleToHitsMap(), lar_content::LArInteractionTypeHelper::GetInteractionType(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetInterpretedMCToPfoHitSharingMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetMCToPfoHitSharingMap(), lar_content::LArMCParticleHelper::GetNuanceCode(), lar_content::LArMonitoringHelper::GetOrderedMCParticleVector(), lar_content::LArMonitoringHelper::GetOrderedPfoVector(), lar_content::LArMCParticleHelper::GetParentMCParticle(), lar_content::LArPfoHelper::GetParentNeutrino(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetPfoToHitsMap(), lar_content::EventValidationBaseAlgorithm::ValidationInfo::GetTargetMCParticleToHitsMap(), lar_content::LArPfoHelper::GetVertex(), lar_content::LArMCParticleHelper::IsBeamNeutrinoFinalState(), lar_content::LArMCParticleHelper::IsCosmicRay(), lar_content::EventValidationBaseAlgorithm::IsGoodMatch(), lar_content::LArPfoHelper::IsNeutrinoFinalState(), lar_content::EventValidationBaseAlgorithm::m_eventNumber, lar_content::EventValidationBaseAlgorithm::m_fileIdentifier, lar_content::EventValidationBaseAlgorithm::m_treeName, and lar_content::LArInteractionTypeHelper::ToString().
|
private |
Definition at line 519 of file NeutrinoEventValidationAlgorithm.cc.
References m_useTrueNeutrinosOnly, and lar_content::EventValidationBaseAlgorithm::ReadSettings().
|
protectedinherited |
The event number.
Definition at line 194 of file EventValidationBaseAlgorithm.h.
Referenced by ProcessOutput(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), and lar_content::EventValidationBaseAlgorithm::Run().
|
protectedinherited |
The input file identifier.
Definition at line 193 of file EventValidationBaseAlgorithm.h.
Referenced by ProcessOutput(), and lar_content::EventValidationBaseAlgorithm::ReadSettings().
|
protectedinherited |
The mc particle primary selection parameters.
Definition at line 192 of file EventValidationBaseAlgorithm.h.
Referenced by FillValidationInfo(), and lar_content::EventValidationBaseAlgorithm::ReadSettings().
|
protectedinherited |
Name of output tree.
Definition at line 196 of file EventValidationBaseAlgorithm.h.
Referenced by ProcessOutput(), lar_content::MuonLeadingEventValidationAlgorithm::ProcessOutput(), lar_content::EventValidationBaseAlgorithm::ReadSettings(), and lar_content::EventValidationBaseAlgorithm::~EventValidationBaseAlgorithm().
|
private |
Whether to consider only mc particles that were neutrino induced.
Definition at line 70 of file NeutrinoEventValidationAlgorithm.h.
Referenced by FillValidationInfo(), and ReadSettings().