diff --git a/PhysicsTools/NanoAOD/plugins/LeptonInJetProducer.cc b/PhysicsTools/NanoAOD/plugins/LeptonInJetProducer.cc index 80c75caac194a..58ed0516ede5f 100644 --- a/PhysicsTools/NanoAOD/plugins/LeptonInJetProducer.cc +++ b/PhysicsTools/NanoAOD/plugins/LeptonInJetProducer.cc @@ -76,9 +76,6 @@ void LeptonInJetProducer::produce(edm::StreamID streamID, edm::Event &iEvent, std::vector vmuIdx3SJ; std::vector veleIdx3SJ; - int ele_pfmatch_index = -1; - int mu_pfmatch_index = -1; - // Find leptons in jets for (unsigned int ij = 0; ij < nJet; ij++) { const pat::Jet &itJet = (*srcJet)[ij]; @@ -91,8 +88,8 @@ void LeptonInJetProducer::produce(edm::StreamID streamID, edm::Event &iEvent, fastjet::PseudoJet p(d->px(), d->py(), d->pz(), d->energy()); lClusterParticles.emplace_back(p); } - ele_pfmatch_index = -1; - mu_pfmatch_index = -1; + int ele_pfmatch_index = -1; + int mu_pfmatch_index = -1; // match to leading and closest electron or muon double dRmin(0.8), dRele(999), dRmu(999), dRtmp(999);