8 #ifndef LAR_EVENT_VALIDATION_ALGORITHM_H 9 #define LAR_EVENT_VALIDATION_ALGORITHM_H 1 11 #include "Pandora/Algorithm.h" 16 #include "PandoraMonitoringApi.h" 125 pandora::StatusCode
Run();
135 void FillValidationInfo(
const pandora::MCParticleList *
const pMCParticleList,
const pandora::CaloHitList *
const pCaloHitList,
136 const pandora::PfoList *
const pPfoList,
ValidationInfo &validationInfo)
const;
138 typedef std::unordered_map<const pandora::ParticleFlowObject*, unsigned int>
PfoToIdMap;
169 void ProcessOutput(
const ValidationInfo &validationInfo,
const bool useInterpretedMatching,
const bool printToScreen,
const bool fillTree)
const;
212 bool IsGoodMatch(
const pandora::CaloHitList &trueHits,
const pandora::CaloHitList &recoHits,
const pandora::CaloHitList &sharedHits)
const;
214 pandora::StatusCode
ReadSettings(
const pandora::TiXmlHandle xmlHandle);
322 return this->
ProcessOutput(validationInfo,
false,
true,
false);
329 return this->
ProcessOutput(validationInfo,
true,
true,
false);
336 return this->
ProcessOutput(validationInfo,
true,
false,
true);
341 #endif // LAR_EVENT_VALIDATION_ALGORITHM_H
~EventValidationAlgorithm()
Destructor.
pandora::StatusCode Run()
std::string m_mcParticleListName
Name of input MC particle list.
std::string m_pfoListName
Name of input Pfo list.
void SetAllMCParticleToHitsMap(const LArMCParticleHelper::MCContributionMap &allMCParticleToHitsMap)
Set the all mc particle to hits map.
bool m_useTrueNeutrinosOnly
Whether to consider only mc particles that were neutrino induced.
int m_eventNumber
The event number.
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 SetTargetMCParticleToHitsMap(const LArMCParticleHelper::MCContributionMap &targetMCParticleToHitsMap)
Set the target 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_useSmallPrimaries
Whether to consider matches to mc primaries with fewer than m_matchingMinPrimaryHits.
bool m_printAllToScreen
Whether to print all/raw matching details to screen.
LArMCParticleHelper::MCParticleToPfoHitSharingMap m_mcToPfoHitSharingMap
The mc to pfo hit sharing map.
float m_matchingMinCompleteness
The minimum particle completeness to declare a match.
LArMCParticleHelper::MCContributionMap m_allMCParticleToHitsMap
The all mc particle to hits map.
bool m_testBeamMode
Whether pandora is reconstructing test beam particles.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
std::unordered_map< const pandora::ParticleFlowObject *, unsigned int > PfoToIdMap
bool m_printMatchingToScreen
Whether to print matching output to screen.
void PrintAllMatches(const ValidationInfo &validationInfo) const
Print all/raw matching information to screen.
float m_minHitSharingFraction
Minimum fraction of energy deposited by selected primary in a single "good" hit.
bool m_writeToTree
Whether to write all/raw matching details to tree.
std::string m_treeName
Name of output tree.
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 con...
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
Header file for the lar monte carlo particle helper helper class.
void SetPfoToHitsMap(const LArMCParticleHelper::PfoContributionMap &pfoToHitsMap)
Set the pfo to hits map.
LArMCParticleHelper::PfoContributionMap m_pfoToHitsMap
The pfo to hits map.
const LArMCParticleHelper::PfoContributionMap & GetPfoToHitsMap() const
Get the pfo to hits map.
std::map< const pandora::MCParticle *, PfoToSharedHitsVector > MCParticleToPfoHitSharingMap
void PrintInterpretedMatches(const ValidationInfo &validationInfo) const
Print interpreted matching information to screen.
std::vector< pandora::HitType > HitTypeVector
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.
bool m_selectInputHits
Whether to use only hits passing mc-based quality (is "reconstructable") checks.
void SetMCToPfoHitSharingMap(const LArMCParticleHelper::MCParticleToPfoHitSharingMap &mcToPfoHitSharingMap)
Set the mc to pfo hit sharing map.
int m_fileIdentifier
The input file identifier.
void SetInterpretedMCToPfoHitSharingMap(const LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap)
Set the interpreted mc to pfo hit sharing map.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
EventValidationAlgorithm()
Default constructor.
EventValidationAlgorithm class.
std::string m_fileName
Name of output file.
const LArMCParticleHelper::MCContributionMap & GetAllMCParticleToHitsMap() const
Get the all mc particle to hits map.
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.
LArMCParticleHelper::MCParticleToPfoHitSharingMap m_interpretedMCToPfoHitSharingMap
The interpreted mc to pfo hit sharing map.
float m_matchingMinPurity
The minimum particle purity to declare a match.
unsigned int m_matchingMinSharedHits
The minimum number of shared hits used in matching scheme.
float m_maxPhotonPropagation
Maximum distance travelled by photon, downstream of a track, in mc particle hierarchy.
LArMCParticleHelper::MCContributionMap m_targetMCParticleToHitsMap
The target mc particle to hits map.
std::unordered_map< const pandora::ParticleFlowObject *, pandora::CaloHitList > PfoContributionMap
void WriteInterpretedMatches(const ValidationInfo &validationInfo) const
Write interpreted matching information to tree.
const LArMCParticleHelper::MCParticleToPfoHitSharingMap & GetInterpretedMCToPfoHitSharingMap() const
Get the interpreted mc to pfo hit sharing map.
std::string m_caloHitListName
Name of input calo hit list.
const LArMCParticleHelper::MCParticleToPfoHitSharingMap & GetMCToPfoHitSharingMap() const
Get the mc to pfo hit sharing map.
void InterpretMatching(const ValidationInfo &validationInfo, LArMCParticleHelper::MCParticleToPfoHitSharingMap &interpretedMCToPfoHitSharingMap) const
Apply an interpretative matching procedure to the comprehensive matches in the provided validation in...
const LArMCParticleHelper::MCContributionMap & GetTargetMCParticleToHitsMap() const
Get the target mc particle to hits map.