From bf2756872a0625273737785f33e32cff53bd6782 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Tue, 27 Jun 2023 07:14:01 +0200 Subject: [PATCH] A fix --- Geometry/HcalCommonData/src/HcalHitRelabeller.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Geometry/HcalCommonData/src/HcalHitRelabeller.cc b/Geometry/HcalCommonData/src/HcalHitRelabeller.cc index 8c3bf1e6c7df6..41fdc015925ed 100644 --- a/Geometry/HcalCommonData/src/HcalHitRelabeller.cc +++ b/Geometry/HcalCommonData/src/HcalHitRelabeller.cc @@ -89,7 +89,9 @@ double HcalHitRelabeller::energyWt(const uint32_t testId) const { int det, z, depth, eta, phi, layer; HcalTestNumbering::unpackHcalIndex(testId, det, z, depth, eta, phi, layer); int zside = (z == 0) ? (-1) : (1); - double wt = (((det == 1) || (det == 2)) && (layer <= 1)) ? theRecNumber->getLayer0Wt(det, phi, zside) : 1.0; + double wt = ((((det == 1) && (layer <= 1)) || ((det == 2) && (layer <= 2))) && (depth == 1)) + ? theRecNumber->getLayer0Wt(det, phi, zside) + : 1.0; #ifdef EDM_ML_DEBUG edm::LogVerbatim("HcalSim") << "EnergyWT::det: " << det << " z: " << z << ":" << zside << " depth: " << depth << " ieta: " << eta << " iphi: " << phi << " layer: " << layer << " wt " << wt;