Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run3-hcx347 Fix the ieta=16 issue for HCAL simulation in the GEN-SIM step - backport of #42105 #42113

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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