def _susy3l_lepId_CB(lep):
    # CH: the same as the 2lss one but without tightCharge
    if not _susy2lss_lepId_CBloose(lep): return False
    if not _susy2lss_lepId_IPcuts(lep): return False
    if abs(lep.pdgId) == 13:
        return lep.mediumMuonId > 0
    elif abs(lep.pdgId) == 11:
        if not (lep.convVeto and lep.lostHits == 0): 
            return False
        return lep.mvaIdSpring15 > 0.87+(0.60-0.87)*(abs(lep.eta)>0.8)+(0.17-0.60)*(abs(lep.eta)>1.479)
    return False
Exemple #2
0
def _susy3l_lepId_CBloose(lep):
    if not _susy2lss_lepId_IPcuts(lep): return False
    if abs(lep.pdgId) == 13:
        if lep.pt <= 5 or abs(lep.eta) > 2.4: return False
        return True  #lep.mediumMuonId > 0
    elif abs(lep.pdgId) == 11:
        if lep.pt <= 7 or abs(lep.eta) > 2.5: return False
        if not (lep.convVeto and lep.lostHits <= 1):
            return False
        if not _susy_elec_nontrigmva_VL(lep):
            return False
        if not _susy3l_idEmu_cuts(lep): return False
        return True
    return False
#--- Recleaner instances
from CMGTools.TTHAnalysis.tools.leptonChoiceRA5 import _susy2lss_lepId_CBloose, _susy2lss_lepId_loosestFO, _susy2lss_lepId_IPcuts, _susy2lss_lepConePt1015, _susy2lss_lepId_tighterFO, _susy2lss_multiIso, _susy2lss_lepId_CB, _susy2lss_idIsoEmu_cuts
from CMGTools.TTHAnalysis.tools.leptonChoiceRA7 import _susy3l_lepId_CBloose, _susy3l_lepId_loosestFO, _susy3l_lepId_loosestFO, _susy3l_multiIso, _susy3l_lepId_CB
from CMGTools.TTHAnalysis.tools.leptonBuilderEWK import _susyEWK_lepId_CBloose, _susyEWK_lepId_IPcuts, _susyEWK_lepId_MVAFO, _susyEWK_lepId_MVAmedium, _susyEWK_tauId_CBloose, _susyEWK_tauId_CBtight
from CMGTools.TTHAnalysis.tools.functionsTTH import _ttH_idEmu_cuts_E2
from CMGTools.TTHAnalysis.tools.functionsEWKino import _ewkino_idEmu_cuts_E2, _ewkino_2lss_lepId_CBloose, _ewkino_2lss_lepId_FO, _ewkino_2lss_lepId_num, _ewkino_3l_lepId_FO, _ewkino_3l_lepId_num, _ewkino_2lss_lepId_IPcuts, _ewkino_leptonMVA_VT, _ewkino_leptonMVA_M
from CMGTools.TTHAnalysis.tools.conept import conept_RA5, conept_RA7, conept_EWK, conept_TTH, conept_SSDL, conept_SSDL_for3l

