diff --git a/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTBcHcalIsolationProducersRegional.cc b/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTBcHcalIsolationProducersRegional.cc index 7548b53b9d2a7..2004dc7f95f4b 100644 --- a/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTBcHcalIsolationProducersRegional.cc +++ b/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTBcHcalIsolationProducersRegional.cc @@ -162,14 +162,13 @@ void EgammaHLTBcHcalIsolationProducersRegional::produce(edm::StreamID, int iEA = -1; auto scEta = std::abs(recoEcalCandRef->superCluster()->eta()); for (int bIt = absEtaLowEdges_.size() - 1; bIt > -1; bIt--) { - if (scEta > absEtaLowEdges_.at(bIt)) { + if (scEta >= absEtaLowEdges_[bIt]) { iEA = bIt; break; } } - isol = isol - rho * effectiveAreas_.at(iEA); + isol = isol - rho * effectiveAreas_[iEA]; } - isoMap.insert(recoEcalCandRef, isol); } diff --git a/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTHcalVarProducerFromRecHit.cc b/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTHcalVarProducerFromRecHit.cc index e721892bd06df..a64f8e0cc2fd6 100644 --- a/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTHcalVarProducerFromRecHit.cc +++ b/RecoEgamma/EgammaHLTProducers/plugins/EgammaHLTHcalVarProducerFromRecHit.cc @@ -229,12 +229,12 @@ void EgammaHLTHcalVarProducerFromRecHit::produce(edm::StreamID, int iEA = -1; auto scEta = std::abs(recoEcalCandRef->superCluster()->eta()); for (int bIt = absEtaLowEdges_.size() - 1; bIt > -1; bIt--) { - if (scEta > absEtaLowEdges_.at(bIt)) { + if (scEta >= absEtaLowEdges_[bIt]) { iEA = bIt; break; } } - isol = isol - rho * effectiveAreas_.at(iEA); + isol = isol - rho * effectiveAreas_[iEA]; } isoMap.insert(recoEcalCandRef, isol); diff --git a/RecoEgamma/EgammaHLTProducers/plugins/HLTEcalPFClusterIsolationProducer.cc b/RecoEgamma/EgammaHLTProducers/plugins/HLTEcalPFClusterIsolationProducer.cc index b4c4c8b9ff7b0..9d03424d601d7 100644 --- a/RecoEgamma/EgammaHLTProducers/plugins/HLTEcalPFClusterIsolationProducer.cc +++ b/RecoEgamma/EgammaHLTProducers/plugins/HLTEcalPFClusterIsolationProducer.cc @@ -174,13 +174,12 @@ void HLTEcalPFClusterIsolationProducer::produce(edm::Event& iEvent, const ed int iEA = -1; auto cEta = std::abs(candRef->eta()); for (int bIt = absEtaLowEdges_.size() - 1; bIt > -1; bIt--) { - if (cEta > absEtaLowEdges_.at(bIt)) { + if (cEta >= absEtaLowEdges_[bIt]) { iEA = bIt; break; } } - - sum = sum - rho * effectiveAreas_.at(iEA); + sum = sum - rho * effectiveAreas_[iEA]; } recoCandMap.insert(candRef, sum); diff --git a/RecoEgamma/EgammaHLTProducers/plugins/HLTHcalPFClusterIsolationProducer.cc b/RecoEgamma/EgammaHLTProducers/plugins/HLTHcalPFClusterIsolationProducer.cc index 0b195f62b7ac4..d5e2de86f40f7 100644 --- a/RecoEgamma/EgammaHLTProducers/plugins/HLTHcalPFClusterIsolationProducer.cc +++ b/RecoEgamma/EgammaHLTProducers/plugins/HLTHcalPFClusterIsolationProducer.cc @@ -200,13 +200,12 @@ void HLTHcalPFClusterIsolationProducer::produce(edm::StreamID sid, int iEA = -1; auto cEta = std::abs(candRef->eta()); for (int bIt = absEtaLowEdges_.size() - 1; bIt > -1; bIt--) { - if (cEta > absEtaLowEdges_.at(bIt)) { + if (cEta >= absEtaLowEdges_[bIt]) { iEA = bIt; break; } } - - sum = sum - rho * effectiveAreas_.at(iEA); + sum = sum - rho * effectiveAreas_[iEA]; } recoCandMap.insert(candRef, sum);