8#ifndef LAR_EVENT_VALIDATION_BASE_ALGORITHM_H
9#define LAR_EVENT_VALIDATION_BASE_ALGORITHM_H 1
16#include "PandoraMonitoringApi.h"
145 const ValidationInfo &validationInfo,
const bool useInterpretedMatching,
const bool printToScreen,
const bool fillTree)
const = 0;
250 return m_targetMCParticleToHitsMap;
257 return m_pfoToHitsMap;
264 return m_mcToPfoHitSharingMap;
271 return m_interpretedMCToPfoHitSharingMap;
278 m_allMCParticleToHitsMap = allMCParticleToHitsMap;
285 m_targetMCParticleToHitsMap = targetMCParticleToHitsMap;
292 m_pfoToHitsMap = pfoToHitsMap;
299 m_mcToPfoHitSharingMap = mcToPfoHitSharingMap;
307 m_interpretedMCToPfoHitSharingMap = interpretedMCToPfoHitSharingMap;
315 return this->
ProcessOutput(validationInfo,
false,
true,
false);
322 return this->
ProcessOutput(validationInfo,
true,
true,
false);
329 return this->
ProcessOutput(validationInfo,
true,
false,
true);
Header file for the algorithm class.
Header file for the lar monte carlo particle helper helper class.
void SetInterpretedMCToPfoHitSharingMap(const LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap)
Set the interpreted mc to pfo hit sharing map.
void SetAllMCParticleToHitsMap(const LArMCParticleHelper::MCContributionMap &allMCParticleToHitsMap)
Set the all mc particle to hits map.
const LArMCParticleHelper::MCParticleToPfoHitSharingMap & GetMCToPfoHitSharingMap() const
Get the mc to pfo hit sharing map.
LArMCParticleHelper::PfoContributionMap m_pfoToHitsMap
The pfo to hits map.
const LArMCParticleHelper::MCParticleToPfoHitSharingMap & GetInterpretedMCToPfoHitSharingMap() const
Get the interpreted mc to pfo hit sharing map.
const LArMCParticleHelper::MCContributionMap & GetTargetMCParticleToHitsMap() const
Get the target mc particle to hits map.
const LArMCParticleHelper::MCContributionMap & GetAllMCParticleToHitsMap() const
Get the all mc particle to hits map.
LArMCParticleHelper::MCParticleToPfoHitSharingMap m_interpretedMCToPfoHitSharingMap
The interpreted mc to pfo hit sharing map.
LArMCParticleHelper::MCParticleToPfoHitSharingMap m_mcToPfoHitSharingMap
The mc to pfo hit sharing map.
LArMCParticleHelper::MCContributionMap m_allMCParticleToHitsMap
The all mc particle to hits map.
void SetPfoToHitsMap(const LArMCParticleHelper::PfoContributionMap &pfoToHitsMap)
Set the pfo to hits map.
void SetTargetMCParticleToHitsMap(const LArMCParticleHelper::MCContributionMap &targetMCParticleToHitsMap)
Set the target mc particle to hits map.
const LArMCParticleHelper::PfoContributionMap & GetPfoToHitsMap() const
Get the pfo to hits map.
LArMCParticleHelper::MCContributionMap m_targetMCParticleToHitsMap
The target mc particle to hits map.
void SetMCToPfoHitSharingMap(const LArMCParticleHelper::MCParticleToPfoHitSharingMap &mcToPfoHitSharingMap)
Set the mc to pfo hit sharing map.
EventValidationBaseAlgorithm class.
unsigned int m_matchingMinSharedHits
The minimum number of shared hits used in matching scheme.
bool m_useSmallPrimaries
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits.
void PrintInterpretedMatches(const ValidationInfo &validationInfo) const
Print interpreted matching information to screen.
std::string m_treeName
Name of output tree.
void InterpretMatching(const ValidationInfo &validationInfo, LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap) const
Apply an interpretative matching procedure to the comprehensive matches in the provided validation in...
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...
~EventValidationBaseAlgorithm()
Destructor.
bool m_printAllToScreen
Whether to print all/raw matching details to screen.
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 WriteInterpretedMatches(const ValidationInfo &validationInfo) const
Write interpreted matching information to tree.
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.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
bool m_writeToTree
Whether to write all/raw matching details to tree.
int m_fileIdentifier
The input file identifier.
bool m_printMatchingToScreen
Whether to print matching output to screen.
float m_matchingMinCompleteness
The minimum particle completeness to declare a match.
LArMCParticleHelper::PrimaryParameters m_primaryParameters
The mc particle primary selection parameters.
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.
void PrintAllMatches(const ValidationInfo &validationInfo) const
Print all/raw matching information to screen.
std::string m_caloHitListName
Name of input calo hit list.
float m_matchingMinPurity
The minimum particle purity to declare a match.
std::string m_mcParticleListName
Name of input MC particle list.
std::string m_fileName
Name of output file.
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::string m_pfoListName
Name of input Pfo list.
int m_eventNumber
The event number.
pandora::StatusCode Run()
Run the algorithm.
EventValidationBaseAlgorithm()
Default constructor.
std::unordered_map< const pandora::ParticleFlowObject *, pandora::CaloHitList > PfoContributionMap
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
std::map< const pandora::MCParticle *, PfoToSharedHitsVector > MCParticleToPfoHitSharingMap
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
MANAGED_CONTAINER< const MCParticle * > MCParticleList
std::unordered_set< const ParticleFlowObject * > PfoSet
MANAGED_CONTAINER< const CaloHit * > CaloHitList
std::vector< const MCParticle * > MCParticleVector
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList