LDMX Software
TrigCaloCluster.h
1#ifndef TRIGGER_EVENT_TRIGCALOCLUSTER_H
2#define TRIGGER_EVENT_TRIGCALOCLUSTER_H
3
4// ROOT
5#include "TObject.h" //For ClassDef
6
7namespace trigger {
8
9// Forward declaration needed by typedef
10class TrigCaloCluster;
11typedef std::vector<TrigCaloCluster> TrigCaloClusterCollection;
12
18 public:
19 TrigCaloCluster() = default;
20
21 TrigCaloCluster(float x, float y, float z, float e = 0);
22
23 virtual ~TrigCaloCluster() = default;
24
25 bool operator<(const TrigCaloCluster &h) { return e_ < h.e_; }
26
27 void Clear();
28
29 void setEnergy(float e) { e_ = e; }
30 void setXYZ(float x, float y, float z) {
31 x_ = x;
32 y_ = y;
33 z_ = z;
34 }
35 void setXYZerr(float xe, float ye, float ze) {
36 xe_ = xe;
37 ye_ = ye;
38 ze_ = ze;
39 }
40 void setdxdz(float dxdz) { dxdz_ = dxdz; }
41 void setdydz(float dydz) { dydz_ = dydz; }
42 void setdxdze(float dxdze) { dxdze_ = dxdze; }
43 void setdydze(float dydze) { dydze_ = dydze; }
44 void set3D(bool x) { is3D_ = x; }
45 void setLayer(int l) { layer_ = l; }
46 void setFirstLayer(int l) { firstLayer_ = l; }
47 void setLastLayer(int l) { lastLayer_ = l; }
48 void setDepth(int d) { depth_ = d; }
49 void setNTP(int n) { nTP_ = n; }
50
51 float x() const { return x_; }
52 float y() const { return y_; }
53 float z() const { return z_; }
54 float e() const { return e_; }
55 float xe() const { return xe_; }
56 float ye() const { return ye_; }
57 float ze() const { return ze_; }
58 float energy() const { return e_; }
59 float dxdz() const { return dxdz_; }
60 float dydz() const { return dydz_; }
61 int nTP() const { return nTP_; }
62 int depth() const { return depth_; }
63
64 private:
65 float x_{0};
66 float y_{0};
67 float z_{0};
68 float e_{0};
69 float dxdz_{0};
70 float dydz_{0};
71 // rms
72 float xe_{0};
73 float ye_{0};
74 float ze_{0};
75 float dxdze_{0};
76 float dydze_{0};
77 bool is3D_{true};
78 int nTP_{0};
79 // 2d attributes
80 int layer_{-1};
81 // 3d attributes
82 int firstLayer_{-1};
83 int lastLayer_{-1};
84 int depth_{0};
85
88};
89} // namespace trigger
90
91#endif // TRIGGER_EVENT_TRIGCALOCLUSTER_H
Class for clusters built from trigger calo hits.
ClassDef(TrigCaloCluster, 1)
ROOT Dictionary class definition macro.