Skip to content

Commit

Permalink
Merge pull request cms-sw#52 from jpata/heppy_7_4_7_jer_update_8tev
Browse files Browse the repository at this point in the history
Updated JER
  • Loading branch information
cbernet committed Sep 15, 2015
2 parents 5cdd7f2 + 6a80621 commit bcfe187
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions PhysicsTools/Heppy/python/analyzers/objects/JetAnalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,15 @@ def smearJets(self, event, jets):
if gen != None:
genpt, jetpt, aeta = gen.pt(), jet.pt(), abs(jet.eta())
# from https://twiki.cern.ch/twiki/bin/view/CMS/JetResolution
factor = 1.052 + self.shiftJER*math.hypot(0.012,0.062);
if aeta > 2.3: factor = 1.288 + self.shiftJER*math.hypot(0.127,0.154)
elif aeta > 1.7: factor = 1.134 + self.shiftJER*math.hypot(0.035,0.066)
elif aeta > 1.1: factor = 1.096 + self.shiftJER*math.hypot(0.017,0.063)
elif aeta > 0.5: factor = 1.057 + self.shiftJER*math.hypot(0.012,0.056)
#8 TeV tables

factor = 1.079 + self.shiftJER*0.026
if aeta > 3.2: factor = 1.056 + self.shiftJER * 0.191
elif aeta > 2.8: factor = 1.395 + self.shiftJER * 0.063
elif aeta > 2.3: factor = 1.254 + self.shiftJER * 0.062
elif aeta > 1.7: factor = 1.208 + self.shiftJER * 0.046
elif aeta > 1.1: factor = 1.121 + self.shiftJER * 0.029
elif aeta > 0.5: factor = 1.099 + self.shiftJER * 0.028
ptscale = max(0.0, (jetpt + (factor-1)*(jetpt-genpt))/jetpt)
#print "get with pt %.1f (gen pt %.1f, ptscale = %.3f)" % (jetpt,genpt,ptscale)
jet.deltaMetFromJetSmearing = [ -(ptscale-1)*jet.rawFactor()*jet.px(), -(ptscale-1)*jet.rawFactor()*jet.py() ]
Expand Down

0 comments on commit bcfe187

Please sign in to comment.