Exemple #1
0
def main(outfolder):
    with open(outfolder+"/list_unprescaled1p8e34.py","w") as outfile:
        outfile.write(header())
        for triggerType in TriggerType:
            outfile.write( to_nice_list( TriggerAPI.getUnprescaled(TriggerPeriod.future1p8e34, triggerType), triggerType.name) )

    with open(outfolder+"/list_unprescaled2e34.py","w") as outfile:
        outfile.write(header())
        for triggerType in TriggerType:
            outfile.write( to_nice_list( TriggerAPI.getUnprescaled(TriggerPeriod.future2e34, triggerType), triggerType.name ) )
Exemple #2
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
Exemple #3
0
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
print "Single muon lowest-unprescaled 2.0e34 items:", TriggerAPI.getLowestUnprescaled(
    TriggerPeriod.future2e34, TriggerType.mu_single)
# - can also retrieve all unprescaled items, including higher thresholds
print "Single muon unprescaled 2.0e34 items:", TriggerAPI.getUnprescaled(
    TriggerPeriod.future2e34, TriggerType.mu_single)

# Use the lists that are build with the release with the expected unprescaled items of the current/future menu
# Will return the same as TriggerAPI.getUnprescaled(TriggerPeriod.future2e34, ...)
# The list has been already processed and takes therefore ~0 time
from TriggerMenu.api import list_unprescaled1p8e34, list_unprescaled2e34
print "Precomputed single muon 2.0e34 items:", list_unprescaled2e34.list_mu_single
print "Precomputed single muon 1.8e34 items:", list_unprescaled1p8e34.list_mu_single

# Set a custom GRL, affects *ALL* calls after it has been set
print "Multi-bjet in periods GHIK (default GRL)", TriggerAPI.getLowestUnprescaled(
    TriggerPeriod.y2017periodGHIK, TriggerType.bj_multi)
TriggerAPI.setCustomGRL(
    "/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data17_13TeV/20171130/data17_13TeV.periodAllYear_DetStatus-v97-pro21-13_Unknown_PHYS_StandardGRL_All_Good_25ns_BjetHLT_Normal2017.xml"
)
print "Multi-bjet in periods GHIK (Bjet GRL)   ", TriggerAPI.getLowestUnprescaled(