2 from TriggerMenuMT.TriggerAPI.TriggerAPI
import TriggerAPI
3 from TriggerMenuMT.TriggerAPI.TriggerEnums
import TriggerPeriod, TriggerType
4 from AthenaConfiguration.AutoConfigFlags
import GetFileMD
5 from AthenaConfiguration.Enums
import LHCPeriod
7 from AthenaCommon.Logging
import logging
8 log = logging.getLogger(
'DAODJetEtMissTriggerList')
12 period2015tofuture = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future
13 period2017tofuture = TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future
14 TriggerAPI.setConfigFlags(flags)
15 API_jetTrig = TriggerAPI.getActive(period2015tofuture, TriggerType.j_single)
17 API_jetTrig += TriggerAPI.getActive(period2017tofuture,TriggerType.j_multi,matchPattern=
".*_a10t_.*")
19 API_jetTrig += TriggerAPI.getActive(period2015tofuture,TriggerType.j_multi,matchPattern=
"HLT_j.*_320eta490")
24 TriggerAPI.setConfigFlags(flags)
25 API_singleElTriggers = TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2015, TriggerType.el_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2016, TriggerType.el_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2017, TriggerType.el_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2018, TriggerType.el_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.future, TriggerType.el_single)
26 return API_singleElTriggers
29 TriggerAPI.setConfigFlags(flags)
30 API_multiElTriggers = TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2015, TriggerType.el_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2016, TriggerType.el_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2017, TriggerType.el_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2018, TriggerType.el_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.future, TriggerType.el_multi)
31 return API_multiElTriggers
35 TriggerAPI.setConfigFlags(flags)
36 API_singleMuTriggers = TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2015, TriggerType.mu_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2016, TriggerType.mu_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2017, TriggerType.mu_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2018, TriggerType.mu_single) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.future, TriggerType.mu_single)
37 return API_singleMuTriggers
40 TriggerAPI.setConfigFlags(flags)
41 API_multiMuTriggers = TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2015, TriggerType.mu_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2016, TriggerType.mu_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2017, TriggerType.mu_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2018, TriggerType.mu_multi) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.future, TriggerType.mu_multi)
42 return API_multiMuTriggers
46 TriggerAPI.setConfigFlags(flags)
47 API_MET_Triggers = TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2015, TriggerType.xe) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2016, TriggerType.xe) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2017, TriggerType.xe) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.y2018, TriggerType.xe) + TriggerAPI.getLowestUnprescaled(TriggerPeriod.future, TriggerType.xe)
48 return API_MET_Triggers
52 TriggerAPI.setConfigFlags(flags)
53 API_singlePhotonTriggers = TriggerAPI.getActive(TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future, TriggerType.g_single)
54 return API_singlePhotonTriggers
65 if flags.GeoModel.Run < LHCPeriod.Run3:
68 pattern = re.compile(
r"HLT_\d*j\d+")
69 vetoes = [
'PhysicsTLA',
'calratio',
'emergingPTF',
'dispjet',
'trackless',
'hitdvjet',
'bgn1',
'bgn2',
'bdl1',
'boffperf',
'xe',
'afprec',
'LArPEBHLT',
'TAU',
'XE',
'L1jLJ']
74 menu = metadata[
'TriggerMenu']
76 log.error(
"TriggerMenu could not be retrieved from file metadata.")
78 HLTChainskey =
'HLTChains'
79 if HLTChainskey
not in menu:
80 log.error(
"HLTChains could not be retrieved from file metadata.")
82 md_hltchains = menu[HLTChainskey]
83 log.info(f
"{len(md_hltchains)} HLT chains retrieved from file metadata")
84 trigger_list += md_hltchains
86 filtered_j_chains = []
87 for chain
in set(trigger_list):
88 if not pattern.match(chain):
continue
89 if any(v
in chain
for v
in vetoes):
continue
90 filtered_j_chains.append(chain)
92 return filtered_j_chains