CMS 3D CMS Logo

Classes | Functions
JetReCalibrator Namespace Reference

Classes

class  JetReCalibrator
 
class  Type1METCorrector
 

Functions

def setFakeRawMETOnOldMiniAODs (met, rawpx, rawpy, rawsumet)
 

Function Documentation

◆ setFakeRawMETOnOldMiniAODs()

def JetReCalibrator.setFakeRawMETOnOldMiniAODs (   met,
  rawpx,
  rawpy,
  rawsumet 
)

Definition at line 186 of file JetReCalibrator.py.

References Matriplex.hypot().

Referenced by JetReCalibrator.Type1METCorrector.correct().

186 def setFakeRawMETOnOldMiniAODs(met, rawpx, rawpy, rawsumet):
187  met._rawSumEt = rawsumet
188  met._rawP4 = ROOT.reco.Particle.LorentzVector(rawpx,rawpy,0,hypot(rawpx,rawpy))
189  met.uncorPt = types.MethodType(lambda myself : myself._rawP4.Pt(), met, met.__class__)
190  met.uncorPx = types.MethodType(lambda myself : myself._rawP4.Px(), met, met.__class__)
191  met.uncorPy = types.MethodType(lambda myself : myself._rawP4.Py(), met, met.__class__)
192  met.uncorPhi = types.MethodType(lambda myself : myself._rawP4.Phi(), met, met.__class__)
193  met.uncorP4 = types.MethodType(lambda myself : myself._rawP4, met, met.__class__)
194  met.uncorSumEt = types.MethodType(lambda myself : myself._rawSumEt, met, met.__class__)
195  # the two below are a bit more tricky, but probably less needed, but something dummy
196  met.uncorP2 = types.MethodType(lambda myself : None, met, met.__class__)
197  met.uncorP3 = types.MethodType(lambda myself : None, met, met.__class__)
198 
199 
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:616
def setFakeRawMETOnOldMiniAODs(met, rawpx, rawpy, rawsumet)