Exemple #1
0
from MitAna.TreeMod.bambu import mithep, analysis

hltMod = mithep.HLTMod(BitsName=mithep.Names.gkHltBitBrn,
                       AbortIfNotAccepted=analysis.isRealData,
                       PrintTable=False)
Exemple #2
0
        badEventsFilterMod.AddEventList(
            'HBHENoiseIsoFilter', mitdata + '/eventlist/hbheiso_Jan13.txt')

    else:
        badEventsFilterMod.SetFilter('CSCTightHaloFilter')
        badEventsFilterMod.SetFilter('CHTrackResolutionFilter')
        badEventsFilterMod.SetFilter('MuBadTrackFilter')
        badEventsFilterMod.SetFilter('HBHENoiseIsoFilter')

        from MitPhysics.SelMods.BadPFTrackFilterMod import badPFTrackFilterMod
        # uncomment below (and set tagging mode to true in badEventsFilterMod) if you want to save bits
        #badPFTrackFilterMod.SetTaggingMode(True)
        #badEventsFilterMod.AddFilter(badPFTrackFilterMod.GetOutputName(0), badPFTrackFilterMod.GetOutputName(), 0)
        #badEventsFilterMod.AddFilter(badPFTrackFilterMod.GetOutputName(1), badPFTrackFilterMod.GetOutputName(), 1)

    hltMod = mithep.HLTMod(ExportTrigObjects=False)

    for path, filters in triggers:
        if type(path) is str:
            hltMod.AddTrigger('HLT_' + path + '_v*')
        else:
            for p in path:
                hltMod.AddTrigger(p)

    initialFilterSequence = badPFTrackFilterMod * badEventsFilterMod * hltMod * initialFilterSequence

else:
    generator = mithep.GeneratorMod(IsData=False,
                                    CopyArrays=False,
                                    MCMETName="GenMet",
                                    FillHist=True)
Exemple #3
0
    "HLT_Ele17_Ele12_CaloIdL_TrackIdL_IsoVL_DZ_v*"
]
monojetTriggerNames[kPhoton] = ["HLT_Photon175_v*"]

monophotonTriggerNames = {}
monophotonTriggerNames[kMet] = ['HLT_Photon175_v*']
monophotonTriggerNames[kSingleMuon] = ["HLT_IsoMu27_v*"]
monophotonTriggerNames[kDimuon] = ["HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v*"]
monophotonTriggerNames[kSingleElectron] = ["HLT_Ele27_eta2p1_WPLoose_Gsf_v*"]
monophotonTriggerNames[kDielectron] = [
    "HLT_Ele17_Ele12_CaloIdL_TrackIdL_IsoVL_DZ_v*"
]
monophotonTriggerNames[kPhoton] = ["HLT_Photon175_v*"]

hltMod = mithep.HLTMod(BitsName="HLTBits",
                       TrigObjsName="MonoJetTriggerObjects",
                       AbortIfNotAccepted=analysis.isRealData)
addedTriggers = []

for l in monojetTriggerNames.values():
    for t in l:
        if t not in addedTriggers:
            hltMod.AddTrigger(t)
            addedTriggers.append(t)

for l in monophotonTriggerNames.values():
    for t in l:
        if t not in addedTriggers:
            hltMod.AddTrigger(t)
            addedTriggers.append(t)