77 if ThresholdDef.alreadyExecuted:
78 raise RuntimeError(
"Calling ThresholdDef.registerThresholds twice")
79 ThresholdDef.alreadyExecuted =
True
84 MuonThreshold(
"MU3VF").setThrValue(thr=3, ba=4).setTGCFlags(
"F")
85 MuonThreshold(
"MU3VC").setThrValue(thr=3, ba=4).setTGCFlags(
"C")
86 MuonThreshold(
"MU5VF").setThrValue(thr=5, ba=6).setTGCFlags(
"F")
88 MuonThreshold(
"MU8FC").setThrValue(thr=8).setTGCFlags(
"F & C")
89 MuonThreshold(
"MU9VF").setThrValue(thr=9, ba=8).setTGCFlags(
"F")
90 MuonThreshold(
"MU9VFC").setThrValue(thr=9, ba=8).setTGCFlags(
"F & C")
91 MuonThreshold(
"MU8VF").setThrValue(thr=8, ba=10).setTGCFlags(
"F")
92 MuonThreshold(
"MU8VFC").setThrValue(thr=8, ba=10).setTGCFlags(
"F & C")
93 MuonThreshold(
"MU14FCH").setThrValue(thr=14).setTGCFlags(
"F & C & H")
94 MuonThreshold(
"MU14FCHR").setThrValue(thr=14).setTGCFlags(
"F & C & H").setExclusionList(
"rpcFeet")
95 MuonThreshold(
"MU15VFCH").setThrValue(thr=15, ba=14).setTGCFlags(
"F & C & H")
96 MuonThreshold(
"MU15VFCHR").setThrValue(thr=15, ba=14).setTGCFlags(
"F & C & H").setExclusionList(
"rpcFeet")
97 MuonThreshold(
"MU18VFCH").setThrValue(thr=18, ba=14).setTGCFlags(
"F & C & H")
99 MuonThreshold(
"MU10BOM").setThrValue(thr=10).setRPCFlags(
"M").setRegion(
"BA")
100 MuonThreshold(
"MU12BOM").setThrValue(thr=12).setRPCFlags(
"M").setRegion(
"BA")
102 MuonThreshold(
"MU8FH").setThrValue(thr=8).setTGCFlags(
"F & H")
104 MuonThreshold(
"MU20VFC").setThrValue(thr=20, ba=14).setTGCFlags(
"F & C")
106 MuonThreshold(
"MU12FCH").setThrValue(thr=12).setTGCFlags(
"F & C & H")
107 MuonThreshold(
"MU4BOM").setThrValue(thr=4).setRPCFlags(
"M").setRegion(
"BA")
110 MuonThreshold(
"MU14EOF").setThrValue(thr=14).setTGCFlags(
"F").setRegion(
"EC,FW")
111 MuonThreshold(
"MU8EOF").setThrValue(thr=8).setTGCFlags(
"F").setRegion(
"EC,FW")
112 MuonThreshold(
"MU3EOF").setThrValue(thr=3, ba=4).setTGCFlags(
"F").setRegion(
"EC,FW")
117 eEM_cuts = [1, 2, 3, 5, 7, 9, 12, 15, 18, 26]
119 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'eEM')
120 ptMin = ttconfig[
"ptMinToTopo"]
121 for thrV
in eEM_cuts:
122 eEMThreshold(
'eEM%i' % thrV,
'eEM').addThrValue(
max(get_threshold_cut(
'eEM', thrV), ptMin))
125 eEMThreshold(
'eEM22A',
'eEM').addThrValue(get_threshold_cut(
'eEM', 22), 16, 20)
126 eEMThreshold(
'eEM22C',
'eEM').addThrValue(get_threshold_cut(
'eEM', 22), -20, -16)
129 for thrV
in range(1, 3):
130 eEMThreshold(
'eEMSPARE%i' % thrV,
'eEM').addThrValue(thrVal_SPARE)
133 eEM_cuts = [9, 10, 12, 18, 24, 26, 40]
134 for thrV
in eEM_cuts:
135 eEMThreshold(
'eEM%iL' % thrV,
'eEM').addThrValue(get_threshold_cut(
'eEM', thrV)).setIsolation(reta=
"Loose", wstot=
"Loose", rhad=
"Loose")
138 eEM_cuts = [10, 18, 20, 22, 24, 26, 28]
139 for thrV
in eEM_cuts:
140 eEMThreshold(
'eEM%iM' % thrV,
'eEM').addThrValue(get_threshold_cut(
'eEM', thrV)).setIsolation(reta=
"Medium", wstot=
"Medium", rhad=
"Medium")
144 for thrV
in eEM_cuts:
145 eEMThreshold(
'eEM%iT' % thrV,
'eEM').addThrValue(get_threshold_cut(
'eEM', thrV)).setIsolation(reta=
"Tight", wstot=
"Tight", rhad=
"Tight")
149 for thrV
in eEM_cuts:
150 ThresholdDef.addVaryingThrValues(pt=get_threshold_cut(
'eEM', thrV), shift_set=1,
151 thr=
eEMVarThreshold(
'eEM%iVM' % thrV,
'eEM').setIsolation(reta=
"Medium", wstot=
"Medium", rhad=
"Medium"))
155 for thrV
in jEM_cuts:
156 jEMThreshold(
'jEM%i' % thrV,
'jEM').addThrValue(get_threshold_cut(
'jEM', thrV))
159 for thrV
in jEM_cuts:
160 jEMThreshold(
'jEM%iM' % thrV,
'jEM').addThrValue(get_threshold_cut(
'jEM', thrV)).setIsolation(iso=
"Medium", frac=
"Medium", frac2=
"Medium")
163 for thrV
in range(1, 2):
164 jEMThreshold(
'jEMSPARE%i' % thrV,
'jEM').addThrValue(thrVal_SPARE)
167 eTAU_cuts = [1, 2, 12, 20, 28, 30, 35, 60, 70, 80, 120, 140]
169 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'eTAU')
170 ptMin = ttconfig[
"ptMinToTopo"]
171 for thrV
in eTAU_cuts:
172 eTauThreshold(
'eTAU%i' % thrV,
'eTAU').setEt(
max(get_threshold_cut(
'eTAU', thrV), ptMin))
175 for thrV
in eTAU_cuts:
176 eTauThreshold(
'eTAU%iL' % thrV,
'eTAU').setEt(get_threshold_cut(
'eTAU', thrV)).setIsolation(rCore=
"Loose")
177 eTAU_cuts = [20, 28, 30, 35]
178 for thrV
in eTAU_cuts:
179 eTauThreshold(
'eTAU%iM' % thrV,
'eTAU').setEt(get_threshold_cut(
'eTAU', thrV)).setIsolation(rCore=
"Medium")
182 for thrV
in eTAU_cuts:
183 eTauThreshold(
'eTAU%iHT' % thrV,
'eTAU').setEt(get_threshold_cut(
'eTAU', thrV)).setIsolation(rHad=
"Tight")
185 for thrV
in eTAU_cuts:
186 eTauThreshold(
'eTAU%iHM' % thrV,
'eTAU').setEt(get_threshold_cut(
'eTAU', thrV)).setIsolation(rHad=
"Medium")
188 for thrV
in eTAU_cuts:
189 eTauThreshold(
'eTAU%iHL' % thrV,
'eTAU').setEt(get_threshold_cut(
'eTAU', thrV)).setIsolation(rHad=
"Loose")
191 for thrV
in range(1, 10):
192 eTauThreshold(
'eTAUSPARE%i' % thrV,
'eTAU').setEt(thrVal_SPARE)
195 cTAU_cuts = [12, 20, 30, 35, 50]
196 for thrV
in cTAU_cuts:
197 cTauThreshold(
'cTAU%iM' % thrV,
'cTAU').setEt(get_threshold_cut(
'cTAU', thrV)).setIsolation(isolation=f
'Medium{thrV}')
200 for thrV
in range(1, 2+1):
201 cTauThreshold(
'cTAUSPARE%i' % thrV,
'cTAU').setEt(thrVal_SPARE)
204 jTAU_cuts = [1, 20, 30]
206 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'jTAU')
207 ptMin = ttconfig[
"ptMinToTopo1"]
208 for thrV
in jTAU_cuts:
209 jTauThreshold(
'jTAU%i' % thrV,
'jTAU').setEt(
max(get_threshold_cut(
'jTAU', thrV), ptMin))
211 for thrV
in jTAU_cuts:
212 jTauThreshold(
'jTAU%iM' % thrV,
'jTAU').setEt(get_threshold_cut(
'jTAU', thrV)).setIsolation(isolation=
"Medium")
218 ttconfig = tc.l1menu.thresholds.typeWideThresholdConfig(
'jJ')
219 ptMin = ttconfig[
"ptMinToTopo1"]
220 jJ_cuts = [5, 10, 20, 30, 40, 50, 55, 60, 70, 80, 90, 125, 140, 160, 180, 500]
222 ThresholdDef.addJetVaryingThrValues(
jJetThreshold(
'jJ%i' % thrV,
'jJ'), pt=
max(get_threshold_cut(
'jJ', thrV), ptMin), shift_set=0, rangemin=0, rangemax=32)
225 jJ_cuts = [(30, 25), (40, 25), (50, 25), (56, 49), (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 = [5, 10, 15, 20, 40, 50, 60, 90, 125]
235 ThresholdDef.addJetVaryingThrValues(
jJetThreshold(
'jJ%ip30ETA49' % thrV,
'jJ'), pt=
max(get_threshold_cut(
'FjJ', thrV), ptMin), shift_set=0, rangemin=30, rangemax=49)
238 for thrV
in range(1, 2):
239 jJetThreshold(
'jJSPARE%i' % thrV,
'jJ').addThrValue(thrVal_SPARE)
242 for thrV
in [20, 50, 100, 400]:
243 ThresholdDef.addJetVaryingThrValues(
gJetThreshold(
'gJ%ip0ETA25' % thrV,
'gJ'), pt=get_threshold_cut(
'gJ', thrV), shift_set=0, rangemin=0, rangemax=25)
247 ThresholdDef.addJetVaryingThrValues(
gJetThreshold(
'gJ%ip25ETA49' % thrV,
'gJ'), pt=get_threshold_cut(
'gJ', thrV), shift_set=0, rangemin=25, rangemax=49)
250 for thrV
in range(1, 2):
251 gJetThreshold(
'gJSPARE%i' % thrV,
'gJ').addThrValue(thrVal_SPARE)
254 for thrV
in [80, 90, 100, 140, 160]:
255 ThresholdDef.addJetVaryingThrValues(
gLJetThreshold(
'gLJ%ip0ETA25' % thrV,
'gLJ'), pt=get_threshold_cut(
'gLJ', thrV), shift_set=0, rangemin=0, rangemax=25)
258 for thrV
in range(1, 5):
259 gLJetThreshold(
'gLJSPARE%i' % thrV,
'gLJ').addThrValue(thrVal_SPARE)
262 gXE_cuts = [60, 70, 80, 100, 110, 120, 500]
263 for thrV
in gXE_cuts:
264 XEThreshold(
'gXEJWOJ%i' % thrV,
'gXE').setXE(get_threshold_cut(
'gXEJWOJ', thrV))
266 gXENC_cuts = [100, 110]
267 for thrV
in gXENC_cuts:
268 XEThreshold(
'gXENC%i' % thrV,
'gXE').setXE(get_threshold_cut(
'gXENC', thrV))
275 for thrV
in [5, 10, 200, 280]:
280 TEThreshold(
'gESPRESSO%i' % thrV,
'gTE').setTE(thrV)
284 TEThreshold(
'gRISTRETTO%i' % thrV,
'gTE').setTE(thrV)
287 jXE_cuts = [60, 70, 80, 90, 100, 110, 120, 500]
288 for thrV
in jXE_cuts:
289 XEThreshold(
'jXE%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
292 cXE_cuts = [100, 110]
293 for thrV
in cXE_cuts:
294 XEThreshold(
'cXE%i' % thrV,
'jXE').setXE(get_threshold_cut(
'cXE', thrV))
298 for thrV
in range(1, 6):
299 XEThreshold(
'jXESPARE%i' % thrV,
'jXE').setXE(thrVal_SPAREXE)
302 for thrV
in jXE_cuts:
303 XEThreshold(
'jXEC%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
307 for thrV
in jXE_cuts:
308 XEThreshold(
'jXEPerf%i' % thrV,
'jXE').setXE(get_threshold_cut(
'jXE', thrV))
312 for thrV
in [3, 4, 5, 10, 20, 50, 100, 200, 600, 1500, 4000, 6500]:
318 for thrV
in [100, 2600, 5600, 6300, 6600]:
321 for thrV
in [100, 5, 1]:
324 for thrV
in [100, 5, 1]:
343 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]
344 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]
347 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]
348 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]
350 for i, (vA, vC)
in enumerate(zip(thresholdA, thresholdC)):
357 if tc.thresholdExists(
'MBTS_A%i' % x):
358 thr_mbtsA.addSector(tc.getDefinedThreshold(
'MBTS_A%i' % x))
359 if tc.thresholdExists(
'MBTS_C%i' % x):
360 thr_mbtsC.addSector(tc.getDefinedThreshold(
'MBTS_C%i' % x))