86 Double_t ebcmax = -99.;
89 if (bc->
energy() > ebcmax && bc !=
b) {
97 Double_t ebcmin = 1e6;
100 if (bc->
energy() < ebcmin && bc !=
b) {
111 if (bc->
energy() < ebcmin && bc !=
b && bc != bclast) {
117 Bool_t isbarrel =
b->hitsAndFractions().at(0).first.subdetId() ==
EcalBarrel;
118 Bool_t hasbc2 =
b2.isNonnull() &&
b2->energy() > 0.;
124 fVals[0] =
s->rawEnergy();
128 fVals[4] =
p.e5x5() /
s->rawEnergy();
129 fVals[5] =
p.hadronicOverEm();
134 double bemax = clustertools.eMax(*
b);
135 double be2nd = clustertools.e2nd(*
b);
136 double betop = clustertools.eTop(*
b);
137 double bebottom = clustertools.eBottom(*
b);
138 double beleft = clustertools.eLeft(*
b);
139 double beright = clustertools.eRight(*
b);
141 fVals[8] =
b->eta() -
s->eta();
143 fVals[10] =
b->energy() /
s->rawEnergy();
144 fVals[11] = clustertools.e3x3(*
b) /
b->energy();
145 fVals[12] = clustertools.e5x5(*
b) /
b->energy();
146 fVals[13] =
sqrt(clustertools.localCovariances(*
b)[0]);
147 fVals[14] =
sqrt(clustertools.localCovariances(*
b)[2]);
148 fVals[15] = clustertools.localCovariances(*
b)[1];
149 fVals[16] = bemax /
b->energy();
155 fVals[22] = (betop - bebottom) / (betop + bebottom);
156 fVals[23] = (beleft - beright) / (beleft + beright);
158 double bc2emax = hasbc2 ? clustertools.eMax(*
b2) : 0.;
159 double bc2e2nd = hasbc2 ? clustertools.e2nd(*
b2) : 0.;
160 double bc2etop = hasbc2 ? clustertools.eTop(*
b2) : 0.;
161 double bc2ebottom = hasbc2 ? clustertools.eBottom(*
b2) : 0.;
162 double bc2eleft = hasbc2 ? clustertools.eLeft(*
b2) : 0.;
163 double bc2eright = hasbc2 ? clustertools.eRight(*
b2) : 0.;
165 fVals[24] = hasbc2 ? (
b2->eta() -
s->eta()) : 0.;
167 fVals[26] = hasbc2 ?
b2->energy() /
s->rawEnergy() : 0.;
168 fVals[27] = hasbc2 ? clustertools.e3x3(*
b2) /
b2->energy() : 0.;
169 fVals[28] = hasbc2 ? clustertools.e5x5(*
b2) /
b2->energy() : 0.;
170 fVals[29] = hasbc2 ?
sqrt(clustertools.localCovariances(*
b2)[0]) : 0.;
171 fVals[30] = hasbc2 ?
sqrt(clustertools.localCovariances(*
b2)[2]) : 0.;
172 fVals[31] = hasbc2 ? clustertools.localCovariances(*
b)[1] : 0.;
173 fVals[32] = hasbc2 ? bc2emax /
b2->energy() : 0.;
174 fVals[33] = hasbc2 ?
log(bc2e2nd / bc2emax) : 0.;
175 fVals[34] = hasbc2 ?
log(bc2etop / bc2emax) : 0.;
176 fVals[35] = hasbc2 ?
log(bc2ebottom / bc2emax) : 0.;
177 fVals[36] = hasbc2 ?
log(bc2eleft / bc2emax) : 0.;
178 fVals[37] = hasbc2 ?
log(bc2eright / bc2emax) : 0.;
179 fVals[38] = hasbc2 ? (bc2etop - bc2ebottom) / (bc2etop + bc2ebottom) : 0.;
180 fVals[39] = hasbc2 ? (bc2eleft - bc2eright) / (bc2eleft + bc2eright) : 0.;
182 fVals[40] = hasbclast ? (bclast->
eta() -
s->eta()) : 0.;
184 fVals[42] = hasbclast ? bclast->
energy() /
s->rawEnergy() : 0.;
185 fVals[43] = hasbclast ? clustertools.e3x3(*bclast) / bclast->
energy() : 0.;
186 fVals[44] = hasbclast ? clustertools.e5x5(*bclast) / bclast->
energy() : 0.;
187 fVals[45] = hasbclast ?
sqrt(clustertools.localCovariances(*bclast)[0]) : 0.;
188 fVals[46] = hasbclast ?
sqrt(clustertools.localCovariances(*bclast)[2]) : 0.;
189 fVals[47] = hasbclast ? clustertools.localCovariances(*bclast)[1] : 0.;
191 fVals[48] = hasbclast2 ? (bclast2->
eta() -
s->eta()) : 0.;
193 fVals[50] = hasbclast2 ? bclast2->
energy() /
s->rawEnergy() : 0.;
194 fVals[51] = hasbclast2 ? clustertools.e3x3(*bclast2) / bclast2->
energy() : 0.;
195 fVals[52] = hasbclast2 ? clustertools.e5x5(*bclast2) / bclast2->
energy() : 0.;
196 fVals[53] = hasbclast2 ?
sqrt(clustertools.localCovariances(*bclast2)[0]) : 0.;
197 fVals[54] = hasbclast2 ?
sqrt(clustertools.localCovariances(*bclast2)[2]) : 0.;
198 fVals[55] = hasbclast2 ? clustertools.localCovariances(*bclast2)[1] : 0.;
203 float betacry, bphicry, bthetatilt, bphitilt;
209 fVals[58] = bieta % 5;
210 fVals[59] = biphi % 2;
213 ((bieta - 25 *
TMath::Abs(bieta) / bieta) % 20);
214 fVals[61] = biphi % 20;
219 float bc2etacry, bc2phicry, bc2thetatilt, bc2phitilt;
220 int bc2ieta, bc2iphi;
223 *
b2, caloGeometry, bc2etacry, bc2phicry, bc2ieta, bc2iphi, bc2thetatilt, bc2phitilt);
225 fVals[64] = hasbc2 ? bc2ieta : 0.;
226 fVals[65] = hasbc2 ? bc2iphi : 0.;
227 fVals[66] = hasbc2 ? bc2ieta % 5 : 0.;
228 fVals[67] = hasbc2 ? bc2iphi % 2 : 0.;
232 fVals[69] = hasbc2 ? bc2iphi % 20 : 0.;
233 fVals[70] = hasbc2 ? bc2etacry : 0.;
234 fVals[71] = hasbc2 ? bc2phicry : 0.;
236 fVals[72] = vtxcol.size();
239 fVals[0] =
s->rawEnergy();
243 fVals[4] =
p.e5x5() /
s->rawEnergy();
246 fVals[7] = vtxcol.size();
249 const Double_t varscale = 1.253;
254 den =
s->rawEnergy();
258 den =
s->rawEnergy() +
s->preshowerEnergy();
263 Double_t ecor =
reader->GetResponse(
fVals.data()) * den;
268 return {ecor, ecorerr};