Skip to content

Commit

Permalink
Fix the ieta=16 issue for HCAL simulation in the GEN-SIM step - backp…
Browse files Browse the repository at this point in the history
…ort of #42105
  • Loading branch information
Sunanda committed Jun 27, 2023
1 parent d13b64a commit 0dbcd28
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Geometry/HcalCommonData/src/HcalNumberingFromDDD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ using namespace geant_units::operators;

HcalNumberingFromDDD::HcalNumberingFromDDD(const HcalDDDSimConstants* hcons) : hcalConstants(hcons) {
#ifdef EDM_ML_DEBUG
edm::LogInfo("HCalGeom") << "Creating HcalNumberingFromDDD\n";
edm::LogVerbatim("HCalGeom") << "Creating HcalNumberingFromDDD";
#endif
}

HcalNumberingFromDDD::~HcalNumberingFromDDD() {
#ifdef EDM_ML_DEBUG
edm::LogInfo("HCalGeom") << "Deleting HcalNumberingFromDDD\n";
edm::LogVerbatim("HCalGeom") << "Deleting HcalNumberingFromDDD";
#endif
}

Expand Down Expand Up @@ -86,7 +86,7 @@ HcalNumberingFromDDD::HcalID HcalNumberingFromDDD::unitID(int det, double etaR,

#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HCalGeom") << "HcalNumberingFromDDD: etaR = " << etaR << " : " << zside << "/" << ieta << " phi "
<< hphi << " : " << iphi << std::endl;
<< hphi << " : " << iphi;
#endif
return unitID(det, zside, depth, ieta, iphi, lay);
}
Expand All @@ -99,6 +99,9 @@ HcalNumberingFromDDD::HcalID HcalNumberingFromDDD::unitID(
int units = hcalConstants->unitPhi(det, etaR);
int iphi_skip = hcalConstants->phiNumber(phi, units);

if ((lay == 1) && (etaR == 16))
etaR = 15;

std::pair<int, int> etaDepth = hcalConstants->getEtaDepth(det, etaR, iphi_skip, zside, depth, lay);

#ifdef EDM_ML_DEBUG
Expand Down

0 comments on commit 0dbcd28

Please sign in to comment.