3 from ..Base.Thresholds
import LegacyThreshold, ZeroBiasThreshold, ThresholdValue
4 from ..Base.Limits
import CaloLimits
as CL
9 alreadyExecuted =
False
13 "eta_bin_boundaries": [0, 0.8, 1.1, 1.4, 1.5, 1.8, 2.5],
14 "shift": [ 1, -1, -2, -3, -1, 0]
17 "eta_bin_boundaries": [0, 0.7, 0.9, 1.2, 1.4, 1.5, 1.7, 2.5],
18 "shift": [ 2, 1, 0, -1, -2, 0, 1]
21 "eta_bin_boundaries": [0, 0.7, 0.8, 1.1, 1.3, 1.4, 1.5, 1.7, 2.5],
22 "shift" : [ 2, 1, 0, -1, -2, -3, -1, 1]
28 eta_bin_boundaries = ThresholdDefLegacy.EMVarRun2[shift_set][
"eta_bin_boundaries"]
29 shift = ThresholdDefLegacy.EMVarRun2[shift_set][
"shift"]
30 thr.addThrValue(pt+shift[0], priority=1)
31 for idx,sh
in reversed(
list(enumerate(shift))[1:]):
32 eta_min =
int(10 * eta_bin_boundaries[idx])
33 eta_max =
int(10 * eta_bin_boundaries[idx+1])
34 thr.addThrValue( pt + sh, -eta_max, -eta_min, priority=2)
35 for idx,sh
in list(enumerate(shift))[1:]:
36 eta_min =
int(10 * eta_bin_boundaries[idx])
37 eta_max =
int(10 * eta_bin_boundaries[idx+1])
38 thr.addThrValue( pt + sh, eta_min, eta_max, priority=2)
47 if ThresholdDefLegacy.alreadyExecuted:
49 ThresholdDefLegacy.alreadyExecuted =
True
52 ThresholdValue.setDefaults(
'EM',{
'isobits' :
'00000',
'use_relIso' :
True })
54 for thrV
in [3, 5, 7, 8, 10, 12, 14, 15, 16, 18, 20, 22]:
58 LegacyThreshold(
'EM20A',
'EM').addThrValue(255, priority=1).addThrValue(20,16,20,priority=2)
59 LegacyThreshold(
'EM20C',
'EM').addThrValue(255, priority=1).addThrValue(20,-20,-16,priority=2)
66 ThresholdValue.setDefaults(
'EM', {
'isobits' :
'00010',
'use_relIso' :
True })
71 ThresholdValue.setDefaults(
'EM', {
'isobits' :
'00001',
'use_relIso' :
True })
72 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM8VH',
'EM'), 8, shift_set = 1 )
73 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM10VH',
'EM'), 10, shift_set = 1 )
74 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM13VH',
'EM'), 13, shift_set = 2 )
75 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM15VH',
'EM'), 15, shift_set = 2 )
76 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM18VH',
'EM'), 18, shift_set = 3 )
77 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM20VH',
'EM'), 20, shift_set = 3 )
78 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM22VH',
'EM'), 22, shift_set = 3 )
81 ThresholdValue.setDefaults(
'EM', {
'isobits' :
'00100',
'use_relIso' :
True })
85 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM15VHI',
'EM'), 15, shift_set = 2 )
86 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM18VHI',
'EM'), 18, shift_set = 3 )
87 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM20VHI',
'EM'), 20, shift_set = 3 )
88 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM22VHI',
'EM'), 22, shift_set = 3 )
89 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM24VHI',
'EM'), 24, shift_set = 3 )
90 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM26VHI',
'EM'), 26, shift_set = 3 )
91 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM30VHI',
'EM'), 30, shift_set = 3 )
94 ThresholdValue.setDefaults(
'EM', {
'isobits' :
'01000',
'use_relIso' :
True })
95 ThresholdDefLegacy.addVaryingThrValuesRun2(
LegacyThreshold(
'EM24VHIM',
'EM'), 24, shift_set = 3 )
97 ThresholdValue.setDefaults(
'EM', {})
101 ThresholdValue.setDefaults(
'TAU',{
'isobits' :
'00000',
'use_relIso' :
True })
102 for thrV
in [1, 2, 3, 5, 6, 8, 12, 15, 20, 25, 30, 35, 40, 50, 60, 90, 100]:
107 LegacyThreshold(
'HA%iA' % thrV,
'TAU').addThrValue(255, priority=1).addThrValue( thrV, etamin = 12, etamax = 16, priority=2)
108 LegacyThreshold(
'HA%iC' % thrV,
'TAU').addThrValue(255, priority=1).addThrValue( thrV, etamin = -16, etamax = -12, priority=2)
110 ThresholdValue.setDefaults(
'TAU', {
'isobits' :
'00001',
'use_relIso' :
True })
114 ThresholdValue.setDefaults(
'TAU', {
'isobits' :
'00010',
'use_relIso' :
True })
115 for thrV
in [12,20,25]:
118 ThresholdValue.setDefaults(
'TAU', {
'isobits' :
'00100',
'use_relIso' :
True })
119 for thrV
in [12,20,25]:
122 ThresholdValue.setDefaults(
'TAU', {
'isobits' :
'01000',
'use_relIso' :
True })
126 ThresholdValue.setDefaults(
'TAU', {})
131 ThresholdValue.setDefaults(
'JET', {
'window' : 8})
134 for thrV
in [5, 10, 12, 15, 20, 25, 30, 35, 40, 50, 60, 70, 75, 85, 100, 120, 150,175, 250, 400]:
135 LegacyThreshold(
'J%i' % thrV,
'JET').addThrValue(CL.JetOff).addThrValue(thrV, etamin=-31, etamax=31, priority=1)
137 ThresholdValue.setDefaults(
'JET', {})
142 ThresholdValue.setDefaults(
'JET', {
'window' : 8})
146 LegacyThreshold(
'J%iA' % thrV,
'JET').addThrValue(CL.JetOff).addThrValue( thrV, etamin = 15, etamax = 23, priority=1)
147 LegacyThreshold(
'J%iC' % thrV,
'JET').addThrValue(CL.JetOff).addThrValue( thrV, etamin = -23, etamax = -15, priority=1)
149 for (thrV, etamax)
in [(12,25), (12,28), (15,25), (17,22), (20,28), (25,23), (35,23), (20,49), (30,49), (40,25), (45,21)]:
150 LegacyThreshold(
'J%ip0ETA%i' % (thrV, etamax),
'JET').addThrValue(CL.JetOff).addThrValue( thrV, etamin = -etamax, etamax = etamax, priority=1)
153 for thrV
in [10, 15, 20, 25, 30, 35, 45, 50, 70, 75, 100]:
155 .addThrValue( thrV, etamin=31, etamax=49, priority=1)\
156 .addThrValue( thrV, etamin=-49, etamax=-31, priority=1)
159 for (thrV, etamin, etamax)
in [ (15,23,49), (15,24,49), (20,28,31) ]:
160 LegacyThreshold(
'J%ip%iETA%i' % (thrV, etamin,etamax),
'JET').addThrValue(CL.JetOff)\
161 .addThrValue( thrV, etamin = etamin, etamax=etamax, priority=1)\
162 .addThrValue( thrV, etamin = -etamax, etamax = -etamin, priority=1)
165 ThresholdValue.setDefaults(
'JET', {
'window' : 4})
169 .addThrValue(CL.JetOff)\
170 .addThrValue( thrV, etamin=23, etamax=49, priority=1)\
171 .addThrValue( thrV, etamin=-49, etamax=-23, priority=1)
173 ThresholdValue.setDefaults(
'JET', {})
176 ZeroBiasThreshold(
'ZB_EM12').setSeedThreshold( seed=
'EM12', seed_multi=1, bcdelay=3564 )
177 ZeroBiasThreshold(
'ZB_EM15').setSeedThreshold( seed=
'EM15', seed_multi=1, bcdelay=3564 )
178 ZeroBiasThreshold(
'ZB_J10' ).setSeedThreshold( seed=
'J10', seed_multi=1, bcdelay=3564 )
179 ZeroBiasThreshold(
'ZB_J75' ).setSeedThreshold( seed=
'J75', seed_multi=1, bcdelay=3564 )
183 ThresholdValue.setDefaults(
'JE', {
'etamin' : -49,
'etamax' : 49,
'phimin' : 0,
'phimax' : 64,
184 'window' : 8,
'priority': 0})
186 for thrV
in [100, 140, 200, 300, 350, 500]:
190 for thrV
in [0, 2, 3, 4, 5, 10, 15, 20, 25, 30, 40, 45, 50, 55, 60, 65, 70, 90, 100, 120, 140, 160, 200, 280, 300, 360, 2000, 4000, 10000, 12000, 14000]:
194 for thrV
in [10, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 150, 300]:
198 for thrV
in [20, 25, 30, 35, 40, 45, 50, 55, 60, 65]:
203 for thrV
in [0, 3, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 80, 110, 150, 180, 1000, 2000, 5000, 6500, 8000, 9000]:
204 LegacyThreshold(
'TE%ip0ETA%i' % (thrV, etamax),
'TE').addThrValue(CL.EtSumOff).addThrValue( thrV, etamin = -etamax, etamax = etamax, priority=1)
209 for thrV
in [0, 3, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 80, 110, 150, 180, 1000, 2000, 5000, 6500, 8000, 9000]:
211 .addThrValue( CL.EtSumOff)\
212 .addThrValue( thrV, etamin = etamin, etamax=etamax, priority=1)\
213 .addThrValue( thrV, etamin = -etamax, etamax = -etamin, priority=1)
217 for thrV
in [30, 35, 40, 45, 50, 55, 60, 70, 80]:
218 LegacyThreshold(
'XE%ip0ETA%i' % (thrV, etamax),
'XE').addThrValue(CL.EtMissOff).addThrValue( thrV, etamin = -etamax, etamax = etamax, priority=1)
222 for thrV
in [3, 7, 500, 600, 1500, 3000, 3500, 5000, 6500, 8000, 9000]:
223 LegacyThreshold(
'TE%ip0ETA%i' % (thrV, etamax),
'TE').addThrValue(CL.EtSumOff).addThrValue( thrV, etamin = -etamax, etamax = etamax, priority=1)