Skip to content

Commit

Permalink
Merge pull request #9190 from cms-btv-pog/JetFlavorFix_from-CMSSW_7_1_16
Browse files Browse the repository at this point in the history
Protection for pt=0 ghost candidates in jet flavor clustering (71X)
  • Loading branch information
davidlange6 committed Jun 4, 2015
2 parents dff9d4a + 3c483a3 commit 55a9031
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PhysicsTools/JetMCAlgos/plugins/JetFlavourClustering.cc
Expand Up @@ -467,6 +467,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 55a9031

Please sign in to comment.