LDMX Software
EcalVetoResult.h
Go to the documentation of this file.
1
9#ifndef EVENT_ECALVETORESULT_H_
10#define EVENT_ECALVETORESULT_H_
11
12//----------------//
13// C++ StdLib //
14//----------------//
15#include <array>
16#include <iostream>
17#include <map>
18
19//----------//
20// ROOT //
21//----------//
22#include <TObject.h> //For ClassDef
23
24namespace ldmx {
25
27 public:
29 EcalVetoResult() = default;
30
32 virtual ~EcalVetoResult();
33
37 void setVariables(
38 int n_readout_hits, int deepest_layer_hit, int n_tracking_hits,
39 float summed_det, float summed_tight_iso, float max_cell_dep,
40 float shower_rms, float x_std, float y_std, float avg_layer_hit,
41 float std_layer_hit, float ecal_back_energy, float ep_ang,
42 float ep_ang_at_target, float ep_sep, float ep_dot,
43 float ep_dot_at_target,
44
45 std::vector<float> electron_containment_energy,
46 std::vector<float> photon_containment_energy,
47 std::vector<float> outside_containment_energy,
48 std::vector<int> outside_containment_n_hits,
49 std::vector<float> outside_containment_x_std,
50 std::vector<float> outside_containment_y_std,
51
52 std::vector<float> energy_seg, std::vector<float> x_mean_seg,
53 std::vector<float> y_mean_seg, std::vector<float> x_std_seg,
54 std::vector<float> y_std_seg, std::vector<float> layer_mean_seg,
55 std::vector<float> layer_std_seg,
56
57 std::vector<std::vector<float>> e_cont_energy,
58 std::vector<std::vector<float>> e_cont_x_mean,
59 std::vector<std::vector<float>> e_cont_y_mean,
60 std::vector<std::vector<float>> g_cont_energy,
61 std::vector<std::vector<int>> g_cont_n_hits,
62 std::vector<std::vector<float>> g_cont_x_mean,
63 std::vector<std::vector<float>> g_cont_y_mean,
64 std::vector<std::vector<float>> o_cont_energy,
65 std::vector<std::vector<int>> o_cont_n_hits,
66 std::vector<std::vector<float>> o_cont_x_mean,
67 std::vector<std::vector<float>> o_cont_y_mean,
68 std::vector<std::vector<float>> o_cont_x_std,
69 std::vector<std::vector<float>> o_cont_y_std,
70 std::vector<std::vector<float>> o_cont_layer_mean,
71 std::vector<std::vector<float>> o_cont_layer_std,
72
73 std::vector<float> ecal_layer_edep_readout, std::array<float, 3> recoil_p,
74 std::array<float, 3> recoil_pos);
75
77 void clear();
78
80 friend std::ostream& operator<<(std::ostream& o, const EcalVetoResult& d);
81
83 bool passesVeto() const { return passes_veto_; }
84
85 float getDisc() const { return disc_value_; }
86
87 bool getFiducial() const { return fiducial_; }
88
89 int getDeepestLayerHit() const { return deepest_layer_hit_; }
90
91 // Did ACTS find a recoil track in the tracker?
92 bool getTrackingFiducial() const { return tracking_fiducial_; }
93
94 int getNReadoutHits() const { return n_readout_hits_; }
95
96 float getSummedDet() const { return summed_det_; }
97
98 float getSummedTightIso() const { return summed_tight_iso_; }
99
100 float getMaxCellDep() const { return max_cell_dep_; }
101
102 float getShowerRMS() const { return shower_rms_; }
103
104 float getXStd() const { return x_std_; }
105
106 float getYStd() const { return y_std_; }
107
108 float getAvgLayerHit() const { return avg_layer_hit_; }
109
110 float getStdLayerHit() const { return std_layer_hit_; }
111
112 float getEcalBackEnergy() const { return ecal_back_energy_; }
113
114 int getNTrackingHits() const { return n_tracking_hits_; }
115
116 float getEPAng() const { return ep_ang_; }
117
118 float getEPAngAtTarget() const { return ep_ang_at_target_; }
119
120 float getEPSep() const { return ep_sep_; }
121
122 float getEPDot() const { return ep_dot_; }
123
124 float getEPDotAtTarget() const { return ep_dot_at_target_; }
125
126 const std::vector<float>& getElectronContainmentEnergy() const {
127 return electron_containment_energy_;
128 }
129
130 const std::vector<float>& getPhotonContainmentEnergy() const {
131 return photon_containment_energy_;
132 }
133
134 const std::vector<float>& getOutsideContainmentEnergy() const {
135 return outside_containment_energy_;
136 }
137
138 const std::vector<int>& getOutsideContainmentNHits() const {
139 return outside_containment_n_hits_;
140 }
141
142 const std::vector<float>& getOutsideContainmentXStd() const {
143 return outside_containment_x_std_;
144 }
145
146 const std::vector<float>& getOutsideContainmentYStd() const {
147 return outside_containment_y_std_;
148 }
149
150 const std::vector<float>& getEcalLayerEdepReadout() const {
151 return ecal_layer_edep_readout_;
152 }
153
154 const std::vector<float>& getEnergySeg() const { return energy_seg_; }
155
156 const std::vector<float>& getXMeanSeg() const { return x_mean_seg_; }
157
158 const std::vector<float>& getYMeanSeg() const { return y_mean_seg_; }
159
160 const std::vector<float>& getXStdSeg() const { return x_std_seg_; }
161
162 const std::vector<float>& getYStdSeg() const { return y_std_seg_; }
163
164 const std::vector<float>& getLayerMeanSeg() const { return layer_mean_seg_; }
165
166 const std::vector<float>& getLayerStdSeg() const { return layer_std_seg_; }
167
168 const std::vector<std::vector<float>>& getEleContEnergy() const {
169 return e_cont_energy_;
170 }
171
172 const std::vector<std::vector<float>>& getEleContXMean() const {
173 return e_cont_x_mean_;
174 }
175
176 const std::vector<std::vector<float>>& getEleContYMean() const {
177 return e_cont_y_mean_;
178 }
179
180 const std::vector<std::vector<float>>& getPhContEnergy() const {
181 return g_cont_energy_;
182 }
183
184 const std::vector<std::vector<int>>& getPhContNHits() const {
185 return g_cont_n_hits_;
186 }
187
188 const std::vector<std::vector<float>>& getPhContXMean() const {
189 return g_cont_x_mean_;
190 }
191
192 const std::vector<std::vector<float>>& getPhContYMean() const {
193 return g_cont_y_mean_;
194 }
195
196 const std::vector<std::vector<float>>& getOutContEnergy() const {
197 return o_cont_energy_;
198 }
199
200 const std::vector<std::vector<int>>& getOutContNHits() const {
201 return o_cont_n_hits_;
202 }
203
204 const std::vector<std::vector<float>>& getOutContXMean() const {
205 return o_cont_x_mean_;
206 }
207
208 const std::vector<std::vector<float>>& getOutContYMean() const {
209 return o_cont_y_mean_;
210 }
211
212 const std::vector<std::vector<float>>& getOutContXStd() const {
213 return o_cont_x_std_;
214 }
215
216 const std::vector<std::vector<float>>& getOutContYStd() const {
217 return o_cont_y_std_;
218 }
219
220 const std::vector<std::vector<float>>& getOutContLayerMean() const {
221 return o_cont_layer_mean_;
222 }
223
224 const std::vector<std::vector<float>>& getOutContLayerStd() const {
225 return o_cont_layer_std_;
226 }
227
228 void setVetoResult(bool passes_veto) { passes_veto_ = passes_veto; }
229 void setDiscValue(float disc_value) { disc_value_ = disc_value; }
230 void setFiducial(bool fiducial) { fiducial_ = fiducial; }
231
232 // Fiducial from the recoil tracking point of view
233 void setTrackingFiducial(bool tracking_fiducial) {
234 tracking_fiducial_ = tracking_fiducial;
235 }
236
238 const std::vector<float> getRecoilMomentum() const {
240 };
241
243 float getRecoilX() const { return recoil_x_; };
244
246 float getRecoilY() const { return recoil_y_; };
247
248 private:
250 bool passes_veto_{false};
251
252 int n_readout_hits_{0};
253 int deepest_layer_hit_{0};
254
255 float summed_det_{0};
256 float summed_tight_iso_{0};
257 float max_cell_dep_{0};
258 float shower_rms_{0};
259 float x_std_{0};
260 float y_std_{0};
261 float avg_layer_hit_{0};
262 float std_layer_hit_{0};
263 float ecal_back_energy_{0};
264
265 std::vector<float> electron_containment_energy_;
266 std::vector<float> photon_containment_energy_;
267 std::vector<float> outside_containment_energy_;
268 std::vector<int> outside_containment_n_hits_;
269 std::vector<float> outside_containment_x_std_;
270 std::vector<float> outside_containment_y_std_;
271
272 std::vector<float> energy_seg_;
273 std::vector<float> x_mean_seg_;
274 std::vector<float> y_mean_seg_;
275 std::vector<float> x_std_seg_;
276 std::vector<float> y_std_seg_;
277 std::vector<float> layer_mean_seg_;
278 std::vector<float> layer_std_seg_;
279
280 std::vector<std::vector<float>> e_cont_energy_;
281 std::vector<std::vector<float>> e_cont_x_mean_;
282 std::vector<std::vector<float>> e_cont_y_mean_;
283 std::vector<std::vector<float>> g_cont_energy_;
284 std::vector<std::vector<int>> g_cont_n_hits_;
285 std::vector<std::vector<float>> g_cont_x_mean_;
286 std::vector<std::vector<float>> g_cont_y_mean_;
287 std::vector<std::vector<float>> o_cont_energy_;
288 std::vector<std::vector<int>> o_cont_n_hits_;
289 std::vector<std::vector<float>> o_cont_x_mean_;
290 std::vector<std::vector<float>> o_cont_y_mean_;
291 std::vector<std::vector<float>> o_cont_x_std_;
292 std::vector<std::vector<float>> o_cont_y_std_;
293 std::vector<std::vector<float>> o_cont_layer_mean_;
294 std::vector<std::vector<float>> o_cont_layer_std_;
295
297 float disc_value_{0};
298
300 bool fiducial_{false};
301
304
306 float recoil_px_{-9999};
307
309 float recoil_py_{-9999};
310
312 float recoil_pz_{-9999};
313
315 float recoil_x_{-9999};
316
318 float recoil_y_{-9999};
319
325 float ep_ang_{0};
329
332 float ep_sep_{0};
334 float ep_dot_{0};
337
338 std::vector<float> ecal_layer_edep_readout_;
339
340 ClassDef(EcalVetoResult, 12);
341};
342} // namespace ldmx
343
344#endif
float disc_value_
discriminator value from the BDT
float getRecoilY() const
Return the y position of the recoil at the Ecal face.
float ep_sep_
Distance between the projected photon and electron trajectories at the ECal face.
bool fiducial_
is the recoil electron fiducial in ECAL?
float ep_ang_
Angular separation between the projected photon and electron trajectories as projected at the ECAL.
const std::vector< float > getRecoilMomentum() const
Return the momentum of the recoil at the Ecal face.
friend std::ostream & operator<<(std::ostream &o, const EcalVetoResult &d)
Print the object.
float recoil_y_
y-position of recoil electron at the Ecal face.
bool passesVeto() const
Checks if the event passes the Ecal veto.
void setVariables(int n_readout_hits, int deepest_layer_hit, int n_tracking_hits, float summed_det, float summed_tight_iso, float max_cell_dep, float shower_rms, float x_std, float y_std, float avg_layer_hit, float std_layer_hit, float ecal_back_energy, float ep_ang, float ep_ang_at_target, float ep_sep, float ep_dot, float ep_dot_at_target, std::vector< float > electron_containment_energy, std::vector< float > photon_containment_energy, std::vector< float > outside_containment_energy, std::vector< int > outside_containment_n_hits, std::vector< float > outside_containment_x_std, std::vector< float > outside_containment_y_std, std::vector< float > energy_seg, std::vector< float > x_mean_seg, std::vector< float > y_mean_seg, std::vector< float > x_std_seg, std::vector< float > y_std_seg, std::vector< float > layer_mean_seg, std::vector< float > layer_std_seg, std::vector< std::vector< float > > e_cont_energy, std::vector< std::vector< float > > e_cont_x_mean, std::vector< std::vector< float > > e_cont_y_mean, std::vector< std::vector< float > > g_cont_energy, std::vector< std::vector< int > > g_cont_n_hits, std::vector< std::vector< float > > g_cont_x_mean, std::vector< std::vector< float > > g_cont_y_mean, std::vector< std::vector< float > > o_cont_energy, std::vector< std::vector< int > > o_cont_n_hits, std::vector< std::vector< float > > o_cont_x_mean, std::vector< std::vector< float > > o_cont_y_mean, std::vector< std::vector< float > > o_cont_x_std, std::vector< std::vector< float > > o_cont_y_std, std::vector< std::vector< float > > o_cont_layer_mean, std::vector< std::vector< float > > o_cont_layer_std, std::vector< float > ecal_layer_edep_readout, std::array< float, 3 > recoil_p, std::array< float, 3 > recoil_pos)
Set the sim particle and 'is findable' flag.
float recoil_x_
x-position of recoil electron at the Ecal face.
void clear()
Reset the object.
float getRecoilX() const
Return the x position of the recoil at the Ecal face.
float ep_dot_at_target_
Dot product of the photon and electron momenta unit vectors as at Target.
float recoil_pz_
pz of recoil electron at the Ecal face.
EcalVetoResult()=default
Constructor.
bool passes_veto_
Flag indicating whether the event is vetoed by the Ecal.
bool tracking_fiducial_
is the recoil electron fiducial in Tracker?
float recoil_px_
px of recoil electron at the Ecal face.
float recoil_py_
py of recoil electron at the Ecal face.
int n_tracking_hits_
Number of hits outside of the electron roc in the Ecal or if the electron trajectory is missing,...
float ep_dot_
Dot product of the photon and electron momenta unit vectors as at ECAL.
virtual ~EcalVetoResult()
Destructor.
float ep_ang_at_target_
Angular separation between the projected photon and electron trajectories as projected at the target.