All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LArMonitoringHelper.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArHelpers/LArMonitoringHelper.h
3  *
4  * @brief Header file for the lar monitoring helper helper class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_MONITORING_HELPER_H
9 #define LAR_MONITORING_HELPER_H 1
10 
11 #include "Pandora/PandoraInternal.h"
12 
14 
15 namespace lar_content
16 {
17 
18 /**
19  * @brief LArMonitoringHelper class
20  */
22 {
23 public:
24  /**
25  * @brief Count the number of calo hits, in a provided list, of a specified type
26  *
27  * @param hitType the hit type
28  * @param caloHitList the calo hit list
29  *
30  * @return the number of calo hits of the specified type
31  */
32  static unsigned int CountHitsByType(const pandora::HitType hitType, const pandora::CaloHitList &caloHitList);
33 
34  /**
35  * @brief Order input MCParticles by their number of hits.
36  *
37  * @param selectedMCParticleToGoodHitsMaps the input vector of mappings from selected reconstructable MCParticles to their good hits
38  * @param orderedMCParticleVector the output vector of ordered MCParticles
39  */
40  static void GetOrderedMCParticleVector(const LArMCParticleHelper::MCContributionMapVector &selectedMCParticleToGoodHitsMaps,
41  pandora::MCParticleVector &orderedMCParticleVector);
42 
43  /**
44  * @brief Order input Pfos by their number of hits.
45  *
46  * @param pfoToReconstructable2DHitsMap the input vector of mappings from Pfos to their reconstructable hits
47  * @param orderedPfoVector the output vector of ordered Pfos
48  */
49  static void GetOrderedPfoVector(const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, pandora::PfoVector &orderedPfoVector);
50 
51  /**
52  * @brief Print details of selected MCParticles to the terminal in a table.
53  *
54  * @param selectedMCParticleToGoodHitsMap the input mapping from selected reconstructable MCParticles to their good hits
55  * @param orderedMCParticleVector the input vector of ordered MCParticles
56  */
57  static void PrintMCParticleTable(const LArMCParticleHelper::MCContributionMap &selectedMCParticleToGoodHitsMaps,
58  const pandora::MCParticleVector &orderedMCParticleVector);
59 
60  /**
61  * @brief Print details of input Pfos to the terminal in a table.
62  *
63  * @param pfoToReconstructable2DHitsMap the input vector of mappings from Pfos to their reconstructable hits
64  * @param orderedPfoVector the input vector of ordered Pfos
65  */
66  static void PrintPfoTable(const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, const pandora::PfoVector &orderedPfoVector);
67 
68  /**
69  * @brief Print the shared good hits between all Pfos and MCParticles
70  *
71  * @param orderedPfoVector the input vector of ordered Pfos
72  * @param orderedMCParticleVector the input vector of ordered MCParticles
73  * @param mcParticleToPfoHitSharingMap the output mapping from selected reconstructable MCParticles to Pfos and the number hits shared
74  * @param nMatches the maximum number of Pfo matches to show
75  */
76  static void PrintMatchingTable(const pandora::PfoVector &orderedPfoVector, const pandora::MCParticleVector &orderedMCParticleVector,
77  const LArMCParticleHelper::MCParticleToPfoHitSharingMap &mcParticleToPfoHitSharingMap, const unsigned int nMatches);
78 };
79 
80 } // namespace lar_content
81 
82 #endif // #ifndef LAR_MONITORING_HELPER_H
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
static void PrintMCParticleTable(const LArMCParticleHelper::MCContributionMap &selectedMCParticleToGoodHitsMaps, const pandora::MCParticleVector &orderedMCParticleVector)
Print details of selected MCParticles to the terminal in a table.
std::map< const pandora::MCParticle *, PfoToSharedHitsVector > MCParticleToPfoHitSharingMap
static void GetOrderedMCParticleVector(const LArMCParticleHelper::MCContributionMapVector &selectedMCParticleToGoodHitsMaps, pandora::MCParticleVector &orderedMCParticleVector)
Order input MCParticles by their number of hits.
Header file for the lar monte carlo particle helper helper class.
LArMonitoringHelper class.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
static void GetOrderedPfoVector(const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, pandora::PfoVector &orderedPfoVector)
Order input Pfos by their number of hits.
std::vector< MCContributionMap > MCContributionMapVector
static void PrintMatchingTable(const pandora::PfoVector &orderedPfoVector, const pandora::MCParticleVector &orderedMCParticleVector, const LArMCParticleHelper::MCParticleToPfoHitSharingMap &mcParticleToPfoHitSharingMap, const unsigned int nMatches)
Print the shared good hits between all Pfos and MCParticles.
std::unordered_map< const pandora::ParticleFlowObject *, pandora::CaloHitList > PfoContributionMap
static unsigned int CountHitsByType(const pandora::HitType hitType, const pandora::CaloHitList &caloHitList)
Count the number of calo hits, in a provided list, of a specified type.
static void PrintPfoTable(const LArMCParticleHelper::PfoContributionMap &pfoToReconstructable2DHitsMap, const pandora::PfoVector &orderedPfoVector)
Print details of input Pfos to the terminal in a table.