34 if (bc->
energy() > ebcmax && bc !=
b) {
45 if (bc->
energy() < ebcmin && bc !=
b) {
56 if (bc->
energy() < ebcmin && bc !=
b && bc != bclast) {
62 bool isbarrel =
b->hitsAndFractions().at(0).first.subdetId() ==
EcalBarrel;
63 bool hasbc2 =
b2.isNonnull() &&
b2->energy() > 0.;
73 fVals[4] =
p.e5x5() /
s->rawEnergy();
74 fVals[5] =
p.hadronicOverEm();
79 double bemax = clustertools.eMax(*
b);
80 double be2nd = clustertools.e2nd(*
b);
81 double betop = clustertools.eTop(*
b);
82 double bebottom = clustertools.eBottom(*
b);
83 double beleft = clustertools.eLeft(*
b);
84 double beright = clustertools.eRight(*
b);
88 fVals[10] =
b->energy() /
s->rawEnergy();
89 fVals[11] = clustertools.e3x3(*
b) /
b->energy();
90 fVals[12] = clustertools.e5x5(*
b) /
b->energy();
91 fVals[13] =
sqrt(clustertools.localCovariances(*
b)[0]);
92 fVals[14] =
sqrt(clustertools.localCovariances(*
b)[2]);
93 fVals[15] = clustertools.localCovariances(*
b)[1];
94 fVals[16] = bemax /
b->energy();
100 fVals[22] = (betop - bebottom) / (betop + bebottom);
101 fVals[23] = (beleft - beright) / (beleft + beright);
103 double bc2emax = hasbc2 ? clustertools.eMax(*
b2) : 0.;
104 double bc2e2nd = hasbc2 ? clustertools.e2nd(*
b2) : 0.;
105 double bc2etop = hasbc2 ? clustertools.eTop(*
b2) : 0.;
106 double bc2ebottom = hasbc2 ? clustertools.eBottom(*
b2) : 0.;
107 double bc2eleft = hasbc2 ? clustertools.eLeft(*
b2) : 0.;
108 double bc2eright = hasbc2 ? clustertools.eRight(*
b2) : 0.;
110 fVals[24] = hasbc2 ? (
b2->eta() -
s->eta()) : 0.;
112 fVals[26] = hasbc2 ?
b2->energy() /
s->rawEnergy() : 0.;
113 fVals[27] = hasbc2 ? clustertools.e3x3(*
b2) /
b2->energy() : 0.;
114 fVals[28] = hasbc2 ? clustertools.e5x5(*
b2) /
b2->energy() : 0.;
115 fVals[29] = hasbc2 ?
sqrt(clustertools.localCovariances(*
b2)[0]) : 0.;
116 fVals[30] = hasbc2 ?
sqrt(clustertools.localCovariances(*
b2)[2]) : 0.;
117 fVals[31] = hasbc2 ? clustertools.localCovariances(*
b)[1] : 0.;
118 fVals[32] = hasbc2 ? bc2emax /
b2->energy() : 0.;
119 fVals[33] = hasbc2 ?
log(bc2e2nd / bc2emax) : 0.;
120 fVals[34] = hasbc2 ?
log(bc2etop / bc2emax) : 0.;
121 fVals[35] = hasbc2 ?
log(bc2ebottom / bc2emax) : 0.;
122 fVals[36] = hasbc2 ?
log(bc2eleft / bc2emax) : 0.;
123 fVals[37] = hasbc2 ?
log(bc2eright / bc2emax) : 0.;
124 fVals[38] = hasbc2 ? (bc2etop - bc2ebottom) / (bc2etop + bc2ebottom) : 0.;
125 fVals[39] = hasbc2 ? (bc2eleft - bc2eright) / (bc2eleft + bc2eright) : 0.;
127 fVals[40] = hasbclast ? (bclast->
eta() -
s->eta()) : 0.;
129 fVals[42] = hasbclast ? bclast->
energy() /
s->rawEnergy() : 0.;
130 fVals[43] = hasbclast ? clustertools.e3x3(*bclast) / bclast->
energy() : 0.;
131 fVals[44] = hasbclast ? clustertools.e5x5(*bclast) / bclast->
energy() : 0.;
132 fVals[45] = hasbclast ?
sqrt(clustertools.localCovariances(*bclast)[0]) : 0.;
133 fVals[46] = hasbclast ?
sqrt(clustertools.localCovariances(*bclast)[2]) : 0.;
134 fVals[47] = hasbclast ? clustertools.localCovariances(*bclast)[1] : 0.;
136 fVals[48] = hasbclast2 ? (bclast2->
eta() -
s->eta()) : 0.;
138 fVals[50] = hasbclast2 ? bclast2->
energy() /
s->rawEnergy() : 0.;
139 fVals[51] = hasbclast2 ? clustertools.e3x3(*bclast2) / bclast2->
energy() : 0.;
140 fVals[52] = hasbclast2 ? clustertools.e5x5(*bclast2) / bclast2->
energy() : 0.;
141 fVals[53] = hasbclast2 ?
sqrt(clustertools.localCovariances(*bclast2)[0]) : 0.;
142 fVals[54] = hasbclast2 ?
sqrt(clustertools.localCovariances(*bclast2)[2]) : 0.;
143 fVals[55] = hasbclast2 ? clustertools.localCovariances(*bclast2)[1] : 0.;
148 float betacry, bphicry, bthetatilt, bphitilt;
154 fVals[58] = bieta % 5;
155 fVals[59] = biphi % 2;
158 ((bieta - 25 *
std::abs(bieta) / bieta) % 20);
159 fVals[61] = biphi % 20;
164 float bc2etacry, bc2phicry, bc2thetatilt, bc2phitilt;
165 int bc2ieta, bc2iphi;
168 *
b2, caloGeometry, bc2etacry, bc2phicry, bc2ieta, bc2iphi, bc2thetatilt, bc2phitilt);
170 fVals[64] = hasbc2 ? bc2ieta : 0.;
171 fVals[65] = hasbc2 ? bc2iphi : 0.;
172 fVals[66] = hasbc2 ? bc2ieta % 5 : 0.;
173 fVals[67] = hasbc2 ? bc2iphi % 2 : 0.;
174 fVals[68] = hasbc2 ? (
std::abs(bc2ieta) <= 25) * (bc2ieta % 25) +
175 (
std::abs(bc2ieta) > 25) * ((bc2ieta - 25 *
std::abs(bc2ieta) / bc2ieta) % 20)
177 fVals[69] = hasbc2 ? bc2iphi % 20 : 0.;
178 fVals[70] = hasbc2 ? bc2etacry : 0.;
179 fVals[71] = hasbc2 ? bc2phicry : 0.;
181 fVals[72] = vtxcol.size();
184 fVals[0] =
s->rawEnergy();
188 fVals[4] =
p.e5x5() /
s->rawEnergy();
191 fVals[7] = vtxcol.size();
194 const double varscale = 1.253;
199 den =
s->rawEnergy();
203 den =
s->rawEnergy() +
s->preshowerEnergy();
208 double ecor =
reader->GetResponse(
fVals.data()) * den;
213 return {ecor, ecorerr};
constexpr double deltaPhi(double phi1, double phi2)
std::shared_ptr< const GBRForest > fReadereb
double phi() const
azimuthal angle of cluster centroid
bool isNonnull() const
Checks for non-null.
std::shared_ptr< const GBRForest > fReadereevariance
Abs< T >::type abs(const T &t)
double energy() const
cluster energy
std::shared_ptr< const GBRForest > fReaderebvariance
std::array< float, 73 > fVals
std::shared_ptr< const GBRForest > fReaderee
double GetResponse(const float *vector) const
double eta() const
pseudorapidity of cluster centroid