ATLAS Offline Software
Menu_MC_pp_run3_v1_inputs.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 from ..Base.L1MenuFlags import L1MenuFlags
4 from ..Base.MenuConfObj import TopoMenuDef
5 import TriggerMenuMT.L1.Menu.Menu_Physics_pp_run3_v1_inputs as phys_menu_inputs
6 
7 
9 
10  phys_menu_inputs.defineInputsMenu()
11 
12  for boardName, boardDef in L1MenuFlags.boards().items():
13  if "connectors" in boardDef:
14  for conn in boardDef["connectors"]:
15 
16  # Add more multiplicity inputs
17 
18  # Topo1Opt3
19  if conn["name"] == "Topo1Opt3":
20  conn["thresholds"] += [
21  ('jXEPerf100',1),
22  ]
23  if conn["name"] == "Topo1Opt1":
24  conn["thresholds"] += [
25  ('eTAU40HT',2),
26  ]
27  if conn["name"] == "Topo1Opt1":
28  conn["thresholds"] += [
29  ('eTAU60HM',2),
30  ]
31  if conn["name"] == "Topo1Opt1":
32  conn["thresholds"] += [
33  ('eTAU60HL',2),
34  ]
35  if conn["name"] == "Topo1Opt1":
36  conn["thresholds"] += [
37  ('eTAU80HL',2),
38  ]
39  # Add more decision algorithms
40  if conn["name"] == "Topo2El":
41  for group in conn["algorithmGroups"]:
42  if group["fpga"]==0 and group["clock"]==1:
43  group["algorithms"] += [
44  TopoMenuDef( '0DR04-MU5VFab-CjJ90ab', outputbits = 11), #Bjet, TODO: not a primary
45  TopoMenuDef( '2DISAMB-jJ55ab-4DR28-eTAU30ab-eTAU20ab', outputbits = 13),
46  TopoMenuDef( '2DISAMB-jJ55ab-4DR32-eTAU30ab-eTAU20ab', outputbits = 14),
47  TopoMenuDef( '2DISAMB-jJ55ab-10DR32-eTAU30ab-eTAU20ab', outputbits = 15),
48  TopoMenuDef( '0DETA24-4DPHI99-eTAU30ab-eTAU20ab', outputbits = 16),
49  TopoMenuDef( '0DETA24-10DPHI99-eTAU30ab-eTAU12ab', outputbits = 17),
50  ]
51  elif group["fpga"]==1 and group["clock"]==0:
52  group["algorithms"] += [
53  TopoMenuDef( 'INVM_BOOSTDR_eEMsl6', outputbits = (10,11), outputlines = ['0INVM70-2DR15-eEM9sl1-eEM9sl6',
54  '0INVM70-2DR15-eEM12sl1-eEM12sl6']),
55 
56  TopoMenuDef( 'INVM_BOOSTDR_Ranges_Asymm_eEMsl6', outputbits = (12,13), outputlines = ['0INVM30-2DR15-eEM12sl1-eEM9sl6',
57  '25INVM70-13DR25-eEM12sl1-eEM9sl6']),
58  ]
59  if conn["name"] == "Topo3El":
60  for group in conn["algorithmGroups"]:
61  if group["fpga"]==0 and group["clock"]==1:
62  group["algorithms"] += [
63  TopoMenuDef( '2DISAMB_jJ50ab_DR_eTAU_eTAU', outputbits = (10,11), outputlines = ['2DISAMB-jJ50ab-0DR25-eTAU30ab-eTAU20ab',
64  '2DISAMB-jJ50ab-0DR28-eTAU30ab-eTAU20ab']),
65  TopoMenuDef( '2DISAMB_jJ40ab_DR_eTAU_eTAU', outputbits = (12,13), outputlines = ['2DISAMB-jJ40ab-0DR25-eTAU30ab-eTAU20ab',
66  '2DISAMB-jJ40ab-0DR28-eTAU30ab-eTAU20ab']),
67  TopoMenuDef( '2DISAMB_jJ30ab_DR_eTAU_eTAU', outputbits = (14,15), outputlines = ['2DISAMB-jJ30ab-0DR25-eTAU30ab-eTAU20ab',
68  '2DISAMB-jJ30ab-0DR28-eTAU30ab-eTAU20ab']),
69  ]
70 
71  #----------------------------------------------
72 
73  def remapThresholds():
74  # remap thresholds. TODO: add checks in case the remap does not fulfill HW constraints?
75  for boardName, boardDef in L1MenuFlags.boards().items():
76  if "connectors" in boardDef:
77  for conn in boardDef["connectors"]:
78  if "thresholds" in conn:
79  thresholdsToRemove = []
80  for thrIndex, thrName in enumerate(conn["thresholds"]):
81  nBits = 0
82  if type(thrName)==tuple:
83  (thrName,nBits) = thrName
84  if thrName in L1MenuFlags.ThresholdMap():
85  if (L1MenuFlags.ThresholdMap()[thrName] != ''):
86  if nBits > 0:
87  conn["thresholds"][thrIndex] = (L1MenuFlags.ThresholdMap()[thrName],nBits)
88  else:
89  conn["thresholds"][thrIndex] = L1MenuFlags.ThresholdMap()[thrName]
90  else:
91  thresholdsToRemove.append(thrIndex)
92  for i in reversed(thresholdsToRemove):
93  del conn["thresholds"][i]
94 
95  #----------------------------------------------
96 
97  remapThresholds()
98 
python.L1.Base.MenuConfObj.TopoMenuDef
Definition: MenuConfObj.py:6
python.L1.Menu.Menu_MC_pp_run3_v1_inputs.defineInputsMenu
def defineInputsMenu()
Definition: Menu_MC_pp_run3_v1_inputs.py:8
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78