All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VisualParticleMonitoringAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArMonitoring/VisualParticleMonitoringAlgorithm.h
3  *
4  * @brief Header file for the particle visualisation algorithm.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_VISUAL_PARTICLE_MONITORING_ALGORITHM_H
9 #define LAR_VISUAL_PARTICLE_MONITORING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
14 
15 namespace lar_content
16 {
17 
18 /**
19  * @brief VisualParticleMonitoringAlgorithm class
20  */
21 class VisualParticleMonitoringAlgorithm : public pandora::Algorithm
22 {
23 public:
24  /**
25  * @brief Default constructor
26  */
28 
30 
31 private:
32  pandora::StatusCode Run();
33  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
34 
35 #ifdef MONITORING
36  /**
37  * @brief Visualize all MC particles independently.
38  *
39  * This function ensures each MC particle has its own entry in the TEve tree, though common PDG colour scheme is used.
40  *
41  * @param mcMap The map from MC particles to calo hits
42  **/
43  void VisualizeIndependentMC(const LArMCParticleHelper::MCContributionMap &mcMap) const;
44 
45  /**
46  * @brief Visualize the MC particles according to their PDG codes.
47  *
48  * This function groups hits from MC particles into a single species per view.
49  *
50  * @param mcMap The map from MC particles to calo hits
51  **/
52  void VisualizeMCByPdgCode(const LArMCParticleHelper::MCContributionMap &mcMap) const;
53 
54  /**
55  * @brief Visualize the PFO particles independently (not colour-coded by PID).
56  *
57  * This function visualises each PFO.
58  *
59  * @param pfoList The list of PFOs to visualize
60  **/
61  void VisualizeIndependentPfo(const pandora::PfoList &pfoList) const;
62 
63  /**
64  * @brief Visualize the PFO particles independently (not colour-coded by PID).
65  *
66  * This function visualises each PFO.
67  *
68  * @param pfoList The list of PFOs to visualize
69  * @param mcMap The map from MC particles to calo hits
70  **/
71  void VisualizeIndependentPfo(const pandora::PfoList &pfoList, const LArMCParticleHelper::MCContributionMap &mcMap) const;
72 
73  /**
74  * @brief Visualize the PFO particles according to their PID.
75  *
76  * This function visualises each PFO according to its particle ID.
77  *
78  * @param pfoList The list of PFOs to visualize
79  **/
80  void VisualizePfoByParticleId(const pandora::PfoList &pfoList) const;
81 
82  /**
83  * @brief Selects the MC particles to consider based on reconstructability criteria
84  *
85  * @param pMCList The input MC particle list
86  * @param calotHitList The input calo hit list
87  * @param mcMap The output map from MC particles to calo hits
88  **/
89  void MakeSelection(const pandora::MCParticleList *pMCList, const pandora::CaloHitList *pCaloHitList,
91 #endif // MONITORING
92 
93  std::string m_caloHitListName; ///< Name of input calo hit list
94  std::string m_pfoListName; ///< Name of input PFO list
95  bool m_visualizeMC; ///< Whether or not to visualize MC particles
96  bool m_visualizePfo; ///< Whether or not to visualize PFOs
97  bool m_groupMCByPdg; ///< Whether or not to group MC particles by particle id
98  bool m_showPfoByPid; ///< Whether or not to colour PFOs by particle id
99  bool m_showPfoMatchedMC; ///< Whether or not to display the best matched MC particle for a PFO
100  bool m_isTestBeam; ///< Whether or not this is a test beam experiment
101  float m_transparencyThresholdE; ///< Cell energy for which transparency is saturated (0%, fully opaque)
102  float m_energyScaleThresholdE; ///< Cell energy for which color is at top end of continous color palette
103  float m_scalingFactor; ///< TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too)
104 };
105 
106 } // namespace lar_content
107 
108 #endif // LAR_VISUAL_PARTICLE_MONITORING_ALGORITHM_H
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
bool m_showPfoMatchedMC
Whether or not to display the best matched MC particle for a PFO.
bool m_showPfoByPid
Whether or not to colour PFOs by particle id.
Header file for the lar monte carlo particle helper helper class.
bool m_isTestBeam
Whether or not this is a test beam experiment.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
bool m_groupMCByPdg
Whether or not to group MC particles by particle id.
std::string m_caloHitListName
Name of input calo hit list.
bool m_visualizeMC
Whether or not to visualize MC particles.