3 from .TypeWideThresholdConfig
import getTypeWideThresholdConfig
6 import L1TopoAlgorithms.L1TopoAlgConfig
as AlgConf
7 import L1TopoHardware.L1TopoHardware
as HW
8 from AthenaCommon.Logging
import logging
9 log = logging.getLogger(__name__)
20 alg = AlgConf.ClusterNoSort( name =
'EMall', inputs =
'ClusterTobArray', outputs =
'EMall')
21 alg.addgeneric(
'InputWidth', HW.InputWidthEM)
22 alg.addgeneric(
'OutputWidth', HW.InputWidthEM)
23 alg.addvariable(
'IsoMask', 0)
24 tm.registerTopoAlgo(alg)
27 alg = AlgConf.ClusterSelect( name =
'TAUabi', inputs =
'ClusterTobArray', outputs =
'TAUabi')
28 alg.addgeneric(
'InputWidth', HW.InputWidthTAU)
29 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectTAU )
30 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectTAU)
31 alg.addvariable(
'MinET', 12)
32 alg.addvariable(
'IsoMask', 2)
33 alg.addvariable(
'MinEta', 0)
34 alg.addvariable(
'MaxEta', _etamax)
35 alg.addgeneric(
'DoIsoCut', 1)
36 tm.registerTopoAlgo(alg)
39 alg = AlgConf.ClusterSelect( name =
'EMabi', inputs =
'ClusterTobArray', outputs =
'EMabi')
40 alg.addgeneric(
'InputWidth', HW.InputWidthEM)
41 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectEM )
42 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectEM)
43 alg.addvariable(
'MinET', 8)
44 alg.addvariable(
'IsoMask', 2)
45 alg.addvariable(
'MinEta', 0)
46 alg.addvariable(
'MaxEta', _etamax)
47 alg.addgeneric(
'DoIsoCut', 1)
48 tm.registerTopoAlgo(alg)
51 alg = AlgConf.ClusterSelect( name =
'EMabhi', inputs =
'ClusterTobArray', outputs =
'EMabhi')
52 alg.addgeneric(
'InputWidth', HW.InputWidthEM)
53 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectEM )
54 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectEM)
55 alg.addvariable(
'MinET', 8)
56 alg.addvariable(
'IsoMask', 3)
57 alg.addvariable(
'MinEta', 0)
58 alg.addvariable(
'MaxEta', _etamax)
59 alg.addgeneric(
'DoIsoCut', 1)
60 tm.registerTopoAlgo(alg)
63 alg = AlgConf.ClusterSelect( name =
'TAUab', inputs =
'ClusterTobArray', outputs =
'TAUab')
64 alg.addgeneric(
'InputWidth', HW.InputWidthTAU)
65 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectTAU )
66 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectTAU)
67 alg.addvariable(
'MinET', 12)
68 alg.addvariable(
'IsoMask', 0)
69 alg.addvariable(
'MinEta', 0)
70 alg.addvariable(
'MaxEta', _etamax)
71 alg.addgeneric(
'DoIsoCut', 0)
72 tm.registerTopoAlgo(alg)
75 alg = AlgConf.ClusterSort( name =
'EMs', inputs =
'ClusterTobArray', outputs =
'EMs')
76 alg.addgeneric(
'InputWidth', HW.InputWidthEM)
77 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortEM)
78 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortEM)
79 alg.addvariable(
'IsoMask', 0)
80 alg.addvariable(
'MinEta', 0)
81 alg.addvariable(
'MaxEta', _etamax)
82 alg.addgeneric(
'DoIsoCut', 0)
83 tm.registerTopoAlgo(alg)
86 alg = AlgConf.ClusterSort( name =
'EMshi', inputs =
'ClusterTobArray', outputs =
'EMshi')
87 alg.addgeneric(
'InputWidth', HW.InputWidthEM)
88 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortEM)
89 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortEM)
90 alg.addvariable(
'IsoMask', 3)
91 alg.addvariable(
'MinEta', 0)
92 alg.addvariable(
'MaxEta', _etamax)
93 alg.addgeneric(
'DoIsoCut', 1)
94 tm.registerTopoAlgo(alg)
97 alg = AlgConf.ClusterSort( name =
'TAUsi', inputs =
'ClusterTobArray', outputs =
'TAUsi')
98 alg.addgeneric(
'InputWidth', HW.InputWidthTAU)
99 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortTAU)
100 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortTAU)
101 alg.addvariable(
'IsoMask', 2)
102 alg.addvariable(
'MinEta', 0)
103 alg.addvariable(
'MaxEta', _etamax)
104 alg.addgeneric(
'DoIsoCut', 1)
105 tm.registerTopoAlgo(alg)
108 alg = AlgConf.JetNoSort( name =
'AJall', inputs =
'JetTobArray', outputs =
'AJall')
109 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
110 alg.addgeneric(
'OutputWidth', HW.InputWidthJET)
111 alg.addgeneric(
'JetSize', HW.DefaultJetSize)
112 tm.registerTopoAlgo(alg)
115 alg = AlgConf.JetNoSort( name =
'AJjall', inputs =
'JetTobArray', outputs =
'AJjall')
116 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
117 alg.addgeneric(
'OutputWidth', HW.InputWidthJET)
118 alg.addgeneric(
'JetSize', 1
if HW.DefaultJetSize.value==2
else 2)
119 tm.registerTopoAlgo(alg)
123 alg = AlgConf.JetNoSortMatch( name =
'AJMatchall', inputs =
'JetTobArray', outputs =
'AJMatchall')
124 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
125 alg.addgeneric(
'OutputWidth', HW.InputWidthJET)
126 alg.addgeneric(
'JetSize', 2
if HW.DefaultJetSize.value==2
else 1)
127 alg.addvariable(
'MinET1', 15)
128 alg.addvariable(
'MinET2', 20)
129 tm.registerTopoAlgo(alg)
133 for idc, jet_type
in enumerate([
'J',
'CJ',
'FJ']):
146 alg = AlgConf.JetSelect( name = jet_type+
'ab', inputs =
'JetTobArray', outputs = jet_type+
'ab')
147 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
148 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectJET )
149 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectJET)
150 alg.addgeneric(
'JetSize', HW.DefaultJetSize.value)
151 alg.addvariable(
'MinET', _minet)
152 alg.addvariable(
'MinEta', _mineta)
153 alg.addvariable(
'MaxEta', jetabseta)
154 alg.addgeneric(
'DoEtaCut', 1)
155 tm.registerTopoAlgo(alg)
158 alg = AlgConf.JetSort( name =
'AJjs', inputs =
'JetTobArray', outputs =
'AJjs')
159 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
160 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortJET )
161 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortJET )
162 alg.addgeneric(
'JetSize', 1
if HW.DefaultJetSize.value==2
else 2)
163 alg.addvariable(
'MinEta', 0)
164 alg.addvariable(
'MaxEta', _etamax)
165 alg.addgeneric(
'DoEtaCut', 0)
166 tm.registerTopoAlgo(alg)
170 for idc, jet_type
in enumerate([
'AJ',
'FJ']):
184 alg = AlgConf.JetSort( name = jet_type+
's', inputs =
'JetTobArray', outputs = jet_type+
's')
185 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
186 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortJET )
187 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortJET )
188 alg.addgeneric(
'JetSize', HW.DefaultJetSize.value)
189 alg.addvariable(
'MinEta', _mineta)
190 alg.addvariable(
'MaxEta', jetabseta)
192 alg.addgeneric(
'DoEtaCut', 1)
194 alg.addgeneric(
'DoEtaCut', 0)
195 tm.registerTopoAlgo(alg)
198 alg = AlgConf.JetSort( name =
'Js', inputs =
'JetTobArray', outputs =
'Js')
199 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
200 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortJET )
201 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortJET )
202 alg.addgeneric(
'JetSize', HW.DefaultJetSize.value)
203 alg.addvariable(
'MinEta', 0)
204 alg.addvariable(
'MaxEta', 31)
205 alg.addgeneric(
'DoEtaCut', 1)
206 tm.registerTopoAlgo(alg)
209 alg = AlgConf.METNoSort( name =
'XENoSort', inputs =
'MetTobArray', outputs =
'XENoSort')
210 alg.addgeneric(
'InputWidth', HW.InputWidthMET)
211 alg.addgeneric(
'OutputWidth', HW.OutputWidthMET)
212 tm.registerTopoAlgo(alg)
214 alg = AlgConf.MetSort( name =
'XE', inputs =
'MetTobArray', outputs =
'XE')
215 alg.addgeneric(
'InputWidth', HW.InputWidthMET)
216 alg.addgeneric(
'OutputWidth', HW.OutputWidthMET)
217 tm.registerTopoAlgo(alg)
219 alg = AlgConf.MuonSelect( name =
'MUab', inputs =
'MuonTobArray', outputs =
'MUab')
220 alg.addgeneric(
'InputWidth', HW.InputWidthMU)
221 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectMU )
222 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectMU)
223 alg.addvariable(
'MinET', 4)
224 alg.addvariable(
'MinEta', 0)
225 alg.addvariable(
'MaxEta', 25)
226 tm.registerTopoAlgo(alg)
228 alg = AlgConf.MuonSort( name =
'MUs', inputs =
'MuonTobArray', outputs =
'MUs')
229 alg.addgeneric(
'InputWidth', HW.InputWidthMU)
230 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSortMU )
231 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortMU)
233 alg.addvariable(
'MinEta', 0)
234 alg.addvariable(
'MaxEta', 25)
235 tm.registerTopoAlgo(alg)
238 alg = AlgConf.MuonSelect( name =
'CMUab', inputs =
'MuonTobArray', outputs =
'CMUab')
239 alg.addgeneric(
'InputWidth', HW.InputWidthMU)
240 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectMU )
241 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectMU)
242 alg.addvariable(
'MinET', 4)
243 alg.addvariable(
'MinEta', 0)
244 alg.addvariable(
'MaxEta', 10)
245 tm.registerTopoAlgo(alg)
248 alg = AlgConf.MuonSort_1BC( name =
'LMUs', inputs =
'LateMuonTobArray', outputs =
'LMUs')
249 alg.addgeneric(
'InputWidth', HW.InputWidthMU)
251 alg.addgeneric(
'OutputWidth', HW.OutputWidthSortMU)
252 alg.addgeneric(
'nDelayedMuons', 1)
253 alg.addvariable(
'MinEta', 0)
254 alg.addvariable(
'MaxEta', 25)
255 tm.registerTopoAlgo(alg)
259 alg = AlgConf.ClusterSelect( name =
'EMab', inputs =
'ClusterTobArray', outputs =
'EMab')
260 alg.addgeneric(
'InputWidth', HW.InputWidthEM)
261 alg.addgeneric(
'InputWidth1stStage', HW.InputWidth1stStageSelectEM )
262 alg.addgeneric(
'OutputWidth', HW.OutputWidthSelectEM)
263 alg.addvariable(
'MinET', 5)
264 alg.addvariable(
'IsoMask', 0)
265 alg.addvariable(
'MinEta', 0)
266 alg.addvariable(
'MaxEta', _etamax)
267 alg.addgeneric(
'DoIsoCut', 0)
268 tm.registerTopoAlgo(alg)
272 alg = AlgConf.ClusterNoSort( name =
'TAUall', inputs =
'ClusterTobArray', outputs =
'TAUall')
273 alg.addgeneric(
'InputWidth', HW.InputWidthTAU)
274 alg.addgeneric(
'OutputWidth', HW.InputWidthTAU)
275 alg.addvariable(
'IsoMask', 0)
276 tm.registerTopoAlgo(alg)
287 {
"algoname":
'INVM_AJ_HighMass',
"Threlist": [ 900, 800, 700, 500 ],
"maxInvm": 9999,
"otype" :
"AJ",
"ocut1" : 30,
"olist" :
"s",
288 "nleading1" : 6,
"inputwidth1": HW.OutputWidthSortJET,
"ocut2" : 20,
"nleading2" : 6},
289 {
"algoname":
'INVM_AJ_LowMass',
"Threlist": [ 400, 300, 200, 100 ],
"maxInvm": 9999,
"otype" :
"AJ",
"ocut1" : 30,
"olist" :
"s",
290 "nleading1" : 6,
"inputwidth1": HW.OutputWidthSortJET,
"ocut2" : 20,
"nleading2" : 6}
297 inputList = d.otype + d.olist
299 for minInvm
in d.Threlist:
300 toponame =
"%iINVM%i-%s%s%s%s-%s%s%s%s" % (minInvm, d.maxInvm,
301 d.otype,
str(d.ocut1) , d.olist,
str(d.nleading1)
if d.olist==
"s" else "",
302 d.otype,
str(d.ocut2) , d.olist,
str(d.nleading2)
if d.olist==
"s" else "")
303 toponames.append(toponame)
304 alg = AlgConf.InvariantMassInclusive1( name = d.algoname, inputs = inputList, outputs = toponames)
305 alg.addgeneric(
'InputWidth', d.inputwidth1)
306 alg.addgeneric(
'MaxTob', d.nleading1)
307 alg.addgeneric(
'NumResultBits', len(toponames))
308 for bitid, minInvm
in enumerate(d.Threlist):
309 alg.addvariable(
'MinET1', d.ocut1, bitid)
310 alg.addvariable(
'MinET2', d.ocut2, bitid)
311 alg.addvariable(
'MinMSqr', minInvm * minInvm, bitid)
312 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm, bitid)
313 tm.registerTopoAlgo(alg)
318 {
"minInvm": 2,
"maxInvm": 8,
"mult": 2,
"otype1" :
"MU",
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2" : 0,
"onebarrel": 0},
319 {
"minInvm": 2,
"maxInvm": 9,
"mult": 2,
"otype1" :
"MU",
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2" : 0,
"onebarrel": 0},
320 {
"minInvm": 8,
"maxInvm": 15,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2" : 4,
"onebarrel": 0},
321 {
"minInvm": 2,
"maxInvm": 8,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2" : 4,
"onebarrel": 0},
322 {
"minInvm": 2,
"maxInvm": 9,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2" : 4,
"onebarrel": 0},
323 {
"minInvm": 8,
"maxInvm": 15,
"mult": 2,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"",
"ocut2" : 0,
"onebarrel": 0},
324 {
"minInvm": 2,
"maxInvm": 9,
"mult": 2,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"",
"ocut2" : 0,
"onebarrel": 0},
325 {
"minInvm": 7,
"maxInvm": 15,
"mult": 2,
"otype1" :
"MU",
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2" : 0,
"onebarrel": 0},
327 for x
in listofalgos:
332 obj1 =
"%s%s%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1,
str(d.ocut1), d.olist)
333 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist)
334 toponame =
"%iINVM%i-%s%s%s" % (d.minInvm, d.maxInvm,
"ONEBARREL-" if d.onebarrel==1
else "", obj1,
"" if d.mult>1
else obj2)
335 log.debug(
"Define %s", toponame)
336 inputList = [d.otype1 + d.olist]
if (d.mult>1
or d.otype1==d.otype2)
else [d.otype1 + d.olist, d.otype2 + d.olist]
337 algoname = AlgConf.InvariantMassInclusive1
if (d.mult>1
or d.otype1==d.otype2)
else AlgConf.InvariantMassInclusive2
338 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
339 if (d.mult>1
or d.otype1==d.otype2):
340 alg.addgeneric(
'InputWidth', HW.OutputWidthSelectMU)
341 alg.addgeneric(
'MaxTob', HW.OutputWidthSelectMU)
342 alg.addgeneric(
'RequireOneBarrel', d.onebarrel)
344 alg.addgeneric(
'InputWidth1', HW.OutputWidthSelectMU)
345 alg.addgeneric(
'InputWidth2', HW.OutputWidthSelectMU)
346 alg.addgeneric(
'MaxTob1', HW.OutputWidthSelectMU)
347 alg.addgeneric(
'MaxTob2', HW.OutputWidthSelectMU)
348 alg.addgeneric(
'NumResultBits', 1)
349 alg.addvariable(
'MinET1', d.ocut1)
350 alg.addvariable(
'MinET2', d.ocut2
if d.ocut2>0
else d.ocut1)
351 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm)
352 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm)
353 tm.registerTopoAlgo(alg)
358 {
"minDr": 2,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU" ,
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 4,
"onebarrel": 0},
359 {
"minDr": 0,
"maxDr": 10,
"mult": 1,
"otype1" :
"MU" ,
"ocut1": 10,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2": 6,
"onebarrel": 0},
360 {
"minDr": 2,
"maxDr": 15,
"mult": 2,
"otype1" :
"MU" ,
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 6,
"onebarrel": 0},
361 {
"minDr": 0,
"maxDr": 15,
"mult": 2,
"otype1" :
"MU" ,
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 4,
"onebarrel": 0},
362 {
"minDr": 0,
"maxDr": 15,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2": 4,
"onebarrel": 0},
363 {
"minDr": 0,
"maxDr": 34,
"mult": 2,
"otype1" :
"MU" ,
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 4,
"onebarrel": 0},
364 {
"minDr": 0,
"maxDr": 24,
"mult": 2,
"otype1" :
"MU" ,
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 4,
"onebarrel": 0},
365 {
"minDr": 0,
"maxDr": 22,
"mult": 2,
"otype1" :
"MU" ,
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 6,
"onebarrel": 0},
366 {
"minDr": 0,
"maxDr": 22,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2": 4,
"onebarrel": 0},
367 {
"minDr": 0,
"maxDr": 15,
"mult": 2,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 6,
"onebarrel": 0},
369 for x
in listofalgos:
374 obj1 =
"%s%s%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1,
str(d.ocut1), d.olist)
375 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist)
376 toponame =
"%iDR%i-%s%s%s" % (d.minDr, d.maxDr,
"ONEBARREL-" if d.onebarrel==1
else "", obj1,
"" if d.mult>1
else obj2)
377 log.debug(
"Define %s", toponame)
378 inputList = [d.otype1 + d.olist]
if (d.mult>1
or d.otype1==d.otype2)
else [d.otype1 + d.olist, d.otype2 + d.olist]
379 algoname = AlgConf.DeltaRSqrIncl1
if (d.mult>1
or d.otype1==d.otype2)
else AlgConf.DeltaRSqrIncl2
380 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
381 if (d.mult>1
or d.otype1==d.otype2):
382 alg.addgeneric(
'InputWidth', HW.OutputWidthSelectMU)
383 alg.addgeneric(
'MaxTob', HW.OutputWidthSelectMU)
384 alg.addgeneric(
'RequireOneBarrel', d.onebarrel)
386 alg.addgeneric(
'InputWidth1', HW.OutputWidthSelectMU)
387 alg.addgeneric(
'InputWidth2', HW.OutputWidthSelectMU)
388 alg.addgeneric(
'MaxTob1', HW.OutputWidthSelectMU)
389 alg.addgeneric(
'MaxTob2', HW.OutputWidthSelectMU)
390 alg.addgeneric(
'NumResultBits', 1)
391 alg.addvariable(
'MinET1', d.ocut1)
392 alg.addvariable(
'MinET2', d.ocut2)
393 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr)
394 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr)
395 tm.registerTopoAlgo(alg)
400 {
"minDeta": 5,
"maxDeta": 99,
"minDphi": 5,
"maxDphi": 99,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist1" :
"ab",
"nleading1": HW.OutputWidthSelectMU,
401 "otype2" :
"MU",
"ocut2": 4,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectMU},
402 {
"minDeta": 5,
"maxDeta": 99,
"minDphi": 5,
"maxDphi": 99,
"mult": 2,
"otype1" :
"MU",
"ocut1": 6,
"olist1" :
"ab",
"nleading1": HW.OutputWidthSelectMU,
403 "otype2" :
"",
"ocut2": 6,
"olist2":
"",
"nleading2": HW.OutputWidthSelectMU},
410 obj1 =
"%s%s%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1,
str(d.ocut1), d.olist1)
411 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2)
if d.ocut2>0
else "", d.olist2)
412 toponame =
"%sDETA%s-%sDPHI%s-%s%s" % (d.minDeta, d.maxDeta, d.minDphi, d.maxDphi, obj1,
"" if d.mult>1
else obj2)
413 log.debug(
"Define %s", toponame)
414 inputList = [d.otype1 + d.olist1]
if (d.mult>1
or d.otype1==d.otype2)
else [d.otype1 + d.olist1, d.otype2 + d.olist2]
415 algoname = AlgConf.DeltaEtaPhiIncl1
if (d.mult>1
or d.otype1==d.otype2)
else AlgConf.DeltaEtaPhiIncl2
416 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
417 alg.addgeneric(
'NumResultBits', 1)
418 if (d.mult>1
or d.otype1==d.otype2):
419 alg.addgeneric(
'InputWidth', d.nleading1)
420 alg.addgeneric(
'MaxTob', d.nleading1)
421 alg.addvariable(
'MinET1', d.ocut1)
422 alg.addvariable(
'MinET2', d.ocut2)
423 alg.addvariable(
'MinDeltaEta', d.minDeta)
424 alg.addvariable(
'MaxDeltaEta', d.maxDeta)
425 alg.addvariable(
'MinDeltaPhi', d.minDphi)
426 alg.addvariable(
'MaxDeltaPhi', d.maxDphi)
428 alg.addgeneric(
'InputWidth1', d.nleading1)
429 alg.addgeneric(
'InputWidth2', d.nleading2)
430 alg.addgeneric(
'MaxTob1', d.nleading1)
431 alg.addgeneric(
'MaxTob2', d.nleading2)
432 alg.addvariable(
'DeltaEtaMin', d.minDeta)
433 alg.addvariable(
'DeltaEtaMax', d.maxDeta)
434 alg.addvariable(
'DeltaPhiMin', d.minDphi)
435 alg.addvariable(
'DeltaPhiMax', d.maxDphi)
436 alg.addvariable(
'MinET1', d.ocut1)
437 alg.addvariable(
'MinET2', d.ocut2)
438 tm.registerTopoAlgo(alg)
442 {
"minDr": 0,
"maxDr": 28,
"otype1" :
"MU" ,
"ocut1": 10,
"olist1" :
"ab",
"nleading1": HW.OutputWidthSelectMU,
"inputwidth1": HW.OutputWidthSelectMU,
443 "otype2" :
"TAU",
"ocut2": 12,
"olist2" :
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU},
444 {
"minDr": 0,
"maxDr": 28,
"otype1" :
"TAU" ,
"ocut1": 20,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectTAU,
"inputwidth1": HW.OutputWidthSelectTAU,
445 "otype2" :
"TAU",
"ocut2": 12,
"olist2" :
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU},
446 {
"minDr": 0,
"maxDr": 25,
"otype1" :
"TAU" ,
"ocut1": 20,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectTAU,
"inputwidth1": HW.OutputWidthSelectTAU,
447 "otype2" :
"TAU",
"ocut2": 12,
"olist2" :
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU},
454 obj1 =
"%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
455 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
456 toponame =
"%iDR%i-%s%s" % (d.minDr, d.maxDr, obj1, obj2)
457 log.debug(
"Define %s", toponame)
458 inputList = [d.otype1 + d.olist1]
if d.otype1==d.otype2
else [d.otype1 + d.olist1, d.otype2 + d.olist2]
459 algoname = AlgConf.DeltaRSqrIncl1
if d.otype1==d.otype2
else AlgConf.DeltaRSqrIncl2
460 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
461 if d.otype1==d.otype2:
462 alg.addgeneric(
'InputWidth', d.inputwidth1)
463 alg.addgeneric(
'MaxTob', d.nleading1)
465 alg.addgeneric(
'InputWidth1', d.inputwidth1)
466 alg.addgeneric(
'InputWidth2', d.inputwidth2)
467 alg.addgeneric(
'MaxTob1', d.nleading1)
468 alg.addgeneric(
'MaxTob2', d.nleading2)
469 alg.addgeneric(
'NumResultBits', 1)
470 if d.otype1==d.otype2:
471 alg.addvariable(
'MinET1', d.ocut1)
472 alg.addvariable(
'MinET2', d.ocut2)
473 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr)
474 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr)
476 alg.addvariable(
'MinET1', d.ocut1, 0)
477 alg.addvariable(
'MinET2', d.ocut2, 0)
478 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr, 0)
479 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr, 0)
480 tm.registerTopoAlgo(alg)
485 {
"minHT": 150,
"otype" :
"J",
"ocut" : 20,
"olist" :
"s",
"nleading" : 5,
"inputwidth": HW.OutputWidthSortJET,
"oeta" : 31},
486 {
"minHT": 190,
"otype" :
"J",
"ocut" : 15,
"olist" :
"s",
"nleading" : 5,
"inputwidth": HW.OutputWidthSortJET,
"oeta" : 21},
487 {
"minHT": 190,
"otype" :
"AJ",
"ocut" : 15,
"olist" :
"all",
"nleading" : HW.InputWidthJET,
"inputwidth": HW.InputWidthJET,
"oeta" : 21},
488 {
"minHT": 150,
"otype" :
"AJ",
"ocut" : 20,
"olist" :
"all",
"nleading" : HW.InputWidthJET,
"inputwidth": HW.InputWidthJET,
"oeta" : 31},
489 {
"minHT": 150,
"otype" :
"AJj",
"ocut" : 15,
"olist" :
"all",
"nleading" : HW.InputWidthJET,
"inputwidth": HW.InputWidthJET,
"oeta" : 49},
490 {
"minHT": 20,
"otype" :
"AJj",
"ocut" : 15,
"olist" :
"all",
"nleading" : HW.InputWidthJET,
"inputwidth": HW.InputWidthJET,
"oeta" : 49},
497 toponame =
"HT%d-%s%s%s%spETA%s" % (d.minHT, d.otype,
str(d.ocut), d.olist,
str(d.nleading)
if d.olist==
"s" else "",
str(d.oeta))
498 log.debug(
"Define %s", toponame)
499 inputList = d.otype + d.olist
500 alg = AlgConf.JetHT( name = toponame, inputs = inputList, outputs = [toponame])
501 alg.addgeneric(
'InputWidth', d.inputwidth)
502 alg.addgeneric(
'MaxTob', d.nleading)
503 alg.addgeneric(
'NumRegisters', 2
if d.olist==
"all" else 0)
504 alg.addgeneric(
'NumResultBits', 1)
505 alg.addvariable(
'MinET', d.ocut)
506 alg.addvariable(
'MinEta', 0)
507 alg.addvariable(
'MaxEta', d.oeta)
508 alg.addvariable(
'MinHt', d.minHT)
509 tm.registerTopoAlgo(alg)
514 {
"algoname":
'INVM_EMs6' ,
"ocutlist": [ 0, 7, 12 ],
"minInvm": 1,
"maxInvm": 5,
"otype" :
"EM",
"olist" :
"s",
"nleading" : 1,
"inputwidth": HW.OutputWidthSortEM}
521 inputList = d.otype + d.olist
523 for ocut
in d.ocutlist:
524 toponame =
"%iINVM%i-%s%s%s%s-EMs6" % (d.minInvm, d.maxInvm, d.otype,
str(ocut)
if ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
525 toponames.append(toponame)
526 alg = AlgConf.InvariantMassInclusive2( name = d.algoname, inputs = [inputList,
'EMs'], outputs = toponames)
527 alg.addgeneric(
'InputWidth1', d.inputwidth)
529 alg.addgeneric(
'InputWidth2', HW.OutputWidthSortEM)
530 alg.addgeneric(
'MaxTob1', d.nleading)
532 alg.addgeneric(
'MaxTob2', HW.OutputWidthSortEM)
533 alg.addgeneric(
'NumResultBits', len(toponames))
534 for bitid, ocut
in enumerate(d.ocutlist):
535 alg.addvariable(
'MinET1', ocut, bitid)
536 alg.addvariable(
'MinET2', 0, bitid)
537 alg.addvariable(
'MinMSqr', (d.minInvm * _emscale_for_decision)*(d.minInvm * _emscale_for_decision), bitid)
538 alg.addvariable(
'MaxMSqr', (d.maxInvm * _emscale_for_decision)*(d.maxInvm * _emscale_for_decision), bitid)
539 tm.registerTopoAlgo(alg)
544 {
"minDPhi": 5,
"otype" :
"AJj",
"ocut" : 10,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortJET},
545 {
"minDPhi": 10,
"otype" :
"AJj",
"ocut" : 10,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortJET},
546 {
"minDPhi": 15,
"otype" :
"AJj",
"ocut" : 10,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortJET},
547 {
"minDPhi": 5,
"otype" :
"EM",
"ocut" : 12,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
548 {
"minDPhi": 5,
"otype" :
"EM",
"ocut" : 15,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
555 toponame =
"%02dMINDPHI-%s%s%s%s-XE0" % (d.minDPhi, d.otype,
str(d.ocut)
if d.ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
556 log.debug(
"Define %s", toponame)
557 inputList = d.otype + d.olist
558 alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [ inputList,
'XE'], outputs = [ toponame ])
559 alg.addgeneric(
'InputWidth1', d.inputwidth)
560 alg.addgeneric(
'InputWidth2', 1)
561 alg.addgeneric(
'MaxTob1', d.nleading)
562 alg.addgeneric(
'MaxTob2', 1)
563 alg.addgeneric(
'NumResultBits', 1)
564 alg.addvariable(
'MinET1', d.ocut)
565 alg.addvariable(
'MinET2', 0)
566 alg.addvariable(
'DeltaPhiMin', d.minDPhi, 0)
567 tm.registerTopoAlgo(alg)
572 {
"minMT": 25,
"otype" :
"EM",
"ocut" : 12,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
573 {
"minMT": 35,
"otype" :
"EM",
"ocut" : 15,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
580 toponame =
"%iMT-%s%s%s%s-XE0" % (d.minMT, d.otype,
str(d.ocut)
if d.ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
581 log.debug(
"Define %s", toponame)
582 inputList = d.otype + d.olist
583 alg = AlgConf.TransverseMassInclusive1( name = toponame, inputs = [ inputList,
'XE'], outputs = [ toponame ])
584 alg.addgeneric(
'InputWidth', HW.OutputWidthSortEM)
585 alg.addgeneric(
'MaxTob', d.nleading)
586 alg.addgeneric(
'NumResultBits', 1)
587 alg.addvariable(
'MinET1',
str(d.ocut))
588 alg.addvariable(
'MinET2', 0)
589 alg.addvariable(
'MinMTSqr', d.minMT*d.minMT)
590 tm.registerTopoAlgo(alg)
595 {
"minDeta": 63,
"maxDeta": 127,
"otype" :
"FJ",
"ocut1" : 20,
"olist" :
"s",
"nleading1" : 1,
"inputwidth1": HW.OutputWidthSortJET,
596 "ocut2" : 20,
"nleading2": 2},
597 {
"minDeta": 0,
"maxDeta": 20,
"otype" :
"J",
"ocut1" : 50,
"olist" :
"s",
"nleading1" : 1,
"inputwidth1": HW.OutputWidthSortJET,
598 "ocut2" : 0,
"nleading2": 2},
605 toponame =
"%iDETA%i-%s%s%s%s-%s%s%s%s" % (d.minDeta, d.maxDeta,
606 d.otype,
str(d.ocut1)
if d.ocut1 > 0
else "", d.olist,
str(d.nleading1)
if d.olist==
"s" else "",
607 d.otype,
str(d.ocut2)
if d.ocut2 > 0
else "", d.olist,
str(d.nleading2)
if d.olist==
"s" else "")
608 log.debug(
"Define %s", toponame)
609 inputList = d.otype + d.olist
610 alg = AlgConf.DeltaEtaIncl1( name = toponame, inputs = inputList, outputs = toponame)
611 alg.addgeneric(
'InputWidth', d.inputwidth1)
612 alg.addgeneric(
'MaxTob', d.nleading2)
613 alg.addgeneric(
'NumResultBits', 1)
614 alg.addvariable(
'MinET1',
str(d.ocut1), 0)
615 alg.addvariable(
'MinET2',
str(d.ocut2), 0)
616 alg.addvariable(
'MinDeltaEta', d.minDeta, 0)
617 alg.addvariable(
'MaxDeltaEta', d.maxDeta, 0)
618 tm.registerTopoAlgo(alg)
622 supportedalgolist = [
623 {
"minDPhi": 10,
"otype" :
"J",
"ocut" : 20,
"olist" :
"s",
"nleading" : 2,
"inputwidth": HW.OutputWidthSortJET,
"ocut2": 50 },
624 {
"minDPhi": 10,
"otype" :
"J",
"ocut" : 20,
"olist" :
"ab",
"nleading" : HW.OutputWidthSelectJET,
"inputwidth": HW.OutputWidthSelectJET,
"ocut2": 50},
625 {
"minDPhi": 10,
"otype" :
"CJ",
"ocut" : 20,
"olist" :
"ab",
"nleading" : HW.OutputWidthSelectJET,
"inputwidth": HW.OutputWidthSelectJET,
"ocut2": 50},
626 {
"minDPhi": 10,
"otype" :
"J",
"ocut" : 20,
"olist" :
"s",
"nleading" : 2,
"inputwidth": HW.OutputWidthSortJET,
"ocut2": 30 },
628 for x
in supportedalgolist:
633 toponame =
"%iMINDPHI-%s%s%s%s-XE%i" % (d.minDPhi, d.otype,
str(d.ocut)
if d.ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "",d.ocut2)
634 log.debug(
"Define %s", toponame)
635 inputList = d.otype + d.olist
636 alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [inputList,
'XE'], outputs = [ toponame ])
637 alg.addgeneric(
'InputWidth1', d.inputwidth)
638 alg.addgeneric(
'InputWidth2', 1)
639 alg.addgeneric(
'MaxTob1', d.nleading)
640 alg.addgeneric(
'MaxTob2', 1)
641 alg.addgeneric(
'NumResultBits', 1)
642 alg.addvariable(
'MinET1', d.ocut)
643 alg.addvariable(
'MinET2', d.ocut2)
644 alg.addvariable(
'DeltaPhiMin', d.minDPhi, 0)
645 tm.registerTopoAlgo(alg)
650 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU" ,
"ocut1": 4,
"olist1" :
"ab",
"otype2" :
"CJ",
"ocut2": 15,
"olist2" :
"ab"},
651 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU" ,
"ocut1": 4,
"olist1" :
"ab",
"otype2" :
"CJ",
"ocut2": 30,
"olist2" :
"ab"},
652 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU" ,
"ocut1": 6,
"olist1" :
"ab",
"otype2" :
"CJ",
"ocut2": 20,
"olist2" :
"ab"},
653 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU" ,
"ocut1": 6,
"olist1" :
"ab",
"otype2" :
"CJ",
"ocut2": 25,
"olist2" :
"ab"},
654 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU" ,
"ocut1": 4,
"olist1" :
"ab",
"otype2" :
"CJ",
"ocut2": 20,
"olist2" :
"ab"},
661 toponame =
"%iDR%02d-%s%s%s-%s%s%s" % (d.minDr, d.maxDr, d.otype1,
str(d.ocut1), d.olist1, d.otype2,
str(d.ocut2), d.olist2)
662 log.debug(
"Define %s", toponame)
663 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
664 alg = AlgConf.DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
665 alg.addgeneric(
'InputWidth1', HW.OutputWidthSelectMU)
666 alg.addgeneric(
'InputWidth2', HW.OutputWidthSelectJET)
667 alg.addgeneric(
'MaxTob1', HW.OutputWidthSelectMU)
668 alg.addgeneric(
'MaxTob2', HW.OutputWidthSelectJET)
669 alg.addgeneric(
'NumResultBits', 1)
670 alg.addvariable(
'MinET1', d.ocut1, 0)
671 alg.addvariable(
'MinET2', d.ocut2, 0)
672 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr, 0)
673 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr, 0)
674 tm.registerTopoAlgo(alg)
679 {
"minInvm": 2,
"maxInvm": 8,
"mult": 1,
"otype1" :
"CMU",
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2" : 4,
"onebarrel": 0},
680 {
"minInvm": 2,
"maxInvm": 8,
"mult": 1,
"otype1" :
"MU",
"ocut1": 6,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2" : 4,
"onebarrel": 1},
687 obj1 =
"%s%s%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1,
str(d.ocut1), d.olist)
688 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist)
689 toponame =
"%iINVM%i-%s%s%s" % (d.minInvm, d.maxInvm,
"ONEBARREL-" if d.onebarrel==1
else "", obj1,
"" if d.mult>1
else obj2)
690 log.debug(
"Define %s", toponame)
691 inputList = [d.otype1 + d.olist]
if (d.mult>1
or d.otype1==d.otype2)
else [d.otype1 + d.olist, d.otype2 + d.olist]
692 algoname = AlgConf.InvariantMassInclusive1
if (d.mult>1
or d.otype1==d.otype2)
else AlgConf.InvariantMassInclusive2
693 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
694 if (d.mult>1
or d.otype1==d.otype2):
695 alg.addgeneric(
'InputWidth', HW.OutputWidthSelectMU)
696 alg.addgeneric(
'MaxTob', HW.OutputWidthSelectMU)
697 alg.addgeneric(
'RequireOneBarrel', d.onebarrel)
699 alg.addgeneric(
'InputWidth1', HW.OutputWidthSelectMU)
700 alg.addgeneric(
'InputWidth2', HW.OutputWidthSelectMU)
701 alg.addgeneric(
'MaxTob1', HW.OutputWidthSelectMU)
702 alg.addgeneric(
'MaxTob2', HW.OutputWidthSelectMU)
703 alg.addgeneric(
'NumResultBits', 1)
704 alg.addvariable(
'MinET1', d.ocut1)
705 alg.addvariable(
'MinET2', d.ocut2
if d.ocut2>0
else d.ocut1)
706 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm)
707 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm)
708 tm.registerTopoAlgo(alg)
713 {
"minDr": 0,
"maxDr": 24,
"mult": 2,
"otype1" :
"CMU",
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"",
"ocut2": 4,
"onebarrel": 0},
714 {
"minDr": 0,
"maxDr": 24,
"mult": 1,
"otype1" :
"CMU",
"ocut1": 4,
"olist" :
"ab",
"otype2" :
"MU",
"ocut2": 4,
"onebarrel": 0},
721 obj1 =
"%s%s%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1,
str(d.ocut1), d.olist)
722 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist)
723 toponame =
"%iDR%i-%s%s%s" % (d.minDr, d.maxDr,
"ONEBARREL-" if d.onebarrel==1
else "", obj1,
"" if d.mult>1
else obj2)
724 log.debug(
"Define %s", toponame)
725 inputList = [d.otype1 + d.olist]
if (d.mult>1
or d.otype1==d.otype2)
else [d.otype1 + d.olist, d.otype2 + d.olist]
726 algoname = AlgConf.DeltaRSqrIncl1
if (d.mult>1
or d.otype1==d.otype2)
else AlgConf.DeltaRSqrIncl2
727 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
728 if (d.mult>1
or d.otype1==d.otype2):
729 alg.addgeneric(
'InputWidth', HW.OutputWidthSelectMU)
730 alg.addgeneric(
'MaxTob', HW.OutputWidthSelectMU)
731 alg.addgeneric(
'RequireOneBarrel', d.onebarrel)
733 alg.addgeneric(
'InputWidth1', HW.OutputWidthSelectMU)
734 alg.addgeneric(
'InputWidth2', HW.OutputWidthSelectMU)
735 alg.addgeneric(
'MaxTob1', HW.OutputWidthSelectMU)
736 alg.addgeneric(
'MaxTob2', HW.OutputWidthSelectMU)
737 alg.addgeneric(
'NumResultBits', 1)
738 alg.addvariable(
'MinET1', d.ocut1)
739 alg.addvariable(
'MinET2', d.ocut2)
740 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr)
741 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr)
742 tm.registerTopoAlgo(alg)
747 {
"minDeta": 0,
"maxDeta": 20,
"minDphi": 0,
"maxDphi": 20,
"mult": 1,
"otype1" :
"TAU",
"ocut1": 20,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectTAU,
748 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU },
755 obj1 =
"%s%s%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1,
str(d.ocut1), d.olist1)
756 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2)
if d.ocut2>0
else "", d.olist2)
757 toponame =
"%sDETA%s-%sDPHI%s-%s%s" % (d.minDeta, d.maxDeta, d.minDphi, d.maxDphi, obj1,
"" if d.mult>1
else obj2)
758 log.debug(
"Define %s", toponame)
759 inputList = [d.otype1 + d.olist1]
if (d.mult>1
or d.otype1==d.otype2)
else [d.otype1 + d.olist1, d.otype2 + d.olist2]
760 algoname = AlgConf.DeltaEtaPhiIncl1
if (d.mult>1
or d.otype1==d.otype2)
else AlgConf.DeltaEtaPhiIncl2
761 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
762 alg.addgeneric(
'NumResultBits', 1)
763 if (d.mult>1
or d.otype1==d.otype2):
764 alg.addgeneric(
'InputWidth', d.nleading1)
765 alg.addgeneric(
'MaxTob', d.nleading1)
766 alg.addvariable(
'MinET1', d.ocut1, 0)
767 alg.addvariable(
'MinET2', d.ocut2, 0)
768 alg.addvariable(
'MinDeltaEta', d.minDeta, 0)
769 alg.addvariable(
'MaxDeltaEta', d.maxDeta, 0)
770 alg.addvariable(
'MinDeltaPhi', d.minDphi, 0)
771 alg.addvariable(
'MaxDeltaPhi', d.maxDphi, 0)
773 alg.addgeneric(
'InputWidth1', d.nleading1)
774 alg.addgeneric(
'InputWidth2', d.nleading2)
775 alg.addgeneric(
'MaxTob1', d.nleading1)
776 alg.addgeneric(
'MaxTob2', d.nleading2)
777 alg.addvariable(
'MinET1', d.ocut1, 0)
778 alg.addvariable(
'MinET2', d.ocut2, 0)
779 alg.addvariable(
'DeltaEtaMin', d.minDeta, 0)
780 alg.addvariable(
'DeltaEtaMax', d.maxDeta, 0)
781 alg.addvariable(
'DeltaPhiMin', d.minDphi, 0)
782 alg.addvariable(
'DeltaPhiMax', d.maxDphi, 0)
783 tm.registerTopoAlgo(alg)
788 {
"minDeta": 0,
"maxDeta":
"04",
"mult": 1,
"otype1" :
"EM",
"ocut1": 8,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectEM,
789 "otype2" :
"MU",
"ocut2": 10,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectMU},
790 {
"minDeta": 0,
"maxDeta":
"04",
"mult": 1,
"otype1" :
"EM",
"ocut1": 15,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectEM,
791 "otype2" :
"MU",
"ocut2": 0,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectMU},
798 toponame =
"%sDETA%s-%s%s%s-%s%s%s" % (d.minDeta, d.maxDeta, d.otype1,
str(d.ocut1), d.olist1, d.otype2,
str(d.ocut2)
if d.ocut2>0
else "", d.olist2)
799 log.debug(
"Define %s", toponame)
800 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
801 alg = AlgConf.DeltaEtaIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
802 alg.addgeneric(
'NumResultBits', 1)
803 alg.addgeneric(
'InputWidth1', d.nleading1)
804 alg.addgeneric(
'InputWidth2', d.nleading2)
805 alg.addgeneric(
'MaxTob1', d.nleading1)
806 alg.addgeneric(
'MaxTob2', d.nleading2)
807 alg.addvariable(
'MinET1', d.ocut1, 0)
808 alg.addvariable(
'MinET2', d.ocut2, 0)
809 alg.addvariable(
'MinDeltaEta', d.minDeta, 0)
810 alg.addvariable(
'MaxDeltaEta', d.maxDeta, 0)
811 tm.registerTopoAlgo(alg)
815 {
"minDphi": 0,
"maxDphi":
"03",
"mult": 1,
"otype1" :
"EM",
"ocut1": 8,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectEM,
816 "otype2" :
"MU",
"ocut2": 10,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectMU},
817 {
"minDphi": 0,
"maxDphi":
"03",
"mult": 1,
"otype1" :
"EM",
"ocut1": 15,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectEM,
818 "otype2" :
"MU",
"ocut2": 0,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectMU},
825 toponame =
"%sDPHI%s-%s%s%s-%s%s%s" % (d.minDphi, d.maxDphi, d.otype1,
str(d.ocut1), d.olist1, d.otype2,
str(d.ocut2)
if d.ocut2>0
else "", d.olist2)
826 log.debug(
"Define %s", toponame)
827 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
828 alg = AlgConf.DeltaPhiIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
829 alg.addgeneric(
'NumResultBits', 1)
830 alg.addgeneric(
'InputWidth1', d.nleading1)
831 alg.addgeneric(
'InputWidth2', d.nleading2)
832 alg.addgeneric(
'MaxTob1', d.nleading1)
833 alg.addgeneric(
'MaxTob2', d.nleading2)
834 alg.addvariable(
'MinET1', d.ocut1, 0)
835 alg.addvariable(
'MinET2', d.ocut2, 0)
836 alg.addvariable(
'MinDeltaPhi', d.minDphi, 0)
837 alg.addvariable(
'MaxDeltaPhi', d.maxDphi, 0)
838 tm.registerTopoAlgo(alg)
841 toponame =
"0MATCH-4AJ20pETA31-4AJj15pETA31"
842 alg = AlgConf.MultiplicityCustom( name = toponame, inputs = [
'AJMatchall' ], outputs = [ toponame ])
843 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
844 alg.addgeneric(
'NumResultBits', 1)
845 alg.addvariable(
'MinET', 0)
846 alg.addvariable(
'MinEta', 0)
847 alg.addvariable(
'MaxEta', 31)
848 alg.addvariable(
'MinMultiplicity', 4)
849 tm.registerTopoAlgo(alg)
853 toponame =
"NOT-02MATCH-EM10s1-AJj15allpETA49"
854 alg = AlgConf.NotMatch( name = toponame, inputs = [
'EMs',
'AJjall'], outputs = [ toponame ])
855 alg.addgeneric(
'InputWidth1', HW.OutputWidthSortEM)
856 alg.addgeneric(
'InputWidth2', HW.InputWidthJET)
857 alg.addgeneric(
'MaxTob1', 1)
858 alg.addgeneric(
'MaxTob2', HW.InputWidthJET)
859 alg.addgeneric(
'NumResultBits', 1)
860 alg.addvariable(
'MinET1', 10)
861 alg.addvariable(
'MinET2', 15)
862 alg.addvariable(
'EtaMin1', 0)
863 alg.addvariable(
'EtaMax1', 49)
864 alg.addvariable(
'EtaMin2', 0)
865 alg.addvariable(
'EtaMax2', 49)
866 alg.addvariable(
'DRCut', 4)
867 tm.registerTopoAlgo(alg)
872 {
"minRatio": 5,
"ocut" : 15,
"Ratio":
"RATIO"},
873 {
"minRatio": 90,
"ocut" : 15,
"Ratio":
"RATIO2"},
874 {
"minRatio": 250,
"ocut" : 15,
"Ratio":
"RATIO2"},
881 toponame =
"%02d%s-XE0-HT0-AJj%sallpETA49" % (d.minRatio, d.Ratio,
str(d.ocut))
882 log.debug(
"Define %s", toponame)
883 alg = AlgConf.Ratio( name = toponame, inputs = [
'XE',
'AJjall'], outputs = [ toponame ])
884 alg.addgeneric(
'InputWidth1', 1)
885 alg.addgeneric(
'InputWidth2', HW.InputWidthJET)
886 alg.addgeneric(
'MaxTob1', 1)
887 alg.addgeneric(
'MaxTob2', HW.InputWidthJET)
888 alg.addgeneric(
'NumResultBits', 1)
889 alg.addgeneric(
'isXE2', 1
if d.Ratio==
"RATIO2" else 0)
890 alg.addvariable(
'MinET2',
str(d.ocut))
891 alg.addvariable(
'EtaMin', 0)
892 alg.addvariable(
'EtaMax', 49)
893 alg.addvariable(
'MinET1', 0)
894 alg.addvariable(
'HT', 0)
895 alg.addvariable(
'Ratio',
str(d.minRatio))
896 tm.registerTopoAlgo(alg)
900 toponame =
'100RATIO-0MATCH-TAU30si2-EMall'
901 alg = AlgConf.RatioMatch( name = toponame, inputs = [
'TAUsi',
'EMall'], outputs = [ toponame ])
902 alg.addgeneric(
'InputWidth1', HW.OutputWidthSortTAU)
903 alg.addgeneric(
'InputWidth2', HW.InputWidthEM)
904 alg.addgeneric(
'MaxTob1', 2)
905 alg.addgeneric(
'MaxTob2', HW.InputWidthEM)
906 alg.addgeneric(
'NumResultBits', 1)
907 alg.addvariable(
'MinET1', 30)
908 alg.addvariable(
'MinET2', 0)
909 alg.addvariable(
'Ratio', 100, 0)
910 tm.registerTopoAlgo(alg)
914 toponame =
'NOT-0MATCH-TAU30si1-EMall'
915 alg = AlgConf.NotMatch( name = toponame, inputs = [
'TAUsi',
'EMall'], outputs = [ toponame ])
916 alg.addgeneric(
'InputWidth1', HW.OutputWidthSortTAU)
917 alg.addgeneric(
'InputWidth2', HW.InputWidthEM)
918 alg.addgeneric(
'MaxTob1', 1)
919 alg.addgeneric(
'MaxTob2', HW.InputWidthEM)
920 alg.addgeneric(
'NumResultBits', 1)
921 alg.addvariable(
'MinET1', 30)
922 alg.addvariable(
'MinET2', 0)
923 alg.addvariable(
'EtaMin1', 0)
924 alg.addvariable(
'EtaMax1', 49)
925 alg.addvariable(
'EtaMin2', 0)
926 alg.addvariable(
'EtaMax2', 49)
927 alg.addvariable(
'DRCut', 0)
928 tm.registerTopoAlgo(alg)
933 {
"otype1" :
"CMU" ,
"ocut1": 4,
"olist1" :
"ab",
"nleading1": HW.OutputWidthSelectMU,
"inputwidth1": HW.OutputWidthSelectMU},
934 {
"otype1" :
"CMU" ,
"ocut1": 6,
"olist1" :
"ab",
"nleading1": HW.OutputWidthSelectMU,
"inputwidth1": HW.OutputWidthSelectMU},
941 toponame =
"MULT-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
942 toponames = [toponame+
"[0]", toponame+
"[1]"]
943 log.debug(
"Define %s", toponames)
944 inputList = [d.otype1 + d.olist1]
945 alg = AlgConf.Multiplicity( name = toponame, inputs = inputList, outputs = toponames)
946 alg.addgeneric(
'InputWidth', d.inputwidth1)
947 alg.addgeneric(
'NumResultBits', 2)
948 alg.addvariable(
'MinET', d.ocut1-1)
949 tm.registerTopoAlgo(alg)
954 {
"disamb": 1,
"otype1" :
"TAU",
"ocut1": 12,
"olist1" :
"abi",
"nleading1": HW.OutputWidthSelectTAU,
955 "otype2" :
"J",
"ocut2": 25,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectJET},
962 obj1 =
"%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
963 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
964 toponame =
"%sDISAMB-%s%s" % ( d.disamb
if d.disamb>0
else "", obj1, obj2)
965 log.debug(
"Define %s", toponame)
966 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
967 alg = AlgConf.DisambiguationIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
968 alg.addgeneric(
'InputWidth1', d.nleading1
if d.olist1.find(
"ab")>=0
else -1000)
969 alg.addgeneric(
'InputWidth2', d.nleading2
if d.olist2.find(
"ab")>=0
else -1000)
970 alg.addgeneric(
'MaxTob1', d.nleading1)
971 alg.addgeneric(
'MaxTob2', d.nleading2)
972 alg.addgeneric(
'NumResultBits', 1)
973 alg.addgeneric(
'ClusterOnly', 1
if (d.otype1==
"EM" and d.otype2==
"TAU")
or (d.otype1==
"TAU" and d.otype2==
"EM")
else 0 )
974 alg.addgeneric(
'ApplyDR', 0)
975 alg.addvariable(
'MinET1', d.ocut1)
976 alg.addvariable(
'MinET2', d.ocut2)
977 alg.addvariable(
'DisambDRSqrMin', d.disamb*d.disamb)
978 tm.registerTopoAlgo(alg)
983 {
"disamb": 1,
"otype1" :
"EM",
"ocut1": 15,
"olist1":
"shi",
"nleading1": 2,
"inputwidth1": HW.OutputWidthSortEM,
984 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU,
985 "otype3" :
"J",
"ocut3": 25,
"olist3":
"ab",
"nleading3": HW.OutputWidthSelectJET,
"inputwidth3": HW.OutputWidthSelectJET},
986 {
"disamb": 1,
"otype1" :
"TAU",
"ocut1": 20,
"olist1":
"abi",
"nleading1": HW.OutputWidthSelectTAU,
"inputwidth1": HW.OutputWidthSelectTAU,
987 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU,
988 "otype3" :
"J",
"ocut3": 25,
"olist3":
"ab",
"nleading3": HW.OutputWidthSelectTAU,
"inputwidth3": HW.OutputWidthSelectJET},
995 obj1 =
"%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1.replace(
'shi',
'his') + (
str(d.nleading1)
if d.olist1.find(
's')>=0
else ""))
996 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2.replace(
'shi',
'his') + (
str(d.nleading2)
if d.olist2.find(
's')>=0
else ""))
997 obj3 =
"-%s%s%s" % (d.otype3,
str(d.ocut3), d.olist3)
998 toponame =
"%sDISAMB-%s%s%s" % ( d.disamb
if d.disamb>0
else "", obj1, obj2, obj3)
999 log.debug(
"Define %s", toponame)
1000 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3]
1001 alg = AlgConf.DisambiguationIncl3( name = toponame, inputs = inputList, outputs = [ toponame ])
1002 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1003 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1004 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1005 alg.addgeneric(
'MaxTob1', d.nleading1)
1006 alg.addgeneric(
'MaxTob2', d.nleading2)
1007 alg.addgeneric(
'MaxTob3', d.nleading3)
1008 alg.addgeneric(
'NumResultBits', 1)
1009 alg.addgeneric(
'ApplyDR', 0)
1010 alg.addvariable(
'MinET1', d.ocut1, 0)
1011 alg.addvariable(
'MinET2', d.ocut2, 0)
1012 alg.addvariable(
'MinET3', d.ocut3, 0)
1013 alg.addvariable(
'DisambDRSqr', d.disamb*d.disamb, 0)
1014 tm.registerTopoAlgo(alg)
1019 {
"disamb": 1,
"otype1" :
"EM",
"ocut1": 15,
"olist1":
"shi",
"nleading1": 2,
"inputwidth1": HW.OutputWidthSortEM,
1020 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU,
1021 "otype3" :
"J",
"ocut3": 25,
"olist3":
"ab",
"nleading3": HW.OutputWidthSelectJET,
"inputwidth3": HW.OutputWidthSelectJET,
1022 "drcutmin": 0,
"drcutmax": 28},
1023 {
"disamb": 1,
"otype1" :
"TAU",
"ocut1": 20,
"olist1":
"abi",
"nleading1": HW.OutputWidthSelectTAU,
"inputwidth1": HW.OutputWidthSelectTAU,
1024 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU,
1025 "otype3" :
"J",
"ocut3": 25,
"olist3":
"ab",
"nleading3": HW.OutputWidthSelectJET,
"inputwidth3": HW.OutputWidthSelectJET,
1026 "drcutmin": 0,
"drcutmax": 28},
1027 {
"disamb": 1,
"otype1" :
"TAU",
"ocut1": 20,
"olist1":
"abi",
"nleading1": HW.OutputWidthSelectTAU,
"inputwidth1": HW.OutputWidthSelectTAU,
1028 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU,
1029 "otype3" :
"J",
"ocut3": 25,
"olist3":
"ab",
"nleading3": HW.OutputWidthSelectJET,
"inputwidth3": HW.OutputWidthSelectJET,
1030 "drcutmin": 0,
"drcutmax": 25},
1036 setattr (d, k, x[k])
1037 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1.replace(
'shi',
'his') + (
str(d.nleading1)
if d.olist1.find(
's')>=0
else ""))
1038 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2.replace(
'shi',
'his') + (
str(d.nleading2)
if d.olist2.find(
's')>=0
else ""))
1039 obj3 =
"%s%s%s" % (d.otype3,
str(d.ocut3), d.olist3)
1040 toponame =
"%sDISAMB-%s-%dDR%d%s%s" % (
str(d.disamb)
if d.disamb>0
else "", obj3, d.drcutmin, d.drcutmax, obj1, obj2)
1041 log.debug(
"Define %s", toponame)
1042 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3]
1043 alg = AlgConf.DisambiguationDRIncl3( name = toponame, inputs = inputList, outputs = [ toponame ])
1044 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1045 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1046 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1047 alg.addgeneric(
'MaxTob1', d.nleading1)
1048 alg.addgeneric(
'MaxTob2', d.nleading2)
1049 alg.addgeneric(
'MaxTob3', d.nleading3)
1050 alg.addgeneric(
'NumResultBits', 1)
1051 alg.addvariable(
'MinET1', d.ocut1, 0)
1052 alg.addvariable(
'MinET2', d.ocut2, 0)
1053 alg.addvariable(
'MinET3', d.ocut3, 0)
1054 alg.addvariable(
'DisambDRSqrMin', d.drcutmin*d.drcutmin, 0)
1055 alg.addvariable(
'DisambDRSqrMax', d.drcutmax*d.drcutmax, 0)
1056 alg.addvariable(
'DisambDRSqr', d.disamb*d.disamb, 0)
1057 tm.registerTopoAlgo(alg)
1062 {
"minEta": 1,
"maxEta": 15,
"minPhi": 17,
"maxPhi": 23,
"otype" :
"EM",
"ocut" : 20,
"olist" :
"shi",
"inputwidth": HW.OutputWidthSortEM},
1063 {
"minEta": 1,
"maxEta": 14,
"minPhi": 17,
"maxPhi": 23,
"otype" :
"J",
"ocut" : 100,
"olist" :
"s",
"inputwidth": HW.OutputWidthSortJET},
1069 setattr (d, k, x[k])
1070 toponame =
"LAR-%s%s%s1" % ( d.otype,
str(d.ocut), d.olist )
1071 log.debug(
"Define %s", toponame)
1072 inputList = d.otype + d.olist
1073 alg = AlgConf.EtaPhiWindow( name = toponame, inputs = inputList, outputs = toponame)
1074 alg.addgeneric(
'InputWidth', d.inputwidth)
1075 alg.addgeneric(
'MaxTob', 0)
1076 alg.addgeneric(
'NumResultBits', 1)
1077 alg.addvariable(
'MinET',
str(d.ocut))
1078 alg.addvariable(
'EtaMin', d.minEta)
1079 alg.addvariable(
'EtaMax', d.maxEta)
1080 alg.addvariable(
'PhiMin', d.minPhi)
1081 alg.addvariable(
'PhiMax', d.maxPhi)
1082 tm.registerTopoAlgo(alg)
1086 {
"etcut": 0,
"Threlist": [ 40, 50, 55, 60, 65, 75 ]}
1092 setattr (d, k, x[k])
1093 log.debug(
"Define %s", toponame)
1094 inputList = [
'XENoSort',
'AJall']
1096 for minxe
in d.Threlist:
1097 toponames.append(
"KF-XE%s-AJall" % (minxe))
1098 alg = AlgConf.KalmanMETCorrection( name =
"KF-XE-AJall", inputs = inputList, outputs = toponames)
1099 alg.addgeneric(
'InputWidth', HW.InputWidthJET)
1100 alg.addgeneric(
'NumResultBits', len(toponames))
1101 alg.addvariable(
'MinET', 0)
1102 for bitid,minxe
in enumerate(d.Threlist):
1103 alg.addvariable(
'KFXE',
str(minxe), bitid)
1104 tm.registerTopoAlgo(alg)
1109 {
"minDPhi": 15,
"otype" :
"EM",
"ocut" : 12,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
1110 {
"minDPhi": 15,
"otype" :
"EM",
"ocut" : 15,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
1116 setattr (d, k, x[k])
1117 toponame =
"%02dMINDPHI-%s%s%s%s-XE0" % (d.minDPhi, d.otype,
str(d.ocut)
if d.ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
1118 log.debug(
"Define %s", toponame)
1119 inputList = d.otype + d.olist
1120 alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [ inputList,
'XE'], outputs = [ toponame ])
1121 alg.addgeneric(
'InputWidth1', d.inputwidth)
1122 alg.addgeneric(
'InputWidth2', 1)
1123 alg.addgeneric(
'MaxTob1', d.nleading)
1124 alg.addgeneric(
'MaxTob2', 1)
1125 alg.addgeneric(
'NumResultBits', 1)
1126 alg.addvariable(
'MinET1', d.ocut)
1127 alg.addvariable(
'MinET2', 0)
1128 alg.addvariable(
'DeltaPhiMin', d.minDPhi, 0)
1129 tm.registerTopoAlgo(alg)
1134 {
"minMT": 35,
"otype" :
"EM",
"ocut" : 12,
"olist" :
"s",
"nleading" : 6,
"inputwidth": HW.OutputWidthSortEM},
1140 setattr (d, k, x[k])
1141 toponame =
"%iMT-%s%s%s%s-XE0" % (d.minMT, d.otype,
str(d.ocut)
if d.ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
1142 log.debug(
"Define %s", toponame)
1143 inputList = d.otype + d.olist
1144 alg = AlgConf.TransverseMassInclusive1( name = toponame, inputs = [ inputList,
'XE'], outputs = [ toponame ])
1145 alg.addgeneric(
'InputWidth', HW.OutputWidthSortEM)
1146 alg.addgeneric(
'MaxTob', d.nleading)
1147 alg.addgeneric(
'NumResultBits', 1)
1148 alg.addvariable(
'MinET1',
str(d.ocut))
1149 alg.addvariable(
'MinET2', 0)
1150 alg.addvariable(
'MinMTSqr', d.minMT*d.minMT)
1151 tm.registerTopoAlgo(alg)
1156 {
"disamb": 0,
"otype1" :
"EM",
"ocut1": 15,
"olist1":
"shi",
"nleading1": 2,
"inputwidth1": HW.OutputWidthSortEM,
1157 "otype2" :
"TAU",
"ocut2": 12,
"olist2":
"abi",
"nleading2": HW.OutputWidthSelectTAU,
"inputwidth2": HW.OutputWidthSelectTAU,
"drcutmin": 0,
"drcutmax": 28},
1163 setattr (d, k, x[k])
1164 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1.replace(
'shi',
'his') + (
str(d.nleading1)
if d.olist1.find(
's')>=0
else ""))
1165 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2.replace(
'shi',
'his') + (
str(d.nleading2)
if d.olist2.find(
's')>=0
else ""))
1166 toponame =
"%sDISAMB-%dDR%d%s%s" % (
str(d.disamb)
if d.disamb>0
else "", d.drcutmin, d.drcutmax, obj1, obj2)
1167 log.debug(
"Define %s", toponame)
1168 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
1169 alg = AlgConf.DisambiguationDRIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
1170 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1171 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1172 alg.addgeneric(
'MaxTob1', d.nleading1)
1173 alg.addgeneric(
'MaxTob2', d.nleading2)
1174 alg.addgeneric(
'NumResultBits', 1)
1175 alg.addvariable(
'MinET1', d.ocut1, 0)
1176 alg.addvariable(
'MinET2', d.ocut2, 0)
1177 alg.addvariable(
'DisambDRSqrMin', d.drcutmin*d.drcutmin, 0)
1178 alg.addvariable(
'DisambDRSqrMax', d.drcutmax*d.drcutmax, 0)
1179 tm.registerTopoAlgo(alg)
1184 {
"minDPhi": 10,
"otype" :
"AJ",
"ocut" : 20,
"olist" :
"s",
"nleading" : 2,
"inputwidth": HW.OutputWidthSortJET},
1190 setattr (d, k, x[k])
1191 toponame =
"%iMINDPHI-%s%s%s%s-XE50" % (d.minDPhi, d.otype,
str(d.ocut)
if d.ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
1192 log.debug(
"Define %s", toponame)
1193 inputList = d.otype + d.olist
1194 alg = AlgConf.MinDeltaPhiIncl2( name = toponame, inputs = [inputList,
'XE'], outputs = [ toponame ])
1195 alg.addgeneric(
'InputWidth1', d.inputwidth)
1196 alg.addgeneric(
'InputWidth2', 1)
1197 alg.addgeneric(
'MaxTob1', d.nleading)
1198 alg.addgeneric(
'MaxTob2', 1)
1199 alg.addgeneric(
'NumResultBits', 1)
1200 alg.addvariable(
'MinET1', d.ocut)
1201 alg.addvariable(
'MinET2', 50)
1202 alg.addvariable(
'DeltaPhiMin', d.minDPhi, 0)
1203 tm.registerTopoAlgo(alg)
1208 {
"otype" :
"LATE-MU",
"ocut" : 10,
"inputwidth": HW.NumberOfDelayedMuons},
1214 setattr (d, k, x[k])
1215 toponame =
"%s%ss1" % ( d.otype,
str(d.ocut) )
1216 log.debug(
"Define %s", toponame)
1218 alg = AlgConf.EtCut( name = toponame, inputs = inputList, outputs = toponame)
1219 alg.addgeneric(
'InputWidth', d.inputwidth)
1220 alg.addgeneric(
'MaxTob', 1)
1221 alg.addgeneric(
'NumResultBits', 1)
1222 alg.addvariable(
'MinET',
str(d.ocut))
1223 tm.registerTopoAlgo(alg)
1228 {
"minHT": 111,
"otype" :
"CJ",
"ocut" : 15,
"olist" :
"ab",
"nleading" : HW.OutputWidthSelectJET,
"inputwidth": HW.OutputWidthSelectJET,
"oeta" : 26},
1229 {
"minHT": 85,
"otype" :
"CJ",
"ocut" : 15,
"olist" :
"ab",
"nleading" : HW.OutputWidthSelectJET,
"inputwidth": HW.OutputWidthSelectJET,
"oeta" : 26},
1235 setattr (d, k, x[k])
1236 toponame =
"SC%d-%s%s%s%spETA%s" % (d.minHT, d.otype,
str(d.ocut), d.olist,
str(d.nleading)
if d.olist==
"s" else "",
str(d.oeta))
1237 log.debug(
"Define %s", toponame)
1238 inputList = d.otype + d.olist
1239 alg = AlgConf.SimpleCone( name = toponame, inputs = inputList, outputs = [toponame])
1240 alg.addgeneric(
'InputWidth', d.inputwidth)
1241 alg.addvariable(
'MinET', d.ocut)
1242 alg.addvariable(
'MinSumET', d.minHT)
1243 alg.addvariable(
'MaxRSqr', 10*10)
1244 tm.registerTopoAlgo(alg)
1250 {
"disamb": 0,
"minInvm": 30,
"maxInvm": 9999,
"otype1" :
"EM",
"ocut1": 20,
"olist1":
"shi",
"nleading1": 2,
1251 "inputwidth1": HW.OutputWidthSortEM,
"otype2" :
"TAU",
"ocut2": 12,
"olist2":
"ab",
"nleading2": HW.OutputWidthSelectTAU,
1252 "inputwidth2": HW.OutputWidthSelectTAU},
1258 setattr (d, k, x[k])
1259 obj1 =
"%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1.replace(
'shi',
'his') + (
str(d.nleading1)
if d.olist1.find(
's')>=0
else ""))
1260 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1261 toponame =
"%sDISAMB-%iINVM%s-%s%s" % ( d.disamb
if d.disamb>0
else "", d.minInvm,
str(d.maxInvm)
if d.maxInvm<9999
else "", obj1, obj2)
1262 log.debug(
"Define %s", toponame)
1263 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
1265 alg = AlgConf.DisambiguationInvmIncl2( name = toponame, inputs = inputList, outputs = toponame)
1266 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1267 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1268 alg.addgeneric(
'MaxTob1', d.nleading1)
1269 alg.addgeneric(
'MaxTob2', d.nleading2)
1270 alg.addgeneric(
'NumResultBits', 1)
1271 alg.addvariable(
'MinET1', d.ocut1)
1272 alg.addvariable(
'MinET2', d.ocut2)
1273 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm)
1274 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm)
1275 tm.registerTopoAlgo(alg)
1280 {
"minInvm": 400,
"maxInvm": 9999,
"otype1" :
"AJ",
"ocut1": 30,
"olist1" :
"s",
"nleading1" : 6,
"inputwidth1": HW.OutputWidthSortJET,
1281 "otype2" :
"AJ",
"ocut2": 20,
"olist2" :
"s",
"nleading2" : 6,
"inputwidth2": HW.OutputWidthSortJET,
"applyEtaCut": 1,
1282 "minEta1": 0 ,
"maxEta1": 31 ,
"minEta2": 31 ,
"maxEta2": 49 , },
1288 setattr (d, k, x[k])
1289 obj1 =
"%s%s%sp%sETA%i" % (d.otype1,
str(d.ocut1), d.olist1 + (
str(d.nleading1)
if d.olist1.find(
's')>=0
else ""),
str(d.minEta1)
if d.minEta1>0
else "", d.maxEta1)
1290 obj2 =
"-%s%s%sp%sETA%i" % (d.otype2,
str(d.ocut2), d.olist2 + (
str(d.nleading2)
if d.olist2.find(
's')>=0
else ""),
str(d.minEta2)
if d.minEta2>0
else "", d.maxEta2)
1291 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
1292 toponame =
"%iINVM%i-%s%s" % (d.minInvm, d.maxInvm, obj1, obj2)
1293 alg = AlgConf.InvariantMassInclusive2( name = toponame, inputs = inputList, outputs = toponame)
1294 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1295 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1296 alg.addgeneric(
'MaxTob1', d.nleading1)
1297 alg.addgeneric(
'MaxTob2', d.nleading2)
1298 alg.addgeneric(
'NumResultBits', 1)
1299 if (d.applyEtaCut>0):
1300 alg.addgeneric(
'ApplyEtaCut', d.applyEtaCut)
1301 alg.addvariable(
'MinET1', d.ocut1)
1302 alg.addvariable(
'MinET2', d.ocut2)
1303 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm )
1304 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm )
1305 if (d.applyEtaCut>0):
1306 alg.addvariable(
'MinEta1', d.minEta1)
1307 alg.addvariable(
'MaxEta1', d.maxEta1)
1308 alg.addvariable(
'MinEta2', d.minEta2)
1309 alg.addvariable(
'MaxEta2', d.maxEta2)
1310 tm.registerTopoAlgo(alg)
1316 {
"minEta": -16,
"maxEta": 16,
"minPhi": 15,
"maxPhi": 29,
"otype" :
"EM",
"ocut" : 20,
"inputwidth": HW.OutputWidthSortEM},
1317 {
"minEta": -16,
"maxEta": 16,
"minPhi": 15,
"maxPhi": 29,
"otype" :
"J",
"ocut" : 100,
"inputwidth": HW.OutputWidthSortJET},
1318 {
"minEta": -16,
"maxEta": 16,
"minPhi": 15,
"maxPhi": 29,
"otype" :
"MU",
"ocut" : 10,
"inputwidth": HW.OutputWidthSortMU},
1324 setattr (d, k, x[k])
1325 toponame =
"FTK-%s%ss1" % ( d.otype,
str(d.ocut)
if not d.otype==
"EM" else "20" )
1326 log.debug(
"Define %s", toponame)
1327 inputList = d.otype +
's'
1328 alg = AlgConf.EtaPhiWindow( name = toponame, inputs = inputList, outputs = toponame)
1329 alg.addgeneric(
'InputWidth', d.inputwidth)
1330 alg.addgeneric(
'MaxTob', 1)
1331 alg.addgeneric(
'NumResultBits', 1)
1332 alg.addvariable(
'MinET',
str(d.ocut))
1333 alg.addvariable(
'EtaMin', d.minEta)
1334 alg.addvariable(
'EtaMax', d.maxEta)
1335 alg.addvariable(
'PhiMin', d.minPhi)
1336 alg.addvariable(
'PhiMax', d.maxPhi)
1337 tm.registerTopoAlgo(alg)
1342 {
"otype" :
"EM",
"ocut1" : 20,
"ocut2" : 20,
"olist" :
"shi",
"nleading1" : 2,
"minInvm" : 60,
"maxInvm" : 100,
"inputwidth": HW.OutputWidthSortEM},
1348 setattr (d, k, x[k])
1349 toponame =
'ZEE-EM20shi2'
1350 log.debug(
"Define %s", toponame)
1351 inputList = d.otype + d.olist
1352 alg = AlgConf.InvariantMassInclusive1( name = toponame, inputs = inputList, outputs = toponame)
1353 alg.addgeneric(
'InputWidth', d.inputwidth)
1354 alg.addgeneric(
'MaxTob', d.nleading1)
1355 alg.addgeneric(
'NumResultBits', 1)
1356 alg.addvariable(
'MinET1', d.ocut1)
1357 alg.addvariable(
'MinET2', d.ocut2)
1358 alg.addvariable(
'MinMSqr', (d.minInvm * _emscale_for_decision)*(d.minInvm * _emscale_for_decision))
1359 alg.addvariable(
'MaxMSqr', (d.maxInvm * _emscale_for_decision)*(d.maxInvm * _emscale_for_decision))
1360 tm.registerTopoAlgo(alg)
1365 {
"minInvm" : 0,
"maxInvm": 9,
"otype" :
"EM",
"ocut1" : 7,
"olist" :
"ab",
"inputwidth": HW.OutputWidthSelectEM,
"ocut2" : 0},
1371 setattr (d, k, x[k])
1372 inputList = d.otype + d.olist
1373 toponame =
"%iINVM%i-%s%s%s-%s%s" % (d.minInvm, d.maxInvm,
1374 d.otype,
str(d.ocut1) , d.olist,
1376 alg = AlgConf.InvariantMassInclusive1( name = toponame, inputs = inputList, outputs = toponame)
1377 alg.addgeneric(
'InputWidth', d.inputwidth)
1378 alg.addgeneric(
'MaxTob', HW.OutputWidthSelectEM)
1379 alg.addgeneric(
'NumResultBits', 1)
1380 alg.addvariable(
'MinET1', d.ocut1)
1381 alg.addvariable(
'MinET2', d.ocut2)
1382 alg.addvariable(
'MinMSqr', (d.minInvm * _emscale_for_decision)*(d.minInvm * _emscale_for_decision))
1383 alg.addvariable(
'MaxMSqr', (d.maxInvm * _emscale_for_decision)*(d.maxInvm * _emscale_for_decision))
1384 tm.registerTopoAlgo(alg)
1389 {
"minDr": 0,
"maxDr": 3,
"otype1" :
"EM" ,
"ocut1": 7,
"olist1" :
"ab",
"otype2" :
"CJ",
"ocut2": 15,
"olist2" :
"ab"}
1395 setattr (d, k, x[k])
1396 toponame =
"%iDR%02d-%s%s%s-%s%s%s" % (d.minDr, d.maxDr, d.otype1,
str(d.ocut1), d.olist1, d.otype2,
str(d.ocut2), d.olist2)
1397 log.debug(
"Define %s", toponame)
1398 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
1399 alg = AlgConf.DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
1400 alg.addgeneric(
'InputWidth1', HW.OutputWidthSelectEM)
1401 alg.addgeneric(
'InputWidth2', HW.OutputWidthSelectJET)
1402 alg.addgeneric(
'MaxTob1', HW.OutputWidthSelectEM)
1403 alg.addgeneric(
'MaxTob2', HW.OutputWidthSelectJET)
1404 alg.addgeneric(
'NumResultBits', 1)
1405 alg.addvariable(
'MinET1', d.ocut1, 0)
1406 alg.addvariable(
'MinET2', d.ocut2, 0)
1407 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr, 0)
1408 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr, 0)
1409 tm.registerTopoAlgo(alg)
1414 {
"algoname":
'INVM_NFF',
"Threlist": [ 600, 500, 400, 200 ],
"maxInvm": 9999,
"otype1" :
"J",
"ocut1" : 30,
"olist1" :
"s",
"nleading1" : 6,
1415 "inputwidth": HW.OutputWidthSortJET,
"otype2" :
"AJ",
"ocut2" : 20,
"olist2" :
"s",
"nleading2" : 6 }
1421 setattr (d, k, x[k])
1422 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
1424 for minInvm
in d.Threlist:
1425 toponame =
"%iINVM%i-%s%s%s%s-%s%s%s%s" % (minInvm, d.maxInvm,
1426 d.otype1,
str(d.ocut1) , d.olist1,
str(d.nleading1)
if d.olist1==
"s" else "",
1427 d.otype2,
str(d.ocut2) , d.olist2,
str(d.nleading2)
if d.olist2==
"s" else "")
1428 toponames.append(toponame)
1429 alg = AlgConf.InvariantMassInclusive2( name = d.algoname, inputs = inputList, outputs = toponames)
1430 alg.addgeneric(
'InputWidth1', d.inputwidth)
1431 alg.addgeneric(
'InputWidth2', d.inputwidth)
1432 alg.addgeneric(
'MaxTob1', d.nleading1)
1433 alg.addgeneric(
'MaxTob2', d.nleading2)
1434 alg.addgeneric(
'NumResultBits', len(toponames))
1435 for bitid, minInvm
in enumerate(d.Threlist):
1436 alg.addvariable(
'MinET1', d.ocut1, bitid)
1437 alg.addvariable(
'MinET2', d.ocut2, bitid)
1438 alg.addvariable(
'MinMSqr', minInvm*minInvm , bitid)
1439 alg.addvariable(
'MaxMSqr', d.maxInvm *d.maxInvm , bitid)
1440 tm.registerTopoAlgo(alg)
1446 {
"minDphi": 27,
"maxDphi": 32,
"otype" :
"EM",
"ocut1" : 0,
"olist" :
"s",
"nleading1" : 1,
"inputwidth1": HW.OutputWidthSortEM,
"ocut2" : 0,
"nleading2": 6},
1452 setattr (d, k, x[k])
1453 toponame =
"%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.minDphi, d.maxDphi,
1454 d.otype,
str(d.ocut1)
if d.ocut1 > 0
else "", d.olist,
str(d.nleading1)
if d.olist==
"s" else "",
1455 d.otype,
str(d.ocut2)
if d.ocut2 > 0
else "", d.olist,
str(d.nleading2)
if d.olist==
"s" else "")
1456 log.debug(
"Define %s", toponame)
1457 inputList = d.otype + d.olist
1458 alg = AlgConf.DeltaPhiIncl1( name = toponame, inputs = inputList, outputs = toponame)
1459 alg.addgeneric(
'InputWidth', d.inputwidth1)
1460 alg.addgeneric(
'MaxTob', d.nleading2)
1461 alg.addgeneric(
'NumResultBits', 1)
1462 alg.addvariable(
'MinET1', d.ocut1
if d.ocut1 > 0
else 3, 0)
1463 alg.addvariable(
'MinET2', d.ocut2
if d.ocut2 > 0
else 3, 0)
1464 alg.addvariable(
'MinDeltaPhi', d.minDphi, 0)
1465 alg.addvariable(
'MaxDeltaPhi', d.maxDphi, 0)
1466 tm.registerTopoAlgo(alg)
1470 toponame =
"8INVM15-2CMU4ab"
1471 log.debug(
"Define %s", toponame)
1472 inputList = [
'CMUab']
1473 alg = AlgConf.InvariantMassInclusive1( name = toponame, inputs = inputList, outputs = toponame)
1474 alg.addgeneric(
'InputWidth', HW.OutputWidthSelectMU)
1475 alg.addgeneric(
'MaxTob', HW.OutputWidthSelectMU)
1476 alg.addgeneric(
'NumResultBits', 1)
1477 alg.addvariable(
'MinMSqr', 8*8)
1478 alg.addvariable(
'MaxMSqr', 15*15)
1479 alg.addvariable(
'MinET1', 4)
1480 alg.addvariable(
'MinET2', 4)
1481 tm.registerTopoAlgo(alg)