Skip to content

Commit

Permalink
Merge pull request cms-sw#109 from cirkovic/CMG_MiniAOD_Lite_V6_0_fro…
Browse files Browse the repository at this point in the history
…m-CMSSW_7_0_6_Skipping_jet.p4_0

Skip the case where the jet.p4 is scaled with zero.
  • Loading branch information
gpetruc committed Aug 13, 2014
2 parents 07db518 + 53d5b41 commit 0a94f13
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def smearJets(self, event):
#print "get with pt %.1f (gen pt %.1f, ptscale = %.3f)" % (jetpt,genpt,ptscale)
event.deltaMetFromJetSmearing[0] -= (ptscale-1)*jet.rawFactor()*jet.px()
event.deltaMetFromJetSmearing[1] -= (ptscale-1)*jet.rawFactor()*jet.py()
jet.setP4(jet.p4()*ptscale)
if ptscale != 0:
jet.setP4(jet.p4()*ptscale)
# leave the uncorrected unchanged for sync
jet._rawFactor = jet.rawFactor()/ptscale if ptscale != 0 else 0
jet.rawFactor = types.MethodType(lambda self : self._rawFactor, jet, jet.__class__)
Expand Down

0 comments on commit 0a94f13

Please sign in to comment.