diff --git a/SimG4CMS/Calo/src/CaloSD.cc b/SimG4CMS/Calo/src/CaloSD.cc index 9b0f172d4e102..0050e5e5be662 100644 --- a/SimG4CMS/Calo/src/CaloSD.cc +++ b/SimG4CMS/Calo/src/CaloSD.cc @@ -323,7 +323,7 @@ bool CaloSD::checkHit() { } else if (nCheckedHits > 0) { int nhits = theHC->entries(); int minhit = std::max(nhits - nCheckedHits, 0); - int maxhit = - 1; + int maxhit = -1; for (int j = maxhit; j > minhit; --j) { if ((*theHC)[j]->getID() == currentID) {