Exemplo n.º 1
0
def getTriggerList( trigger_type, matching_pattern="", reject_list=[] ):
        
    # Gets list of unprescaled triggers from the current/future menu
    # -- uses "list_unprescaled1p8e34" + "list_unprescaled2e34" generated during build
    # Loops through retrieved trigger list to search for given type/pattern
    # -- trigger_type format = TriggerType.(physics object + _ + single/multi)
    # -- physics objects: el, mu, j, bj, tau, g [also xe, ht, exotics]

    triggerList = []
    
    lowestUnprescaled = TriggerAPI.getLowestUnprescaled(
        TriggerPeriod.future, trigger_type, matchPattern=matching_pattern )
    lowestUnprescaledAny = TriggerAPI.getLowestUnprescaledAnyPeriod(
        TriggerPeriod.future, trigger_type, matchPattern=matching_pattern )
    unprescaled = TriggerAPI.getUnprescaled(
        TriggerPeriod.future, trigger_type, matchPattern=matching_pattern )
    
    unprescaled_triggers = lowestUnprescaled + lowestUnprescaledAny + unprescaled

    for trigger in unprescaled_triggers:
        if trigger in triggerList: continue
        isRejected = False
        for reject in reject_list:
            if reject is not "" and reject in trigger: isRejected = True
        if isRejected == True: continue
        triggerList.append( trigger )

    return triggerList
Exemplo n.º 2
0
# Further options:
# - ask for specific runs and/or specific patterns
print "Pattern match :", TriggerAPI.getLowestUnprescaled(
    337833, TriggerType.mu_bphys, matchPattern="bJpsi|bUpsi")
# - combined items, example bjet + ht, bjet + met
#                           bj = bj_single | bj_multi
print "Bjet combined items:", TriggerAPI.getLowestUnprescaled(
    337833, TriggerType.bj, TriggerType.xe | TriggerType.ht)
# - combined items, example electron + anything
print "Ele combined items:", TriggerAPI.getLowestUnprescaled(
    337833, TriggerType.el, TriggerType.ALL)
# - lowest unprescaled in at least one period.
#   Allows to get items that were accidentally prescaled in some period or changed over time
#   E.g. no multi b-jet trigger is unprescaled over the full 2017
print "Lowest in at least one period:", TriggerAPI.getLowestUnprescaledAnyPeriod(
    TriggerPeriod.y2017periodAll, TriggerType.bj_multi)
# - retrieve items above a certain live fraction instead of unprescaled
#   HLT_j225_gsc420_boffperf_split is unprescaled
#   HLT_j225_gsc400_boffperf_split recorded >95% of the available luminosity
print "Lowest j225_gsc with 100% data:", TriggerAPI.getLowestUnprescaled(
    TriggerPeriod.y2017periodB, TriggerType.j_single, matchPattern="j225_gsc")
print "Lowest j225_gsc with  95% data:", TriggerAPI.getLowestUnprescaled(
    TriggerPeriod.y2017periodB,
    TriggerType.j_single,
    matchPattern="j225_gsc",
    livefraction=0.95)

# - combined items with more than 2 types:
print "Muon+jet+met items:", TriggerAPI.getLowestUnprescaled(
    337833, TriggerType.mu, [TriggerType.j, TriggerType.xe])
# - items that are expected to be lowest-unprescaled at higher luminosities
Exemplo n.º 3
0
               AssocConfig('Soft', '')]
PHYSLITE_cfg = METAssocConfig('AnalysisMET',
                              associators,
                              doPFlow=True)
METCommon.customMETConfigs.setdefault('AnalysisMET',{})[PHYSLITE_cfg.suffix] = PHYSLITE_cfg
scheduleMETAssocAlg(sequence=SeqPHYSLITE,configlist="AnalysisMET")

#====================================================================
# TRIGGER CONTENT
#====================================================================
# See https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerAPI
# Get single and multi mu, e, photon triggers
# Jet, tau, multi-object triggers not available in the matching code
# Note this comes relatively late as we have to re-do the matching to our analysis objects
allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
trig_el  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el,  livefraction=0.8)
trig_mu  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu,  livefraction=0.8)
trig_g   = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.g,   livefraction=0.8)
trig_tau = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.tau, livefraction=0.8)
# Add cross-triggers for some sets
trig_em = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.mu,  livefraction=0.8)
trig_et = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el, additionalTriggerType=TriggerType.tau, livefraction=0.8)
trig_mt = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu, additionalTriggerType=TriggerType.tau, livefraction=0.8)
# Note that this seems to pick up both isolated and non-isolated triggers already, so no need for extra grabs
trig_txe = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.tau, additionalTriggerType=TriggerType.xe, livefraction=0.8)

# Merge and remove duplicates
trigger_names_full_notau = list(set(trig_el+trig_mu+trig_g+trig_em+trig_et+trig_mt))
trigger_names_full_tau = list(set(trig_tau+trig_txe))

# Now reduce the list...
Exemplo n.º 4
0
goodMuonTool.MuQuality = 3
# turn of the momentum correction which is not needed for IDHits cut and Preselection
goodMuonTool.TurnOffMomCorr = True
ToolSvc += goodMuonTool
print goodMuonTool
from PrimaryDPDMaker.PrimaryDPDMakerConf import DerivationFramework__DRAW_ZMUMUSkimmingTool
goodMuonSkimmingTool = DerivationFramework__DRAW_ZMUMUSkimmingTool(
    name="DRAW_ZMUMU_GoodMuon_SkimmingTool",
    MuonContainerKey="Muons",
    MuonSelectorTool=goodMuonTool,
    MinimumNumberOfMuons=1,
    MuonPtCut=20.0)
ToolSvc += goodMuonSkimmingTool

periods = TriggerPeriod.future | TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017
allUnprescaledTriggers = TriggerAPI.getLowestUnprescaledAnyPeriod(
    periods, TriggerType.mu)
print "DRAW_ZMUMU: will skim on an OR of the following muon triggers (list provided at run-time by the TriggerAPI):"
print allUnprescaledTriggers
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__TriggerSkimmingTool
triggerSkimmingTool = DerivationFramework__TriggerSkimmingTool(
    name="DRAWZMUMUTriggerSkimmingTool", TriggerListOR=allUnprescaledTriggers)
ToolSvc += triggerSkimmingTool

# Event selection tool
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationAND
DRAW_ZMUMU_SkimmingTool = DerivationFramework__FilterCombinationAND(
    name="DRAW_ZMUMU_FinalFilter",
    FilterList=[
        dimuonMassSkimmingTool, goodMuonSkimmingTool, triggerSkimmingTool
    ])
ToolSvc += DRAW_ZMUMU_SkimmingTool