10 import L1TopoAlgorithms.L1TopoAlgConfig
as AlgConf
11 import L1TopoHardware.L1TopoHardware
as HW
12 from .L1CaloThresholdMapping
import get_threshold_cut
13 from .L1TopoKFMETweights
import KFMETweightParameters
15 from AthenaCommon.Logging
import logging
16 log = logging.getLogger(__name__)
18 from collections
import namedtuple
26 _no_m_upper_threshold = 1024*1024*10*10*10
38 alg = AlgConf.eEmNoSort( name =
'eEMall', inputs =
'eEmTobs', outputs =
'eEMall' )
39 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
40 alg.addgeneric(
'OutputWidth', HW.eEmInputWidth)
41 alg.addvariable(
'REtaMin', 0)
42 alg.addvariable(
'RHadMin', 0)
43 alg.addvariable(
'WsTotMin', 0)
44 tm.registerTopoAlgo(alg)
48 alg = AlgConf.eEmSort( name =
'eEMs', inputs =
'eEmTobs', outputs =
'eEMs' )
49 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
50 alg.addgeneric(
'OutputWidth', HW.eEmOutputWidthSort)
51 alg.addvariable(
'REtaMin', 0)
52 alg.addvariable(
'RHadMin', 0)
53 alg.addvariable(
'WsTotMin', 0)
54 tm.registerTopoAlgo(alg)
56 alg = AlgConf.eEmSort( name =
'eEMsl', inputs =
'eEmTobs', outputs =
'eEMsl' )
57 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
58 alg.addgeneric(
'OutputWidth', HW.eEmOutputWidthSort)
59 alg.addvariable(
'REtaMin', 1)
60 alg.addvariable(
'RHadMin', 1)
61 alg.addvariable(
'WsTotMin', 1)
62 tm.registerTopoAlgo(alg)
64 alg = AlgConf.eEmSort( name =
'eEMsm', inputs =
'eEmTobs', outputs =
'eEMsm' )
65 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
66 alg.addgeneric(
'OutputWidth', HW.eEmOutputWidthSort)
67 alg.addvariable(
'REtaMin', 2)
68 alg.addvariable(
'RHadMin', 2)
69 alg.addvariable(
'WsTotMin', 2)
70 tm.registerTopoAlgo(alg)
74 alg = AlgConf.eEmSelect( name =
'eEMab', inputs =
'eEmTobs', outputs =
'eEMab' )
75 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
76 alg.addgeneric(
'OutputWidth', HW.eEmOutputWidthSelect)
78 alg.addvariable(
'REtaMin', 0)
79 alg.addvariable(
'RHadMin', 0)
80 alg.addvariable(
'WsTotMin', 0)
81 tm.registerTopoAlgo(alg)
83 alg = AlgConf.eEmSelect( name =
'eEMabl', inputs =
'eEmTobs', outputs =
'eEMabl' )
84 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
85 alg.addgeneric(
'OutputWidth', HW.eEmOutputWidthSelect)
87 alg.addvariable(
'REtaMin', 1)
88 alg.addvariable(
'RHadMin', 1)
89 alg.addvariable(
'WsTotMin', 1)
90 tm.registerTopoAlgo(alg)
92 alg = AlgConf.eEmSelect( name =
'eEMabm', inputs =
'eEmTobs', outputs =
'eEMabm' )
93 alg.addgeneric(
'InputWidth', HW.eEmInputWidth)
94 alg.addgeneric(
'OutputWidth', HW.eEmOutputWidthSelect)
96 alg.addvariable(
'REtaMin', 2)
97 alg.addvariable(
'RHadMin', 2)
98 alg.addvariable(
'WsTotMin', 2)
99 tm.registerTopoAlgo(alg)
106 alg = AlgConf.eTauNoSort( name =
'eTAUall', inputs =
'eTauTobs', outputs =
'eTAUall')
107 alg.addgeneric(
'InputWidth', HW.eTauInputWidth)
108 alg.addgeneric(
'OutputWidth', HW.eTauInputWidth)
109 alg.addvariable(
'RCoreMin', 0)
110 alg.addvariable(
'RHadMin', 0)
111 tm.registerTopoAlgo(alg)
115 alg = AlgConf.eTauSort( name =
'eTAUs', inputs =
'eTauTobs', outputs =
'eTAUs' )
116 alg.addgeneric(
'InputWidth', HW.eTauInputWidth)
117 alg.addgeneric(
'OutputWidth', HW.eTauOutputWidthSort)
118 alg.addvariable(
'RCoreMin', 0)
119 alg.addvariable(
'RHadMin', 0)
120 tm.registerTopoAlgo(alg)
124 alg = AlgConf.eTauSelect( name =
'eTAUab', inputs =
'eTauTobs', outputs =
'eTAUab' )
125 alg.addgeneric(
'InputWidth', HW.eTauInputWidth)
126 alg.addgeneric(
'OutputWidth', HW.eTauOutputWidthSelect)
128 alg.addvariable(
'RCoreMin', 0)
129 alg.addvariable(
'RHadMin', 0)
130 tm.registerTopoAlgo(alg)
132 alg = AlgConf.eTauSelect( name =
'eTAUabm', inputs =
'eTauTobs', outputs =
'eTAUabm' )
133 alg.addgeneric(
'InputWidth', HW.eTauInputWidth)
134 alg.addgeneric(
'OutputWidth', HW.eTauOutputWidthSelect)
136 alg.addvariable(
'RCoreMin', 2)
137 alg.addvariable(
'RHadMin', 0)
138 tm.registerTopoAlgo(alg)
152 alg = AlgConf.MuonSelect( name =
'MU3Vab', inputs =
'MuonTobs', outputs =
'MU3Vab' )
153 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
154 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSelect)
155 alg.addvariable(
'MinEtRPC', 4*_et_conversion)
156 alg.addvariable(
'MinEtTGC', 3*_et_conversion)
157 alg.addvariable(
'MinEta', 0*_eta_conversion)
158 alg.addvariable(
'MaxEta', 25*_eta_conversion)
159 alg.addvariable(
'InnerCoinCut', 0)
160 alg.addvariable(
'FullStationCut',0)
161 alg.addvariable(
'GoodMFieldCut', 0)
162 tm.registerTopoAlgo(alg)
164 alg = AlgConf.MuonSelect( name =
'MU3VFab', inputs =
'MuonTobs', outputs =
'MU3VFab' )
165 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
166 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSelect)
167 alg.addvariable(
'MinEtRPC', 4*_et_conversion)
168 alg.addvariable(
'MinEtTGC', 3*_et_conversion)
169 alg.addvariable(
'MinEta', 0*_eta_conversion)
170 alg.addvariable(
'MaxEta', 25*_eta_conversion)
171 alg.addvariable(
'InnerCoinCut', 0)
172 alg.addvariable(
'FullStationCut',1)
173 alg.addvariable(
'GoodMFieldCut', 0)
174 tm.registerTopoAlgo(alg)
176 alg = AlgConf.MuonSelect( name =
'MU5VFab', inputs =
'MuonTobs', outputs =
'MU5VFab' )
177 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
178 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSelect)
179 alg.addvariable(
'MinEtRPC', 6*_et_conversion)
180 alg.addvariable(
'MinEtTGC', 5*_et_conversion)
181 alg.addvariable(
'MinEta', 0*_eta_conversion)
182 alg.addvariable(
'MaxEta', 25*_eta_conversion)
183 alg.addvariable(
'InnerCoinCut', 0)
184 alg.addvariable(
'FullStationCut',1)
185 alg.addvariable(
'GoodMFieldCut', 0)
186 tm.registerTopoAlgo(alg)
188 alg = AlgConf.MuonSelect( name =
'MU8Fab', inputs =
'MuonTobs', outputs =
'MU8Fab' )
189 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
190 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSelect)
191 alg.addvariable(
'MinEtRPC', 8*_et_conversion)
192 alg.addvariable(
'MinEtTGC', 8*_et_conversion)
193 alg.addvariable(
'MinEta', 0*_eta_conversion)
194 alg.addvariable(
'MaxEta', 25*_eta_conversion)
195 alg.addvariable(
'InnerCoinCut', 0)
196 alg.addvariable(
'FullStationCut',1)
197 alg.addvariable(
'GoodMFieldCut', 0)
198 tm.registerTopoAlgo(alg)
200 alg = AlgConf.MuonSelect( name =
'CMU3Vab', inputs =
'MuonTobs', outputs =
'CMU3Vab' )
201 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
202 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSelect)
203 alg.addvariable(
'MinEtRPC', 4*_et_conversion)
204 alg.addvariable(
'MinEtTGC', 3*_et_conversion)
205 alg.addvariable(
'MinEta', 0*_eta_conversion)
206 alg.addvariable(
'MaxEta', 10*_eta_conversion)
207 alg.addvariable(
'InnerCoinCut', 0)
208 alg.addvariable(
'FullStationCut',0)
209 alg.addvariable(
'GoodMFieldCut', 0)
210 tm.registerTopoAlgo(alg)
212 alg = AlgConf.MuonSelect( name =
'CMU5VFab', inputs =
'MuonTobs', outputs =
'CMU5VFab' )
213 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
214 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSelect)
215 alg.addvariable(
'MinEtRPC', 6*_et_conversion)
216 alg.addvariable(
'MinEtTGC', 5*_et_conversion)
217 alg.addvariable(
'MinEta', 0*_eta_conversion)
218 alg.addvariable(
'MaxEta', 10*_eta_conversion)
219 alg.addvariable(
'InnerCoinCut', 0)
220 alg.addvariable(
'FullStationCut',1)
221 alg.addvariable(
'GoodMFieldCut', 0)
222 tm.registerTopoAlgo(alg)
225 alg = AlgConf.MuonSort( name =
'MUs', inputs =
'MuonTobs', outputs =
'MUs' )
226 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
227 alg.addgeneric(
'OutputWidth', HW.muonOutputWidthSort)
229 alg.addvariable(
'MinEta', 0*_eta_conversion)
230 alg.addvariable(
'MaxEta', 25*_eta_conversion)
231 alg.addvariable(
'InnerCoinCut', 0)
232 alg.addvariable(
'FullStationCut', 0)
233 alg.addvariable(
'GoodMFieldCut', 0)
234 tm.registerTopoAlgo(alg)
237 alg = AlgConf.MuonSort_1BC( name =
'LMUs', inputs =
'LateMuonTobArray', outputs =
'LMUs' )
238 alg.addgeneric(
'InputWidth', HW.muonInputWidth)
239 alg.addgeneric(
'OutputWidth', 1)
240 alg.addgeneric(
'nDelayedMuons', 1)
241 alg.addvariable(
'MinEta', 0*_eta_conversion)
242 alg.addvariable(
'MaxEta', 25*_eta_conversion)
243 alg.addvariable(
'InnerCoinCut', 0)
244 alg.addvariable(
'FullStationCut', 1)
245 alg.addvariable(
'GoodMFieldCut', 0)
246 tm.registerTopoAlgo(alg)
249 alg = AlgConf.jJetNoSort( name =
'AjJall_1BC', inputs =
'jJetTobs', outputs =
'AjJall_1BC' )
250 alg.addgeneric(
'InputWidth', HW.jJetInputWidth)
251 alg.addgeneric(
'OutputWidth', HW.jJetInputWidth)
254 alg.addgeneric(
'NumRegisters', 1)
255 tm.registerTopoAlgo(alg)
260 {
"otype" :
"jJ",
"ocut" : 50,
"olist" :
"ab",
"etamin" : 0,
"etamax" : 32},
261 {
"otype" :
"CjJ",
"ocut" : 40,
"olist" :
"ab",
"etamin" : 0,
"etamax" : 26},
262 {
"otype" :
"FjJ",
"ocut" : 40,
"olist" :
"ab",
"etamin" : 30,
"etamax" : 49},
269 listname =
"%s%s" % (d.otype,d.olist)
270 algoname = AlgConf.jJetSelect
271 alg = algoname( name = listname, inputs =
'jJetTobs', outputs = listname )
272 alg.addgeneric(
'InputWidth', HW.jJetInputWidth)
273 alg.addgeneric(
'OutputWidth', HW.jJetOutputWidthSelect)
276 alg.addvariable(
'MinEta', d.etamin*_eta_conversion)
277 alg.addvariable(
'MaxEta', d.etamax*_eta_conversion)
278 tm.registerTopoAlgo(alg)
281 {
"otype" :
"FjJ",
"ocut" : 0,
"olist" :
"s",
"etamin" : 30,
"etamax" : 49},
282 {
"otype" :
"jJ",
"ocut" : 0,
"olist" :
"s",
"etamin" : 0,
"etamax" : 32},
283 {
"otype" :
"CjJ",
"ocut" : 0,
"olist" :
"s",
"etamin" : 0,
"etamax" : 26},
284 {
"otype" :
"AjJ",
"ocut" : 0,
"olist" :
"s",
"etamin" : 0,
"etamax" : 49},
291 listname =
"%s%s" % (d.otype,d.olist)
292 algoname = AlgConf.jJetSort
293 alg = algoname( name = listname, inputs =
'jJetTobs', outputs = listname )
294 alg.addgeneric(
'InputWidth', HW.jJetInputWidth)
295 alg.addgeneric(
'OutputWidth', HW.jJetOutputWidthSort)
297 alg.addvariable(
'MinET', d.ocut*_et_conversion)
298 alg.addvariable(
'MinEta', d.etamin*_eta_conversion)
299 alg.addvariable(
'MaxEta', d.etamax*_eta_conversion)
300 tm.registerTopoAlgo(alg)
305 alg = AlgConf.jEmSort( name =
'jEMs25ETA49', inputs =
'jEmTobs', outputs =
'jEMs25ETA49' )
306 alg.addgeneric(
'InputWidth', HW.jEmInputWidth)
307 alg.addgeneric(
'OutputWidth', HW.jEmOutputWidthSort)
308 alg.addvariable(
'MinEta', 25*_eta_conversion)
309 alg.addvariable(
'MaxEta', 49*_eta_conversion)
311 alg.addvariable(
'IsoMin', 0)
312 alg.addvariable(
'Frac1Min', 0)
313 alg.addvariable(
'Frac2Min', 0)
314 tm.registerTopoAlgo(alg)
318 alg = AlgConf.jTauNoSort( name =
'jTAUall', inputs =
'jTauTobs', outputs =
'jTAUall')
319 alg.addgeneric(
'InputWidth', HW.jTauInputWidth)
320 alg.addgeneric(
'OutputWidth', HW.jTauInputWidth)
321 alg.addvariable(
'Isolation',0)
322 alg.addvariable(
'passIsolation',
True)
323 tm.registerTopoAlgo(alg)
326 alg = AlgConf.jTauSort( name =
'jTAUs', inputs =
'jTauTobs', outputs =
'jTAUs' )
327 alg.addgeneric(
'InputWidth', HW.jTauInputWidth)
328 alg.addgeneric(
'OutputWidth', HW.jTauOutputWidthSort)
329 alg.addvariable(
'MinEta', 0*_eta_conversion)
330 alg.addvariable(
'MaxEta', 32*_eta_conversion)
331 alg.addvariable(
'Isolation',0)
332 alg.addvariable(
'passIsolation',
True)
333 tm.registerTopoAlgo(alg)
337 alg = AlgConf.jXENoSort( name =
'jXENoSort_1BC', inputs =
'jXETobs', outputs =
'jXENoSort_1BC' )
338 alg.addgeneric(
'InputWidth', HW.jMetInputWidth)
339 alg.addgeneric(
'OutputWidth', HW.metOutputWidth)
342 alg.addgeneric(
'NumRegisters', 1)
343 tm.registerTopoAlgo(alg)
345 alg = AlgConf.jXESort( name =
'jXEs', inputs =
'jXETobs', outputs =
'jXEs' )
346 alg.addgeneric(
'InputWidth', HW.jMetInputWidth)
347 alg.addgeneric(
'OutputWidth', HW.metOutputWidth)
348 tm.registerTopoAlgo(alg)
360 {
"otype" :
"eEM",
"ocut1" : 24,
"ocut2" : 24,
"olist" :
"sm",
"nleading1" : 2,
"minInvm" : 60,
"maxInvm" : 100,
"inputwidth": HW.eEmOutputWidthSort},
367 toponame =
'ZEE-eEM24sm2'
368 log.debug(
"Define %s", toponame)
369 inputList = d.otype + d.olist
370 alg = AlgConf.InvariantMassInclusive1( name = toponame, inputs = inputList, outputs = toponame)
371 alg.addgeneric(
'InputWidth', d.inputwidth)
372 alg.addgeneric(
'MaxTob', d.nleading1)
373 alg.addgeneric(
'NumResultBits', 1)
376 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion )
377 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion )
378 tm.registerTopoAlgo(alg)
385 {
"minDr": 3,
"maxDr": 99,
"mult": 1,
"otype1" :
"MU8Fab" ,
"otype2" :
"eTAU",
"ocut2" : 30,
"olist2" :
"ab", },
386 {
"minDr": 3,
"maxDr": 35,
"mult": 1,
"otype1" :
"MU8Fab" ,
"otype2" :
"eTAU",
"ocut2" : 30,
"olist2" :
"ab", },
387 {
"minDr": 3,
"maxDr": 30,
"mult": 1,
"otype1" :
"MU8Fab" ,
"otype2" :
"eTAU",
"ocut2" : 30,
"olist2" :
"ab", },
388 {
"minDr": 3,
"maxDr": 28,
"mult": 1,
"otype1" :
"MU8Fab" ,
"otype2" :
"eTAU",
"ocut2" : 30,
"olist2" :
"ab", },
396 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
397 obj2 =
"-%s%d%s" % (d.otype2, d.ocut2, d.olist2)
398 toponame =
"%iDR%i-%s%s" % (d.minDr, d.maxDr, obj1, obj2)
399 log.debug(
"Define %s", toponame)
400 inputList = [ d.otype1,
'eTAUs']
401 algoname = AlgConf.DeltaRSqrIncl2
402 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
404 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
405 alg.addgeneric(
'InputWidth2', HW.eTauOutputWidthSort)
406 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
407 alg.addgeneric(
'MaxTob2', 1)
408 alg.addgeneric(
'NumResultBits', 1)
409 alg.addvariable(
'MinET1', 0*_et_conversion)
411 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
412 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
413 tm.registerTopoAlgo(alg)
423 {
"minDr": 0,
"maxDr": 15,
"mult": 2,
"otype1" :
"MU3Vab" ,
"otype2" :
"", },
424 {
"minDr": 0,
"maxDr": 24,
"mult": 2,
"otype1" :
"MU3Vab" ,
"otype2" :
"", },
426 {
"minDr": 1,
"maxDr": 15,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3Vab", },
427 {
"minDr": 1,
"maxDr": 22,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3Vab", },
428 {
"minDr": 2,
"maxDr": 15,
"mult": 2,
"otype1" :
"MU5VFab",
"otype2" :
"", },
429 {
"minDr": 0,
"maxDr": 22,
"mult": 2,
"otype1" :
"MU5VFab",
"otype2" :
"", },
430 {
"minDr": 2,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab" ,
"otype2" :
"", },
432 for x
in listofalgos:
437 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
438 obj2 =
"-%s" % (d.otype2)
439 toponame =
"%iDR%i-%s%s" % (d.minDr, d.maxDr, obj1,
"" if d.mult>1
else obj2)
440 log.debug(
"Define %s", toponame)
441 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
442 algoname = AlgConf.DeltaRSqrIncl1
if (d.mult>1)
else AlgConf.DeltaRSqrIncl2
443 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
445 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
446 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
448 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
449 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
450 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
451 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
452 alg.addgeneric(
'NumResultBits', 1)
453 alg.addvariable(
'MinET1', 0*_et_conversion)
454 alg.addvariable(
'MinET2', 0*_et_conversion)
455 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
456 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
457 tm.registerTopoAlgo(alg)
466 {
"minDr": 0,
"maxDr": 12,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2" :
"", },
468 for x
in listofalgos:
473 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
474 obj2 =
"-%s" % (d.otype2)
475 toponame =
"%iDR%iC-%s%s" % (d.minDr, d.maxDr, obj1,
"" if d.mult>1
else obj2)
476 log.debug(
"Define %s", toponame)
477 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
478 algoname = AlgConf.DeltaRSqrIncl1Charge
if (d.mult>1)
else AlgConf.DeltaRSqrIncl2Charge
479 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
481 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
482 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
484 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
485 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
486 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
487 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
488 alg.addgeneric(
'NumResultBits', 1)
489 alg.addvariable(
'MinET1', 0*_et_conversion)
490 alg.addvariable(
'MinET2', 0*_et_conversion)
491 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
492 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
493 tm.registerTopoAlgo(alg)
504 {
"minInvm":7,
"maxInvm":22,
"minDr": 0,
"maxDr": 20,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2" :
"", },
506 for x
in listofalgos:
511 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
512 obj2 =
"-%s" % (d.otype2)
513 toponame =
"%iINVM%i-%iDR%iC-%s%s" % (d.minInvm, d.maxInvm, d.minDr, d.maxDr, obj1,
"" if d.mult>1
else obj2)
514 log.debug(
"Define %s", toponame)
515 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
516 algoname = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1Charge
if (d.mult>1)
else AlgConf.InvariantMassInclusiveDeltaRSqrIncl2Charge
517 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
519 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
520 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
522 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
523 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
524 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
525 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
526 alg.addgeneric(
'NumResultBits', 1)
527 alg.addvariable(
'MinET1', 0*_et_conversion)
528 alg.addvariable(
'MinET2', 0*_et_conversion)
529 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm *_et_conversion*_et_conversion)
530 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm *_et_conversion*_et_conversion)
531 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
532 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
533 tm.registerTopoAlgo(alg)
544 {
"minDeta": 5,
"maxDeta": 99,
"minDphi": 5,
"maxDphi": 99,
"mult": 1,
545 "otype1" :
"MU5VFab",
"ocut1":
"",
"olist1":
"",
"nleading1": HW.muonOutputWidthSelect,
546 "otype2" :
"MU3Vab" ,
"ocut2":
"",
"olist2":
"",
"nleading2": HW.muonOutputWidthSelect},
547 {
"minDeta": 5,
"maxDeta": 99,
"minDphi": 5,
"maxDphi": 99,
"mult": 2,
548 "otype1" :
"MU5VFab",
"ocut1":
"",
"olist1":
"",
"nleading1": HW.muonOutputWidthSelect,
549 "otype2" :
"" ,
"ocut2":
"",
"olist2":
"",
"nleading2": HW.muonOutputWidthSelect},
550 {
"minDeta": 5,
"maxDeta": 99,
"minDphi": 5,
"maxDphi": 99,
"mult": 2,
551 "otype1" :
"MU3Vab",
"ocut1":
"",
"olist1":
"",
"nleading1": HW.muonOutputWidthSelect,
552 "otype2" :
"" ,
"ocut2":
"",
"olist2":
"",
"nleading2": HW.muonOutputWidthSelect},
553 {
"minDeta": 5,
"maxDeta": 99,
"minDphi": 5,
"maxDphi": 99,
"mult": 2,
554 "otype1" :
"MU3VFab",
"ocut1":
"",
"olist1":
"",
"nleading1": HW.muonOutputWidthSelect,
555 "otype2" :
"" ,
"ocut2":
"",
"olist2":
"",
"nleading2": HW.muonOutputWidthSelect},
556 {
"minDeta": 0,
"maxDeta": 24,
"minDphi": 4,
"maxDphi": 99,
"mult": 1,
557 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
558 "otype2" :
"eTAU",
"ocut2": 20,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect},
559 {
"minDeta": 0,
"maxDeta": 24,
"minDphi": 4,
"maxDphi": 99,
"mult": 1,
560 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
561 "otype2" :
"eTAU",
"ocut2": 12,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect},
562 {
"minDeta": 0,
"maxDeta": 24,
"minDphi": 10,
"maxDphi": 99,
"mult": 1,
563 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
564 "otype2" :
"eTAU",
"ocut2": 12,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect},
571 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1+
str(d.ocut1)+
str(d.olist1))
572 obj2 =
"-%s" % (d.otype2+
str(d.ocut2)+
str(d.olist2))
573 toponame =
"%sDETA%s-%sDPHI%s-%s%s" % (d.minDeta, d.maxDeta, d.minDphi, d.maxDphi, obj1,
"" if d.mult>1
else obj2)
574 log.debug(
"Define %s", toponame)
575 inputList = [d.otype1+d.olist1]
if (d.mult>1)
else [d.otype1+d.olist1, d.otype2+d.olist2]
576 algoname = AlgConf.DeltaEtaPhiIncl1
if (d.mult>1)
else AlgConf.DeltaEtaPhiIncl2
577 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
578 alg.addgeneric(
'NumResultBits', 1)
580 alg.addgeneric(
'InputWidth', d.nleading1)
581 alg.addgeneric(
'MaxTob', d.nleading1)
582 alg.addvariable(
'MinET1', 0*_et_conversion)
583 alg.addvariable(
'MinET2', 0*_et_conversion)
584 alg.addvariable(
'MinDeltaEta', d.minDeta*_eta_conversion)
585 alg.addvariable(
'MaxDeltaEta', d.maxDeta*_eta_conversion)
586 alg.addvariable(
'MinDeltaPhi', d.minDphi*_phi_conversion)
587 alg.addvariable(
'MaxDeltaPhi', d.maxDphi*_phi_conversion)
589 alg.addgeneric(
'InputWidth1', d.nleading1)
590 alg.addgeneric(
'InputWidth2', d.nleading2)
591 alg.addgeneric(
'MaxTob1', d.nleading1)
592 alg.addgeneric(
'MaxTob2', d.nleading2)
593 alg.addvariable(
'MinET1', 0*_et_conversion)
594 alg.addvariable(
'MinET2', 0*_et_conversion)
595 alg.addvariable(
'DeltaEtaMin', d.minDeta*_eta_conversion)
596 alg.addvariable(
'DeltaEtaMax', d.maxDeta*_eta_conversion)
597 alg.addvariable(
'DeltaPhiMin', d.minDphi*_phi_conversion)
598 alg.addvariable(
'DeltaPhiMax', d.maxDphi*_phi_conversion)
599 tm.registerTopoAlgo(alg)
604 {
"itemNameMinHT": 150,
"minHT": 240,
"otype" :
"jJ",
"ocut" : 50,
"olist" :
"s",
"nleading" : 5,
"inputwidth": HW.jJetOutputWidthSort,
"oeta" : 32},
605 {
"itemNameMinHT": 190,
"minHT": 300,
"otype" :
"jJ",
"ocut" : 40,
"olist" :
"s",
"nleading" : 5,
"inputwidth": HW.jJetOutputWidthSort,
"oeta" : 21},
612 toponame =
"HT%d-%s%s%s%spETA%s" % (d.itemNameMinHT, d.otype,
str(d.ocut), d.olist,
str(d.nleading)
if d.olist==
"s" else "",
str(d.oeta))
613 log.debug(
"Define %s", toponame)
614 inputList = d.otype + d.olist
615 alg = AlgConf.JetHT( name = toponame, inputs = inputList, outputs = [toponame] )
616 alg.addgeneric(
'InputWidth', d.inputwidth)
617 alg.addgeneric(
'MaxTob', d.nleading)
618 alg.addgeneric(
'NumRegisters', 2
if d.olist==
"all" else 0)
619 alg.addgeneric(
'NumResultBits', 1)
621 alg.addvariable(
'MinEta', 0*_eta_conversion)
622 alg.addvariable(
'MaxEta', d.oeta*_eta_conversion)
623 alg.addvariable(
'MinHt', d.minHT*_et_conversion)
624 tm.registerTopoAlgo(alg)
631 "algoname" :
"DR_2MU5VFab",
634 "otype1" :
"MU5VFab",
640 for x
in DR_2MU5FMap:
645 inputList = [ d.otype1 ]
647 for bitId
in range(len(d.minDR)):
648 toponames.append(
"%iDR%i-%s%s" % (d.minDR[bitId], d.maxDR[bitId],
str(d.mult1[bitId]),
651 alg = AlgConf.DeltaRSqrIncl1( name = d.algoname, inputs = inputList, outputs = toponames)
652 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
653 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
654 alg.addgeneric(
'NumResultBits', len(toponames) )
656 for bitId
in range(len(toponames)):
657 alg.addvariable(
'MinET1', 0 * _et_conversion, bitId )
658 alg.addvariable(
'MinET2', 0 * _et_conversion, bitId )
659 alg.addvariable(
"DeltaRMin", d.minDR[bitId] * d.minDR[bitId] * _dr_conversion * _dr_conversion, bitId)
660 alg.addvariable(
"DeltaRMax", d.maxDR[bitId] * d.maxDR[bitId] * _dr_conversion * _dr_conversion, bitId)
662 tm.registerTopoAlgo(alg)
676 "algoname" :
"INVM_DPHI_eEMsm6",
683 "ocut1List" : [ 12, 15 ],
686 "ocut2List" : [ 12, 15 ],
693 for x
in eINVM_DPHIMap:
698 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
700 for bitId, ocut1Value
in enumerate(d.ocut1List):
701 toponames.append (
"%iINVM%i-%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.minInvm, d.maxInvm, d.minDphi, d.maxDphi,
702 d.otype1,
str(ocut1Value) , d.olist1,
str(d.nleading1)
if d.olist1==
"sm" else "",
703 d.otype2,
str(d.ocut2List[bitId]) , d.olist2,
str(d.nleading2)
if d.olist2==
"sm" else ""))
704 alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = d.algoname, inputs = inputList, outputs = toponames )
705 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSort)
706 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
707 alg.addgeneric(
'MaxTob1', d.nleading1)
708 alg.addgeneric(
'MaxTob2', d.nleading2)
709 alg.addgeneric(
'NumResultBits', len(toponames))
710 for bitId
in range(len(toponames)):
711 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1List[bitId]) * _et_conversion, bitId)
712 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype1, d.ocut2List[bitId]) * _et_conversion, bitId)
713 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm * _et_conversion * _et_conversion, bitId)
714 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm * _et_conversion * _et_conversion, bitId)
715 alg.addvariable(
'MinDeltaPhi', d.minDphi * _phi_conversion, bitId)
716 alg.addvariable(
'MaxDeltaPhi', d.maxDphi * _phi_conversion, bitId)
718 tm.registerTopoAlgo(alg)
734 "algoname" :
"INVM_INVDPHI_eEMsl6",
741 "ocut1List" : [ 9, 12],
744 "ocut2List" : [ 9, 12 ],
750 for x
in eINVM_DPHIMap:
755 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
757 for bitId, ocut1Value
in enumerate(d.ocut1List):
758 toponames.append (
"%iINVM%i-%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.minInvm, d.maxInvm, d.minDphi, d.maxDphi,
759 d.otype1,
str(ocut1Value) , d.olist1,
str(d.nleading1)
if d.olist1==
"sl" else "",
760 d.otype2,
str(d.ocut2List[bitId]) , d.olist2,
str(d.nleading2)
if d.olist2==
"sl" else ""))
761 alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = d.algoname, inputs = inputList, outputs = toponames )
763 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSort)
764 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
765 alg.addgeneric(
'MaxTob1', d.nleading1)
766 alg.addgeneric(
'MaxTob2', d.nleading2)
767 alg.addgeneric(
'NumResultBits', len(toponames))
768 for bitId
in range(len(toponames)):
769 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1List[bitId]) * _et_conversion, bitId)
770 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype1, d.ocut2List[bitId]) * _et_conversion, bitId)
771 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm * _et_conversion * _et_conversion, bitId)
772 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm * _et_conversion * _et_conversion, bitId)
773 alg.addvariable(
'MinDeltaPhi', d.minDphi * _phi_conversion, bitId)
774 alg.addvariable(
'MaxDeltaPhi', d.maxDphi * _phi_conversion, bitId)
776 tm.registerTopoAlgo(alg)
792 "algoname" :
"INVM_BOOSTDR_eEMsl6",
799 "ocut1List" : [ 9, 12 ],
802 "ocut2List" : [ 9, 12 ],
808 for x
in eINVM_DRMap:
813 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
815 for bitId, ocut1Value
in enumerate(d.ocut1List):
816 toponames.append (
"%iINVM%i-%iDR%i-%s%s%s%s-%s%s%s%s" % (d.minInvm, d.maxInvm, d.minDR, d.maxDR,
817 d.otype1,
str(ocut1Value) , d.olist1,
str(d.nleading1)
if d.olist1==
"sl" else "",
818 d.otype2,
str(d.ocut2List[bitId]) , d.olist2,
str(d.nleading2)
if d.olist2==
"sl" else ""))
820 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = d.algoname, inputs = inputList, outputs = toponames )
821 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSort)
822 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
823 alg.addgeneric(
'MaxTob1', d.nleading1)
824 alg.addgeneric(
'MaxTob2', d.nleading2)
825 alg.addgeneric(
'NumResultBits', len(toponames))
826 for bitId
in range(len(toponames)):
827 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1List[bitId]) * _et_conversion, bitId)
828 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype1, d.ocut2List[bitId]) * _et_conversion, bitId)
829 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm * _et_conversion * _et_conversion, bitId)
830 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm * _et_conversion * _et_conversion, bitId)
831 alg.addvariable(
'DeltaRMin', d.minDR*d.minDR*_dr_conversion*_dr_conversion, bitId)
832 alg.addvariable(
'DeltaRMax', d.maxDR*d.maxDR*_dr_conversion*_dr_conversion, bitId)
834 tm.registerTopoAlgo(alg)
847 eINVM_Ranges_DRMap = [
849 "algoname" :
"INVM_BOOSTDR_Ranges_eEM12sl6",
856 "ocut1List" : [12,12],
859 "ocut2List" : [12,12],
865 for x
in eINVM_Ranges_DRMap:
870 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
872 for bitId, ocut1Value
in enumerate(d.ocut1List):
873 toponames.append (
"%iINVM%i-%iDR%i-%s%s%s%s-%s%s%s%s" % (d.minInvm[bitId], d.maxInvm[bitId], d.minDR[bitId], d.maxDR[bitId],
874 d.otype1,
str(ocut1Value) , d.olist1,
str(d.nleading1)
if d.olist1==
"sl" else "",
875 d.otype2,
str(d.ocut2List[bitId]) , d.olist2,
str(d.nleading2)
if d.olist2==
"sl" else ""))
877 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = d.algoname, inputs = inputList, outputs = toponames )
878 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSort)
879 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
880 alg.addgeneric(
'MaxTob1', d.nleading1)
881 alg.addgeneric(
'MaxTob2', d.nleading2)
882 alg.addgeneric(
'NumResultBits', len(toponames))
883 for bitId
in range(len(toponames)):
884 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1List[bitId]) * _et_conversion, bitId)
885 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype1, d.ocut2List[bitId]) * _et_conversion, bitId)
886 alg.addvariable(
'MinMSqr', d.minInvm[bitId] * d.minInvm[bitId] * _et_conversion * _et_conversion, bitId)
887 alg.addvariable(
'MaxMSqr', d.maxInvm[bitId] * d.maxInvm[bitId] * _et_conversion * _et_conversion, bitId)
888 alg.addvariable(
'DeltaRMin', d.minDR[bitId]*d.minDR[bitId]*_dr_conversion*_dr_conversion, bitId)
889 alg.addvariable(
'DeltaRMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
891 tm.registerTopoAlgo(alg)
905 eINVM_Ranges_Asymm_DRMap = [
907 "algoname" :
"INVM_BOOSTDR_Ranges_Asymm_eEMsl6",
914 "ocut1List" : [12,12],
923 for x
in eINVM_Ranges_Asymm_DRMap:
928 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
930 for bitId, ocut1Value
in enumerate(d.ocut1List):
931 toponames.append (
"%iINVM%i-%iDR%i-%s%s%s%s-%s%s%s%s" % (d.minInvm[bitId], d.maxInvm[bitId], d.minDR[bitId], d.maxDR[bitId],
932 d.otype1,
str(ocut1Value) , d.olist1,
str(d.nleading1)
if d.olist1==
"sl" else "",
933 d.otype2,
str(d.ocut2List[bitId]) , d.olist2,
str(d.nleading2)
if d.olist2==
"sl" else ""))
935 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = d.algoname, inputs = inputList, outputs = toponames )
936 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSort)
937 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
938 alg.addgeneric(
'MaxTob1', d.nleading1)
939 alg.addgeneric(
'MaxTob2', d.nleading2)
940 alg.addgeneric(
'NumResultBits', len(toponames))
941 for bitId
in range(len(toponames)):
942 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1List[bitId]) * _et_conversion, bitId)
943 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype1, d.ocut2List[bitId]) * _et_conversion, bitId)
944 alg.addvariable(
'MinMSqr', d.minInvm[bitId] * d.minInvm[bitId] * _et_conversion * _et_conversion, bitId)
945 alg.addvariable(
'MaxMSqr', d.maxInvm[bitId] * d.maxInvm[bitId] * _et_conversion * _et_conversion, bitId)
946 alg.addvariable(
'DeltaRMin', d.minDR[bitId]*d.minDR[bitId]*_dr_conversion*_dr_conversion, bitId)
947 alg.addvariable(
'DeltaRMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
949 tm.registerTopoAlgo(alg)
954 INVM_DR_2MU5VFabMap = [
956 "algoname":
"INVM_DR_2MU5VFab",
961 "otype1" :
"MU5VFab",
965 for x
in INVM_DR_2MU5VFabMap:
972 for bitId
in range(len(d.minDR)):
973 toponames.append(
"%iINVM%i-%iDR%i-%i%s" % ( d.minInvm[bitId], d.maxInvm[bitId],
974 d.minDR[bitId] , d.maxDR[bitId],
978 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = d.algoname, inputs = inputList, outputs = toponames)
979 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
980 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
981 alg.addgeneric(
'NumResultBits', len(toponames))
982 for bitId
in range(len(toponames)):
983 alg.addvariable(
'MinET1', 0*_et_conversion, bitId)
984 alg.addvariable(
'MinET2', 0*_et_conversion, bitId)
985 alg.addvariable(
'MinMSqr', d.minInvm[bitId]*d.minInvm[bitId]*_et_conversion*_et_conversion, bitId)
986 alg.addvariable(
'MaxMSqr', d.maxInvm[bitId]*d.maxInvm[bitId]*_et_conversion*_et_conversion, bitId)
987 alg.addvariable(
'DeltaRMin', d.minDR[bitId]*d.minDR[bitId]*_dr_conversion*_dr_conversion, bitId)
988 alg.addvariable(
'DeltaRMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
989 tm.registerTopoAlgo(alg)
994 INVM_2MU3VFab_Map = [
996 "algoname":
"INVM_2MU3VFab",
999 "otype1" :
"MU3VFab",
1003 for x
in INVM_2MU3VFab_Map:
1008 inputList = d.otype1
1010 for bitId
in range(len(d.maxInvm)):
1011 toponames.append(
"%iINVM%i-%i%s" % ( d.minInvm, d.maxInvm[bitId],
1015 alg = AlgConf.InvariantMassInclusive1( name = d.algoname, inputs = inputList, outputs = toponames)
1016 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
1017 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
1018 alg.addgeneric(
'NumResultBits', len(toponames))
1019 for bitId
in range(len(toponames)):
1020 alg.addvariable(
'MinET1', 0*_et_conversion, bitId)
1021 alg.addvariable(
'MinET2', 0*_et_conversion, bitId)
1022 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion, bitId)
1023 alg.addvariable(
'MaxMSqr', d.maxInvm[bitId]*d.maxInvm[bitId]*_et_conversion*_et_conversion, bitId)
1024 tm.registerTopoAlgo(alg)
1029 invm_map = {
"algoname":
'INVM_eEMs6' ,
"ocutlist": [ 9, 15 ],
"minInvm": 1,
"maxInvm": 5,
"otype" :
"eEM",
"olist" :
"s",
1030 "nleading" : 1,
"inputwidth": HW.eEmOutputWidthSort}
1031 for x
in [ invm_map ]:
1035 setattr (d, k, x[k])
1036 inputList = d.otype + d.olist
1038 for ocut
in d.ocutlist:
1039 toponame =
"%iINVM%i-%s%s%s%s-eEMs6" % (d.minInvm, d.maxInvm, d.otype,
str(ocut)
if ocut > 0
else "", d.olist,
str(d.nleading)
if d.olist==
"s" else "")
1040 toponames.append(toponame)
1041 alg = AlgConf.InvariantMassInclusive2( name = d.algoname, inputs = [inputList,
'eEMs'], outputs = toponames)
1042 alg.addgeneric(
'InputWidth1', d.inputwidth)
1043 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
1044 alg.addgeneric(
'MaxTob1', d.nleading)
1045 alg.addgeneric(
'MaxTob2', HW.eEmOutputWidthSort)
1046 alg.addgeneric(
'NumResultBits', len(toponames))
1047 for bitid, ocut
in enumerate(d.ocutlist):
1049 alg.addvariable(
'MinET2', 0*_et_conversion, bitid)
1050 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion, bitid)
1051 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion, bitid)
1052 tm.registerTopoAlgo(alg)
1057 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU5VFab",
"otype2" :
"CjJ",
"ocut2": 30,
"olist2" :
"ab"},
1058 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU8Fab" ,
"otype2" :
"CjJ",
"ocut2": 30,
"olist2" :
"ab"},
1059 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU5VFab",
"otype2" :
"CjJ",
"ocut2": 40,
"olist2" :
"ab"},
1060 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU8Fab" ,
"otype2" :
"CjJ",
"ocut2": 40,
"olist2" :
"ab"},
1061 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU3Vab" ,
"otype2" :
"CjJ",
"ocut2": 40,
"olist2" :
"ab"},
1062 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU5VFab",
"otype2" :
"CjJ",
"ocut2": 80,
"olist2" :
"ab"},
1063 {
"minDr": 0,
"maxDr": 4,
"otype1" :
"MU5VFab",
"otype2" :
"CjJ",
"ocut2": 90,
"olist2" :
"ab"},
1069 setattr (d, k, x[k])
1070 toponame =
"%iDR%02d-%s-%s%s%s" % (d.minDr, d.maxDr, d.otype1, d.otype2,
str(d.ocut2), d.olist2)
1071 log.debug(
"Define %s", toponame)
1072 inputList = [d.otype1, d.otype2 + d.olist2]
1073 alg = AlgConf.DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
1074 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
1075 alg.addgeneric(
'InputWidth2', HW.jJetOutputWidthSelect)
1076 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
1077 alg.addgeneric(
'MaxTob2', HW.jJetOutputWidthSelect)
1078 alg.addgeneric(
'NumResultBits', 1)
1079 alg.addvariable(
'MinET1', 0*_et_conversion, 0)
1080 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, 0)
1081 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion, 0)
1082 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion, 0)
1083 tm.registerTopoAlgo(alg)
1092 {
"minInvm": 2,
"maxInvm": 8,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2" :
"", },
1093 {
"minInvm": 2,
"maxInvm": 9,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2" :
"", },
1094 {
"minInvm": 8,
"maxInvm": 15,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3Vab",},
1095 {
"minInvm": 2,
"maxInvm": 8,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3Vab",},
1096 {
"minInvm": 2,
"maxInvm": 9,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3Vab",},
1097 {
"minInvm": 8,
"maxInvm": 15,
"mult": 2,
"otype1" :
"MU5VFab",
"otype2" :
"", },
1098 {
"minInvm": 2,
"maxInvm": 9,
"mult": 2,
"otype1" :
"MU5VFab",
"otype2" :
"", },
1099 {
"minInvm": 7,
"maxInvm": 15,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2" :
"", },
1100 {
"minInvm": 7,
"maxInvm": 22,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3VFab",},
1101 {
"minInvm": 7,
"maxInvm": 14,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2" :
"MU3VFab",},
1102 {
"minInvm": 7,
"maxInvm": 14,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2" :
"", },
1104 for x
in listofalgos:
1108 setattr (d, k, x[k])
1109 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
1110 obj2 =
"-%s" % (d.otype2)
1111 toponame =
"%iINVM%i-%s%s" % (d.minInvm, d.maxInvm, obj1,
"" if d.mult>1
else obj2)
1112 log.debug(
"Define %s", toponame)
1113 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
1114 algoname = AlgConf.InvariantMassInclusive1
if (d.mult>1)
else AlgConf.InvariantMassInclusive2
1115 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
1117 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
1118 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
1120 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
1121 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
1122 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
1123 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
1124 alg.addgeneric(
'NumResultBits', 1)
1125 alg.addvariable(
'MinET1', 0*_et_conversion)
1126 alg.addvariable(
'MinET2', 0*_et_conversion)
1127 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm *_et_conversion*_et_conversion)
1128 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm *_et_conversion*_et_conversion)
1129 tm.registerTopoAlgo(alg)
1131 toponame =
"8INVM15-2CMU3Vab"
1132 log.debug(
"Define %s", toponame)
1133 inputList = [
'CMU3Vab']
1134 alg = AlgConf.InvariantMassInclusive1( name = toponame, inputs = inputList, outputs = toponame )
1135 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
1136 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
1137 alg.addgeneric(
'NumResultBits', 1)
1138 alg.addvariable(
'MinET1', 0*_et_conversion)
1139 alg.addvariable(
'MinET2', 0*_et_conversion)
1140 alg.addvariable(
'MinMSqr', 8*8*_et_conversion*_et_conversion)
1141 alg.addvariable(
'MaxMSqr', 15*15*_et_conversion*_et_conversion)
1142 tm.registerTopoAlgo(alg)
1145 {
"minInvm": 2,
"maxInvm": 8,
"mult": 1,
"otype1" :
"CMU3Vab",
"otype2" :
"MU3Vab"},
1151 setattr (d, k, x[k])
1152 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
1153 obj2 =
"-%s" % (d.otype2)
1154 toponame =
"%iINVM%i-%s%s" % (d.minInvm, d.maxInvm, obj1,
"" if d.mult>1
else obj2)
1155 log.debug(
"Define %s", toponame)
1156 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
1157 algoname = AlgConf.InvariantMassInclusive1
if (d.mult>1)
else AlgConf.InvariantMassInclusive2
1158 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
1160 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
1161 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
1162 alg.addgeneric(
'RequireOneBarrel', d.onebarrel)
1164 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
1165 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
1166 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
1167 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
1168 alg.addgeneric(
'NumResultBits', 1)
1169 alg.addvariable(
'MinET1', 0*_et_conversion)
1170 alg.addvariable(
'MinET2', 0*_et_conversion)
1171 alg.addvariable(
'MinMSqr', d.minInvm * d.minInvm *_et_conversion*_et_conversion)
1172 alg.addvariable(
'MaxMSqr', d.maxInvm * d.maxInvm *_et_conversion*_et_conversion)
1173 tm.registerTopoAlgo(alg)
1177 {
"minDr": 0,
"maxDr": 24,
"mult": 2,
"otype1" :
"CMU3Vab",
"otype2" :
"", },
1178 {
"minDr": 1,
"maxDr": 24,
"mult": 1,
"otype1" :
"CMU3Vab",
"otype2" :
"MU3Vab", },
1184 setattr (d, k, x[k])
1185 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
1186 obj2 =
"-%s" % (d.otype2)
1187 toponame =
"%iDR%i-%s%s" % (d.minDr, d.maxDr, obj1,
"" if d.mult>1
else obj2)
1188 log.debug(
"Define %s", toponame)
1189 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
1190 algoname = AlgConf.DeltaRSqrIncl1
if (d.mult>1)
else AlgConf.DeltaRSqrIncl2
1191 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
1193 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
1194 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
1196 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
1197 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
1198 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
1199 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
1200 alg.addgeneric(
'NumResultBits', 1)
1201 alg.addvariable(
'MinET1', 0*_et_conversion)
1202 alg.addvariable(
'MinET2', 0*_et_conversion)
1203 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr *_dr_conversion*_dr_conversion)
1204 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr *_dr_conversion*_dr_conversion)
1205 tm.registerTopoAlgo(alg)
1209 toponame =
'100RATIO-0MATCH-eTAU40si2-eEMall'
1210 alg = AlgConf.RatioMatch( name = toponame, inputs = [
'eTAUs',
'eEMall'], outputs = [ toponame ] )
1211 alg.addgeneric(
'InputWidth1', HW.eTauOutputWidthSort)
1212 alg.addgeneric(
'InputWidth2', HW.eEmInputWidth)
1213 alg.addgeneric(
'MaxTob1', 2)
1214 alg.addgeneric(
'MaxTob2', HW.eEmInputWidth)
1215 alg.addgeneric(
'NumResultBits', 1)
1217 alg.addvariable(
'MinET2', 0*_et_conversion)
1218 alg.addvariable(
'Ratio', 100, 0)
1219 tm.registerTopoAlgo(alg)
1222 toponame =
'NOT-0MATCH-eTAU40si1-eEMall'
1223 alg = AlgConf.NotMatch( name = toponame, inputs = [
'eTAUs',
'eEMall'], outputs = [ toponame ] )
1224 alg.addgeneric(
'InputWidth1', HW.eTauOutputWidthSort)
1225 alg.addgeneric(
'InputWidth2', HW.eEmInputWidth)
1226 alg.addgeneric(
'MaxTob1', 1)
1227 alg.addgeneric(
'MaxTob2', HW.eEmInputWidth)
1228 alg.addgeneric(
'NumResultBits', 1)
1230 alg.addvariable(
'MinET2', 0*_et_conversion)
1231 alg.addvariable(
'EtaMin1', 0*_eta_conversion)
1232 alg.addvariable(
'EtaMax1', 49*_eta_conversion)
1233 alg.addvariable(
'EtaMin2', 0*_eta_conversion)
1234 alg.addvariable(
'EtaMax2', 49*_eta_conversion)
1235 alg.addvariable(
'DRCut', 0)
1236 tm.registerTopoAlgo(alg)
1239 xemap = [{
"etcut": 0,
"Threlist": [ 40, 50, 55, 60, 65, 75 ]}]
1244 setattr (d, k, x[k])
1245 log.debug(
"Define %s", toponame)
1246 inputList = [
'jXENoSort_1BC',
'AjJall_1BC']
1248 for minxe
in d.Threlist:
1249 toponames.append(
"KF-jXE%s-AjJall" % (minxe))
1250 alg = AlgConf.KalmanMETCorrection( name =
"KF-jXE-AjJall", inputs = inputList, outputs = toponames )
1251 alg.addgeneric(
'InputWidth', HW.jJetInputWidth)
1252 alg.addgeneric(
'NumResultBits', len(toponames))
1253 for key, value
in KFMETweightParameters.items():
1257 alg.addvariable(key, value)
1258 alg.addvariable(
'MinET', 0)
1259 for bitid,minxe
in enumerate(d.Threlist):
1260 alg.addvariable(
'KFXE',
str(minxe*_et_conversion), bitid)
1261 tm.registerTopoAlgo(alg)
1267 {
"otype" :
"LATE-MU",
"ocut" : 10,
"inputwidth": HW.NumberOfDelayedMuons},
1273 setattr (d, k, x[k])
1275 toponame =
"%s%ss1" % ( d.otype,
str(d.ocut) )
1277 log.debug(
"Define %s", toponame)
1281 alg = AlgConf.EtCut( name = toponame, inputs = inputList, outputs = toponame )
1282 alg.addgeneric(
'InputWidth', d.inputwidth)
1283 alg.addgeneric(
'MaxTob', 1)
1284 alg.addgeneric(
'NumResultBits', 1)
1285 alg.addvariable(
'MinET',
str(d.ocut*_et_conversion))
1286 tm.registerTopoAlgo(alg)
1291 {
"itemNameMinHT": 111,
"minHT": 166,
"otype" :
"CjJ",
"ocut" : 40,
"olist" :
"ab",
"nleading" : HW.jJetOutputWidthSelect,
"inputwidth": HW.jJetOutputWidthSelect,
"oeta" : 26},
1297 setattr (d, k, x[k])
1298 toponame =
"SC%d-%s%s%s%spETA%s" % (d.itemNameMinHT, d.otype,
str(d.ocut), d.olist,
str(d.nleading)
if d.olist==
"s" else "",
str(d.oeta))
1299 log.debug(
"Define %s", toponame)
1300 inputList = d.otype + d.olist
1301 alg = AlgConf.SimpleCone( name = toponame, inputs = inputList, outputs = [toponame] )
1302 alg.addgeneric(
'InputWidth', d.inputwidth)
1303 alg.addgeneric(
'NumResultBits', 1)
1304 alg.addvariable(
'MinET', d.ocut*_et_conversion)
1305 alg.addvariable(
'MinSumET', d.minHT*_et_conversion)
1306 alg.addvariable(
'MaxRSqr', 10*10*_dr_conversion*_dr_conversion)
1307 tm.registerTopoAlgo(alg)
1311 {
"minInvm" : 0,
"maxInvm": 9,
"otype" :
"eEM",
"ocut1" : 9,
"olist" :
"ab",
"inputwidth": HW.eEmOutputWidthSelect,
"ocut2" : 0},
1317 setattr (d, k, x[k])
1318 inputList = d.otype + d.olist
1319 toponame =
"%iINVM%i-%s%s%s-%s%s" % (d.minInvm, d.maxInvm,
1320 d.otype,
str(d.ocut1) , d.olist,
1322 alg = AlgConf.InvariantMassInclusive1( name = toponame, inputs = inputList, outputs = toponame)
1323 alg.addgeneric(
'InputWidth', d.inputwidth)
1324 alg.addgeneric(
'MaxTob', HW.eEmOutputWidthSelect)
1325 alg.addgeneric(
'NumResultBits', 1)
1328 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion)
1329 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion)
1330 tm.registerTopoAlgo(alg)
1335 {
"minDr": 0,
"maxDr": 3,
"otype1" :
"eEM" ,
"ocut1": 9,
"olist1" :
"ab",
"otype2" :
"CjJ",
"ocut2": 40,
"olist2" :
"ab"}
1341 setattr (d, k, x[k])
1342 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)
1343 log.debug(
"Define %s", toponame)
1344 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
1345 alg = AlgConf.DeltaRSqrIncl2( name = toponame, inputs = inputList, outputs = [ toponame ])
1346 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSelect)
1347 alg.addgeneric(
'InputWidth2', HW.jJetOutputWidthSelect)
1348 alg.addgeneric(
'MaxTob1', HW.eEmOutputWidthSelect)
1349 alg.addgeneric(
'MaxTob2', HW.jJetOutputWidthSelect)
1350 alg.addgeneric(
'NumResultBits', 1)
1351 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, 0)
1352 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, 0)
1353 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion, 0)
1354 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion, 0)
1355 tm.registerTopoAlgo(alg)
1361 {
"minDphi": 27,
"maxDphi": 32,
"otype" :
"eEM",
"ocut1" : 0,
"olist" :
"s",
"nleading1" : 1,
"inputwidth1": HW.eEmOutputWidthSort,
"ocut2" : 0,
"nleading2": 6},
1367 setattr (d, k, x[k])
1368 toponame =
"%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.minDphi, d.maxDphi,
1369 d.otype,
str(d.ocut1)
if d.ocut1 > 0
else "", d.olist,
str(d.nleading1)
if d.olist==
"s" else "",
1370 d.otype,
str(d.ocut2)
if d.ocut2 > 0
else "", d.olist,
str(d.nleading2)
if d.olist==
"s" else "")
1371 log.debug(
"Define %s", toponame)
1372 inputList = d.otype + d.olist
1373 alg = AlgConf.DeltaPhiIncl1( name = toponame, inputs = inputList, outputs = toponame )
1374 alg.addgeneric(
'InputWidth', d.inputwidth1)
1375 alg.addgeneric(
'MaxTob', d.nleading2)
1376 alg.addgeneric(
'NumResultBits', 1)
1379 alg.addvariable(
'MinDeltaPhi', d.minDphi*_phi_conversion, 0)
1380 alg.addvariable(
'MaxDeltaPhi', d.maxDphi*_phi_conversion, 0)
1381 tm.registerTopoAlgo(alg)
1385 {
"minDr": 0,
"maxDr": 28,
"otype1" :
"eTAU" ,
"ocut1": 30,
"olist1" :
"abm",
1386 "nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
"otype2" :
"eTAU",
"ocut2": 20,
"olist2" :
"abm",
1387 "nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect},
1393 setattr (d, k, x[k])
1394 obj1 =
"%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
1395 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1396 toponame =
"%iDR%i-%s%s" % (d.minDr, d.maxDr, obj1, obj2)
1397 log.debug(
"Define %s", toponame)
1398 inputList = [d.otype1 + d.olist1]
if d.otype1==d.otype2
else [d.otype1 + d.olist1, d.otype2 + d.olist2]
1399 algoname = AlgConf.DeltaRSqrIncl1
if d.otype1==d.otype2
else AlgConf.DeltaRSqrIncl2
1400 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
1401 if d.otype1==d.otype2:
1402 alg.addgeneric(
'InputWidth', d.inputwidth1)
1403 alg.addgeneric(
'MaxTob', d.nleading1)
1405 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1406 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1407 alg.addgeneric(
'MaxTob1', d.nleading1)
1408 alg.addgeneric(
'MaxTob2', d.nleading2)
1409 alg.addgeneric(
'NumResultBits', 1)
1410 if d.otype1==d.otype2:
1413 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
1414 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
1416 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion , 0)
1417 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion , 0)
1418 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion, 0)
1419 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion, 0)
1420 tm.registerTopoAlgo(alg)
1433 DISAMB_DR_jJ_eTau_eTau_Map = [
1435 "algoname":
"2DISAMB_jJ55ab_DR_eTAU_eTAU",
1442 "nleading1": HW.eTauOutputWidthSelect,
1443 "inputwidth1": HW.eTauOutputWidthSelect,
1446 "nleading2": HW.eTauOutputWidthSelect,
1447 "inputwidth2": HW.eTauOutputWidthSelect,
1451 "nleading3": HW.jJetOutputWidthSelect,
1452 "inputwidth3": HW.jJetOutputWidthSelect,
1456 "algoname":
"2DISAMB_jJ50ab_DR_eTAU_eTAU",
1463 "nleading1": HW.eTauOutputWidthSelect,
1464 "inputwidth1": HW.eTauOutputWidthSelect,
1467 "nleading2": HW.eTauOutputWidthSelect,
1468 "inputwidth2": HW.eTauOutputWidthSelect,
1472 "nleading3": HW.jJetOutputWidthSelect,
1473 "inputwidth3": HW.jJetOutputWidthSelect,
1477 "algoname":
"2DISAMB_jJ40ab_DR_eTAU_eTAU",
1484 "nleading1": HW.eTauOutputWidthSelect,
1485 "inputwidth1": HW.eTauOutputWidthSelect,
1488 "nleading2": HW.eTauOutputWidthSelect,
1489 "inputwidth2": HW.eTauOutputWidthSelect,
1493 "nleading3": HW.jJetOutputWidthSelect,
1494 "inputwidth3": HW.jJetOutputWidthSelect,
1498 "algoname":
"2DISAMB_jJ30ab_DR_eTAU_eTAU",
1505 "nleading1": HW.eTauOutputWidthSelect,
1506 "inputwidth1": HW.eTauOutputWidthSelect,
1509 "nleading2": HW.eTauOutputWidthSelect,
1510 "inputwidth2": HW.eTauOutputWidthSelect,
1514 "nleading3": HW.jJetOutputWidthSelect,
1515 "inputwidth3": HW.jJetOutputWidthSelect,
1519 for x
in DISAMB_DR_jJ_eTau_eTau_Map:
1524 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3]
1526 for bitId
in range(len(d.maxDR)):
1527 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
1528 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1529 obj3 =
"%s%s%s" % (d.otype3,
str(d.ocut3), d.olist3)
1530 toponames.append(
"%sDISAMB-%s-%dDR%d%s%s" % (
str(d.disamb)
if d.disamb>0
else "",
1531 obj3, d.minDR, d.maxDR[bitId], obj1, obj2))
1533 alg = AlgConf.DisambiguationDRIncl3( name = d.algoname, inputs = inputList, outputs = toponames )
1534 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1535 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1536 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1537 alg.addgeneric(
'MaxTob1', d.nleading1)
1538 alg.addgeneric(
'MaxTob2', d.nleading2)
1539 alg.addgeneric(
'MaxTob3', d.nleading3)
1540 alg.addgeneric(
'NumResultBits', len(toponames))
1542 for bitId
in range(len(toponames)):
1543 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, bitId)
1544 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, bitId)
1545 alg.addvariable(
'MinET3',
get_threshold_cut(d.otype3, d.ocut3)*_et_conversion, bitId)
1546 alg.addvariable(
'DisambDRSqrMin', d.minDR*d.minDR*_dr_conversion*_dr_conversion, bitId)
1547 alg.addvariable(
'DisambDRSqrMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
1548 alg.addvariable(
'DisambDRSqr', d.disamb*d.disamb*_dr_conversion*_dr_conversion, bitId)
1550 tm.registerTopoAlgo(alg)
1556 DR_eTau30_eTau20_Map = [
1558 "algoname":
"DR_eTAU30ab_eTAU20ab",
1566 "inputwidth": HW.eTauOutputWidthSelect,
1570 for x
in DR_eTau30_eTau20_Map:
1575 inputList = [d.otype1 + d.olist1]
1577 for bitId
in range(len(d.maxDR)):
1578 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
1579 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1580 toponames.append(
"%dDR%d%s%s" % ( d.minDR, d.maxDR[bitId], obj1, obj2))
1582 alg = AlgConf.DeltaRSqrIncl1( name = d.algoname, inputs = inputList, outputs = toponames )
1584 alg.addgeneric(
'InputWidth', d.inputwidth)
1585 alg.addgeneric(
'MaxTob', HW.eTauOutputWidthSelect)
1586 alg.addgeneric(
'NumResultBits', len(toponames) )
1588 for bitId
in range(len(toponames)):
1589 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, bitId)
1590 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, bitId)
1591 alg.addvariable(
'DeltaRMin', d.minDR*d.minDR*_dr_conversion*_dr_conversion, bitId)
1592 alg.addvariable(
'DeltaRMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
1595 tm.registerTopoAlgo(alg)
1600 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"abm",
"nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
1601 "otype2" :
"eTAU",
"ocut2": 20,
"olist2":
"abm",
"nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect,
1602 "otype3" :
"jJ" ,
"ocut3": 55,
"olist3":
"ab" ,
"nleading3": HW.jJetOutputWidthSelect,
"inputwidth3": HW.jJetOutputWidthSelect,
1603 "drcutmin": 0,
"drcutmax": 28},
1605 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
1606 "otype2" :
"eTAU",
"ocut2": 20,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect,
1607 "otype3" :
"jJ" ,
"ocut3": 55,
"olist3":
"ab" ,
"nleading3": HW.jJetOutputWidthSelect,
"inputwidth3": HW.jJetOutputWidthSelect,
1608 "drcutmin": 4 ,
"drcutmax": 28},
1610 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
1611 "otype2" :
"eTAU",
"ocut2": 20,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect,
1612 "otype3" :
"jJ" ,
"ocut3": 55,
"olist3":
"ab" ,
"nleading3": HW.jJetOutputWidthSelect,
"inputwidth3": HW.jJetOutputWidthSelect,
1613 "drcutmin": 4 ,
"drcutmax": 32},
1615 "otype1" :
"eTAU",
"ocut1": 30,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
1616 "otype2" :
"eTAU",
"ocut2": 20,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect,
1617 "otype3" :
"jJ" ,
"ocut3": 55,
"olist3":
"ab" ,
"nleading3": HW.jJetOutputWidthSelect,
"inputwidth3": HW.jJetOutputWidthSelect,
1618 "drcutmin": 10 ,
"drcutmax": 32},
1624 setattr (d, k, x[k])
1625 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
1626 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1627 obj3 =
"%s%s%s" % (d.otype3,
str(d.ocut3), d.olist3)
1628 toponame =
"%sDISAMB-%s-%dDR%d%s%s" % (
str(d.disamb)
if d.disamb>0
else "", obj3, d.drcutmin, d.drcutmax, obj1, obj2)
1629 log.debug(
"Define %s", toponame)
1630 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3]
1631 alg = AlgConf.DisambiguationDRIncl3( name = toponame, inputs = inputList, outputs = [ toponame ])
1632 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1633 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1634 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1635 alg.addgeneric(
'MaxTob1', d.nleading1)
1636 alg.addgeneric(
'MaxTob2', d.nleading2)
1637 alg.addgeneric(
'MaxTob3', d.nleading3)
1638 alg.addgeneric(
'NumResultBits', 1)
1639 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, 0)
1640 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, 0)
1641 alg.addvariable(
'MinET3',
get_threshold_cut(d.otype3, d.ocut3)*_et_conversion, 0)
1642 alg.addvariable(
'DisambDRSqrMin', d.drcutmin*d.drcutmin*_dr_conversion*_dr_conversion, 0)
1643 alg.addvariable(
'DisambDRSqrMax', d.drcutmax*d.drcutmax*_dr_conversion*_dr_conversion, 0)
1644 alg.addvariable(
'DisambDRSqr', d.disamb*d.disamb*_dr_conversion*_dr_conversion, 0)
1645 tm.registerTopoAlgo(alg)
1650 {
"minDeta": 0,
"maxDeta": 20,
"otype" :
"jJ",
"ocut1" : 90,
"olist" :
"s",
1651 "nleading1" : 1,
"inputwidth1": HW.jJetOutputWidthSort,
"ocut2" : 0,
"nleading2": 2},
1652 {
"minDeta": 0,
"maxDeta" : 24,
"otype" :
"eTAU" ,
"olist" :
"s",
"inputwidth1": HW.eTauOutputWidthSort,
1653 "ocut1" : 30,
"nleading1": 2,
1654 "ocut2" : 12,
"nleading2": 2},
1660 setattr (d, k, x[k])
1661 toponame =
"%iDETA%i-%s%s%s%s-%s%s%s%s" % (d.minDeta, d.maxDeta,
1662 d.otype, d.ocut1
if d.ocut1 > 0
else "", d.olist, d.nleading1,
1663 d.otype, d.ocut2
if d.ocut2 > 0
else "", d.olist, d.nleading2)
1664 log.debug(
"Define %s", toponame)
1665 inputList = d.otype + d.olist
1666 alg = AlgConf.DeltaEtaIncl1( name = toponame, inputs = inputList, outputs = toponame )
1667 alg.addgeneric(
'InputWidth', d.inputwidth1)
1668 alg.addgeneric(
'MaxTob', d.nleading2)
1669 alg.addgeneric(
'NumResultBits', 1)
1670 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype, d.ocut1)*_et_conversion, 0)
1671 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype, d.ocut2)*_et_conversion, 0)
1672 alg.addvariable(
'MinDeltaEta', d.minDeta*_eta_conversion, 0)
1673 alg.addvariable(
'MaxDeltaEta', d.maxDeta*_eta_conversion, 0)
1674 tm.registerTopoAlgo(alg)
1680 DPHI_jXE40delay_jJ40s_map = [
1682 "algoname" :
"DPHI_jXE40delay_jJ40s",
1685 "InputWidth1": HW.metOutputWidth,
1686 "InputWidth2": HW.jJetOutputWidthSort,
1689 "MinET1" : 40*_et_conversion,
1690 "MinET2" : 40*_et_conversion,
1691 "MinDeltaPhi": 0*_phi_conversion,
1692 "phi_thresholds": [10, 99],
1696 for x
in DPHI_jXE40delay_jJ40s_map:
1701 inputList = [
'jXEs',
'jJs']
1703 for bitId
in range(len(d.phi_thresholds)):
1704 toponames.append(
"0DPHI%d-jXE40delay-jJ40s" % (d.phi_thresholds[bitId]))
1706 alg = AlgConf.DeltaPhiIncl2( name = d.algoname, inputs = inputList, outputs = toponames )
1708 alg.addgeneric(
'InputWidth1', d.InputWidth1)
1709 alg.addgeneric(
'InputWidth2', d.InputWidth2)
1710 alg.addgeneric(
'MaxTob1', d.MaxTob1)
1711 alg.addgeneric(
'MaxTob2', d.MaxTob2)
1712 alg.addgeneric(
'NumResultBits', len(toponames) )
1714 for bitId
in range(len(toponames)):
1715 alg.addvariable(
'MinET1', d.MinET1, bitId)
1716 alg.addvariable(
'MinET2', d.MinET2, bitId)
1717 alg.addvariable(
'MinDeltaPhi', d.MinDeltaPhi, bitId)
1718 alg.addvariable(
'MaxDeltaPhi', d.phi_thresholds[bitId]*_phi_conversion, bitId)
1719 tm.registerTopoAlgo(alg)
1724 "otype1" :
"eTAU",
"ocut1": 20,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
1725 "otype2" :
"eTAU",
"ocut2": 12,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect,
1726 "otype3" :
"jJ",
"ocut3": 40,
"olist3":
"ab",
"nleading3": HW.jJetOutputWidthSelect,
"inputwidth3": HW.jJetOutputWidthSelect,
1727 "drcutmin": 0,
"drcutmax": 10},
1733 setattr (d, k, x[k])
1734 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
1735 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1736 obj3 =
"%s%s%s" % (d.otype3,
str(d.ocut3), d.olist3)
1737 toponame =
"%sDISAMB-%s-%dDR%d%s%s" % (
str(d.disamb)
if d.disamb>0
else "", obj3, d.drcutmin, d.drcutmax, obj1, obj2)
1738 log.debug(
"Define %s", toponame)
1739 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3]
1740 alg = AlgConf.DisambiguationDRIncl3( name = toponame, inputs = inputList, outputs = [ toponame ])
1741 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1742 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1743 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1744 alg.addgeneric(
'MaxTob1', d.nleading1)
1745 alg.addgeneric(
'MaxTob2', d.nleading2)
1746 alg.addgeneric(
'MaxTob3', d.nleading3)
1747 alg.addgeneric(
'NumResultBits', 1)
1748 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, 0)
1749 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, 0)
1750 alg.addvariable(
'MinET3',
get_threshold_cut(d.otype3, d.ocut3)*_et_conversion, 0)
1751 alg.addvariable(
'DisambDRSqrMin', d.drcutmin*d.drcutmin*_dr_conversion*_dr_conversion, 0)
1752 alg.addvariable(
'DisambDRSqrMax', d.drcutmax*d.drcutmax*_dr_conversion*_dr_conversion, 0)
1753 alg.addvariable(
'DisambDRSqr', d.disamb*d.disamb*_dr_conversion*_dr_conversion, 0)
1754 tm.registerTopoAlgo(alg)
1765 "algoname" :
"ADVAE2A-jJ0s-eTAU0s-MU0s-jXE0s",
1766 "otype1" :
"jJ",
"olist1":
"s",
"inputwidth1": 6,
"nleading1": 6,
1767 "otype2" :
"eTAU",
"olist2":
"s",
"inputwidth2": 6,
"nleading2": 4,
1768 "otype3" :
"MU",
"olist3":
"s",
"inputwidth3": 6,
"nleading3": 4,
1769 "otype4" :
"jXE",
"olist4":
"s",
"inputwidth4": 1,
"nleading4": 1,
1770 "WPList" : [
"Tight",
"Loose"],
1771 "AnomalyScoreThresh" : [3875, 3875],
1776 setattr (d, k, algo[k])
1779 toponames.append(
"ADVAE2A-%s%s0%s-%s%s0%s-%s%s0%s-%s0%s-%s" %(
str(d.nleading1), d.otype1, d.olist1,
1780 str(d.nleading2), d.otype2, d.olist2,
1781 str(d.nleading3), d.otype3, d.olist3,
1784 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3, d.otype4 + d.olist4]
1785 alg = AlgConf.ADVAE_2A( name = d.algoname, inputs = inputList, outputs = toponames)
1786 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1787 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1788 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1789 alg.addgeneric(
'InputWidth4', d.inputwidth4)
1790 alg.addgeneric(
'MaxTob1', d.nleading1)
1791 alg.addgeneric(
'MaxTob2', d.nleading2)
1792 alg.addgeneric(
'MaxTob3', d.nleading3)
1793 alg.addgeneric(
'MaxTob4', d.nleading4)
1794 alg.addgeneric(
'NumResultBits', len(toponames))
1795 alg.addgeneric(
'ADVAEVersion', 1)
1796 for bitId
in range(len(toponames)):
1797 alg.addvariable(
'AnomalyScoreThresh', d.AnomalyScoreThresh[bitId], bitId)
1798 tm.registerTopoAlgo(alg)
1802 "otype1" :
"eTAU",
"ocut1": 20,
"olist1":
"ab",
"nleading1": HW.eTauOutputWidthSelect,
"inputwidth1": HW.eTauOutputWidthSelect,
1803 "otype2" :
"eTAU",
"ocut2": 12,
"olist2":
"ab",
"nleading2": HW.eTauOutputWidthSelect,
"inputwidth2": HW.eTauOutputWidthSelect,
1804 "otype3" :
"jJ",
"ocut3": 30,
"olist3":
"ab",
"nleading3": HW.jJetOutputWidthSelect,
"inputwidth3": HW.jJetOutputWidthSelect,
1805 "drcutmin": 0,
"drcutmax": 10},
1811 setattr (d, k, x[k])
1812 obj1 =
"-%s%s%s" % (d.otype1,
str(d.ocut1), d.olist1)
1813 obj2 =
"-%s%s%s" % (d.otype2,
str(d.ocut2), d.olist2)
1814 obj3 =
"%s%s%s" % (d.otype3,
str(d.ocut3), d.olist3)
1815 toponame =
"%sDISAMB-%s-%dDR%d%s%s" % (
str(d.disamb)
if d.disamb>0
else "", obj3, d.drcutmin, d.drcutmax, obj1, obj2)
1816 log.debug(
"Define %s", toponame)
1817 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2, d.otype3 + d.olist3]
1818 alg = AlgConf.DisambiguationDRIncl3( name = toponame, inputs = inputList, outputs = [ toponame ])
1819 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1820 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1821 alg.addgeneric(
'InputWidth3', d.inputwidth3)
1822 alg.addgeneric(
'MaxTob1', d.nleading1)
1823 alg.addgeneric(
'MaxTob2', d.nleading2)
1824 alg.addgeneric(
'MaxTob3', d.nleading3)
1825 alg.addgeneric(
'NumResultBits', 1)
1826 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, 0)
1827 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion, 0)
1828 alg.addvariable(
'MinET3',
get_threshold_cut(d.otype3, d.ocut3)*_et_conversion, 0)
1829 alg.addvariable(
'DisambDRSqrMin', d.drcutmin*d.drcutmin*_dr_conversion*_dr_conversion, 0)
1830 alg.addvariable(
'DisambDRSqrMax', d.drcutmax*d.drcutmax*_dr_conversion*_dr_conversion, 0)
1831 alg.addvariable(
'DisambDRSqr', d.disamb*d.disamb*_dr_conversion*_dr_conversion, 0)
1832 tm.registerTopoAlgo(alg)
1836 {
"itemNameMinInvm": 400,
"minInvm": 640 ,
"minDphi": 0,
"maxDphiList": [26, 24, 22, 20],
1837 "otype1" :
"AjJ",
"ocut1" : 60,
"olist1" :
"s",
"nleading1" : 6,
"inputwidth": HW.jJetOutputWidthSort,
1838 "otype2" :
"AjJ",
"ocut2" : 50,
"olist2" :
"s",
"nleading2" : 6 }
1840 for x
in NFFDphimap:
1844 setattr (d, k, x[k])
1845 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
1847 for maxDphi
in d.maxDphiList:
1848 toponames.append (
"%iINVM-%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.itemNameMinInvm, d.minDphi, maxDphi,
1849 d.otype1,
str(d.ocut1) , d.olist1,
str(d.nleading1)
if d.olist1==
"s" else "",
1850 d.otype2,
str(d.ocut2) , d.olist2,
str(d.nleading2)
if d.olist2==
"s" else ""))
1851 alg = AlgConf.InvariantMassDeltaPhiInclusive2( name =
'jINVM_DPHI', inputs = inputList, outputs = toponames)
1852 alg.addgeneric(
'InputWidth1', d.inputwidth)
1853 alg.addgeneric(
'InputWidth2', d.inputwidth)
1854 alg.addgeneric(
'MaxTob1', d.nleading1)
1855 alg.addgeneric(
'MaxTob2', d.nleading2)
1856 alg.addgeneric(
'NumResultBits', len(toponames))
1857 for bitid,maxDphi
in enumerate(d.maxDphiList):
1858 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion , bitid)
1859 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion , bitid)
1860 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm *_et_conversion*_et_conversion , bitid)
1861 alg.addvariable(
'MaxMSqr', _no_m_upper_threshold , bitid)
1862 alg.addvariable(
'MinDeltaPhi', d.minDphi*_phi_conversion , bitid)
1863 alg.addvariable(
'MaxDeltaPhi', maxDphi*_phi_conversion, bitid)
1864 tm.registerTopoAlgo(alg)
1869 {
"itemNameMinInvm": 400,
"minInvm": 640 ,
"minDphi": 0,
"maxDphiList": [26, 24, 22, 20],
1870 "otype1" :
"jJ",
"ocut1" : 60,
"olist1" :
"s",
"nleading1" : 6,
"inputwidth": HW.jJetOutputWidthSort,
1871 "otype2" :
"AjJ",
"ocut2" : 50,
"olist2" :
"s",
"nleading2" : 6 }
1873 for x
in NFFDphimap:
1877 setattr (d, k, x[k])
1878 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
1880 for maxDphi
in d.maxDphiList:
1881 toponames.append (
"%iINVM-%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.itemNameMinInvm, d.minDphi, maxDphi,
1882 d.otype1,
str(d.ocut1) , d.olist1,
str(d.nleading1)
if d.olist1==
"s" else "",
1883 d.otype2,
str(d.ocut2) , d.olist2,
str(d.nleading2)
if d.olist2==
"s" else ""))
1884 alg = AlgConf.InvariantMassDeltaPhiInclusive2( name =
'jINVM_DPHI_NFF', inputs = inputList, outputs = toponames)
1885 alg.addgeneric(
'InputWidth1', d.inputwidth)
1886 alg.addgeneric(
'InputWidth2', d.inputwidth)
1887 alg.addgeneric(
'MaxTob1', d.nleading1)
1888 alg.addgeneric(
'MaxTob2', d.nleading2)
1889 alg.addgeneric(
'NumResultBits', len(toponames))
1890 for bitid,maxDphi
in enumerate(d.maxDphiList):
1891 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion , bitid)
1892 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion , bitid)
1893 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm *_et_conversion*_et_conversion , bitid)
1894 alg.addvariable(
'MaxMSqr', _no_m_upper_threshold , bitid)
1895 alg.addvariable(
'MinDeltaPhi', d.minDphi*_phi_conversion , bitid)
1896 alg.addvariable(
'MaxDeltaPhi', maxDphi*_phi_conversion, bitid)
1897 tm.registerTopoAlgo(alg)
1902 {
"itemNameMinInvm": 400,
"minInvm": 640,
"otype1" :
"AjJ",
"ocut1": 60,
"olist1" :
"s",
"nleading1" : 6,
"inputwidth1": HW.jJetOutputWidthSort,
1903 "otype2" :
"AjJ",
"ocut2": 50,
"olist2" :
"s",
"nleading2" : 6,
"inputwidth2": HW.jJetOutputWidthSort,
"applyEtaCut":1,
1904 "minEta1": 0 ,
"maxEta1": 32 ,
"minEta2": 30 ,
"maxEta2": 49 , },
1910 setattr (d, k, x[k])
1911 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)
1912 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)
1913 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist2]
1914 toponame =
"%iINVM-%s%s" % (d.itemNameMinInvm, obj1, obj2)
1915 alg = AlgConf.InvariantMassInclusive2( name = toponame, inputs = inputList, outputs = toponame)
1916 alg.addgeneric(
'InputWidth1', d.inputwidth1)
1917 alg.addgeneric(
'InputWidth2', d.inputwidth2)
1918 alg.addgeneric(
'MaxTob1', d.nleading1)
1919 alg.addgeneric(
'MaxTob2', d.nleading2)
1920 alg.addgeneric(
'NumResultBits', 1)
1921 if (d.applyEtaCut>0):
1922 alg.addgeneric(
'ApplyEtaCut', d.applyEtaCut)
1925 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion )
1926 alg.addvariable(
'MaxMSqr', _no_m_upper_threshold )
1927 if (d.applyEtaCut>0):
1928 alg.addvariable(
'MinEta1', d.minEta1*_eta_conversion )
1929 alg.addvariable(
'MaxEta1', d.maxEta1*_eta_conversion )
1930 alg.addvariable(
'MinEta2', d.minEta2*_eta_conversion )
1931 alg.addvariable(
'MaxEta2', d.maxEta2*_eta_conversion )
1932 tm.registerTopoAlgo(alg)
1936 {
"itemNameMinInvmList": [300, 400, 500, 700],
"minInvmList": [480, 640, 800, 1100] ,
1937 "otype1" :
"AjJ",
"ocut1" : 60,
"olist1" :
"s",
"nleading1" : 6,
"inputwidth": HW.jJetOutputWidthSort,
1938 "otype2" :
"AjJ",
"ocut2" : 50,
"olist2" :
"s",
"nleading2" : 6 }
1944 setattr (d, k, x[k])
1945 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
1947 for minInvm
in d.itemNameMinInvmList:
1948 toponames.append (
"%iINVM-%s%s%s%s-%s%s%s%s" % (minInvm,
1949 d.otype1,
str(d.ocut1) , d.olist1,
str(d.nleading1)
if d.olist1==
"s" else "",
1950 d.otype2,
str(d.ocut2) , d.olist2,
str(d.nleading2)
if d.olist2==
"s" else ""))
1951 alg = AlgConf.InvariantMassInclusive2( name =
'jINVM', inputs = inputList, outputs = toponames)
1952 alg.addgeneric(
'InputWidth1', d.inputwidth)
1953 alg.addgeneric(
'InputWidth2', d.inputwidth)
1954 alg.addgeneric(
'MaxTob1', d.nleading1)
1955 alg.addgeneric(
'MaxTob2', d.nleading2)
1956 alg.addgeneric(
'NumResultBits', len(toponames))
1957 for bitid,minInvm
in enumerate(d.minInvmList):
1958 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion , bitid)
1959 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion , bitid)
1960 alg.addvariable(
'MinMSqr', minInvm*minInvm*_et_conversion*_et_conversion , bitid)
1961 alg.addvariable(
'MaxMSqr', _no_m_upper_threshold , bitid)
1962 tm.registerTopoAlgo(alg)
1966 {
"itemNameMinInvmList": [300, 400, 500, 700],
"minInvmList": [480, 640, 800, 1100] ,
1967 "otype1" :
"jJ",
"ocut1" : 60,
"olist1" :
"s",
"nleading1" : 6,
"inputwidth": HW.jJetOutputWidthSort,
1968 "otype2" :
"AjJ",
"ocut2" : 50,
"olist2" :
"s",
"nleading2" : 6 }
1974 setattr (d, k, x[k])
1975 inputList = [d.otype1 + d.olist1, d.otype2 + d.olist1]
1977 for minInvm
in d.itemNameMinInvmList:
1978 toponames.append (
"%iINVM-%s%s%s%s-%s%s%s%s" % (minInvm,
1979 d.otype1,
str(d.ocut1) , d.olist1,
str(d.nleading1)
if d.olist1==
"s" else "",
1980 d.otype2,
str(d.ocut2) , d.olist2,
str(d.nleading2)
if d.olist2==
"s" else ""))
1981 alg = AlgConf.InvariantMassInclusive2( name =
'jINVM_NFF', inputs = inputList, outputs = toponames)
1982 alg.addgeneric(
'InputWidth1', d.inputwidth)
1983 alg.addgeneric(
'InputWidth2', d.inputwidth)
1984 alg.addgeneric(
'MaxTob1', d.nleading1)
1985 alg.addgeneric(
'MaxTob2', d.nleading2)
1986 alg.addgeneric(
'NumResultBits', len(toponames))
1987 for bitid,minInvm
in enumerate(d.minInvmList):
1988 alg.addvariable(
'MinET1',
get_threshold_cut(
"CjJ", d.ocut1)*_et_conversion , bitid)
1989 alg.addvariable(
'MinET2',
get_threshold_cut(d.otype2, d.ocut2)*_et_conversion , bitid)
1990 alg.addvariable(
'MinMSqr', minInvm*minInvm*_et_conversion*_et_conversion , bitid)
1991 alg.addvariable(
'MaxMSqr', _no_m_upper_threshold , bitid)
1992 tm.registerTopoAlgo(alg)
1999 toponame =
"0INVM10-3MU3Vab"
2000 log.debug(
"Define %s", toponame)
2001 inputList =
'MU3Vab'
2002 alg = AlgConf.InvariantMassThreeTOBsIncl1( name = toponame, inputs = inputList, outputs = toponame )
2003 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2004 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2005 alg.addgeneric(
'NumResultBits', 1)
2006 alg.addvariable(
'MinET1', 0*_et_conversion)
2007 alg.addvariable(
'MinMSqr', 0*_et_conversion*_et_conversion)
2008 alg.addvariable(
'MaxMSqr', 10*10*_et_conversion*_et_conversion)
2009 tm.registerTopoAlgo(alg)
2011 toponame =
"0INVM10-3MU3VFab"
2012 log.debug(
"Define %s", toponame)
2013 inputList =
'MU3VFab'
2014 alg = AlgConf.InvariantMassThreeTOBsIncl1( name = toponame, inputs = inputList, outputs = toponame )
2015 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2016 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2017 alg.addgeneric(
'NumResultBits', 1)
2018 alg.addvariable(
'MinET1', 0*_et_conversion)
2019 alg.addvariable(
'MinMSqr', 0*_et_conversion*_et_conversion)
2020 alg.addvariable(
'MaxMSqr', 10*10*_et_conversion*_et_conversion)
2021 tm.registerTopoAlgo(alg)
2024 toponame =
"0INVM10C-3MU3Vab"
2025 log.debug(
"Define %s", toponame)
2026 inputList =
'MU3Vab'
2027 alg = AlgConf.InvariantMassThreeTOBsIncl1Charge( name = toponame, inputs = inputList, outputs = toponame )
2028 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2029 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2030 alg.addgeneric(
'NumResultBits', 1)
2031 alg.addvariable(
'MinET1', 0*_et_conversion)
2032 alg.addvariable(
'MinMSqr', 0*_et_conversion*_et_conversion)
2033 alg.addvariable(
'MaxMSqr', 10*10*_et_conversion*_et_conversion)
2034 tm.registerTopoAlgo(alg)
2050 INVM_DR_eEM_MU_Map = [{
2051 "algoname":
"INVM_DR_eEM_MU",
2060 "olist2": [
"Fab",
"VFab"],
2062 "ocut2Offset" : [3,0]
2066 for x
in INVM_DR_eEM_MU_Map:
2071 inputList = [d.otype1 + d.olist1, d.otype2 +
str(d.ocut2) + d.olist2[1] ]
2073 for bitId
in range(len(d.ocut1)):
2074 obj1 =
"-%s%s%s" % (d.otype1,
str( d.ocut1[bitId] ) , d.olist1)
2075 obj2 =
"-%s%s%s" % (d.otype2,
str( d.ocut2 + d.ocut2Offset[bitId] ) , d.olist2[bitId])
2076 toponames.append(
"%dINVM%d-%dDR%d%s%s" % ( d.minInvm, d.maxInvm, d.minDR, d.maxDR, obj1, obj2))
2078 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl2( name = d.algoname, inputs = inputList, outputs = toponames )
2080 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSelect)
2081 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
2082 alg.addgeneric(
'MaxTob1', HW.eEmOutputWidthSort)
2083 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
2084 alg.addgeneric(
'ApplyEtaCut', 1)
2086 alg.addgeneric(
'NumResultBits', len(toponames) )
2088 for bitId
in range(len(toponames)):
2089 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1[bitId])*_et_conversion, bitId)
2090 alg.addvariable(
'MinET2', (d.ocut2 + d.ocut2Offset[bitId])*_et_conversion, bitId)
2091 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion, bitId)
2092 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion, bitId)
2093 alg.addvariable(
'MinEta1', 0*_eta_conversion, bitId)
2094 alg.addvariable(
'MaxEta1', 49*_eta_conversion, bitId)
2095 alg.addvariable(
'MinEta2', 0*_eta_conversion, bitId)
2096 alg.addvariable(
'MaxEta2', 49*_eta_conversion, bitId)
2097 alg.addvariable(
'DeltaRMin', d.minDR*d.minDR*_dr_conversion*_dr_conversion, bitId)
2098 alg.addvariable(
'DeltaRMax', d.maxDR*d.maxDR*_dr_conversion*_dr_conversion, bitId)
2101 tm.registerTopoAlgo(alg)
2117 {
"minInvm": 60 ,
"minDphiList": [4, 25],
"maxDphi": 32,
"minEta2": 25,
"maxEta2": 49,
2118 "inputwidth1": HW.eEmOutputWidthSelect,
"otype1" :
"eEM",
"ocut1" : 18,
"olist1" :
"abm",
2119 "nleading1" : HW.eEmOutputWidthSelect,
"inputwidth2": HW.jEmOutputWidthSort,
"ocut2" : 20,
"nleading2" : 6 }
2121 for x
in ZAFBDphimap:
2125 setattr (d, k, x[k])
2126 inputList = [d.otype1 + d.olist1,
'jEMs25ETA49']
2128 for minDphi
in d.minDphiList:
2129 toponames.append (
"%iINVM-%02dDPHI%i-%s%s%s%s-jEM%ss%s%iETA%i" % (d.minInvm, minDphi, d.maxDphi,
2130 d.otype1,
str(d.ocut1) , d.olist1,
str(d.nleading1)
if d.olist1==
"s" else "",
2131 str(d.ocut2) ,
str(d.nleading2) , d.minEta2, d.maxEta2))
2132 alg = AlgConf.InvariantMassDeltaPhiInclusive2( name =
'ZAFB_DPHI', inputs = inputList, outputs = toponames)
2133 alg.addgeneric(
'InputWidth1', d.inputwidth1)
2134 alg.addgeneric(
'InputWidth2', d.inputwidth2)
2135 alg.addgeneric(
'MaxTob1', d.nleading1)
2136 alg.addgeneric(
'MaxTob2', d.nleading2)
2137 alg.addgeneric(
'NumResultBits', len(toponames))
2138 alg.addgeneric(
'ApplyEtaCut', 1)
2139 for bitid,minDphi
in enumerate(d.minDphiList):
2140 alg.addvariable(
'MinET1',
get_threshold_cut(d.otype1, d.ocut1)*_et_conversion, bitid)
2141 alg.addvariable(
'MinET2',
get_threshold_cut(
'jEM', d.ocut2)*_et_conversion, bitid)
2142 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion, bitid)
2143 alg.addvariable(
'MaxMSqr', _no_m_upper_threshold, bitid)
2144 alg.addvariable(
'MinEta1', 0*_eta_conversion, bitid)
2145 alg.addvariable(
'MaxEta1', 49*_eta_conversion, bitid)
2146 alg.addvariable(
'MinEta2', d.minEta2*_eta_conversion, bitid)
2147 alg.addvariable(
'MaxEta2', d.maxEta2*_eta_conversion, bitid)
2148 alg.addvariable(
'MinDeltaPhi', minDphi*_phi_conversion, bitid)
2149 alg.addvariable(
'MaxDeltaPhi', d.maxDphi*_phi_conversion, bitid)
2150 tm.registerTopoAlgo(alg)
2154 {
"minInvm": 0,
"maxInvm": 70,
"minDphi": 27,
"maxDphi": 32,
"otype":
"eEM",
"olist":
"s",
"ocut1":9,
"nleading1":1,
"ocut2":9,
"nleading2":6,},
2155 {
"minInvm": 0,
"maxInvm": 70,
"minDphi": 27,
"maxDphi": 32,
"otype":
"eEM",
"olist":
"sl",
"ocut1":9,
"nleading1":1,
"ocut2":9,
"nleading2":6,},
2157 for x
in listofalgos:
2161 setattr (d, k, x[k])
2162 toponame =
"%iINVM%i-%iDPHI%i-%s%s%s%s-%s%s%s%s" % (d.minInvm, d.maxInvm, d.minDphi, d.maxDphi, d.otype,
str(d.ocut1), d.olist,
str(d.nleading1), d.otype,
str(d.ocut2), d.olist,
str(d.nleading2))
2163 log.debug(
"Define %s", toponame)
2164 inputList = [d.otype + d.olist, d.otype + d.olist]
2165 alg = AlgConf.InvariantMassDeltaPhiInclusive2( name = toponame, inputs = inputList, outputs = toponame )
2166 alg.addgeneric(
'InputWidth1', HW.eEmOutputWidthSort)
2167 alg.addgeneric(
'InputWidth2', HW.eEmOutputWidthSort)
2168 alg.addgeneric(
'MaxTob1', d.nleading1)
2169 alg.addgeneric(
'MaxTob2', d.nleading2)
2170 alg.addgeneric(
'NumResultBits', 1)
2173 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion)
2174 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion)
2175 alg.addgeneric(
'ApplyEtaCut', 1)
2176 alg.addvariable(
'MinEta1', 0*_eta_conversion)
2177 alg.addvariable(
'MaxEta1',49*_eta_conversion)
2178 alg.addvariable(
'MinEta2', 0*_eta_conversion)
2179 alg.addvariable(
'MaxEta2',49*_eta_conversion)
2180 alg.addvariable(
'MinDeltaPhi', d.minDphi*_phi_conversion)
2181 alg.addvariable(
'MaxDeltaPhi', d.maxDphi*_phi_conversion)
2182 tm.registerTopoAlgo(alg)
2188 INVM_DR_2MU3Vab_Map = [
2190 "algoname":
"7INVM22_DR_2MU3Vab",
2195 "otype1" :
"MU3Vab",
2199 for x
in INVM_DR_2MU3Vab_Map:
2204 inputList = d.otype1
2206 for bitId
in range(len(d.minDR)):
2207 toponames.append(
"%iINVM%i-%iDR%i-%i%s" % ( d.minInvm, d.maxInvm,
2208 d.minDR[bitId] , d.maxDR[bitId],
2212 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = d.algoname, inputs = inputList, outputs = toponames)
2213 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2214 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2215 alg.addgeneric(
'NumResultBits', len(toponames))
2216 for bitId
in range(len(toponames)):
2217 alg.addvariable(
'MinET1', 0*_et_conversion, bitId)
2218 alg.addvariable(
'MinET2', 0*_et_conversion, bitId)
2219 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion, bitId)
2220 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion, bitId)
2221 alg.addvariable(
'DeltaRMin', d.minDR[bitId]*d.minDR[bitId]*_dr_conversion*_dr_conversion, bitId)
2222 alg.addvariable(
'DeltaRMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
2223 tm.registerTopoAlgo(alg)
2231 INVM_DR_2MU3VFab_Map = [
2233 "algoname":
"INVM_DR_2MU3VFab",
2235 "maxInvm" : [9,11,22],
2238 "otype1" :
"MU3VFab",
2242 for x
in INVM_DR_2MU3VFab_Map:
2247 inputList = d.otype1
2249 for bitId
in range(len(d.minDR)):
2250 toponames.append(
"%iINVM%i-%iDR%i-%i%s" % ( d.minInvm[bitId], d.maxInvm[bitId],
2251 d.minDR[bitId] , d.maxDR[bitId],
2255 alg = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1( name = d.algoname, inputs = inputList, outputs = toponames)
2256 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2257 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2258 alg.addgeneric(
'NumResultBits', len(toponames))
2259 for bitId
in range(len(toponames)):
2260 alg.addvariable(
'MinET1', 0*_et_conversion, bitId)
2261 alg.addvariable(
'MinET2', 0*_et_conversion, bitId)
2262 alg.addvariable(
'MinMSqr', d.minInvm[bitId]*d.minInvm[bitId]*_et_conversion*_et_conversion, bitId)
2263 alg.addvariable(
'MaxMSqr', d.maxInvm[bitId]*d.maxInvm[bitId]*_et_conversion*_et_conversion, bitId)
2264 alg.addvariable(
'DeltaRMin', d.minDR[bitId]*d.minDR[bitId]*_dr_conversion*_dr_conversion, bitId)
2265 alg.addvariable(
'DeltaRMax', d.maxDR[bitId]*d.maxDR[bitId]*_dr_conversion*_dr_conversion, bitId)
2266 tm.registerTopoAlgo(alg)
2272 {
"minInvm": 2,
"maxInvm": 9,
"minDr": 0,
"maxDr": 15,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2":
"MU3Vab", },
2273 {
"minInvm": 8,
"maxInvm": 15,
"minDr": 0,
"maxDr": 22,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2":
"MU3Vab", },
2274 {
"minInvm": 2,
"maxInvm": 9,
"minDr": 0,
"maxDr": 15,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"", },
2277 {
"minInvm": 0,
"maxInvm": 16,
"minDr": 20,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"",},
2278 {
"minInvm": 0,
"maxInvm": 16,
"minDr": 15,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"",},
2279 {
"minInvm": 8,
"maxInvm": 15,
"minDr": 20,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"",},
2280 {
"minInvm": 8,
"maxInvm": 15,
"minDr": 15,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"",},
2282 {
"minInvm": 7,
"maxInvm": 22,
"minDr": 0,
"maxDr": 20,
"mult": 2,
"otype1" :
"MU3VFab",
"otype2":
"",},
2284 {
"minInvm": 8,
"maxInvm": 15,
"minDr": 0,
"maxDr": 22,
"mult": 1,
"otype1" :
"CMU5VFab",
"otype2":
"CMU3Vab",},
2286 {
"minInvm": 7,
"maxInvm": 14,
"minDr": 0,
"maxDr": 25,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2":
"MU3Vab", },
2287 {
"minInvm": 7,
"maxInvm": 11,
"minDr": 25,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"",},
2288 {
"minInvm": 7,
"maxInvm": 14,
"minDr": 0,
"maxDr": 25,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2":
"MU3VFab", },
2292 for x
in listofalgos:
2296 setattr (d, k, x[k])
2297 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
2298 obj2 =
"-%s" % (d.otype2)
2299 toponame =
"%iINVM%i-%iDR%i-%s%s" % (d.minInvm, d.maxInvm, d.minDr, d.maxDr, obj1,
"" if d.mult>1
else obj2)
2300 log.debug(
"Define %s", toponame)
2301 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
2302 algoname = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1
if (d.mult>1)
else AlgConf.InvariantMassInclusiveDeltaRSqrIncl2
2303 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
2305 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2306 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2308 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
2309 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
2310 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
2311 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
2312 alg.addgeneric(
'NumResultBits', 1)
2313 alg.addvariable(
'MinET1', 0*_et_conversion)
2314 alg.addvariable(
'MinET2', 0*_et_conversion)
2315 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion)
2316 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion)
2317 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
2318 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
2319 tm.registerTopoAlgo(alg)
2323 {
"minInvm": 2,
"maxInvm": 9,
"minDr": 0,
"maxDr": 15,
"mult": 1,
"otype1" :
"MU5VFab",
"otype2":
"MU3Vab",},
2324 {
"minInvm": 8,
"maxInvm": 15,
"minDr": 20,
"maxDr": 99,
"mult": 2,
"otype1" :
"MU3Vab",
"otype2":
"",},
2326 for x
in listofalgos:
2330 setattr (d, k, x[k])
2331 obj1 =
"%s%s" % ((
str(d.mult)
if d.mult>1
else ""), d.otype1)
2332 obj2 =
"-%s" % (d.otype2)
2333 toponame =
"%iINVM%i-%iDR%i-C-%s%s" % (d.minInvm, d.maxInvm, d.minDr, d.maxDr, obj1,
"" if d.mult>1
else obj2)
2334 log.debug(
"Define %s", toponame)
2335 inputList = [d.otype1]
if (d.mult>1)
else [d.otype1, d.otype2]
2336 algoname = AlgConf.InvariantMassInclusiveDeltaRSqrIncl1Charge
if (d.mult>1)
else AlgConf.InvariantMassInclusiveDeltaRSqrIncl2Charge
2337 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
2339 alg.addgeneric(
'InputWidth', HW.muonOutputWidthSelect)
2340 alg.addgeneric(
'MaxTob', HW.muonOutputWidthSelect)
2342 alg.addgeneric(
'InputWidth1', HW.muonOutputWidthSelect)
2343 alg.addgeneric(
'InputWidth2', HW.muonOutputWidthSelect)
2344 alg.addgeneric(
'MaxTob1', HW.muonOutputWidthSelect)
2345 alg.addgeneric(
'MaxTob2', HW.muonOutputWidthSelect)
2346 alg.addgeneric(
'NumResultBits', 1)
2347 alg.addvariable(
'MinET1', 0*_et_conversion)
2348 alg.addvariable(
'MinET2', 0*_et_conversion)
2349 alg.addvariable(
'MinMSqr', d.minInvm*d.minInvm*_et_conversion*_et_conversion)
2350 alg.addvariable(
'MaxMSqr', d.maxInvm*d.maxInvm*_et_conversion*_et_conversion)
2351 alg.addvariable(
'DeltaRMin', d.minDr*d.minDr*_dr_conversion*_dr_conversion)
2352 alg.addvariable(
'DeltaRMax', d.maxDr*d.maxDr*_dr_conversion*_dr_conversion)
2353 tm.registerTopoAlgo(alg)
2358 {
"algoname":
'CEP_CjJ',
"minETlist": [90, 100]}
2364 setattr (d, k, x[k])
2365 inputList = [
'CjJs']
2367 for minET
in d.minETlist:
2368 toponames.append (
"CEP-CjJ%is6" % (minET))
2369 alg = AlgConf.ExclusiveJets( name = d.algoname, inputs = inputList, outputs = toponames)
2370 alg.addgeneric(
'InputWidth', HW.jJetOutputWidthSort)
2371 alg.addgeneric(
'MaxTob', HW.jJetOutputWidthSort)
2372 alg.addgeneric(
'NumResultBits', len(toponames))
2373 alg.addvariable(
'PtScale', 1.4*10)
2374 alg.addvariable(
'PtShift', 20*_et_conversion)
2375 for bitid,minET
in enumerate(d.minETlist):
2376 alg.addvariable(
'MinET1',
get_threshold_cut(
'CjJ', minET)*_et_conversion, bitid)
2377 alg.addvariable(
'MinXi', 13600.0*_et_conversion*0.02, bitid)
2378 alg.addvariable(
'MaxXi', 13600.0*_et_conversion*0.05, bitid)
2379 tm.registerTopoAlgo(alg)
2388 {
"minDphi": 23,
"maxDphi": 32,
"mult": 2,
"otype1" :
"eEM",
2389 "ocut1": 1,
"olist1":
"s",
"nleading1": HW.eEmOutputWidthSort,
"minET1":0.9,
"otype2" :
"",
"minET2":0.8},
2390 {
"minDphi": 23,
"maxDphi": 32,
"mult": 2,
"otype1" :
"eTAU",
2391 "ocut1": 1,
"olist1":
"s",
"nleading1": HW.eTauOutputWidthSort,
"minET1":0.8,
"otype2" :
"",
"minET2":0.8},
2392 {
"minDphi": 23,
"maxDphi": 32,
"mult": 2,
"otype1" :
"jTAU",
2393 "ocut1": 1,
"olist1":
"s",
"nleading1": HW.jTauOutputWidthSort,
"minET1":1.4,
"otype2" :
"",
"minET2":1.4},
2399 setattr (d, k, x[k])
2400 obj =
"%s" % (
str(d.mult)+d.otype1+
str(d.ocut1)+
str(d.olist1))
2401 toponame =
"%sDPHI%s-%s" % (d.minDphi, d.maxDphi, obj)
2402 log.debug(
"Define %s", toponame)
2403 inputList = [d.otype1+d.olist1]
2404 algoname = AlgConf.DeltaPhiIncl1
2405 alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
2406 alg.addgeneric(
'NumResultBits', 1)
2407 alg.addgeneric(
'InputWidth', d.nleading1)
2408 alg.addgeneric(
'MaxTob', d.nleading1)
2409 alg.addvariable(
'MinET1', d.minET1*_et_conversion)
2410 alg.addvariable(
'MinET2', d.minET2*_et_conversion)
2411 alg.addvariable(
'MinDeltaPhi', d.minDphi*_phi_conversion)
2412 alg.addvariable(
'MaxDeltaPhi', d.maxDphi*_phi_conversion)
2413 tm.registerTopoAlgo(alg)
2416 Algo = namedtuple(
'Algo', [
'dPhiMin',
'dPhiMax',
'otype',
'olist',
'ocut1',
'ocut2',
'nTOB'])
2418 Algo(dPhiMin=30, dPhiMax=32, otype=
'eTAU', olist=
's', ocut1=60, ocut2=60, nTOB=HW.eTauOutputWidthSort),
2421 name = f
'{x.dPhiMin}DPHI{x.dPhiMax}-'
2422 name += f
'2{x.otype}{x.ocut1}{x.olist}' if x.ocut1 == x.ocut2
else f
'{x.otype}{x.ocut1}{x.olist}-{x.otype}{x.ocut2}{x.olist}'
2424 alg = AlgConf.DeltaPhiIncl1(name=name, inputs=[x.otype+x.olist], outputs=[name])
2425 alg.addgeneric(
'NumResultBits', 1)
2426 alg.addgeneric(
'InputWidth', x.nTOB)
2427 alg.addgeneric(
'MaxTob', x.nTOB)
2430 alg.addvariable(
'MinDeltaPhi', x.dPhiMin*_phi_conversion)
2431 alg.addvariable(
'MaxDeltaPhi', x.dPhiMax*_phi_conversion)
2432 tm.registerTopoAlgo(alg)