80 from TrigConfigSvc.TriggerConfigAccess
import getHLTMonitoringAccess
87 log.info(f
'Monitoring {len(mbNames)} MinBias chains')
91 def _c(chain, refchain, level, **kwargs):
92 conf = {
"chain": chain,
"refchain": refchain,
"level": level,
"xmin": 0,
"xmax": 20}
98 return "_EMPTY" not in name
and "_UNPAIRED_ISO" not in name
101 filledChains =
list(
filter(_isFilled, spTrkChains))
102 emptyChains = [chain
for chain
in spTrkChains
if "_EMPTY" in chain[0]]
103 unpairedChains = [chain
for chain
in spTrkChains
if "_UNPAIRED_ISO" in chain[0]]
108 triggerAndRef += [_c(name,
"HLT_noalg_L1RD0_FILLED", level)
for name, level
in filledChains]
109 triggerAndRef += [_c(name,
"HLT_noalg_L1RD0_EMPTY", level)
for name, level
in emptyChains]
110 triggerAndRef += [_c(name,
"HLT_noalg_L1RD0_UNPAIRED_ISO", level)
for name, level
in unpairedChains]
113 triggerAndRef += [_c(name,
"HLT_noalg_mb_L1RD0_FILLED", level)
for name, level
in filledChains]
114 triggerAndRef += [_c(name,
"HLT_noalg_mb_L1RD0_EMPTY", level)
for name, level
in emptyChains]
115 triggerAndRef += [_c(name,
"HLT_noalg_mb_L1RD0_UNPAIRED_ISO", level)
for name, level
in unpairedChains]
118 triggerAndRef += [_c(
"HLT_mb_sptrk_L1RD0_FILLED",
"HLT_mb_sp_L1RD0_FILLED",
'Shifter')]
122 nonPusupChains = [chain
for chain
in hmtChains
if '_pusup' not in chain[0]]
123 if len(nonPusupChains) != 0:
127 part = name.split(
"_")
129 if el.startswith(
"trk"):
130 return int(el.strip(
"trk"))
131 raise RuntimeError(f
"Chain {name} is not the hmt chain")
133 nonPusupChains.sort(key=
lambda chain:
int(_trk(chain)))
136 first = nonPusupChains[0]
137 triggerAndRef += [_c(first[0],
"HLT_mb_sptrk_L1RD0_FILLED", first[1], xmax=_trk(first) + 30)]
140 triggerAndRef += [_c(chain[0],
"HLT_mb_sptrk_L1RD0_FILLED", chain[1], xmin=_trk(chain) - 20, xmax=_trk(chain) + 50)
for chain
in nonPusupChains[1:]]
143 pusupChains = [chain
for chain
in hmtChains
if '_pusup' in chain[0]]
147 return "_".
join(s[:3] + s[4:])
149 triggerAndRef += [_c(chain[0], _dropsup(chain[0]), chain[1], xmin=_trk(chain) - 20, xmax=_trk(chain) + 50)
for chain
in pusupChains]
153 for name, level
in exclChains:
154 triggerAndRef.append(_c(name,
'HLT_mb_sptrk_L1RD0_FILLED', level))
155 triggerAndRef.append(_c(name,
'HLT_mb_sp_L1RD0_FILLED', level))
159 triggerAndRef += [_c(name,
'HLT_mb_sptrk_L1RD0_FILLED', level)
for name, level
in noalgMbtsChains]
162 mbtsL1Chains = [
"L1_MBTS_A",
"L1_MBTS_C",
"L1_MBTS_1",
"L1_MBTS_2",
"L1_MBTS_1_1"]
163 triggerAndRef += [_c(chain,
'HLT_mb_sptrk_L1RD0_FILLED',
'Expert')
for chain
in mbtsL1Chains]
166 triggerAndRef += [_c(
"L1_TE{}".
format(i),
'HLT_mb_sptrk_L1RD0_FILLED',
'Expert', xmin=0, xmax=100)
for i
in [3, 5, 10, 40]]
169 def _find_noalg(chain):
170 pos = chain.find(
'L1')
171 return 'HLT_noalg_' + chain[pos:]
173 def _chains_with_noalg_ref():
176 for name, level
in filledChains:
178 if 'L1RD0_FILLED' in name:
181 noalg = _find_noalg(name)
182 if noalg
not in mbNames:
185 chains.append(_c(name, noalg, level))
189 triggerAndRef += _chains_with_noalg_ref()
195 def _hi_chain_with_mb_ref():
198 for name, level
in hiChains:
199 split = name.split(
'_hi_')
204 split = hi_l1.split(
'L1')
210 if ref
not in mbNames:
213 chains.append(_c(name, ref, level))
217 triggerAndRef += _hi_chain_with_mb_ref()
221 triggerAndRef.append(_c(
'HLT_mb_excl_1trk4_pt1_hi_FgapAC5_L12eEM1_VjTE200',
'HLT_mb_excl_1trk4_pt1_L12eEM1_VjTE200_GAP_AANDC',
'Expert'))
223 return _TrigEff(flags, triggerAndRef)