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