8 #ifndef LAR_EVENT_VALIDATION_BASE_ALGORITHM_H 9 #define LAR_EVENT_VALIDATION_BASE_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 16 #include "PandoraMonitoringApi.h" 133 virtual void FillValidationInfo(
const pandora::MCParticleList *
const pMCParticleList,
const pandora::CaloHitList *
const pCaloHitList,
134 const pandora::PfoList *
const pPfoList,
ValidationInfo &validationInfo)
const = 0;
145 const ValidationInfo &validationInfo,
const bool useInterpretedMatching,
const bool printToScreen,
const bool fillTree)
const = 0;
188 bool IsGoodMatch(
const pandora::CaloHitList &trueHits,
const pandora::CaloHitList &recoHits,
const pandora::CaloHitList &sharedHits)
const;
190 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
199 pandora::StatusCode
Run();
315 return this->
ProcessOutput(validationInfo,
false,
true,
false);
322 return this->
ProcessOutput(validationInfo,
true,
true,
false);
329 return this->
ProcessOutput(validationInfo,
true,
false,
true);
334 #endif // LAR_EVENT_VALIDATION_BASE_ALGORITHM_H
const LArMCParticleHelper::PfoContributionMap & GetPfoToHitsMap() const
Get the pfo to hits map.
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
const LArMCParticleHelper::MCContributionMap & GetTargetMCParticleToHitsMap() const
Get the target mc particle to hits map.
int m_eventNumber
The event number.
int m_fileIdentifier
The input file identifier.
void InterpretMatching(const ValidationInfo &validationInfo, LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap) const
Apply an interpretative matching procedure to the comprehensive matches in the provided validation in...
void PrintAllMatches(const ValidationInfo &validationInfo) const
Print all/raw matching information to screen.
LArMCParticleHelper::MCParticleToPfoHitSharingMap m_mcToPfoHitSharingMap
The mc to pfo hit sharing map.
LArMCParticleHelper::PfoContributionMap m_pfoToHitsMap
The pfo to hits map.
const LArMCParticleHelper::MCContributionMap & GetAllMCParticleToHitsMap() const
Get the all mc particle to hits map.
float m_matchingMinPurity
The minimum particle purity to declare a match.
std::map< const pandora::MCParticle *, PfoToSharedHitsVector > MCParticleToPfoHitSharingMap
const LArMCParticleHelper::MCParticleToPfoHitSharingMap & GetMCToPfoHitSharingMap() const
Get the mc to pfo hit sharing map.
void SetInterpretedMCToPfoHitSharingMap(const LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap)
Set the interpreted mc to pfo hit sharing map.
pandora::StatusCode Run()
void SetMCToPfoHitSharingMap(const LArMCParticleHelper::MCParticleToPfoHitSharingMap &mcToPfoHitSharingMap)
Set the mc to pfo hit sharing map.
bool m_printAllToScreen
Whether to print all/raw matching details to screen.
~EventValidationBaseAlgorithm()
Destructor.
EventValidationBaseAlgorithm class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void WriteInterpretedMatches(const ValidationInfo &validationInfo) const
Write interpreted matching information to tree.
std::string m_pfoListName
Name of input Pfo list.
void PrintInterpretedMatches(const ValidationInfo &validationInfo) const
Print interpreted matching information to screen.
void SetTargetMCParticleToHitsMap(const LArMCParticleHelper::MCContributionMap &targetMCParticleToHitsMap)
Set the target mc particle to hits map.
LArMCParticleHelper::MCContributionMap m_allMCParticleToHitsMap
The all mc particle to hits map.
Header file for the lar monte carlo particle helper helper class.
LArMCParticleHelper::PrimaryParameters m_primaryParameters
The mc particle primary selection parameters.
std::string m_fileName
Name of output file.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
const LArMCParticleHelper::MCParticleToPfoHitSharingMap & GetInterpretedMCToPfoHitSharingMap() const
Get the interpreted mc to pfo hit sharing map.
std::string m_mcParticleListName
Name of input MC particle list.
bool m_writeToTree
Whether to write all/raw matching details to tree.
unsigned int m_matchingMinSharedHits
The minimum number of shared hits used in matching scheme.
LArMCParticleHelper::MCContributionMap m_targetMCParticleToHitsMap
The target mc particle to hits map.
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 con...
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...
bool m_useSmallPrimaries
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits.
void SetAllMCParticleToHitsMap(const LArMCParticleHelper::MCContributionMap &allMCParticleToHitsMap)
Set the all mc particle to hits map.
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 m_printMatchingToScreen
Whether to print matching output to screen.
std::string m_treeName
Name of output tree.
EventValidationBaseAlgorithm()
Default constructor.
void SetPfoToHitsMap(const LArMCParticleHelper::PfoContributionMap &pfoToHitsMap)
Set the pfo to hits map.
LArMCParticleHelper::MCParticleToPfoHitSharingMap m_interpretedMCToPfoHitSharingMap
The interpreted mc to pfo hit sharing map.
float m_matchingMinCompleteness
The minimum particle completeness to declare a match.
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.
std::unordered_map< const pandora::ParticleFlowObject *, pandora::CaloHitList > PfoContributionMap
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.
std::string m_caloHitListName
Name of input calo hit list.