Skip to content

Commit cb49789

Browse files
authored
Update L1TCaloLayer1FetchLUTs.cc
1 parent e4b07c4 commit cb49789

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

L1Trigger/L1TCaloLayer1/src/L1TCaloLayer1FetchLUTs.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ bool L1TCaloLayer1FetchLUTs(
197197
calibratedECalInput *= ecalSF.at(phiBin * ecalScaleETBins.size() * 28 + etBin * 28 + etaBin);
198198
if (useLSB)
199199
calibratedECalInput /= caloLSB;
200-
if (ecalInput < ecalZSF.size() / 28 - 1)
200+
if (ecalZSF.size() >= 28 && ecalInput < ecalZSF.size() / 28 - 1)
201201
calibratedECalInput *= ecalZSF.at(ecalInput * 28 + etaBin);
202202

203203
value = calibratedECalInput;
@@ -265,7 +265,7 @@ bool L1TCaloLayer1FetchLUTs(
265265
calibratedHcalInput *= hcalSF.at(phiBin * hcalScaleETBins.size() * 28 + etBin * 28 + etaBin);
266266
if (useLSB)
267267
calibratedHcalInput /= caloLSB;
268-
if (hcalInput < hcalZSF.size() / 28 - 1)
268+
if (hcalZSF.size() >= 28 && hcalInput < hcalZSF.size() / 28 - 1)
269269
calibratedHcalInput *= hcalZSF.at(hcalInput * 28 + etaBin);
270270
value = calibratedHcalInput;
271271
if (fwVersion > 2) {

0 commit comments

Comments
 (0)