LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MuonLeadingEventValidationAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_MUON_LEADING_EVENT_VALIDATION_ALGORITHM_H
9 #define LAR_MUON_LEADING_EVENT_VALIDATION_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
16 
17 #ifdef MONITORING
18 #include "PandoraMonitoringApi.h"
19 #endif
20 
21 #include <map>
22 
23 namespace lar_content
24 {
29 {
30 public:
35 
40 
41 private:
50  void FillValidationInfo(const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList,
51  const pandora::PfoList *const pPfoList, ValidationInfo &validationInfo) const;
52 
61  void GetRecoCosmicRayHits(const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList,
62  const pandora::PfoList *const pPfoList, pandora::CaloHitList &recoCosmicRayHitList) const;
63 
74  void PerformUnfoldedMatching(const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList,
75  const pandora::PfoList *const pPfoList, const pandora::CaloHitList &recoCosmicRayHitList, const float minHitSharingFraction,
76  ValidationInfo &validationInfo) const;
77 
86  void RemoveIncorrectlyReconstructedCosmicRays(const pandora::MCParticleList *const pMCParticleList,
87  const pandora::CaloHitList *const pCaloHitList, const pandora::PfoList *const pPfoList, ValidationInfo &validationInfo) const;
88 
97  void DetermineIncorrectlyReconstructedCosmicRays(const pandora::MCParticleList *const pMCParticleList, const pandora::CaloHitList *const pCaloHitList,
98  const pandora::PfoList *const pPfoList, pandora::MCParticleList &incorrectlyReconstructedCosmicRays) const;
99 
108  void ProcessOutput(const ValidationInfo &validationInfo, const bool useInterpretedMatching, const bool printToScreen, const bool fillTree) const;
109 
116 #ifdef MONITORING
117  void PrintHits(const pandora::CaloHitList caloHitList, const bool isCR) const;
118 #endif
119 
129 #ifdef MONITORING
130  void PrintHits(const pandora::CaloHitList totalCaloHitList, const pandora::CaloHitList otherShowerCaloHitList,
131  const pandora::CaloHitList otherTrackCaloHitList, const pandora::CaloHitList parentTrackCaloHitList, const std::string &stringTag) const;
132 #endif
133 
141  void PrintHits(const pandora::CaloHitList totalCaloHitList, const pandora::CaloHitList leadingCaloHitList, const std::string &stringTag) const;
142 
150  void FillContaminationHitsDistance(const pandora::CaloHitList &contaminationHits, const pandora::CaloHitList &leadingMCHits,
151  pandora::FloatVector &bestMatchContaminationHitsDistance) const;
152 
160  void GetHitsOfType(const pandora::CaloHitList &inputList, const pandora::HitType hitType, pandora::CaloHitList &outputList) const;
161 
162  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
163 
169  bool m_visualize;
172  std::vector<int> m_deltaRayIDs;
173 };
174 
175 } // namespace lar_content
176 
177 #endif // LAR_MUON_LEADING_EVENT_VALIDATION_ALGORITHM_H
bool m_removeRecoCosmicRayHits
Whether to remove the reconstructed cosmic ray hits from leading particle metrics.
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 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.
std::vector< int > m_deltaRayIDs
If filled, to contain the list leading particles to run metrics over.
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 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 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...
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.
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.
bool m_visualize
Whether to visualize the MC and reco leading particles.
Header file for the event validation algorithm.
int m_cosmicRaysToSkip
The number of reconstructable cosmic rays to skip.
Header file for the muon leading helper class.
bool m_ignoreIncorrectCosmicRays
Whether to remove the leading particles with incorrrectly reconstructed parents from metrics...
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 ...
LArMuonLeadingHelper::ValidationParameters m_validationParameters
The definition of a reconstructable MCParticle.
HitType
Definition: HitType.h:12
bool m_writeRawMatchesToTree
Whether to write all matches to output tree.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)