79 if ThresholdDef.alreadyExecuted:
80 raise RuntimeError(
"Calling ThresholdDef.registerThresholds twice")
81 ThresholdDef.alreadyExecuted =
True
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")
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")
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:
124 eEMThreshold(
'eEM%i' %thrV,
'eEM').addThrValue(
max(get_threshold_cut(
'eEM', thrV), ptMin))
127 eEMThreshold(
'eEM22A',
'eEM').addThrValue(get_threshold_cut(
'eEM',22),16,20)
128 eEMThreshold(
'eEM22C',
'eEM').addThrValue(get_threshold_cut(
'eEM',22),-20,-16)
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, 20, 22, 24, 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:
158 jEMThreshold(
'jEM%i' % thrV,
'jEM').addThrValue(get_threshold_cut(
'jEM',thrV))
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, 2, 12, 20, 28, 30, 35, 60, 70, 80, 120, 140]
171 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'eTAU')
172 ptMin = ttconfig[
"ptMinToTopo"]
173 for thrV
in eTAU_cuts:
174 eTauThreshold(
'eTAU%i' % thrV,
'eTAU').setEt(
max(get_threshold_cut(
'eTAU', thrV), ptMin))
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, 28, 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, 50]
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, 2+1):
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:
211 jTauThreshold(
'jTAU%i' % thrV,
'jTAU').setEt(
max(get_threshold_cut(
'jTAU', thrV), ptMin))
213 for thrV
in jTAU_cuts:
214 jTauThreshold(
'jTAU%iM' % thrV,
'jTAU').setEt(get_threshold_cut(
'jTAU', thrV)).setIsolation( isolation =
"Medium" )
220 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'jJ')
221 ptMin = ttconfig[
"ptMinToTopo1"]
222 jJ_cuts = [5, 10, 20, 30, 40, 50, 55, 60, 70, 80, 90, 125, 140, 160, 180, 500]
224 ThresholdDef.addJetVaryingThrValues(
jJetThreshold(
'jJ%i' % thrV,
'jJ'), pt=
max(get_threshold_cut(
'jJ', thrV),ptMin), shift_set=0, rangemin=0, rangemax=32 )
227 jJ_cuts = [(30,25), (40,25), (50,25), (56,49), (55,23), (70,23), (80,25), (85,21)]
228 for thrV, etamax
in jJ_cuts:
229 ThresholdDef.addJetVaryingThrValues(
jJetThreshold(
'jJ%ip0ETA%i' % (thrV, etamax),
'jJ'), pt=get_threshold_cut(
'CjJ', thrV), shift_set=0, rangemin=0, rangemax=etamax )
235 jJ_cuts = [5, 10, 15, 20, 40, 50, 60, 90, 125]
237 ThresholdDef.addJetVaryingThrValues(
jJetThreshold(
'jJ%ip30ETA49' % thrV,
'jJ'), pt=
max(get_threshold_cut(
'FjJ', thrV),ptMin), shift_set=0, rangemin=30, rangemax=49 )
240 for thrV
in range(1,2):
241 jJetThreshold(
'jJSPARE%i' % thrV,
'jJ').addThrValue(thrVal_SPARE)
245 for thrV
in [20, 50, 100, 400]:
246 ThresholdDef.addJetVaryingThrValues(
gJetThreshold(
'gJ%ip0ETA25' % thrV,
'gJ'), pt=get_threshold_cut(
'gJ', thrV), shift_set=0, rangemin=0, rangemax=25)
250 ThresholdDef.addJetVaryingThrValues(
gJetThreshold(
'gJ%ip25ETA49' % thrV,
'gJ'), pt=get_threshold_cut(
'gJ', thrV), shift_set=0, rangemin=25, rangemax=49)
253 for thrV
in range(1,2):
254 gJetThreshold(
'gJSPARE%i' % thrV,
'gJ').addThrValue(thrVal_SPARE)
258 for thrV
in [80, 90, 100, 140, 160]:
259 ThresholdDef.addJetVaryingThrValues(
gLJetThreshold(
'gLJ%ip0ETA25' % thrV,
'gLJ'), pt=get_threshold_cut(
'gLJ', thrV), shift_set=0, rangemin=0, rangemax=25)
262 for thrV
in range(1,5):
263 gLJetThreshold(
'gLJSPARE%i' % thrV,
'gLJ').addThrValue(thrVal_SPARE)
267 for thrV
in gXE_cuts:
268 XEThreshold(
'gXENC%i' % thrV,
'gXE').setXE(get_threshold_cut(
'gXENC', thrV))
274 gXE_cuts = [60, 70, 80, 100, 110, 120, 500]
275 for thrV
in gXE_cuts:
276 XEThreshold(
'gXEJWOJ%i' % thrV,
'gXE').setXE(get_threshold_cut(
'gXEJWOJ', thrV))
283 for thrV
in [5, 10, 200, 280]:
288 TEThreshold(
'gESPRESSO%i' % thrV,
'gTE').setTE(thrV)
291 jXE_cuts = [60, 70, 80, 90, 100, 110, 120, 500]
292 for thrV
in jXE_cuts:
293 XEThreshold(
'jXE%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
297 for thrV
in cXE_cuts:
298 XEThreshold(
'cXE%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
302 for thrV
in range(1, 6):
303 XEThreshold(
'jXESPARE%i' % thrV,
'jXE').setXE(thrVal_SPAREXE)
306 for thrV
in jXE_cuts:
307 XEThreshold(
'jXEC%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
311 for thrV
in jXE_cuts:
312 XEThreshold(
'jXEPerf%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
316 for thrV
in [3, 4, 5, 10, 20, 50, 100, 200, 600, 1500, 4000, 6500]:
322 for thrV
in [100, 2600, 5600, 6300, 6600]:
325 for thrV
in [100,5,1]:
328 for thrV
in [100,5,1]:
348 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]
349 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]
352 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]
353 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]
355 for i, (vA, vC)
in enumerate(zip(thresholdA, thresholdC)):
362 if tc.thresholdExists(
'MBTS_A%i' % x):
363 thr_mbtsA.addSector( tc.getDefinedThreshold(
'MBTS_A%i' % x) )
364 if tc.thresholdExists(
'MBTS_C%i' % x):
365 thr_mbtsC.addSector( tc.getDefinedThreshold(
'MBTS_C%i' % x) )