77 def registerThresholds(tc, menuName):
79 if ThresholdDef.alreadyExecuted:
80 raise RuntimeError(
"Calling ThresholdDef.registerThresholds twice")
81 ThresholdDef.alreadyExecuted =
True
85 MuonThreshold(
"MU3V" ).setThrValue( thr=3, ba=4 )
86 MuonThreshold(
"MU3VF" ).setThrValue( thr=3, ba=4 ).setTGCFlags(
"F")
87 MuonThreshold(
"MU3VC" ).setThrValue( thr=3, ba=4 ).setTGCFlags(
"C")
88 MuonThreshold(
"MU5VF" ).setThrValue( thr=5, ba=6 ).setTGCFlags(
"F")
89 MuonThreshold(
"MU8F" ).setThrValue( thr=8 ).setTGCFlags(
"F")
90 MuonThreshold(
"MU8FC" ).setThrValue( thr=8 ).setTGCFlags(
"F & C")
91 MuonThreshold(
"MU9VF" ).setThrValue( thr=9,ba=8 ).setTGCFlags(
"F")
92 MuonThreshold(
"MU9VFC" ).setThrValue( thr=9,ba=8 ).setTGCFlags(
"F & C")
93 MuonThreshold(
"MU8VF" ).setThrValue( thr=8, ba=10 ).setTGCFlags(
"F")
94 MuonThreshold(
"MU8VFC" ).setThrValue( thr=8, ba=10 ).setTGCFlags(
"F & C")
95 MuonThreshold(
"MU14FCH" ).setThrValue( thr=14 ).setTGCFlags(
"F & C & H")
96 MuonThreshold(
"MU14FCHR" ).setThrValue( thr=14 ).setTGCFlags(
"F & C & H").setExclusionList(
"rpcFeet")
97 MuonThreshold(
"MU15VFCH" ).setThrValue( thr=15, ba=14 ).setTGCFlags(
"F & C & H")
98 MuonThreshold(
"MU15VFCHR").setThrValue( thr=15, ba=14 ).setTGCFlags(
"F & C & H").setExclusionList(
"rpcFeet")
99 MuonThreshold(
"MU18VFCH" ).setThrValue( thr=18, ba=14 ).setTGCFlags(
"F & C & H")
101 MuonThreshold(
"MU10BOM" ).setThrValue( thr=10 ).setRPCFlags(
"M").setRegion(
"BA")
102 MuonThreshold(
"MU12BOM" ).setThrValue( thr=12 ).setRPCFlags(
"M").setRegion(
"BA")
104 MuonThreshold(
"MU8FH" ).setThrValue( thr=8 ).setTGCFlags(
"F & H")
106 MuonThreshold(
"MU20VFC" ).setThrValue( thr=20, ba=14 ).setTGCFlags(
"F & C")
108 MuonThreshold(
"MU12FCH" ).setThrValue( thr=12 ).setTGCFlags(
"F & C & H")
109 MuonThreshold(
"MU4BOM" ).setThrValue( thr=4 ).setRPCFlags(
"M").setRegion(
"BA")
110 MuonThreshold(
"MU4BO" ).setThrValue( thr=4 ).setRegion(
"BA")
111 MuonThreshold(
"MU10BO" ).setThrValue( thr=10 ).setRegion(
"BA")
112 MuonThreshold(
"MU14EOF" ).setThrValue( thr=14 ).setTGCFlags(
"F").setRegion(
"EC,FW")
113 MuonThreshold(
"MU8EOF" ).setThrValue( thr=8 ).setTGCFlags(
"F").setRegion(
"EC,FW")
114 MuonThreshold(
"MU3EOF" ).setThrValue( thr=3, ba=4 ).setTGCFlags(
"F").setRegion(
"EC,FW")
116 NSWMonThreshold(
'NSWMon')
119 eEM_cuts = [1, 2, 5, 7, 9, 12, 15, 18, 26]
121 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'eEM')
122 ptMin = ttconfig[
"ptMinToTopo"]
123 for thrV
in eEM_cuts:
131 for thrV
in range(1,3):
132 eEMThreshold(
'eEMSPARE%i' % thrV,
'eEM').addThrValue(thrVal_SPARE)
135 eEM_cuts = [9, 10, 12, 18, 24, 26, 40]
136 for thrV
in eEM_cuts:
137 eEMThreshold(
'eEM%iL' % thrV,
'eEM').addThrValue(
get_threshold_cut(
'eEM',thrV)).setIsolation( reta =
"Loose", wstot =
"Loose", rhad =
"Loose" )
140 eEM_cuts = [10, 18, 22, 26, 28]
141 for thrV
in eEM_cuts:
142 eEMThreshold(
'eEM%iM' % thrV,
'eEM').addThrValue(
get_threshold_cut(
'eEM',thrV)).setIsolation( reta =
"Medium", wstot =
"Medium", rhad =
"Medium" )
146 for thrV
in eEM_cuts:
147 eEMThreshold(
'eEM%iT' % thrV,
'eEM').addThrValue(
get_threshold_cut(
'eEM',thrV)).setIsolation( reta =
"Tight", wstot =
"Tight", rhad =
"Tight" )
151 for thrV
in eEM_cuts:
152 ThresholdDef.addVaryingThrValues( pt=
get_threshold_cut(
'eEM',thrV), shift_set = 1,
153 thr=eEMVarThreshold(
'eEM%iVM' % thrV,
'eEM').setIsolation( reta =
"Medium", wstot =
"Medium", rhad =
"Medium" ) )
157 for thrV
in jEM_cuts:
161 for thrV
in jEM_cuts:
162 jEMThreshold(
'jEM%iM' % thrV,
'jEM').addThrValue(
get_threshold_cut(
'jEM',thrV)).setIsolation( iso =
"Medium", frac =
"Medium", frac2 =
"Medium" )
165 for thrV
in range(1,2):
166 jEMThreshold(
'jEMSPARE%i' % thrV,
'jEM').addThrValue(thrVal_SPARE)
169 eTAU_cuts = [1, 12, 20, 30, 35, 60, 80, 140]
171 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'eTAU')
172 ptMin = ttconfig[
"ptMinToTopo"]
173 for thrV
in eTAU_cuts:
177 for thrV
in eTAU_cuts:
178 eTauThreshold(
'eTAU%iL' % thrV,
'eTAU').setEt(
get_threshold_cut(
'eTAU', thrV)).setIsolation( rCore =
"Loose" )
179 eTAU_cuts = [20, 30, 35]
180 for thrV
in eTAU_cuts:
181 eTauThreshold(
'eTAU%iM' % thrV,
'eTAU').setEt(
get_threshold_cut(
'eTAU', thrV)).setIsolation( rCore =
"Medium" )
184 for thrV
in eTAU_cuts:
185 eTauThreshold(
'eTAU%iHT' % thrV,
'eTAU').setEt(
get_threshold_cut(
'eTAU', thrV)).setIsolation( rHad =
"Tight" )
187 for thrV
in eTAU_cuts:
188 eTauThreshold(
'eTAU%iHM' % thrV,
'eTAU').setEt(
get_threshold_cut(
'eTAU', thrV)).setIsolation( rHad =
"Medium" )
190 for thrV
in eTAU_cuts:
191 eTauThreshold(
'eTAU%iHL' % thrV,
'eTAU').setEt(
get_threshold_cut(
'eTAU', thrV)).setIsolation( rHad =
"Loose" )
193 for thrV
in range(1,10):
194 eTauThreshold(
'eTAUSPARE%i' % thrV,
'eTAU').setEt(thrVal_SPARE)
197 cTAU_cuts = [12, 20, 30, 35]
198 for thrV
in cTAU_cuts:
199 cTauThreshold(
'cTAU%iM' % thrV,
'cTAU').setEt(
get_threshold_cut(
'cTAU', thrV)).setIsolation( isolation = f
'Medium{thrV}' )
202 for thrV
in range(1,3):
203 cTauThreshold(
'cTAUSPARE%i' % thrV,
'cTAU').setEt(thrVal_SPARE)
206 jTAU_cuts = [1, 20, 30]
208 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'jTAU')
209 ptMin = ttconfig[
"ptMinToTopo1"]
210 for thrV
in jTAU_cuts:
213 for thrV
in jTAU_cuts:
214 jTauThreshold(
'jTAU%iM' % thrV,
'jTAU').setEt(
get_threshold_cut(
'jTAU', thrV)).setIsolation( isolation =
"Medium" )
220 jJ_cuts = [20, 30, 40, 50, 55, 60, 80, 90, 125, 140, 160, 180, 500]
222 ThresholdDef.addJetVaryingThrValues( jJetThreshold(
'jJ%i' % thrV,
'jJ'), pt=
get_threshold_cut(
'jJ', thrV), shift_set=0, rangemin=0, rangemax=32 )
225 jJ_cuts = [(30,25), (40,25), (55,23), (70,23), (80,25), (85,21)]
226 for thrV, etamax
in jJ_cuts:
227 ThresholdDef.addJetVaryingThrValues( jJetThreshold(
'jJ%ip0ETA%i' % (thrV, etamax),
'jJ'), pt=
get_threshold_cut(
'CjJ', thrV), shift_set=0, rangemin=0, rangemax=etamax )
233 jJ_cuts = [15, 20, 40, 50, 60, 90, 125]
235 ThresholdDef.addJetVaryingThrValues( jJetThreshold(
'jJ%ip30ETA49' % thrV,
'jJ'), pt=
get_threshold_cut(
'FjJ', thrV), shift_set=0, rangemin=30, rangemax=49 )
238 for thrV
in range(1,5):
239 jJetThreshold(
'jJSPARE%i' % thrV,
'jJ').addThrValue(thrVal_SPARE)
242 for thrV
in [60, 80, 100, 120, 140, 160, 180, 200]:
243 ThresholdDef.addJetVaryingThrValues( jLJetThreshold(
'jLJ%i' % thrV,
'jLJ'), pt=
get_threshold_cut(
'jLJ', thrV), shift_set=0, rangemin=0, rangemax=32 )
246 for thrV
in range(1,5):
247 jLJetThreshold(
'jLJSPARE%i' % thrV,
'jLJ').addThrValue(thrVal_SPARE)
250 for thrV
in [20, 50, 100, 400]:
251 ThresholdDef.addJetVaryingThrValues( gJetThreshold(
'gJ%ip0ETA25' % thrV,
'gJ'), pt=
get_threshold_cut(
'gJ', thrV), shift_set=0, rangemin=0, rangemax=25)
255 ThresholdDef.addJetVaryingThrValues( gJetThreshold(
'gJ%ip25ETA49' % thrV,
'gJ'), pt=
get_threshold_cut(
'gJ', thrV), shift_set=0, rangemin=25, rangemax=49)
258 for thrV
in range(1,2):
259 gJetThreshold(
'gJSPARE%i' % thrV,
'gJ').addThrValue(thrVal_SPARE)
263 for thrV
in [80, 100, 140, 160]:
264 ThresholdDef.addJetVaryingThrValues( gLJetThreshold(
'gLJ%ip0ETA25' % thrV,
'gLJ'), pt=
get_threshold_cut(
'gLJ', thrV), shift_set=0, rangemin=0, rangemax=25)
267 for thrV
in range(1,5):
268 gLJetThreshold(
'gLJSPARE%i' % thrV,
'gLJ').addThrValue(thrVal_SPARE)
272 for thrV
in gXE_cuts:
279 gXE_cuts = [60, 70, 80, 100, 110, 120, 500]
280 for thrV
in gXE_cuts:
285 XEThreshold(
'gMHT%i' % thrV,
'gXE').setXE(thrV)
289 TEThreshold(
'gTE%i' % thrV,
'gTE').setTE(thrV)
292 jXE_cuts = [60, 70, 80, 90, 100, 110, 120, 500]
293 for thrV
in jXE_cuts:
298 for thrV
in range(1,11):
299 XEThreshold(
'jXESPARE%i' % thrV,
'jXE').setXE(thrVal_SPAREXE)
302 for thrV
in jXE_cuts:
307 for thrV
in jXE_cuts:
312 for thrV
in [3,4,5,10,20,50,100,200,600,1500,3000,10000]:
313 TEThreshold(
'jTE%i' % thrV,
'jTE').setTE(thrV)
316 TEThreshold(
'jTEC%i' % thrV,
'jTE').setTE(thrV)
319 TEThreshold(
'jTEFWD%i' % thrV,
'jTE').setTE(thrV)
321 for thrV
in [100,5,1]:
322 TEThreshold(
'jTEFWDA%i' % thrV,
'jTE').setTE(thrV)
324 for thrV
in [100,5,1]:
325 TEThreshold(
'jTEFWDC%i' % thrV,
'jTE').setTE(thrV)
328 LArSaturationThreshold(
'LArSaturation')
330 ZeroBiasThresholdTopo(
'ZeroBiasA').setSeedThreshold(seed=[805306368, 0, 0, 0, 0, 0], bcdelay=3564)
331 ZeroBiasThresholdTopo(
'ZeroBiasB')
336 NimThreshold(
'CAL%i' % i,
'CALREQ', mapping=i)
344 thresholdA=[ 32.04, 26.98, 35.00, 33.54, 32.08, 36.46, 30.63, 32.08, 33.54, 30.63, 29.17, 33.54, 32.08, 32.08, 30.63, 26.25]
345 thresholdC=[ 55.42, 31.98, 32.81, 49.48, 98.44, 32.11, 32.62, 29.90, 24.06, 25.81, 25.52, 35.00, 27.71, 36.46, 26.25, 30.63]
348 thresholdA=[ 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
349 thresholdC=[ 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
351 for i, (vA, vC)
in enumerate(zip(thresholdA, thresholdC)):
352 MBTSSIThreshold(
'MBTS_A%i' % i).setVoltage(vA)
353 MBTSSIThreshold(
'MBTS_C%i' % i).setVoltage(vC)
355 thr_mbtsA = MBTSThreshold(
'MBTS_A', mapping=0)
356 thr_mbtsC = MBTSThreshold(
'MBTS_C', mapping=1)
358 if tc.thresholdExists(
'MBTS_A%i' % x):
359 thr_mbtsA.addSector( tc.getDefinedThreshold(
'MBTS_A%i' % x) )
360 if tc.thresholdExists(
'MBTS_C%i' % x):
361 thr_mbtsC.addSector( tc.getDefinedThreshold(
'MBTS_C%i' % x) )
367 NimThreshold(
'ZDC_0',
'ZDC')
368 NimThreshold(
'ZDC_1',
'ZDC')
369 NimThreshold(
'ZDC_2',
'ZDC')
374 NimThreshold(
'BCM_AtoC',
'BCM')
375 NimThreshold(
'BCM_CtoA',
'BCM')
376 NimThreshold(
'BCM_Wide',
'BCM')
377 NimThreshold(
'BCM_Comb',
'BCMCMB')
378 NimThreshold(
'BCM_MCA',
'BCM')
379 NimThreshold(
'BCM_MCC',
'BCM')
380 NimThreshold(
'BCM6',
'BCM')
381 NimThreshold(
'BCM7',
'BCM')
382 NimThreshold(
'BCM8',
'BCM')
387 NimThreshold(
'BMA0',
'NIM')
388 NimThreshold(
'BMA1',
'NIM')
389 NimThreshold(
'BMA2',
'NIM')
390 NimThreshold(
'BMA3',
'NIM')
394 NimThreshold(
'LUCID_A',
'LUCID')
395 NimThreshold(
'LUCID_C',
'LUCID')
396 NimThreshold(
'LUCID_Coinc_AC',
'LUCID')
397 NimThreshold(
'LUCID_COMM',
'LUCID')
398 NimThreshold(
'LUCID_05',
'LUCID')
399 NimThreshold(
'LUCID_06',
'LUCID')
402 NimThreshold(
'AFP_NSA',
'NIM', mapping=2)
403 NimThreshold(
'AFP_FSA',
'NIM', mapping=3)
404 NimThreshold(
'AFP_FSA_TOF_T0',
'NIM', mapping=4)
405 NimThreshold(
'AFP_FSA_TOF_T1',
'NIM', mapping=5)
406 NimThreshold(
'AFP_FSA_TOF_T2',
'NIM', mapping=6)
407 NimThreshold(
'AFP_FSA_TOF_T3',
'NIM', mapping=7)
408 NimThreshold(
'AFP_NSC',
'NIM', mapping=15)
409 NimThreshold(
'AFP_FSC',
'NIM', mapping=16)
410 NimThreshold(
'AFP_FSC_TOF_T0',
'NIM', mapping=17)
411 NimThreshold(
'AFP_FSC_TOF_T1',
'NIM', mapping=18)
412 NimThreshold(
'AFP_FSC_TOF_T2',
'NIM', mapping=19)
413 NimThreshold(
'AFP_FSC_TOF_T3',
'NIM', mapping=20)
417 NimThreshold(
'BPTX0',
'BPTX')
418 NimThreshold(
'BPTX1',
'BPTX')
422 NimThreshold(
'NIML1A',
'NIM', mapping=0)
423 NimThreshold(
'NIMLHCF',
'NIM', mapping=1)
424 NimThreshold(
'NIMTGC',
'NIM', mapping=12)
425 NimThreshold(
'NIMRPC',
'NIM', mapping=13)
426 NimThreshold(
'NIMTRT',
'NIM', mapping=14)