ATLAS Offline Software
Menu_MC_pp_run4_v1.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from TriggerMenuMT.L1.Base.L1MenuFlags import L1MenuFlags
4 import TriggerMenuMT.L1.Menu.Menu_MC_pp_run3_v1 as Run3
5 
6 def defineMenu():
7 
8  # reuse based on run3 menu
9  Run3.defineMenu()
10 
11  l1items = L1MenuFlags.items()
12 
13  # remove AFP and MBTS items
14  discard_list = ["L1_AFP", "L1_MBTS"]
15 
16  def match_any(item):
17  return any([item.startswith(pattern) for pattern in discard_list])
18 
19  l1items = [l1 for l1 in l1items if not match_any(l1)]
20  existed = set(l1items)
21 
22  def try_add(item):
23  if item not in existed:
24  l1items.append(item)
25 
26  def try_recover(item):
27  if item in L1MenuFlags.ItemMap():
28  l1items.append(item)
29 
30  # add run4 new items
31  try_add("L1_eEM10L_MU8F")
32  try_add("L1_2eEM10L")
33  try_add("L1_MU5VF_cTAU30M")
34  try_add("L1_3jJ40")
35 
36  # recover the ones removed by run3 MC
37  try_recover("L1_eEM22M")
38  try_recover("L1_jJ140")
39 
40  L1MenuFlags.items = l1items
python.L1.Menu.Menu_MC_pp_run4_v1.defineMenu
def defineMenu()
Definition: Menu_MC_pp_run4_v1.py:6
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