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
10 phys_menu_inputs.defineInputsMenu()
12 for boardName, boardDef
in L1MenuFlags.boards().
items():
13 if "connectors" in boardDef:
14 for conn
in boardDef[
"connectors"]:
19 if conn[
"name"] ==
"Topo1Opt3":
20 conn[
"thresholds"] += [
23 if conn[
"name"] ==
"Topo1Opt1":
24 conn[
"thresholds"] += [
27 if conn[
"name"] ==
"Topo1Opt1":
28 conn[
"thresholds"] += [
31 if conn[
"name"] ==
"Topo1Opt1":
32 conn[
"thresholds"] += [
35 if conn[
"name"] ==
"Topo1Opt1":
36 conn[
"thresholds"] += [
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),
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),
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']),
56 TopoMenuDef(
'INVM_BOOSTDR_Ranges_Asymm_eEMsl6', outputbits = (12,13), outputlines = [
'0INVM30-2DR15-eEM12sl1-eEM9sl6',
57 '25INVM70-13DR25-eEM12sl1-eEM9sl6']),
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']),
73 def remapThresholds():
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"]):
82 if type(thrName)==tuple:
83 (thrName,nBits) = thrName
84 if thrName
in L1MenuFlags.ThresholdMap():
85 if (L1MenuFlags.ThresholdMap()[thrName] !=
''):
87 conn[
"thresholds"][thrIndex] = (L1MenuFlags.ThresholdMap()[thrName],nBits)
89 conn[
"thresholds"][thrIndex] = L1MenuFlags.ThresholdMap()[thrName]
91 thresholdsToRemove.append(thrIndex)
92 for i
in reversed(thresholdsToRemove):
93 del conn[
"thresholds"][i]