MODULES.append((
    'leptonJetReCleanerSusyRA5',
    lambda: LeptonJetReCleaner(
        "Mini",
        lambda lep: lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(
            lep),  #and (ht>300 or _susy2lss_idIsoEmu_cuts(lep)),
        lambda lep: lep.pt > 10 and _susy2lss_lepId_loosestFO(lep) and
        _susy2lss_lepId_IPcuts(lep),  # cuts applied on top of loose
        lambda lep, ht: lep.pt > 10 and _susy2lss_lepConePt1015(
            lep) and _susy2lss_lepId_IPcuts(lep) and
        (_susy2lss_lepId_loosestFO(lep) if ht > 300 else
         _susy2lss_lepId_tighterFO(lep)),  # cuts applied on top of loose
        lambda lep, ht: lep.pt > 10 and _susy2lss_lepConePt1015(
            lep) and _susy2lss_multiIso(lep) and _susy2lss_lepId_CB(lep) and
        (ht > 300 or _susy2lss_idIsoEmu_cuts(lep)
         ),  # cuts applied on top of loose
        cleanJet=lambda lep, jet, dr: dr < 0.4,
        selectJet=lambda jet: abs(jet.eta) < 2.4,
        cleanJetsWithTaus=False,
        doVetoZ=True,
        doVetoLMf=True,
        doVetoLMt=True,
        jetPt=40,
#    MODULES.append( ('btagRWJetDown%s'%syst, BTagReweightFriend(BTagReweight76X, jets=["Jet_jecDown","DiscJet_jecDown"], outlabel='btagCSVWeight%s'%syst.replace('nominal',''), rwtSyst=syst.replace('_','')) ))
#    MODULES.append( ('btagRWLep%s'%syst, BTagLeptonReweightFriend(BTagReweight76X, outlabel='jetBTagCSVWeight%s'%syst.replace('nominal',''), rwtSyst=syst.replace('_','')) ))
#
#from CMGTools.TTHAnalysis.tools.eventBTagRWT import EventBTagRWT
#MODULES.append( ('eventBTagRWT', lambda: EventBTagRWT() ))

#--- Recleaner instances

from CMGTools.TTHAnalysis.tools.leptonChoiceRA5 import _susy2lss_lepId_CBloose,_susy2lss_lepId_loosestFO,_susy2lss_lepId_IPcuts,_susy2lss_lepConePt1015,_susy2lss_lepId_tighterFO,_susy2lss_multiIso,_susy2lss_lepId_CB,_susy2lss_idIsoEmu_cuts, _susy2lss_leptonMVA
from CMGTools.TTHAnalysis.tools.leptonChoiceRA7 import _susy3l_lepId_loosestFO,_susy3l_lepId_loosestFO,_susy3l_multiIso,_susy3l_lepId_CB
from CMGTools.TTHAnalysis.tools.functionsTTH import _ttH_idEmu_cuts_E2
from CMGTools.TTHAnalysis.tools.conept import conept_RA5, conept_RA7, conept_TTH, conept_SSDL

MODULES.append( ('leptonJetReCleanerSusyRA5', lambda : LeptonJetReCleaner("Mini", 
                   lambda lep : lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep), #and (ht>300 or _susy2lss_idIsoEmu_cuts(lep)), 
                   lambda lep : lep.pt>10 and _susy2lss_lepId_loosestFO(lep) and _susy2lss_lepId_IPcuts(lep), # cuts applied on top of loose
                   lambda lep,ht : lep.pt>10 and _susy2lss_lepConePt1015(lep) and _susy2lss_lepId_IPcuts(lep) and (_susy2lss_lepId_loosestFO(lep) if ht>300 else _susy2lss_lepId_tighterFO(lep)), # cuts applied on top of loose
                   lambda lep,ht : lep.pt>10 and _susy2lss_lepConePt1015(lep) and _susy2lss_multiIso(lep) and _susy2lss_lepId_CB(lep) and (ht>300 or _susy2lss_idIsoEmu_cuts(lep)), # cuts applied on top of loose
                   cleanJet = lambda lep,jet,dr : dr<0.4,
                   selectJet = lambda jet: abs(jet.eta)<2.4,
                   cleanWithTaus = False,
                   doVetoZ = True,
                   doVetoLMf = True,
                   doVetoLMt = True,
                   jetPt = 40,
                   bJetPt = 25,
                   coneptdef = lambda lep: conept_RA5(lep),
                   storeJetVariables = True                                                       
                 ) ))

MODULES.append( ('leptonJetReCleanerSusyRA7', lambda : LeptonJetReCleaner("Mini", 
Exemple #5
0




#--- Recleaner instances
from CMGTools.TTHAnalysis.tools.leptonChoiceRA5 import _susy2lss_lepId_CBloose,_susy2lss_lepId_loosestFO,_susy2lss_lepId_IPcuts,_susy2lss_lepConePt1015,_susy2lss_lepId_tighterFO,_susy2lss_multiIso,_susy2lss_lepId_CB,_susy2lss_idIsoEmu_cuts
from CMGTools.TTHAnalysis.tools.leptonBuilderRA7 import _susy3l_lepId_CBloose, _susy3l_lepId_loosestFO,_susy3l_lepId_loosestFO,_susy3l_multiIso,_susy3l_lepId_CB
from CMGTools.TTHAnalysis.tools.leptonBuilderEWK import _susyEWK_lepId_CBloose, _susyEWK_lepId_IPcuts, _susyEWK_lepId_MVAFO, _susyEWK_lepId_MVAmedium, _susyEWK_tauId_CBloose, _susyEWK_tauId_CBtight
from CMGTools.TTHAnalysis.tools.functionsTTH import _ttH_idEmu_cuts_E2
from CMGTools.TTHAnalysis.tools.functionsEWKino import _ewkino_idEmu_cuts_E2, _ewkino_2lss_lepId_CBloose, _ewkino_2lss_lepId_FO, _ewkino_2lss_lepId_num,_ewkino_3l_lepId_FO, _ewkino_3l_lepId_num, _ewkino_2lss_lepId_IPcuts, _ewkino_leptonMVA_VT, _ewkino_leptonMVA_M
from CMGTools.TTHAnalysis.tools.conept import conept_RA5, conept_RA7, conept_EWK, conept_TTH, conept_SSDL, conept_SSDL_for3l

MODULES.append( ('leptonJetReCleanerSusyRA5', lambda : LeptonJetReCleaner("Mini",
                   lambda lep : lep.miniRelIso < 0.4 and _susy2lss_lepId_CBloose(lep), #and (ht>300 or _susy2lss_idIsoEmu_cuts(lep)),
                   lambda lep : lep.pt>10 and _susy2lss_lepId_loosestFO(lep) and _susy2lss_lepId_IPcuts(lep), # cuts applied on top of loose
                   lambda lep,ht : lep.pt>10 and _susy2lss_lepConePt1015(lep) and _susy2lss_lepId_IPcuts(lep) and (_susy2lss_lepId_loosestFO(lep) if ht>300 else _susy2lss_lepId_tighterFO(lep)), # cuts applied on top of loose
                   lambda lep,ht : lep.pt>10 and _susy2lss_lepConePt1015(lep) and _susy2lss_multiIso(lep) and _susy2lss_lepId_CB(lep) and (ht>300 or _susy2lss_idIsoEmu_cuts(lep)), # cuts applied on top of loose
                   cleanJet = lambda lep,jet,dr : dr<0.4,
                   selectJet = lambda jet: abs(jet.eta)<2.4,
                   cleanJetsWithTaus = False,
                   doVetoZ = True,
                   doVetoLMf = True,
                   doVetoLMt = True,
                   jetPt = 40,
                   bJetPt = 25,
                   coneptdef = lambda lep: conept_RA5(lep),
                   storeJetVariables = True
                 ) ))

# updated cut-based RA7