def muPtScaleSystematic(a, gen=False): """ Apply muon pT Scale systematic from wpol code """ pt_scale = one.MuPtScaleFilter(gen) a.AddMuonFilter("PreCC", pt_scale) pfmet_pt_scalePSet = PSet( Lepton = "Muon", Gen = gen ).ps() pfmet_pt_scale = one.pfMETLeptonScale(pfmet_pt_scalePSet) a.AddMETFilter("pfMET",pfmet_pt_scale) return (pt_scale, pfmet_pt_scale)
def elPtScaleSystematic(a, gen = False, shiftVal = 0.01, shiftDir = True): """ Apply muon pT Scale systematic from wpol code """ pt_scale = one.ElPtScaleFilter(shiftVal, shiftDir) a.AddElectronFilter("PreCC", pt_scale) pfmet_pt_scalePSet = PSet( Lepton = "Electron", Gen = gen , ElPtScaleValue = shiftVal, ElPtScaleDirection = shiftDir ).ps() pfmet_pt_scale = one.pfMETLeptonScale(pfmet_pt_scalePSet) a.AddMETFilter("pfMET",pfmet_pt_scale) return (pt_scale, pfmet_pt_scale)