LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
CosmicRayTaggingMonitoringTool.h
Go to the documentation of this file.
1 
8 #ifndef LAR_COSMIC_RAY_TAGGING_MONITORING_TOOL_H
9 #define LAR_COSMIC_RAY_TAGGING_MONITORING_TOOL_H 1
10 
12 
15 
16 #include <unordered_map>
17 
18 namespace lar_content
19 {
20 
25 {
26 public:
31 
32  void FindAmbiguousPfos(const pandora::PfoList &parentCosmicRayPfos, pandora::PfoList &ambiguousPfos, const MasterAlgorithm *const pAlgorithm);
33 
34 private:
39  {
48  };
49 
50  typedef std::map<const pandora::ParticleFlowObject *, float> PfoToFloatMap;
51  typedef std::map<const pandora::ParticleFlowObject *, Classification> PfoClassificationMap;
52 
64  const LArMCParticleHelper::PfoContributionMap &pfoToCaloHitListMap, const LArMCParticleHelper::MCContributionMapVector &targetsToGoodHitsMaps,
65  PfoToFloatMap &pfoSignificanceMap, PfoToFloatMap &pfoPurityMap, PfoClassificationMap &pfoClassificationMap) const;
66 
70  bool IsMainMCParticleMuon(const pandora::ParticleFlowObject *const pPfo) const;
71 
80  Classification ClassifyPfo(const unsigned int &nHits, const float &significance, const float &purity, const bool isMuon) const;
81 
86 
90  std::string GetClassificationName(const Classification &classification) const;
91 
102  void PrintPfoTable(const pandora::PfoVector &orderedPfoVector,
103  const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, const PfoToFloatMap &pfoPurityMap,
104  const PfoToFloatMap &pfoSignificanceMap, const PfoClassificationMap &pfoClassificationMap, const pandora::PfoList &ambiguousPfos) const;
105 
109  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
110 
113  float m_minPurity;
116  std::string m_caloHitList2D;
117 };
118 
119 } // namespace lar_content
120 
121 #endif // #ifndef LAR_COSMIC_RAY_TAGGING_MONITORING_TOOL_H
void CalculatePfoMetrics(const LArMCParticleHelper::PfoToMCParticleHitSharingMap &hitSharingMap, const LArMCParticleHelper::PfoContributionMap &pfoToCaloHitListMap, const LArMCParticleHelper::MCContributionMapVector &targetsToGoodHitsMaps, PfoToFloatMap &pfoSignificanceMap, PfoToFloatMap &pfoPurityMap, PfoClassificationMap &pfoClassificationMap) const
Calculate metrics to classify Pfos based on the target reconstructable MCParticles with which they sh...
Classification ClassifyPfo(const unsigned int &nHits, const float &significance, const float &purity, const bool isMuon) const
Classify a pfo given some metrics.
LArFormattingHelper::Color GetClassificationColor(const Classification &classification) const
Returns a unique color for each possible Pfo classification.
CosmicRayTaggingBaseTool class.
void FindAmbiguousPfos(const pandora::PfoList &parentCosmicRayPfos, pandora::PfoList &ambiguousPfos, const MasterAlgorithm *const pAlgorithm)
Find the list of ambiguous pfos (could represent cosmic-ray muons or neutrinos)
LArMCParticleHelper::PrimaryParameters m_parameters
Parameters used to decide when an MCParticle is reconstructable.
std::string GetClassificationName(const Classification &classification) const
Returns a string for each classification.
std::map< const pandora::ParticleFlowObject *, float > PfoToFloatMap
std::map< const pandora::ParticleFlowObject *, Classification > PfoClassificationMap
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read settings.
Header file for the master algorithm class.
Header file for the lar monte carlo particle helper helper class.
unsigned int m_minHitsToConsiderTagging
The minimum number of hits to consider a Pfo for tagging.
float m_minSignificance
The minimum significance to consider a Pfo as "significant".
std::vector< MCContributionMap > MCContributionMapVector
MasterAlgorithm class.
float m_minImpurity
The minimum impurity to consider a Pfo as "impure".
float m_minPurity
The minimum purity to consider a Pfo as "pure".
std::unordered_map< const pandora::ParticleFlowObject *, pandora::CaloHitList > PfoContributionMap
bool IsMainMCParticleMuon(const pandora::ParticleFlowObject *const pPfo) const
Returns true if the main MCParticle of the supplied Pfo is a muon.
std::map< const pandora::ParticleFlowObject *, MCParticleToSharedHitsVector > PfoToMCParticleHitSharingMap
void PrintPfoTable(const pandora::PfoVector &orderedPfoVector, const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, const PfoToFloatMap &pfoPurityMap, const PfoToFloatMap &pfoSignificanceMap, const PfoClassificationMap &pfoClassificationMap, const pandora::PfoList &ambiguousPfos) const
Prints a table detailing all input Pfos and their classifications.