ATLAS Offline Software
TopoAlgoDefMuctpi.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2 
3 # algorithm python base classes generated from C++ code
4 import L1TopoAlgorithms.L1TopoAlgConfig as AlgConf
5 import L1TopoHardware.L1TopoHardware as HW
6 
7 
8 from AthenaCommon.Logging import logging
9 log = logging.getLogger(__name__)
10 
12 
13  @staticmethod
15 
16  # TODO: no conversion applied!
17 
18  # SELECT
19  alg = AlgConf.MuonSelect( name = 'MU5VFab', inputs = 'MuonTobs', outputs = 'MU5VFab' )
20  alg.addgeneric('InputWidth', HW.muonInputWidth)
21  alg.addgeneric('OutputWidth', HW.muonOutputWidthSelect)
22  alg.addvariable('MinEta', 0)
23  alg.addvariable('MaxEta', 25)
24  alg.addvariable('MinEtTGC', 5)
25  alg.addvariable('MinEtRPC', 6)
26  alg.addvariable('InnerCoinCut', 0)
27  alg.addvariable('FullStationCut',1)
28  alg.addvariable('GoodMFieldCut', 0)
29  tm.registerTopoAlgo(alg)
30 
31  # dimu DR items
32  listofalgos=[
33  { "minDr": 0, "maxDr": 15, "mult": 2,
34  "otype1" : "MU5VFab", "ocut1": 6, "olist" : "ab",
35  "otype2" : "",}, #0DR15-2MU5VFab
36  ]
37 
38  for x in listofalgos:
39  class d:
40  pass
41  for k in x:
42  setattr (d, k, x[k])
43 
44  obj1 = "%s%s" % ((str(d.mult) if d.mult>1 else ""), d.otype1)
45  obj2 = "-%s" % (d.otype2)
46  toponame = "MUCTP-%iDR%i-%s%s" % (d.minDr, d.maxDr, obj1, "" if d.mult>1 else obj2)
47 
48  log.debug("Define %s", toponame)
49 
50  inputList = [d.otype1] if (d.mult>1) else [d.otype1, d.otype2]
51  algoname = AlgConf.DeltaRSqrIncl1 if (d.mult>1) else AlgConf.DeltaRSqrIncl2
52  alg = algoname( name = toponame, inputs = inputList, outputs = [ toponame ])
53 
54  if (d.mult>1):
55  alg.addgeneric('InputWidth', HW.OutputWidthSelectMU)
56  alg.addgeneric('MaxTob', HW.OutputWidthSelectMU)
57  else:
58  alg.addgeneric('InputWidth1', HW.OutputWidthSelectMU)
59  alg.addgeneric('InputWidth2', HW.OutputWidthSelectMU)
60  alg.addgeneric('MaxTob1', HW.OutputWidthSelectMU)
61  alg.addgeneric('MaxTob2', HW.OutputWidthSelectMU)
62 
63  alg.addgeneric('NumResultBits', 1)
64  alg.addvariable('MinET1', 0)
65  alg.addvariable('MinET2', 0)
66  alg.addvariable('DeltaRMin', d.minDr*d.minDr)
67  alg.addvariable('DeltaRMax', d.maxDr*d.maxDr)
68  tm.registerTopoAlgo(alg)
hist_file_dump.d
d
Definition: hist_file_dump.py:137
python.L1.Config.TopoAlgoDefMuctpi.TopoAlgoDefMuctpi
Definition: TopoAlgoDefMuctpi.py:11
python.L1.Config.TopoAlgoDefMuctpi.TopoAlgoDefMuctpi.registerTopoAlgos
def registerTopoAlgos(tm)
Definition: TopoAlgoDefMuctpi.py:14
str
Definition: BTagTrackIpAccessor.cxx:11