HierarchyMonitoringAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArMonitoring/HierarchyMonitoringAlgorithm.h
3  *
4  * @brief Header file for the particle visualisation algorithm.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_HIERARCHY_MONITORING_ALGORITHM_H
9 #define LAR_HIERARCHY_MONITORING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 #include "Pandora/PandoraEnumeratedTypes.h"
13 
15 
16 namespace lar_content
17 {
18 
19 /**
20  * @brief HierarchyMonitoringAlgorithm class
21  */
22 class HierarchyMonitoringAlgorithm : public pandora::Algorithm
23 {
24 public:
25  /**
26  * @brief Default constructor
27  */
29 
31 
32 private:
33  pandora::StatusCode Run();
34  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
35 
36  /**
37  * @brief Visualize MC nodes.
38  *
39  * @param hierarchy The MC hierarchy to render
40  **/
41  void VisualizeMC(const LArHierarchyHelper::MCHierarchy &hierarchy) const;
42 
43  /**
44  * @brief Visualize MC nodes without grouping by particle id.
45  *
46  * @param hierarchy The MC hierarchy to render
47  **/
48  void VisualizeMCDistinct(const LArHierarchyHelper::MCHierarchy &hierarchy) const;
49 
50  /**
51  * @brief Visualize MC nodes based on the MC process that created them.
52  *
53  * @param hierarchy The MC hierarchy to render
54  **/
55  void VisualizeMCProcess(const LArHierarchyHelper::MCHierarchy &hierarchy) const;
56 
57  /**
58  * @brief Visualize the reco nodes.
59  *
60  * @param hierarchy The reco hierarchy to render
61  **/
62  void VisualizeReco(const LArHierarchyHelper::RecoHierarchy &hierarchy) const;
63 
64  /**
65  * @brief Visualize reco to MC matches.
66  *
67  * @param matchInfo The match information between reco and MC hierarchies
68  */
69  void VisualizeMatches(const LArHierarchyHelper::MatchInfo &matchInfo) const;
70 
71  /**
72  * @brief Visualize the reco nodes matched to a single MC node
73  *
74  * @param matches The MC to reco matches
75  * @param mcIdx The unique identifier for the MC particle
76  */
77  void VisualizeMatchedMC(const LArHierarchyHelper::MCMatches &matches, const int mcIdx) const;
78 
79  /**
80  * @brief Visualize the unmatched reco node
81  *
82  * @param pNode The unmatched reco node
83  */
85 
86  /**
87  * @brief Visualize a calo hit list
88  *
89  * @param hits The hits to visualize
90  * @param label The label to apply to the hits
91  * @param color The color to apply to the hits
92  */
93  void Visualize(const pandora::CaloHitList &hits, const std::string &label, const int color) const;
94 
95  /**
96  * @brief Fill per view hit lists
97  *
98  * @param hits The input list of hits
99  * @param uHits The output list of hits in U
100  * @param vHits The output list of hits in V
101  * @param wHits The output list of hits in W
102  */
103  void FillHitLists(const pandora::CaloHitList &hits, pandora::CaloHitList &uHits, pandora::CaloHitList &vHits, pandora::CaloHitList &wHits) const;
104 
105  std::string m_caloHitListName; ///< Name of input calo hit list
106  std::string m_pfoListName; ///< Name of input PFO list
107  bool m_visualizeMC; ///< Whether or not to visualize the MC nodes
108  bool m_visualizeReco; ///< Whether or not to visualize the reco nodes
109  bool m_visualizeDistinct; ///< If true, allocate colours without consideration of particle id
110  bool m_visualizeProcess; ///< If true, allocate colours based on the MC process
111  bool m_match; ///< Whether or not to visualize the reco to MC matches
112  bool m_collectionOnly; ///< Limit display to the collection plane only
113  bool m_foldToPrimaries; ///< Whether or not to fold everything back to primaries
114  bool m_foldDynamic; ///< Whether or not to fold based on process information
115  float m_transparencyThresholdE; ///< Cell energy for which transparency is saturated (0%, fully opaque)
116  float m_energyScaleThresholdE; ///< Cell energy for which color is at top end of continous color palette
117  float m_scalingFactor; ///< TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too)
118 };
119 
120 } // namespace lar_content
121 
122 #endif // LAR_HIERARCHY_MONITORING_ALGORITHM_H
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
void Visualize(const pandora::CaloHitList &hits, const std::string &label, const int color) const
Visualize a calo hit list.
std::string m_pfoListName
Name of input PFO list.
bool m_visualizeMC
Whether or not to visualize the MC nodes.
std::string string
Definition: nybbler.cc:12
void VisualizeMatchedMC(const LArHierarchyHelper::MCMatches &matches, const int mcIdx) const
Visualize the reco nodes matched to a single MC node.
bool m_visualizeProcess
If true, allocate colours based on the MC process.
void VisualizeMCProcess(const LArHierarchyHelper::MCHierarchy &hierarchy) const
Visualize MC nodes based on the MC process that created them.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
bool m_visualizeReco
Whether or not to visualize the reco nodes.
void VisualizeUnmatchedReco(const LArHierarchyHelper::RecoHierarchy::Node *pNode) const
Visualize the unmatched reco node.
void VisualizeMatches(const LArHierarchyHelper::MatchInfo &matchInfo) const
Visualize reco to MC matches.
bool m_foldToPrimaries
Whether or not to fold everything back to primaries.
void VisualizeReco(const LArHierarchyHelper::RecoHierarchy &hierarchy) const
Visualize the reco nodes.
void VisualizeMC(const LArHierarchyHelper::MCHierarchy &hierarchy) const
Visualize MC nodes.
std::string m_caloHitListName
Name of input calo hit list.
void FillHitLists(const pandora::CaloHitList &hits, pandora::CaloHitList &uHits, pandora::CaloHitList &vHits, pandora::CaloHitList &wHits) const
Fill per view hit lists.
bool m_match
Whether or not to visualize the reco to MC matches.
std::size_t color(std::string const &procname)
Header file for the lar hierarchy helper class.
bool m_collectionOnly
Limit display to the collection plane only.
void VisualizeMCDistinct(const LArHierarchyHelper::MCHierarchy &hierarchy) const
Visualize MC nodes without grouping by particle id.
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)
bool m_foldDynamic
Whether or not to fold based on process information.
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
bool m_visualizeDistinct
If true, allocate colours without consideration of particle id.