MODULES.append(('leptonChoiceEWK', lambda: LeptonChoiceEWK("Loop", "Mini", whichApplication="Super", isFastSim=isFastSim, filePathFakeRate=RA7_FRname, filePathLeptonSFfull=RA7_full_lepSF, filePathLeptonSFfast=RA7_fast_lepSF, filePathPileUp=RA7_puweights))) #--- Friend trees for fake rate calculation from CMGTools.TTHAnalysis.tools.leptonFakeRateQCDVars import LeptonFakeRateQCDVars MODULES.append(('leptonFakeRateQCDVarsTTH', lambda: LeptonFakeRateQCDVars( lambda lep: lep.sip3d < 8, lambda jet, lep, dr: jet.pt > (20 if abs(jet.eta) < 2.4 else 30) and dr > 0.7))) MODULES.append(('leptonFakeRateQCDVarsSusy', lambda: LeptonFakeRateQCDVars( lambda lep: lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep) and _susy2lss_lepId_loosestFO(lep) and _susy2lss_lepId_IPcuts(lep), lambda jet, lep, dr: jet.pt > 40 and abs(jet.eta) < 2.4 and dr > 1.0 and jet.id))) #--- Pileup reweighting from CMGTools.TTHAnalysis.tools.vertexWeightFriend import VertexWeightFriend putruefilemc = utility_files_dir + "/pileup/zjets-4-nvtx_plots_true.root" putruefiledata_central = utility_files_dir + "/json/Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON_pileup_69000_50.root" putruefiledata_up = utility_files_dir + "/json/Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON_pileup_69000_50_p5pc.root" putruefiledata_down = utility_files_dir + "/json/Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON_pileup_69000_50_m5pc.root" MODULES.append(('puWeightsTrue_central',
lambda lep : lep.relIso03 < 0.5 and lep.sip3d < 8 and _tthlep_lepId(lep), lambda lep : lep.mvaTTH > 0.6 and lep.mediumMuonId, cleanJet = lambda lep,jet,dr : (lep.pt > 10 and dr < 0.4)) )) MODULES.append( ('leptonJetReCleanerTTH', LeptonJetReCleaner("MiniSip8", lambda lep : lep.miniRelIso < 0.4 and lep.sip3d < 8 and _tthlep_lepId(lep), lambda lep : lep.mvaTTH > 0.6 and lep.mediumMuonId, cleanJet = lambda lep,jet,dr : (lep.pt > 10 and dr < 0.4)) )) #--- Susy multilep instances MODULES.append( ('leptonJetReCleanerSusy', LeptonJetReCleaner("Mini", lambda lep : lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep), lambda lep : lep.sip3d < 4 and _susy2lss_multiIso(lep) and _susy2lss_lepId_CB(lep), cleanJet = lambda lep,jet,dr : (lep.pt > 10 and dr < 0.4)) )) from CMGTools.TTHAnalysis.tools.leptonFakeRateQCDVars import LeptonFakeRateQCDVars #--- TTH instances MODULES.append( ('leptonFakeRateQCDVarsTTH', LeptonFakeRateQCDVars( lambda lep : lep.sip3d < 8 and lep.relIso03 < 0.5 and _tthlep_lepId(lep), lambda jet, lep, dr : jet.pt > (20 if abs(jet.eta)<2.4 else 30) and dr > 0.7) ) ) #--- Susy multilep instances MODULES.append( ('leptonFakeRateQCDVarsSusy', LeptonFakeRateQCDVars( lambda lep : lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep), lambda jet, lep, dr : jet.pt > 40 and abs(jet.eta)<2.4 and dr > 1.0 and jet.id ) ) ) from CMGTools.TTHAnalysis.tools.leptonJetReCleaner import _susy2lss_multiIso_withMiniIsoRelaxed_ConePtJetPtRatio,_susy2lss_multiIso_withMiniIsoRelaxed_CutForFO4 list_cuts_tightlepid_nomultiiso_noeltightmvaid_nosip_nodxy = [ lambda lep : (abs(lep.pdgId)==11 or abs(lep.pdgId)==13), lambda lep : lep.miniRelIso<0.4, lambda lep : abs(lep.dz)<0.1, lambda lep : lep.pt > 10, lambda lep : ((abs(lep.eta)<2.4 and abs(lep.pdgId)==13) or (abs(lep.eta)<2.5 and abs(lep.pdgId)==11)), lambda lep : ((abs(lep.pdgId)!=11) or abs(lep.eta)<1.4442 or abs(lep.eta)>1.566), lambda lep : (lep.mediumMuonId > 0 or abs(lep.pdgId)!=13),
cleanJet=lambda lep, jet, dr: (lep.pt > 10 and dr < 0.4)))) #--- Susy multilep instances MODULES.append( ('leptonJetReCleanerSusy', LeptonJetReCleaner( "Mini", lambda lep: lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep), lambda lep: lep.sip3d < 4 and _susy2lss_multiIso( lep) and _susy2lss_lepId_CB(lep), cleanJet=lambda lep, jet, dr: (lep.pt > 10 and dr < 0.4)))) from CMGTools.TTHAnalysis.tools.leptonFakeRateQCDVars import LeptonFakeRateQCDVars #--- TTH instances MODULES.append(('leptonFakeRateQCDVarsTTH', LeptonFakeRateQCDVars( lambda lep: lep.sip3d < 8 and lep.relIso03 < 0.5 and _tthlep_lepId(lep), lambda jet, lep, dr: jet.pt > (20 if abs(jet.eta) < 2.4 else 30) and dr > 0.7))) #--- Susy multilep instances MODULES.append( ('leptonFakeRateQCDVarsSusy', LeptonFakeRateQCDVars( lambda lep: lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep), lambda jet, lep, dr: jet.pt > (20 if abs(jet.eta) < 2.4 else 30) and dr > 0.7))) #from CMGTools.TTHAnalysis.tools.finalMVA_2lss import FinalMVA_2LSS #MODULES.append( ('2lss_mva', FinalMVA_2LSS()) ) #from CMGTools.TTHAnalysis.tools.finalMVA_3l import FinalMVA_3L #MODULES.append( ('3l_mva', FinalMVA_3L()) ) #from CMGTools.TTHAnalysis.tools.bbvars import bbVars #MODULES.append( ('bbvars', bbVars()) )