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:
30
32 virtual ~EcalVetoResult();
33
37 void setVariables(int nReadoutHits, int deepestLayerHit, float summedDet,
38 float summedTightIso, float maxCellDep, float showerRMS,
39 float xStd, float yStd, float avgLayerHit,
40 float stdLayerHit, float ecalBackEnergy,
41 int nStraightTracks, int nLinregTracks,
42 int firstNearPhLayer, int nNearPhHits,
43 int photonTerritoryHits, float epAng, float epSep,
44 float epDot,
45
46 std::vector<float> electronContainmentEnergy,
47 std::vector<float> photonContainmentEnergy,
48 std::vector<float> outsideContainmentEnergy,
49 std::vector<int> outsideContainmentNHits,
50 std::vector<float> outsideContainmentXStd,
51 std::vector<float> outsideContainmentYStd,
52
53 std::vector<float> energySeg, std::vector<float> xMeanSeg,
54 std::vector<float> yMeanSeg, std::vector<float> xStdSeg,
55 std::vector<float> yStdSeg, std::vector<float> layerMeanSeg,
56 std::vector<float> layerStdSeg,
57
58 std::vector<std::vector<float>> eContEnergy,
59 std::vector<std::vector<float>> eContXMean,
60 std::vector<std::vector<float>> eContYMean,
61 std::vector<std::vector<float>> gContEnergy,
62 std::vector<std::vector<int>> gContNHits,
63 std::vector<std::vector<float>> gContXMean,
64 std::vector<std::vector<float>> gContYMean,
65 std::vector<std::vector<float>> oContEnergy,
66 std::vector<std::vector<int>> oContNHits,
67 std::vector<std::vector<float>> oContXMean,
68 std::vector<std::vector<float>> oContYMean,
69 std::vector<std::vector<float>> oContXStd,
70 std::vector<std::vector<float>> oContYStd,
71 std::vector<std::vector<float>> oContLayerMean,
72 std::vector<std::vector<float>> oContLayerStd,
73
74 std::vector<float> EcalLayerEdepReadout,
75 std::array<float, 3> recoilP,
76 std::array<float, 3> recoilPos);
77
79 void Clear();
80
82 void Print() const;
83
85 bool passesVeto() const { return passesVeto_; }
86
87 float getDisc() const { return discValue_; }
88
89 bool getFiducial() const { return fiducial_; }
90
91 int getDeepestLayerHit() const { return deepestLayerHit_; }
92
93 int getNReadoutHits() const { return nReadoutHits_; }
94
95 float getSummedDet() const { return summedDet_; }
96
97 float getSummedTightIso() const { return summedTightIso_; }
98
99 float getMaxCellDep() const { return maxCellDep_; }
100
101 float getShowerRMS() const { return showerRMS_; }
102
103 float getXStd() const { return xStd_; }
104
105 float getYStd() const { return yStd_; }
106
107 float getAvgLayerHit() const { return avgLayerHit_; }
108
109 float getStdLayerHit() const { return stdLayerHit_; }
110
111 float getEcalBackEnergy() const { return ecalBackEnergy_; }
112
113 const std::vector<float>& getElectronContainmentEnergy() const {
114 return electronContainmentEnergy_;
115 }
116
117 const std::vector<float>& getPhotonContainmentEnergy() const {
118 return photonContainmentEnergy_;
119 }
120
121 const std::vector<float>& getOutsideContainmentEnergy() const {
122 return outsideContainmentEnergy_;
123 }
124
125 const std::vector<int>& getOutsideContainmentNHits() const {
126 return outsideContainmentNHits_;
127 }
128
129 const std::vector<float>& getOutsideContainmentXStd() const {
130 return outsideContainmentXStd_;
131 }
132
133 const std::vector<float>& getOutsideContainmentYStd() const {
134 return outsideContainmentYStd_;
135 }
136
137 const std::vector<float>& getEcalLayerEdepReadout() const {
138 return ecalLayerEdepReadout_;
139 }
140
141 const std::vector<float>& getEnergySeg() const { return energySeg_; }
142
143 const std::vector<float>& getXMeanSeg() const { return xMeanSeg_; }
144
145 const std::vector<float>& getYMeanSeg() const { return yMeanSeg_; }
146
147 const std::vector<float>& getXStdSeg() const { return xStdSeg_; }
148
149 const std::vector<float>& getYStdSeg() const { return yStdSeg_; }
150
151 const std::vector<float>& getLayerMeanSeg() const { return layerMeanSeg_; }
152
153 const std::vector<float>& getLayerStdSeg() const { return layerStdSeg_; }
154
155 const std::vector<std::vector<float>>& getEleContEnergy() const {
156 return eContEnergy_;
157 }
158
159 const std::vector<std::vector<float>>& getEleContXMean() const {
160 return eContXMean_;
161 }
162
163 const std::vector<std::vector<float>>& getEleContYMean() const {
164 return eContYMean_;
165 }
166
167 const std::vector<std::vector<float>>& getPhContEnergy() const {
168 return gContEnergy_;
169 }
170
171 const std::vector<std::vector<int>>& getPhContNHits() const {
172 return gContNHits_;
173 }
174
175 const std::vector<std::vector<float>>& getPhContXMean() const {
176 return gContXMean_;
177 }
178
179 const std::vector<std::vector<float>>& getPhContYMean() const {
180 return gContYMean_;
181 }
182
183 const std::vector<std::vector<float>>& getOutContEnergy() const {
184 return oContEnergy_;
185 }
186
187 const std::vector<std::vector<int>>& getOutContNHits() const {
188 return oContNHits_;
189 }
190
191 const std::vector<std::vector<float>>& getOutContXMean() const {
192 return oContXMean_;
193 }
194
195 const std::vector<std::vector<float>>& getOutContYMean() const {
196 return oContYMean_;
197 }
198
199 const std::vector<std::vector<float>>& getOutContXStd() const {
200 return oContXStd_;
201 }
202
203 const std::vector<std::vector<float>>& getOutContYStd() const {
204 return oContYStd_;
205 }
206
207 const std::vector<std::vector<float>>& getOutContLayerMean() const {
208 return oContLayerMean_;
209 }
210
211 const std::vector<std::vector<float>>& getOutContLayerStd() const {
212 return oContLayerStd_;
213 }
214
215 void setVetoResult(bool passesVeto) { passesVeto_ = passesVeto; }
216 void setDiscValue(float discValue) { discValue_ = discValue; }
217 void setFiducial(bool fiducial) { fiducial_ = fiducial; }
218
220 const std::vector<float> getRecoilMomentum() const {
221 return {recoilPx_, recoilPy_, recoilPz_};
222 };
223
225 float getRecoilX() const { return recoilX_; };
226
228 float getRecoilY() const { return recoilY_; };
229
231 int getNStraightTracks() const { return nStraightTracks_; }
232
234 int getNLinRegTracks() const { return nLinregTracks_; }
235
236 int getFirstNearPhLayer() const { return firstNearPhLayer_; }
237 int getNNearPhHits() const { return nNearPhHits_; }
238 int getPhotonTerritoryHits() const { return photonTerritoryHits_; }
239 float getEPAng() const { return epAng_; }
240 float getEPSep() const { return epSep_; }
241 float getEPDot() const { return epDot_; }
242
243 private:
245 bool passesVeto_{false};
246
247 int nReadoutHits_{0};
248 int deepestLayerHit_{0};
249
250 float summedDet_{0};
251 float summedTightIso_{0};
252 float maxCellDep_{0};
253 float showerRMS_{0};
254 float xStd_{0};
255 float yStd_{0};
256 float avgLayerHit_{0};
257 float stdLayerHit_{0};
258 float ecalBackEnergy_{0};
259 // MIP tracking
273 float epAng_{0};
276 float epSep_{0};
278 float epDot_{0};
279
280 std::vector<float> electronContainmentEnergy_;
281 std::vector<float> photonContainmentEnergy_;
282 std::vector<float> outsideContainmentEnergy_;
283 std::vector<int> outsideContainmentNHits_;
284 std::vector<float> outsideContainmentXStd_;
285 std::vector<float> outsideContainmentYStd_;
286
287 std::vector<float> energySeg_;
288 std::vector<float> xMeanSeg_;
289 std::vector<float> yMeanSeg_;
290 std::vector<float> xStdSeg_;
291 std::vector<float> yStdSeg_;
292 std::vector<float> layerMeanSeg_;
293 std::vector<float> layerStdSeg_;
294
295 std::vector<std::vector<float>> eContEnergy_;
296 std::vector<std::vector<float>> eContXMean_;
297 std::vector<std::vector<float>> eContYMean_;
298 std::vector<std::vector<float>> gContEnergy_;
299 std::vector<std::vector<int>> gContNHits_;
300 std::vector<std::vector<float>> gContXMean_;
301 std::vector<std::vector<float>> gContYMean_;
302 std::vector<std::vector<float>> oContEnergy_;
303 std::vector<std::vector<int>> oContNHits_;
304 std::vector<std::vector<float>> oContXMean_;
305 std::vector<std::vector<float>> oContYMean_;
306 std::vector<std::vector<float>> oContXStd_;
307 std::vector<std::vector<float>> oContYStd_;
308 std::vector<std::vector<float>> oContLayerMean_;
309 std::vector<std::vector<float>> oContLayerStd_;
310
312 float discValue_{0};
313
315 bool fiducial_{false};
316
318 float recoilPx_{-9999};
319
321 float recoilPy_{-9999};
322
324 float recoilPz_{-9999};
325
327 float recoilX_{-9999};
328
330 float recoilY_{-9999};
331
332 std::vector<float> ecalLayerEdepReadout_;
333
334 ClassDef(EcalVetoResult, 8);
335};
336} // namespace ldmx
337
338#endif
int firstNearPhLayer_
Earliest ECal layer in which a hit is found near the projected photon trajectory.
float getRecoilY() const
Return the y position of the recoil at the Ecal face.
bool fiducial_
is the recoil electron fiducial in ECAL?
EcalVetoResult()
Constructor.
float recoilPy_
py of recoil electron at the Ecal face.
float recoilY_
y position of recoil electron at the Ecal face.
float discValue_
discriminator value from the BDT
void Clear()
Reset the object.
int getNLinRegTracks() const
Number of linear-regression tracks found.
const std::vector< float > getRecoilMomentum() const
Return the momentum of the recoil at the Ecal face.
float epSep_
Distance between the projected photon and electron trajectories at the ECal face.
float epDot_
Dot product of the photon and electron momenta unit vectors.
bool passesVeto() const
Checks if the event passes the Ecal veto.
int nNearPhHits_
Number of hits near the photon trajectory.
bool passesVeto_
Flag indicating whether the event is vetoed by the Ecal.
float recoilPx_
px of recoil electron at the Ecal face.
int nLinregTracks_
Number of "linreg" tracks found in the event.
float getRecoilX() const
Return the x position of the recoil at the Ecal face.
void setVariables(int nReadoutHits, int deepestLayerHit, float summedDet, float summedTightIso, float maxCellDep, float showerRMS, float xStd, float yStd, float avgLayerHit, float stdLayerHit, float ecalBackEnergy, int nStraightTracks, int nLinregTracks, int firstNearPhLayer, int nNearPhHits, int photonTerritoryHits, float epAng, float epSep, float epDot, std::vector< float > electronContainmentEnergy, std::vector< float > photonContainmentEnergy, std::vector< float > outsideContainmentEnergy, std::vector< int > outsideContainmentNHits, std::vector< float > outsideContainmentXStd, std::vector< float > outsideContainmentYStd, std::vector< float > energySeg, std::vector< float > xMeanSeg, std::vector< float > yMeanSeg, std::vector< float > xStdSeg, std::vector< float > yStdSeg, std::vector< float > layerMeanSeg, std::vector< float > layerStdSeg, std::vector< std::vector< float > > eContEnergy, std::vector< std::vector< float > > eContXMean, std::vector< std::vector< float > > eContYMean, std::vector< std::vector< float > > gContEnergy, std::vector< std::vector< int > > gContNHits, std::vector< std::vector< float > > gContXMean, std::vector< std::vector< float > > gContYMean, std::vector< std::vector< float > > oContEnergy, std::vector< std::vector< int > > oContNHits, std::vector< std::vector< float > > oContXMean, std::vector< std::vector< float > > oContYMean, std::vector< std::vector< float > > oContXStd, std::vector< std::vector< float > > oContYStd, std::vector< std::vector< float > > oContLayerMean, std::vector< std::vector< float > > oContLayerStd, std::vector< float > EcalLayerEdepReadout, std::array< float, 3 > recoilP, std::array< float, 3 > recoilPos)
Set the sim particle and 'is findable' flag.
void Print() const
Print the object.
int getNStraightTracks() const
Number of straight tracks found.
float epAng_
Angular separation between the projected photon and electron trajectories (currently unused)
float recoilPz_
py of recoil electron at the Ecal face.
float recoilX_
x position of recoil electron at the Ecal face.
virtual ~EcalVetoResult()
Destructor.
int photonTerritoryHits_
Number of hits in the photon territory.
int nStraightTracks_
Number of "straight" tracks found in the event.