HerdSoftware  0.3.2
HWCaloEventDisplay.h
Go to the documentation of this file.
1 /*
2  * HWCaloEventDisplay.h
3  *
4  * Created on: 08 May 2019
5  * Author: Valerio Formato
6  */
7 
8 // HERD headers
12 #include "dataobjects/CaloHits.h"
13 
14 // ROOT headers
15 #include "TEveGeoNode.h"
16 
17 // c++ headers
18 #include <unordered_map>
19 
20 #ifndef HWCaloEventDisplay_H_
21 #define HWCaloEventDisplay_H_
22 
23 namespace Herd {
25 public:
27  ~HWCaloEventDisplay() = default;
28 
29  void GenerateHashTable(TEveGeoNode *node);
30  void ImportCaloHits(const CaloHits &caloHits, const CaloGeoParams &caloParams);
31  void SetRenderState(bool renderState);
32 
33  TEveElementList *CaloHits3D;
34  TEveElementList *CaloHitsXZ;
35  TEveElementList *CaloHitsYZ;
36  TEveElementList *CaloHitsXY;
37 
38 private:
39  std::unordered_map<std::string, TEveGeoShape *> m_EGSMap;
40  std::map<RefFrame::View, std::unique_ptr<VPalette>> m_palettes;
41  std::unique_ptr<VPalette> m_3Dpalette;
42 
43  struct CaloProjHit {
44  int iu;
45  int iv;
46  float eDep;
47  float u;
48  float v;
49  };
50 
51 public:
52  using projHitIteratorBase = std::pair<std::pair<int, int>, CaloProjHit>;
53  using CaloProjHits = std::map<std::pair<int, int>, CaloProjHit>;
54  void Draw3DHits(const CaloHits &caloHits, const CaloGeoParams &caloParams);
55  void DrawProjectedHits(const CaloProjHits &projHits, RefFrame::View view);
56 
57  CaloProjHits ProjectHits(const CaloHits &hits, const CaloGeoParams &geoParams, RefFrame::Axis dir1,
58  RefFrame::Axis dir2);
59 };
60 } // namespace Herd
61 
62 #endif
std::map< RefFrame::View, std::unique_ptr< VPalette > > m_palettes
Definition: HWCaloEventDisplay.h:40
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
int iv
Definition: HWCaloEventDisplay.h:45
Definition: HWCaloEventDisplay.h:43
HWCaloEventDisplay()
Definition: HWCaloEventDisplay.cpp:38
CaloProjHits ProjectHits(const CaloHits &hits, const CaloGeoParams &geoParams, RefFrame::Axis dir1, RefFrame::Axis dir2)
Definition: HWCaloEventDisplay.cpp:61
std::unordered_map< std::string, TEveGeoShape * > m_EGSMap
Definition: HWCaloEventDisplay.h:39
float v
Definition: HWCaloEventDisplay.h:48
void GenerateHashTable(TEveGeoNode *node)
Definition: HWCaloEventDisplay.cpp:214
Axis
Aliases for the axes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:36
TEveElementList * CaloHitsXZ
Definition: HWCaloEventDisplay.h:34
int iu
Definition: HWCaloEventDisplay.h:44
std::pair< std::pair< int, int >, CaloProjHit > projHitIteratorBase
Definition: HWCaloEventDisplay.h:52
Data structure for the Calo geometry parameters.
Definition: CaloGeoParams.h:34
Definition: HWCaloEventDisplay.h:24
void ImportCaloHits(const CaloHits &caloHits, const CaloGeoParams &caloParams)
Definition: HWCaloEventDisplay.cpp:81
TEveElementList * CaloHits3D
Definition: HWCaloEventDisplay.h:33
std::map< std::pair< int, int >, CaloProjHit > CaloProjHits
Definition: HWCaloEventDisplay.h:53
float u
Definition: HWCaloEventDisplay.h:47
std::unique_ptr< VPalette > m_3Dpalette
Definition: HWCaloEventDisplay.h:41
float eDep
Definition: HWCaloEventDisplay.h:46
TEveElementList * CaloHitsYZ
Definition: HWCaloEventDisplay.h:35
void Draw3DHits(const CaloHits &caloHits, const CaloGeoParams &caloParams)
Definition: HWCaloEventDisplay.cpp:167
void SetRenderState(bool renderState)
Definition: HWCaloEventDisplay.cpp:54
TEveElementList * CaloHitsXY
Definition: HWCaloEventDisplay.h:36
View
Aliases for the three 2D projection planes. RefFrame.h common/RefFrame.h.
Definition: RefFrame.h:93
Container for the hits of a single CALO detector.
Definition: HWBaseEventDisplay.h:19
void DrawProjectedHits(const CaloProjHits &projHits, RefFrame::View view)
Definition: HWCaloEventDisplay.cpp:88