13 ecalRegressionInitialized_(
false),
14 combinationRegressionInitialized_(
false),
15 caloTopologyCacheId_(0),
16 caloGeometryCacheId_(0),
17 regressionCacheId_(0) {
56 unsigned long long newRegressionCacheId = es.
get<
GBRWrapperRcd>().cacheIdentifier();
86 unsigned long long newRegressionCacheId = es.
get<
GBRWrapperRcd>().cacheIdentifier();
131 double& energyFactor,
132 double& errorFactor)
const {
133 energyFactor = -999.;
136 std::vector<float> rInputs;
140 if (sc.
seed()->hitsAndFractions()[0].first.subdetId() ==
EcalBarrel) {
143 }
else if (sc.
seed()->hitsAndFractions()[0].first.subdetId() ==
EcalEndcap) {
147 throw cms::Exception(
"RegressionHelper::calculateRegressedEnergy")
148 <<
"Supercluster seed is either EB nor EE!" << std::endl;
181 bool isEB = ele.
isEB();
184 float energyRelError = energyError /
energy;
185 float momentumRelError = momentumError / momentum;
186 float errorRatio = energyRelError / momentumRelError;
190 float eOverPerror =
eOverP * std::hypot(energyRelError, momentumRelError);
193 std::vector<float> regressionInputs;
194 regressionInputs.resize(11, 0.);
196 regressionInputs[0] =
energy;
197 regressionInputs[1] = energyRelError;
198 regressionInputs[2] = momentum;
199 regressionInputs[3] = momentumRelError;
200 regressionInputs[4] = errorRatio;
201 regressionInputs[5] =
eOverP;
202 regressionInputs[6] = eOverPerror;
203 regressionInputs[7] = static_cast<float>(isEcalDriven);
204 regressionInputs[8] = static_cast<float>(isTrackerDriven);
205 regressionInputs[9] = static_cast<float>(elClass);
206 regressionInputs[10] = static_cast<float>(isEB);
211 fabs(momentum -
energy) < 15. *
sqrt(momentumError * momentumError +
212 energyError * energyError))
222 float combinedMomentumError =
227 if (momentumError != 999. ||
weight == 0.) {
230 oldMomentum.y() * combinedMomentum / oldMomentum.t(),
231 oldMomentum.z() * combinedMomentum / oldMomentum.t(),