ATLAS Offline Software
Functions | Variables
python.TriggerLists Namespace Reference

Functions

def jetTrig (flags)
 
def single_el_Trig (flags)
 
def multi_el_Trig (flags)
 
def single_mu_Trig (flags)
 
def multi_mu_Trig (flags)
 
def MET_Trig (flags)
 
def single_photon_Trig (flags)
 
def get_jetTrig (flags)
 

Variables

 log = logging.getLogger('DAODJetEtMissTriggerList')
 

Function Documentation

◆ get_jetTrig()

def python.TriggerLists.get_jetTrig (   flags)

Definition at line 61 of file TriggerLists.py.

61 def get_jetTrig(flags):
62 
63  trigger_list = jetTrig(flags)
64 
65  if flags.GeoModel.Run < LHCPeriod.Run3:
66  return trigger_list
67 
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']
70 
71  # retrieve trigger list from input file metadata
72  # and add to trigger_list from trigAPI
73  metadata = GetFileMD(flags.Input.Files)
74  menu = metadata['TriggerMenu']
75  if not menu:
76  log.error("TriggerMenu could not be retrieved from file metadata.")
77  else:
78  HLTChainskey = 'HLTChains'
79  if HLTChainskey not in menu:
80  log.error("HLTChains could not be retrieved from file metadata.")
81  else:
82  md_hltchains = menu[HLTChainskey]
83  log.info(f"{len(md_hltchains)} HLT chains retrieved from file metadata")
84  trigger_list += md_hltchains
85 
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)
91 
92  return filtered_j_chains

◆ jetTrig()

def python.TriggerLists.jetTrig (   flags)

Definition at line 11 of file TriggerLists.py.

11 def jetTrig(flags):
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)
16  # Large-radius multijet triggers
17  API_jetTrig += TriggerAPI.getActive(period2017tofuture,TriggerType.j_multi,matchPattern=".*_a10t_.*")
18  # Eta-intercalibration triggers (one central, one forward jet)
19  API_jetTrig += TriggerAPI.getActive(period2015tofuture,TriggerType.j_multi,matchPattern="HLT_j.*_320eta490")
20  return API_jetTrig
21 
22 # electron triggers (unprescaled)

◆ MET_Trig()

def python.TriggerLists.MET_Trig (   flags)

Definition at line 45 of file TriggerLists.py.

45 def MET_Trig(flags):
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
49 
50 # photon triggers (prescaled and unprescaled)

◆ multi_el_Trig()

def python.TriggerLists.multi_el_Trig (   flags)

Definition at line 28 of file TriggerLists.py.

28 def multi_el_Trig(flags):
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
32 
33 # single muon triggers (unprescaled)

◆ multi_mu_Trig()

def python.TriggerLists.multi_mu_Trig (   flags)

Definition at line 39 of file TriggerLists.py.

39 def multi_mu_Trig(flags):
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
43 
44 # xe triggers (unprescaled)

◆ single_el_Trig()

def python.TriggerLists.single_el_Trig (   flags)

Definition at line 23 of file TriggerLists.py.

23 def single_el_Trig(flags):
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
27 

◆ single_mu_Trig()

def python.TriggerLists.single_mu_Trig (   flags)

Definition at line 34 of file TriggerLists.py.

34 def single_mu_Trig(flags):
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
38 

◆ single_photon_Trig()

def python.TriggerLists.single_photon_Trig (   flags)

Definition at line 51 of file TriggerLists.py.

51 def single_photon_Trig(flags):
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
55 
56 # get jet triggers
57 # Run 2: returns list returned by trigAPI
58 # Run 3: TrigAPI doesn't return complete list. Adds additional jet triggers from file metadata
59 # and filters out unnecessary chains - ATLJETMET-1717.
60 # Use this function until trigAPI works for Run 3.

Variable Documentation

◆ log

python.TriggerLists.log = logging.getLogger('DAODJetEtMissTriggerList')

Definition at line 8 of file TriggerLists.py.

python.AutoConfigFlags.GetFileMD
def GetFileMD(filenames, allowEmpty=True)
Definition: AutoConfigFlags.py:51
python.TriggerLists.MET_Trig
def MET_Trig(flags)
Definition: TriggerLists.py:45
python.TriggerLists.single_photon_Trig
def single_photon_Trig(flags)
Definition: TriggerLists.py:51
python.TriggerLists.single_mu_Trig
def single_mu_Trig(flags)
Definition: TriggerLists.py:34
python.TriggerLists.multi_el_Trig
def multi_el_Trig(flags)
Definition: TriggerLists.py:28
python.TriggerLists.jetTrig
def jetTrig(flags)
Definition: TriggerLists.py:11
python.TriggerLists.single_el_Trig
def single_el_Trig(flags)
Definition: TriggerLists.py:23
python.TriggerLists.get_jetTrig
def get_jetTrig(flags)
Definition: TriggerLists.py:61
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.TriggerLists.multi_mu_Trig
def multi_mu_Trig(flags)
Definition: TriggerLists.py:39