LDMX Software
TrigCaloHit.h
1#ifndef TRIGGER_EVENT_TRIGCALOHIT_H
2#define TRIGGER_EVENT_TRIGCALOHIT_H
3
4// ROOT
5#include "TObject.h" //For ClassDef
6
7namespace trigger {
8
14 public:
15 TrigCaloHit() = default;
16
17 TrigCaloHit(float position_x, float position_y, float position_z,
18 float energy = 0);
19
20 virtual ~TrigCaloHit() = default;
21
22 bool operator<(const TrigCaloHit &h) { return energy_ < h.energy_; }
23
24 void clear() {
25 position_x_ = 0;
26 position_y_ = 0;
27 position_z_ = 0;
28 energy_ = 0;
29 layer_ = 0;
30 strip_ = 0;
31 module_section_ = 0;
32 }
33
34 void setEnergy(float energy) { energy_ = energy; }
35 void setXYZ(float position_x, float position_y, float position_z) {
36 position_x_ = position_x;
37 position_y_ = position_y;
38 position_z_ = position_z;
39 }
40 void setLayer(int layer) { layer_ = layer; }
41 void setStrip(int strip) { strip_ = strip; }
42 void setModule(int module) { module_section_ = module; }
43 void setSection(int module_section) { module_section_ = module_section; }
44
45 float positionX() const { return position_x_; }
46 float positionY() const { return position_y_; }
47 float positionZ() const { return position_z_; }
48 float energy() const { return energy_; }
49
50 int layer() const { return layer_; }
51 int strip() const { return strip_; }
52 int module() const { return module_section_; }
53 int section() const { return module_section_; }
54
55 private:
56 float position_x_{0};
57 float position_y_{0};
58 float position_z_{0};
59 float energy_{0};
60 int layer_{0};
61 int strip_{0};
62 int module_section_{0};
63
66};
67} // namespace trigger
68
69#endif // TRIGGER_EVENT_TRIGCALOHIT_H
Class for calo hits used in trigger computations.
Definition TrigCaloHit.h:13
ClassDef(TrigCaloHit, 2)
ROOT Dictionary class definition macro.