Skip to content

Commit

Permalink
Merge pull request #11267 from slava77/CMSSW_7_4_12/crashA-PuppiConta…
Browse files Browse the repository at this point in the history
…iner

don't pass puppi NaNs to pseudojet methods
  • Loading branch information
davidlange6 committed Sep 16, 2015
2 parents eac8218 + e41afb3 commit 2fa2ca2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CommonTools/PileupAlgos/src/PuppiContainer.cc
Expand Up @@ -47,7 +47,11 @@ void PuppiContainer::initialize(const std::vector<RecoObj> &iRecoObjects) {
// float nom = sqrt((fRecoParticle.m)*(fRecoParticle.m) + (fRecoParticle.pt)*(fRecoParticle.pt)*(cosh(fRecoParticle.eta))*(cosh(fRecoParticle.eta))) + (fRecoParticle.pt)*sinh(fRecoParticle.eta);//hacked
// float denom = sqrt((fRecoParticle.m)*(fRecoParticle.m) + (fRecoParticle.pt)*(fRecoParticle.pt));//hacked
// float rapidity = log(nom/denom);//hacked
curPseudoJet.reset_PtYPhiM(fRecoParticle.pt,fRecoParticle.rapidity,fRecoParticle.phi,fRecoParticle.m);//hacked
if (edm::isFinite(fRecoParticle.rapidity)){
curPseudoJet.reset_PtYPhiM(fRecoParticle.pt,fRecoParticle.rapidity,fRecoParticle.phi,fRecoParticle.m);//hacked
} else {
curPseudoJet.reset_PtYPhiM(0, 99., 0, 0);//skipping may have been a better choice
}
//curPseudoJet.reset_PtYPhiM(fRecoParticle.pt,fRecoParticle.eta,fRecoParticle.phi,fRecoParticle.m);
int puppi_register = 0;
if(fRecoParticle.id == 0 or fRecoParticle.charge == 0) puppi_register = 0; // zero is neutral hadron
Expand Down

0 comments on commit 2fa2ca2

Please sign in to comment.