Skip to content

Commit

Permalink
Fix loop in PFJetIDSelectionFunctor
Browse files Browse the repository at this point in the history
The end iterator was not from the same container as the begin.
This was found by gcc 11.
  • Loading branch information
Dr15Jones committed Aug 5, 2021
1 parent 2508ef2 commit 36874ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class PFJetIDSelectionFunctor : public Selector<pat::Jet> {
double e_muf = 0.0;
nch = 0;
nconstituents = 0;
for (reco::Jet::const_iterator ibegin = basicJet->begin(), iend = patJet->end(), isub = ibegin; isub != iend;
for (reco::Jet::const_iterator ibegin = basicJet->begin(), iend = basicJet->end(), isub = ibegin; isub != iend;
++isub) {
reco::PFJet const *pfsub = dynamic_cast<reco::PFJet const *>(&*isub);
e_chf += pfsub->chargedHadronEnergy();
Expand Down

0 comments on commit 36874ec

Please sign in to comment.