Skip to content

Commit

Permalink
Merge pull request #9831 from davidlange6/JetMCAlgos_741patch
Browse files Browse the repository at this point in the history
added protection for zero pt ghost candidates
  • Loading branch information
davidlange6 committed Jun 23, 2015
2 parents 5a1571e + d9e96ea commit 0a7e48d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PhysicsTools/JetMCAlgos/plugins/JetFlavourClustering.cc
Expand Up @@ -485,6 +485,11 @@ JetFlavourClustering::insertGhosts(const edm::Handle<reco::GenParticleRefVector>
// insert "ghost" particles in the vector of jet constituents
for(reco::GenParticleRefVector::const_iterator it = particles->begin(); it != particles->end(); ++it)
{
if((*it)->pt() == 0)
{
edm::LogInfo("NullTransverseMomentum") << "dropping input ghost candidate with pt=0";
continue;
}
fastjet::PseudoJet p((*it)->px(),(*it)->py(),(*it)->pz(),(*it)->energy());
p*=ghostRescaling; // rescale particle momentum
p.set_user_info(new GhostInfo(isHadron, isbHadron, isParton, isLepton, *it));
Expand Down

0 comments on commit 0a7e48d

Please sign in to comment.