diff --git a/RecoParticleFlow/PFProducer/plugins/PFLinker.cc b/RecoParticleFlow/PFProducer/plugins/PFLinker.cc index fa8689e81a88c..8365182549d35 100644 --- a/RecoParticleFlow/PFProducer/plugins/PFLinker.cc +++ b/RecoParticleFlow/PFProducer/plugins/PFLinker.cc @@ -150,6 +150,9 @@ void PFLinker::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::Ptr candPtr(pfCandidates, i); reco::PFCandidate cand(candPtr); + if (!(cand.energy() > 0)) + continue; + bool isphoton = cand.particleId() == reco::PFCandidate::gamma && cand.mva_nothing_gamma() > 0.; bool iselectron = cand.particleId() == reco::PFCandidate::e; // PFCandidates may have a valid MuonRef though they are not muons.