Pandora
Pandora source code navigator
|
MuonLeadingEventValidationAlgorithm class. More...
#include "MuonLeadingEventValidationAlgorithm.h"
Public Member Functions | |
MuonLeadingEventValidationAlgorithm () | |
Default constructor. | |
virtual | ~MuonLeadingEventValidationAlgorithm () |
Destructor. | |
const std::string & | GetType () const |
Get the type. | |
const std::string & | GetInstanceName () const |
Get the instance name. | |
const Pandora & | GetPandora () const |
Get the associated pandora instance. | |
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. | |
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. | |
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. | |
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. | |
virtual StatusCode | Initialize () |
Perform any operations that must occur after reading settings, but before running the process. | |
virtual StatusCode | Reset () |
Perform any operations when pandora is reset, typically at the end of each event. | |
StatusCode | RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName) |
Register i) the pandora instance that will run the process and ii) the process type. | |
Protected Attributes | |
LArMCParticleHelper::PrimaryParameters | m_primaryParameters |
The mc particle primary selection parameters. | |
int | m_fileIdentifier |
The input file identifier. | |
int | m_eventNumber |
The event number. | |
std::string | m_treeName |
Name of output tree. | |
const Pandora * | m_pPandora |
The pandora object that will run the process. | |
std::string | m_type |
The process type. | |
std::string | m_instanceName |
The process instance name. | |
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. | |
void | GetRecoCosmicRayHits (const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, pandora::CaloHitList &recoCosmicRayHitList) const |
Determine all reconstructable hits in cosmic ray pfos. | |
void | PerformUnfoldedMatching (const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, const pandora::CaloHitList &recoCosmicRayHitList, const float minHitSharingFraction, ValidationInfo &validationInfo) const |
Perform the main matching procedure. | |
void | RemoveIncorrectlyReconstructedCosmicRays (const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, ValidationInfo &validationInfo) const |
Remove incorrectly reconstructed cosmic rays from main matching maps. | |
void | DetermineIncorrectlyReconstructedCosmicRays (const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, pandora::MCParticleList &incorrectlyReconstructedCosmicRays) const |
Perform the cosmic ray matching procedure and identify incorrectly reconstructed cosmic rays. | |
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. | |
void | PrintHits (const pandora::CaloHitList totalCaloHitList, const pandora::CaloHitList leadingCaloHitList, const std::string &stringTag) const |
Print leading MCParticle hits. | |
void | FillContaminationHitsDistance (const pandora::CaloHitList &contaminationHits, const pandora::CaloHitList &leadingMCHits, pandora::FloatVector &bestMatchContaminationHitsDistance) const |
Fill an input contamination hit distance vector with the closest distance of each contaminant hit to the true leading particle hits. | |
void | GetHitsOfType (const pandora::CaloHitList &inputList, const pandora::HitType hitType, pandora::CaloHitList &outputList) const |
To filter out the hits of a given type from an input list. | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Read the algorithm settings. | |
pandora::StatusCode | Run () |
Run the algorithm. | |
void | PrintAllMatches (const ValidationInfo &validationInfo) const |
Print all/raw matching information to screen. | |
void | PrintInterpretedMatches (const ValidationInfo &validationInfo) const |
Print interpreted matching information to screen. | |
void | WriteInterpretedMatches (const ValidationInfo &validationInfo) const |
Write interpreted matching information to tree. | |
Private Attributes | |
LArMuonLeadingHelper::ValidationParameters | m_validationParameters |
The definition of a reconstructable MCParticle. | |
bool | m_removeRecoCosmicRayHits |
Whether to remove the reconstructed cosmic ray hits from leading particle metrics. | |
bool | m_deltaRayMode |
Whether to run in delta ray mode. | |
bool | m_michelMode |
Whether to run in michel mode. | |
int | m_cosmicRaysToSkip |
The number of reconstructable cosmic rays to skip. | |
bool | m_visualize |
Whether to visualize the MC and reco leading particles. | |
bool | m_ignoreIncorrectCosmicRays |
Whether to remove the leading particles with incorrrectly reconstructed parents from metrics. | |
bool | m_writeRawMatchesToTree |
Whether to write all matches to output tree. | |
std::vector< int > | m_deltaRayIDs |
If filled, to contain the list leading particles to run metrics over. | |
std::string | m_caloHitListName |
Name of input calo hit list. | |
std::string | m_mcParticleListName |
Name of input MC particle list. | |
std::string | m_pfoListName |
Name of input Pfo list. | |
bool | m_printAllToScreen |
Whether to print all/raw matching details to screen. | |
bool | m_printMatchingToScreen |
Whether to print matching output to screen. | |
bool | m_writeToTree |
Whether to write all/raw matching details to tree. | |
bool | m_useSmallPrimaries |
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits. | |
unsigned int | m_matchingMinSharedHits |
The minimum number of shared hits used in matching scheme. | |
float | m_matchingMinCompleteness |
The minimum particle completeness to declare a match. | |
float | m_matchingMinPurity |
The minimum particle purity to declare a match. | |
std::string | m_fileName |
Name of output file. | |
MuonLeadingEventValidationAlgorithm class.
Definition at line 28 of file MuonLeadingEventValidationAlgorithm.h.
lar_content::MuonLeadingEventValidationAlgorithm::MuonLeadingEventValidationAlgorithm | ( | ) |
Default constructor.
Definition at line 25 of file MuonLeadingEventValidationAlgorithm.cc.
|
virtual |
Destructor.
Definition at line 38 of file MuonLeadingEventValidationAlgorithm.cc.
|
private |
Perform the cosmic ray matching procedure and identify incorrectly reconstructed cosmic rays.
pMCParticleList | the address of the mc particle list |
pCaloHitList | the address of the calo hit list |
pPfoList | the address of the pfo list |
incorrectlyReconstructedCosmicRays | the output list of incorrectly reconstructed cosmic rays |
Definition at line 191 of file MuonLeadingEventValidationAlgorithm.cc.
|
private |
Fill an input contamination hit distance vector with the closest distance of each contaminant hit to the true leading particle hits.
contaminationHits | the list of contaminant hits |
leadingMCHitList | the list of true MCParticles hits |
bestMatchContaminationHitsDistance | the output contaminant hit distance vector |
Definition at line 874 of file MuonLeadingEventValidationAlgorithm.cc.
|
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 44 of file MuonLeadingEventValidationAlgorithm.cc.
|
private |
To filter out the hits of a given type from an input list.
inputList | the input list of hits |
hitType | the specified TPC view |
outputList | the output list of hits of the specified list |
Definition at line 899 of file MuonLeadingEventValidationAlgorithm.cc.
|
inlineinherited |
|
inlineinherited |
|
private |
Determine all reconstructable hits in cosmic ray pfos.
pMCParticleList | the address of the mc particle list |
pCaloHitList | the address of the calo hit list |
pPfoList | the address of the pfo list |
recoCosmicRayHitList | the output list of cosmic ray pfo reconstructable hits |
Definition at line 70 of file MuonLeadingEventValidationAlgorithm.cc.
|
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.
|
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.
|
inlineinherited |
|
inlineprotectedvirtualinherited |
Perform any operations that must occur after reading settings, but before running the process.
Reimplemented in lar_content::BdtBeamParticleIdTool, lar_content::BeamParticleIdTool, lar_content::CosmicRayTaggingTool, lar_content::EventReadingAlgorithm, lar_content::EventWritingAlgorithm, lar_content::LArPseudoLayerPlugin, lar_content::LArRotationalTransformationPlugin, EventReadingAlgorithm, and EventWritingAlgorithm.
Definition at line 126 of file Process.h.
|
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.
|
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.
|
private |
Perform the main matching procedure.
pMCParticleList | the address of the mc particle list |
pCaloHitList | the address of the calo hit list |
pPfoList | the address of the pfo list |
recoCosmicRayHitList | the list of cosmic ray pfo reconstructable hits to remove from leading particle maps |
minHitSharingFraction | the minimum hit share fraction of a reconstructable hit |
validationInfo | to receive the validation info |
Definition at line 100 of file MuonLeadingEventValidationAlgorithm.cc.
|
inlineprivateinherited |
Print all/raw matching information to screen.
validationInfo | the validation info |
Definition at line 313 of file EventValidationBaseAlgorithm.h.
|
private |
Print leading MCParticle hits.
caloHitList | the list of hits to print |
isCR | whether the hits belong to a MC cosmic ray or delta ray/michel electron |
Print leading pfo hits
totalCaloHitList | the list of hits to print |
otherShowerCaloHitList | the list of hits that in truth belong to a different shower |
otherTrackCaloHitList | the list of hits that in truth belong to a cosmic ray that is not the parent |
parentTrackCaloHitList | the list of hits that in truth belong to the parent cosmic ray |
stringTag | the event display marker string |
Print hits of the parent cosmic ray
totalCaloHitList | the list of hits to print |
leadingCaloHitList | the list of hits that in truth belong to the child hierarchy |
stringTag | the event display marker string |
|
inlineprivateinherited |
Print interpreted matching information to screen.
validationInfo | the validation info |
Definition at line 320 of file EventValidationBaseAlgorithm.h.
|
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 240 of file MuonLeadingEventValidationAlgorithm.cc.
|
privatevirtual |
Read the algorithm settings.
xmlHandle | the relevant xml handle |
Reimplemented from lar_content::EventValidationBaseAlgorithm.
Definition at line 910 of file MuonLeadingEventValidationAlgorithm.cc.
|
inlineprotectedinherited |
Register i) the pandora instance that will run the process and ii) the process type.
pPandora | address of the pandora object that will run the process |
type | the process type |
instanceName | the process instance name |
Definition at line 146 of file Process.h.
|
private |
Remove incorrectly reconstructed cosmic rays from main matching maps.
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 updated validation info |
Definition at line 149 of file MuonLeadingEventValidationAlgorithm.cc.
|
inlineprotectedvirtualinherited |
Perform any operations when pandora is reset, typically at the end of each event.
Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.
Definition at line 133 of file Process.h.
|
privatevirtualinherited |
Run the algorithm.
Implements pandora::Algorithm.
Definition at line 56 of file EventValidationBaseAlgorithm.cc.
|
inlineprivateinherited |
Write interpreted matching information to tree.
validationInfo | the validation info |
Definition at line 327 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
Name of input calo hit list.
Definition at line 222 of file EventValidationBaseAlgorithm.h.
|
private |
The number of reconstructable cosmic rays to skip.
Definition at line 168 of file MuonLeadingEventValidationAlgorithm.h.
|
private |
If filled, to contain the list leading particles to run metrics over.
Definition at line 172 of file MuonLeadingEventValidationAlgorithm.h.
|
private |
Whether to run in delta ray mode.
Definition at line 166 of file MuonLeadingEventValidationAlgorithm.h.
|
protectedinherited |
The event number.
Definition at line 194 of file EventValidationBaseAlgorithm.h.
|
protectedinherited |
The input file identifier.
Definition at line 193 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
Name of output file.
Definition at line 235 of file EventValidationBaseAlgorithm.h.
|
private |
Whether to remove the leading particles with incorrrectly reconstructed parents from metrics.
Definition at line 170 of file MuonLeadingEventValidationAlgorithm.h.
|
protectedinherited |
|
privateinherited |
The minimum particle completeness to declare a match.
Definition at line 232 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
The minimum particle purity to declare a match.
Definition at line 233 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
The minimum number of shared hits used in matching scheme.
Definition at line 231 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
Name of input MC particle list.
Definition at line 223 of file EventValidationBaseAlgorithm.h.
|
private |
Whether to run in michel mode.
Definition at line 167 of file MuonLeadingEventValidationAlgorithm.h.
|
privateinherited |
Name of input Pfo list.
Definition at line 224 of file EventValidationBaseAlgorithm.h.
|
protectedinherited |
|
protectedinherited |
The mc particle primary selection parameters.
Definition at line 192 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
Whether to print all/raw matching details to screen.
Definition at line 226 of file EventValidationBaseAlgorithm.h.
|
privateinherited |
Whether to print matching output to screen.
Definition at line 227 of file EventValidationBaseAlgorithm.h.
|
private |
Whether to remove the reconstructed cosmic ray hits from leading particle metrics.
Definition at line 165 of file MuonLeadingEventValidationAlgorithm.h.
|
protectedinherited |
Name of output tree.
Definition at line 196 of file EventValidationBaseAlgorithm.h.
|
protectedinherited |
|
privateinherited |
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits.
Definition at line 230 of file EventValidationBaseAlgorithm.h.
|
private |
The definition of a reconstructable MCParticle.
Definition at line 164 of file MuonLeadingEventValidationAlgorithm.h.
|
private |
Whether to visualize the MC and reco leading particles.
Definition at line 169 of file MuonLeadingEventValidationAlgorithm.h.
|
private |
Whether to write all matches to output tree.
Definition at line 171 of file MuonLeadingEventValidationAlgorithm.h.
|
privateinherited |
Whether to write all/raw matching details to tree.
Definition at line 228 of file EventValidationBaseAlgorithm.h.