Skip to content

Commit

Permalink
Skip the case where the jet.p4 is scaled with zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
cirkovic committed Aug 12, 2014
1 parent 07db518 commit 53d5b41
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 53d5b41

Please sign in to comment.