Ejemplo n.º 1
0
        goodElectronList = tauFun.makeGoodElectronList(e)
        goodMuonList = tauFun.makeGoodMuonList(e)
        goodElectronList, goodMuonList = tauFun.eliminateCloseLeptons(
            e, goodElectronList, goodMuonList)
        lepList = []

        if lepMode == 'ee':
            if args.year == '2016' and not e.HLT_Ele27_WPTight_Gsf and not e.HLT_Ele23_Ele12_CaloIdL_TrackIdL_IsoVL_DZ:
                continue
            if args.year == '2017' and not e.HLT_Ele35_WPTight_Gsf: continue
            if args.year == '2018' and not e.HLT_Ele32_WPTight_Gsf and not e.HLT_Ele35_WPTight_Gsf:
                continue  #do we need to put the HLT_Ele24_eta2p1_WPTight_Gsf_LooseChargedIsoPFTauHPS30_eta2p1_CrossL1 as well ?

            if len(goodElectronList) < 2: continue

            pairList, lepList = tauFun.findZ(goodElectronList, [], e)
            #protect from the case that you dont get back 2 leptons
            if len(lepList) != 2: continue
            for cat in cats[:4]:
                cutCounter[cat].count('Trigger')

        if lepMode == 'mm':
            if args.year == '2016' and not e.HLT_IsoMu22 and not e.HLT_IsoMu24 and not e.HLT_IsoMu22_eta2p1 and not e.HLT_IsoTkMu22 and not e.HLT_IsoTkMu22_eta2p1 and not e.HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ:
                continue
            if args.year == '2017' and not e.HLT_IsoMu24 and not e.HLT_IsoMu27:
                continue
            if args.year == '2018' and not e.HLT_IsoMu24 and not e.HLT_IsoMu27 and not e.HLT_IsoMu20_eta2p1_LooseChargedIsoPFTauHPS27_eta2p1_CrossL1 and not e.HLT_IsoMu20_eta2p1_LooseChargedIsoPFTauHPS27_eta2p1_TightID_CrossL1:
                continue

            if len(goodMuonList) < 2: continue
            pairList, lepList = tauFun.findZ([], goodMuonList, e)
Ejemplo n.º 2
0
        if entry.nElectron < 2: continue
    if cat[0:2] == 'mm':
        if entry.nMuon < 2: continue
        if entry.Muon_pt[0] < 28.:
            continue  # require 2 muons, one with at least 27 GeV of Pt

    cutCounter.count('TwoLepton')

    goodElectronList = tauFun.makeGoodElectronList(entry)
    goodMuonList = tauFun.makeGoodMuonList(entry)
    goodElectronList, goodMuonList = tauFun.eliminateCloseLeptons(
        entry, goodElectronList, goodMuonList)

    if cat[0:2] == 'ee':
        if len(goodElectronList) < 2: continue
        pairList = tauFun.findZ(goodElectronList, [], entry)

    if cat[0:2] == 'mm':
        if len(goodMuonList) < 2:
            continue
        pairList = tauFun.findZ([], goodMuonList, entry)

    if len(pairList) < 1:
        continue
    cutCounter.count('LeptonPair')
    LepP, LepM = pairList[0], pairList[1]
    M = (LepM + LepP).M()
    if M < 60. or M > 120.: continue
    cutCounter.count('FoundZ')

    tauList = tauFun.getTauList(cat, entry)