LDMX Software
EcalVetoResult.cxx
1
3
5
6namespace ldmx {
8
10
12 passesVeto_ = false;
13
14 nReadoutHits_ = 0;
15 summedDet_ = 0;
16 summedTightIso_ = 0;
17 maxCellDep_ = 0;
18 showerRMS_ = 0;
19 xStd_ = 0;
20 yStd_ = 0;
21 avgLayerHit_ = 0;
22 stdLayerHit_ = 0;
23 deepestLayerHit_ = 0;
24 ecalBackEnergy_ = 0;
25 // MIP tracking
29 nNearPhHits_ = 0;
31 epAng_ = 0;
32 epSep_ = 0;
33 epDot_ = 0;
34
35 electronContainmentEnergy_.clear();
36 photonContainmentEnergy_.clear();
37 outsideContainmentEnergy_.clear();
38 outsideContainmentNHits_.clear();
39 outsideContainmentXStd_.clear();
40 outsideContainmentYStd_.clear();
41
42 energySeg_.clear();
43 xMeanSeg_.clear();
44 yMeanSeg_.clear();
45 xStdSeg_.clear();
46 yStdSeg_.clear();
47 layerMeanSeg_.clear();
48 layerStdSeg_.clear();
49
50 eContEnergy_.clear();
51 eContXMean_.clear();
52 eContYMean_.clear();
53 gContEnergy_.clear();
54 gContNHits_.clear();
55 gContXMean_.clear();
56 gContYMean_.clear();
57 oContEnergy_.clear();
58 oContNHits_.clear();
59 oContXMean_.clear();
60 oContYMean_.clear();
61 oContXStd_.clear();
62 oContYStd_.clear();
63 oContLayerMean_.clear();
64 oContLayerStd_.clear();
65
66 discValue_ = 0;
67
68 recoilPx_ = -9999;
69 recoilPy_ = -9999;
70 recoilPz_ = -9999;
71 recoilX_ = -9999;
72 recoilY_ = -9999;
73
74 ecalLayerEdepReadout_.clear();
75}
76
78 int nReadoutHits, int deepestLayerHit, float summedDet,
79 float summedTightIso, float maxCellDep, float showerRMS, float xStd,
80 float yStd, float avgLayerHit, float stdLayerHit, float ecalBackEnergy,
81 int nStraightTracks, int nLinregTracks, int firstNearPhLayer,
82 int nNearPhHits, int photonTerritoryHits, float epAng, float epSep,
83 float epDot,
84
85 std::vector<float> electronContainmentEnergy,
86 std::vector<float> photonContainmentEnergy,
87 std::vector<float> outsideContainmentEnergy,
88 std::vector<int> outsideContainmentNHits,
89 std::vector<float> outsideContainmentXStd,
90 std::vector<float> outsideContainmentYStd,
91
92 std::vector<float> energySeg, std::vector<float> xMeanSeg,
93 std::vector<float> yMeanSeg, std::vector<float> xStdSeg,
94 std::vector<float> yStdSeg, std::vector<float> layerMeanSeg,
95 std::vector<float> layerStdSeg,
96
97 std::vector<std::vector<float>> eContEnergy,
98 std::vector<std::vector<float>> eContXMean,
99 std::vector<std::vector<float>> eContYMean,
100 std::vector<std::vector<float>> gContEnergy,
101 std::vector<std::vector<int>> gContNHits,
102 std::vector<std::vector<float>> gContXMean,
103 std::vector<std::vector<float>> gContYMean,
104 std::vector<std::vector<float>> oContEnergy,
105 std::vector<std::vector<int>> oContNHits,
106 std::vector<std::vector<float>> oContXMean,
107 std::vector<std::vector<float>> oContYMean,
108 std::vector<std::vector<float>> oContXStd,
109 std::vector<std::vector<float>> oContYStd,
110 std::vector<std::vector<float>> oContLayerMean,
111 std::vector<std::vector<float>> oContLayerStd,
112
113 std::vector<float> EcalLayerEdepReadout, std::vector<double> recoilP,
114 std::vector<float> recoilPos) {
115 nReadoutHits_ = nReadoutHits;
116 summedDet_ = summedDet;
117 summedTightIso_ = summedTightIso;
118 maxCellDep_ = maxCellDep;
119 showerRMS_ = showerRMS;
120 xStd_ = xStd;
121 yStd_ = yStd;
122 avgLayerHit_ = avgLayerHit;
123 stdLayerHit_ = stdLayerHit;
124 deepestLayerHit_ = deepestLayerHit;
125 ecalBackEnergy_ = ecalBackEnergy;
126 // MIP tracking
127 nStraightTracks_ = nStraightTracks;
128 nLinregTracks_ = nLinregTracks;
129 firstNearPhLayer_ = firstNearPhLayer;
130 nNearPhHits_ = nNearPhHits;
131 photonTerritoryHits_ = photonTerritoryHits;
132 epAng_ = epAng;
133 epSep_ = epSep;
134 epDot_ = epDot;
135
136 electronContainmentEnergy_ = electronContainmentEnergy;
137 photonContainmentEnergy_ = photonContainmentEnergy;
138 outsideContainmentEnergy_ = outsideContainmentEnergy;
139 outsideContainmentNHits_ = outsideContainmentNHits;
140 outsideContainmentXStd_ = outsideContainmentXStd;
141 outsideContainmentYStd_ = outsideContainmentYStd;
142
143 energySeg_ = energySeg;
144 xMeanSeg_ = xMeanSeg;
145 yMeanSeg_ = yMeanSeg;
146 xStdSeg_ = xStdSeg;
147 yStdSeg_ = yStdSeg;
148 layerMeanSeg_ = layerMeanSeg;
149 layerStdSeg_ = layerStdSeg;
150
151 eContEnergy_ = eContEnergy;
152 eContXMean_ = eContXMean;
153 eContYMean_ = eContYMean;
154 gContEnergy_ = gContEnergy;
155 gContNHits_ = gContNHits;
156 gContXMean_ = gContXMean;
157 gContYMean_ = gContYMean;
158 oContEnergy_ = oContEnergy;
159 oContNHits_ = oContNHits;
160 oContXMean_ = oContXMean;
161 oContYMean_ = oContYMean;
162 oContXStd_ = oContXStd;
163 oContYStd_ = oContYStd;
164 oContLayerMean_ = oContLayerMean;
165 oContLayerStd_ = oContLayerStd;
166
167 // discvalue not set here
168
169 if (!recoilP.empty()) {
170 recoilPx_ = recoilP[0];
171 recoilPy_ = recoilP[1];
172 recoilPz_ = recoilP[2];
173 recoilX_ = recoilPos[0];
174 recoilY_ = recoilPos[1];
175 }
176
177 ecalLayerEdepReadout_ = EcalLayerEdepReadout;
178}
179
181 std::cout << "[ EcalVetoResult ]:\n"
182 << "\t Passes veto : " << passesVeto_ << "\n"
183 << std::endl;
184}
185} // namespace ldmx
Class used to encapsulate the results obtained from EcalVetoProcessor.
int firstNearPhLayer_
Earliest ECal layer in which a hit is found near the projected photon trajectory.
double recoilPx_
px of recoil electron at the Ecal face.
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.
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.
int nNearPhHits_
Number of hits near the photon trajectory.
bool passesVeto_
Flag indicating whether the event is vetoed by the Ecal.
int nLinregTracks_
Number of "linreg" tracks found in the event.
void Print() const
Print the object.
double recoilPz_
py of recoil electron at the Ecal face.
float epAng_
Angular separation between the projected photon and electron trajectories (currently unused)
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.