LDMX Software
PFCandidate.h
Go to the documentation of this file.
1
7#ifndef RECON_EVENT_PFCANDIDATE_H_
8#define RECON_EVENT_PFCANDIDATE_H_
9
10// ROOT
11#include "TObject.h" //For ClassDef
12
13namespace ldmx {
14
20 public:
21 PFCandidate() {}
22 virtual ~PFCandidate() {}
23
24 void print() const;
25 bool operator<(const PFCandidate &rhs) const {
26 return this->getEnergy() < rhs.getEnergy();
27 }
28
29 /*
30 Setters
31 */
32 void setPID(int x) { pid_ = x; }
33 void setMass(float x) { mass_ = x; }
34 void setEnergy(float x) { energy_ = x; }
35
36 void setTargetPositionXYZ(float x, float y, float z) {
37 posTargX_ = x;
38 posTargY_ = y;
39 posTargZ_ = z;
40 }
41 void setEcalPositionXYZ(float x, float y, float z) {
42 posEcalX_ = x;
43 posEcalY_ = y;
44 posEcalZ_ = z;
45 }
46 void setHcalPositionXYZ(float x, float y, float z) {
47 posHcalX_ = x;
48 posHcalY_ = y;
49 posHcalZ_ = z;
50 }
51
52 void setTrackPxPyPz(float x, float y, float z) {
53 trackPx_ = x;
54 trackPy_ = y;
55 trackPz_ = z;
56 }
57
58 void setEcalEnergy(float x) { ecalEnergy_ = x; }
59 void setEcalRawEnergy(float x) { ecalRawEnergy_ = x; }
60 void setEcalClusterXYZ(float x, float y, float z) {
61 ecalClusterX_ = x;
62 ecalClusterY_ = y;
63 ecalClusterZ_ = z;
64 }
65 void setEcalClusterEXYZ(float x, float y, float z) {
66 ecalClusterEX_ = x;
67 ecalClusterEY_ = y;
68 ecalClusterEZ_ = z;
69 }
70 void setEcalClusterDXDZ(float x) { ecalClusterDXDZ_ = x; }
71 void setEcalClusterDYDZ(float x) { ecalClusterDYDZ_ = x; }
72 void setEcalClusterEDXDZ(float x) { ecalClusterEDXDZ_ = x; }
73 void setEcalClusterEDYDZ(float x) { ecalClusterEDYDZ_ = x; }
74
75 void setHcalEnergy(float x) { hcalEnergy_ = x; }
76 void setHcalRawEnergy(float x) { hcalRawEnergy_ = x; }
77 void setHcalClusterXYZ(float x, float y, float z) {
78 hcalClusterX_ = x;
79 hcalClusterY_ = y;
80 hcalClusterZ_ = z;
81 }
82 void setHcalClusterEXYZ(float x, float y, float z) {
83 hcalClusterEX_ = x;
84 hcalClusterEY_ = y;
85 hcalClusterEZ_ = z;
86 }
87 void setHcalClusterDXDZ(float x) { hcalClusterDXDZ_ = x; }
88 void setHcalClusterDYDZ(float x) { hcalClusterDYDZ_ = x; }
89 void setHcalClusterEDXDZ(float x) { hcalClusterEDXDZ_ = x; }
90 void setHcalClusterEDYDZ(float x) { hcalClusterEDYDZ_ = x; }
91
92 void setTruthEcalXYZ(double x, double y, double z) {
93 truthEcalX_ = x;
94 truthEcalY_ = y;
95 truthEcalZ_ = z;
96 }
97 void setTruthPxPyPz(double x, double y, double z) {
98 truthPx_ = x;
99 truthPy_ = y;
100 truthPz_ = z;
101 }
102 void setTruthMass(double x) { truthMass_ = x; }
103 void setTruthEnergy(double x) { truthEnergy_ = x; }
104 void setTruthPdgId(int x) { truthPdgId_ = x; }
105
106 /*
107 Getters
108 */
109 int getPID() const { return pid_; }
110 float getMass() const { return mass_; }
111 float getEnergy() const { return energy_; }
112
113 std::vector<float> getTargetPositionXYZ() const {
114 return {posTargX_, posTargY_, posTargZ_};
115 }
116 std::vector<float> getEcalPositionXYZ() const {
117 return {posEcalX_, posEcalY_, posEcalZ_};
118 }
119 std::vector<float> getHcalPositionXYZ() const {
120 return {posHcalX_, posHcalY_, posHcalZ_};
121 }
122
123 std::vector<float> getTrackPxPyPz() const {
124 return {trackPx_, trackPy_, trackPz_};
125 }
126
127 float getEcalEnergy() const { return ecalEnergy_; }
128 float getEcalRawEnergy() const { return ecalRawEnergy_; }
129 std::vector<float> getEcalClusterXYZ() const {
130 return {ecalClusterX_, ecalClusterY_, ecalClusterZ_};
131 }
132 std::vector<float> getEcalClusterEXYZ() const {
133 return {ecalClusterEX_, ecalClusterEY_, ecalClusterEZ_};
134 }
135 float getEcalClusterDXDZ() const { return ecalClusterDXDZ_; }
136 float getEcalClusterDYDZ() const { return ecalClusterDYDZ_; }
137 float getEcalClusterEDXDZ() const { return ecalClusterEDXDZ_; }
138 float getEcalClusterEDYDZ() const { return ecalClusterEDYDZ_; }
139
140 float getHcalEnergy() const { return hcalEnergy_; }
141 float getHcalRawEnergy() const { return hcalRawEnergy_; }
142 std::vector<float> getHcalClusterXYZ() const {
143 return {hcalClusterX_, hcalClusterY_, hcalClusterZ_};
144 }
145 std::vector<float> getHcalClusterEXYZ() const {
146 return {hcalClusterEX_, hcalClusterEY_, hcalClusterEZ_};
147 }
148 float getHcalClusterDXDZ() const { return hcalClusterDXDZ_; }
149 float getHcalClusterDYDZ() const { return hcalClusterDYDZ_; }
150 float getHcalClusterEDXDZ() const { return hcalClusterEDXDZ_; }
151 float getHcalClusterEDYDZ() const { return hcalClusterEDYDZ_; }
152
153 std::vector<double> const getTruthEcalXYZ() {
154 return {truthEcalX_, truthEcalY_, truthEcalZ_};
155 }
156 std::vector<double> const getTruthPxPyPz() {
157 return {truthPx_, truthPy_, truthPz_};
158 }
159 double getTruthMass() { return truthMass_; }
160 double getTruthEnergy() { return truthEnergy_; }
161 int getTruthPdgId() { return truthPdgId_; }
162
163 private:
164 /* Particle ID enum */
165 int pid_{0};
166 float mass_{0};
167 float energy_{0};
168
169 /* Position at the Target */
170 float posTargX_{0};
171 float posTargY_{0};
172 float posTargZ_{0};
173 /* Position at the ECal face */
174 float posEcalX_{0};
175 float posEcalY_{0};
176 float posEcalZ_{0};
177 /* Position at the HCal face */
178 float posHcalX_{0};
179 float posHcalY_{0};
180 float posHcalZ_{0};
181
182 /* track momenta */
183 float trackPx_{0};
184 float trackPy_{0};
185 float trackPz_{0};
186
187 /* Ecal energy, cluster info */
188 float ecalEnergy_{0};
189 float ecalRawEnergy_{0};
190 float ecalClusterX_{0};
191 float ecalClusterY_{0};
192 float ecalClusterZ_{0};
193 float ecalClusterEX_{0};
194 float ecalClusterEY_{0};
195 float ecalClusterEZ_{0};
196 float ecalClusterDXDZ_{0};
197 float ecalClusterDYDZ_{0};
198 float ecalClusterEDXDZ_{0};
199 float ecalClusterEDYDZ_{0};
200
201 /* Hcal energy, cluster info */
202 float hcalEnergy_{0};
203 float hcalRawEnergy_{0};
204 float hcalClusterX_{0};
205 float hcalClusterY_{0};
206 float hcalClusterZ_{0};
207 float hcalClusterEX_{0};
208 float hcalClusterEY_{0};
209 float hcalClusterEZ_{0};
210 float hcalClusterDXDZ_{0};
211 float hcalClusterDYDZ_{0};
212 float hcalClusterEDXDZ_{0};
213 float hcalClusterEDYDZ_{0};
214
215 /* Information for truth matched particles */
216 double truthEcalX_{0};
217 double truthEcalY_{0};
218 double truthEcalZ_{0};
219 double truthPx_{0};
220 double truthPy_{0};
221 double truthPz_{0};
222 double truthMass_{0};
223 double truthEnergy_{0};
224 int truthPdgId_{0};
225
226 /* The ROOT class definition. */
227 ClassDef(PFCandidate, 1);
228};
229} // namespace ldmx
230
231#endif /* RECON_EVENT_PFCANDIDATE_H_ */
Represents a reconstructed particle.
Definition PFCandidate.h:19