LDMX Software
Objects.h
Go to the documentation of this file.
1
7#ifndef EVENTDISPLAY_EVENTOBJECTS_H_
8#define EVENTDISPLAY_EVENTOBJECTS_H_
9
10#include "DetDescr/HcalID.h"
12#include "Ecal/Event/EcalHit.h"
16#include "Hcal/Event/HcalHit.h"
18#include "SimCore/Event/SimParticle.h"
20#include "TColor.h"
21#include "TEveArrow.h"
22#include "TEveBox.h"
23#include "TEveRGBAPalette.h"
24#include "TRandom.h"
25
26namespace eventdisplay {
27
34class Objects {
35 public:
41 Objects();
42
48 delete sim_objects_;
49 delete rec_objects_;
50 }
51
55 void Initialize();
56
60 template <typename T>
61 void draw(T o) {
62 EXCEPTION_RAISE("NotImp", "Drawing not implemented for the input type.");
63 }
64
68 void draw(std::vector<ldmx::EcalHit> hits);
69
73 void draw(std::vector<ldmx::HcalHit> hits);
74
78 void draw(std::vector<ldmx::EcalCluster> clusters);
79
83 void draw(std::vector<ldmx::SimTrackerHit> hits);
84
89 void draw(std::vector<ldmx::SimCalorimeterHit> hits);
90
94 void draw(std::map<int, ldmx::SimParticle> particles);
95
101 void SetSimThresh(double simThresh);
102
106 void ColorClusters();
107
112 TEveElement* getSimObjects() { return sim_objects_; }
113
118 TEveElement* getRecObjects() { return rec_objects_; }
119
120 private:
122 TEveElement* sim_objects_;
124 TEveElement* rec_objects_;
125
127 double simThresh_ = 0;
128
130 std::vector<Color_t> colors_ = {kRed, kBlue, kGreen, kYellow,
131 kMagenta, kBlack, kOrange, kPink};
132
134 TRandom r_;
135};
136} // namespace eventdisplay
137
138#endif
Header file for class DetectorGeometry.
Class that stores cluster information from the ECal.
Header file for EveDetectorGeometry Class.
Class that stores Stores reconstructed hit information from the HCAL.
Class that defines an HCal sensitive detector.
Class which stores simulated calorimeter hit information.
Class which encapsulates information from a hit in a simulated tracking detector.
Drawing methods for event objects.
Definition Objects.h:34
~Objects()
Destructor Deletes objects that have been constructed.
Definition Objects.h:47
Objects()
Constructor Defines new necessary objects.
Definition Objects.cxx:5
double simThresh_
threshold for sim particles to be drawn
Definition Objects.h:127
void ColorClusters()
Colors ecal clusters according to colors_.
Definition Objects.cxx:32
TEveElement * rec_objects_
Eve Element containing reco objects that aren't hits.
Definition Objects.h:124
TEveElement * getRecObjects()
Get the objects from the reconstruction level Eve Element Used to attach these Eve Elements to the Ev...
Definition Objects.h:118
void SetSimThresh(double simThresh)
Sets the energy threshold for a sim particle to be drawn.
Definition Objects.cxx:13
TRandom r_
random number generator for colors if we go over the ones in
Definition Objects.h:134
TEveElement * sim_objects_
Eve Element containing all hits.
Definition Objects.h:122
TEveElement * getSimObjects()
Get the objects from the sim level Eve Element Used to attach these Eve Elements to the Eve Manager.
Definition Objects.h:112
void Initialize()
Defines new Eve Element Lists for the event objects.
Definition Objects.cxx:7
std::vector< Color_t > colors_
list of colors to use with ecal clusters
Definition Objects.h:130
void draw(T o)
Not implemented.
Definition Objects.h:61