ATLAS Offline Software
Loading...
Searching...
No Matches
R3L1PerfConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2# TODO: I haven't yet migrated any of the new control flags so this is essentially hardcoded to one configuration
3
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5from AthenaConfiguration.ComponentFactory import CompFactory
6from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
7from AtlasGeoModel.GeoModelConfig import GeoModelCfg
8from AthenaCommon.Logging import logging
9
10log = logging.getLogger(__name__)
11
12
14 """ Create the mapping maker for JTowers """
15 result = ComponentAccumulator()
16 result.merge(DetDescrCnvSvcCfg(flags))
17 result.merge(GeoModelCfg(flags))
18 result.addCondAlgo(
19 CompFactory.LVL1.JTowerMappingDataCondAlg(
20 "JTowerMappingDataCondAlg",
21 MappingData="JTowerMappingData",
22 MapTileCells=False, # TODO: FLAGS
23 ),
24 primary=True,
25 )
26 return result
27
28
30 """ Create the mapping maker for GTowers """
31 result = ComponentAccumulator()
32 result.merge(DetDescrCnvSvcCfg(flags))
33 result.merge(GeoModelCfg(flags))
34 result.addCondAlgo(
35 CompFactory.LVL1.GTowerMappingDataCondAlg(
36 "GTowerMappingDataCondAlg",
37 MappingData="GTowerMappingData",
38 MapTileCells=False, # TODO: FLAGS
39 ),
40 primary=True,
41 )
42 return result
43
44
45def JTowerBuilderCfg(flags, superCellsIn):
46 """ Create the JTower building algorithm """
47 result = ComponentAccumulator()
48 result.merge(JTowerMappingDataCondAlgCfg(flags))
49 # TODO: FLAGS
50 result.addEventAlgo(
51 CompFactory.LVL1.JGTowerBuilder(
52 "JTowerBuilder",
53 UseSCQuality=True,
54 UseAllCalo=False,
55 InputSuperCells=superCellsIn,
56 EmulateSuperCellTiming=False,
57 MinSCETp=-1,
58 MaxSCETm=1,
59 MinTowerET=-9e9,
60 MappingData="JTowerMappingData",
61 OutputTowers="JTowers",
62 ),
63 primary=True,
64 )
65 return result
66
67
68def GTowerBuilderCfg(flags, superCellsIn):
69 """ Create the GCaloTower building algorithm """
70 result = ComponentAccumulator()
71 result.merge(GTowerMappingDataCondAlgCfg(flags))
72 # TODO: FLAGS
73 result.addEventAlgo(
74 CompFactory.LVL1.JGTowerBuilder(
75 "GTowerBuilder",
76 UseSCQuality=True,
77 UseAllCalo=False,
78 InputSuperCells=superCellsIn,
79 EmulateSuperCellTiming=False,
80 MinSCETp=-1,
81 MaxSCETm=1,
82 MinTowerET=-9e9,
83 MappingData="GTowerMappingData",
84 OutputTowers="GCaloTowers",
85 ),
86 primary=True,
87 )
88 return result
89
90
91def JTowersCfg(flags, superCellsIn):
92 """Create the algorithms required for the JTower configuration
93
94 Sequences the builder and the noise algorithm
95 """
96 result = ComponentAccumulator()
97 result.merge(JTowerBuilderCfg(flags, superCellsIn))
98 result.addEventAlgo(
99 CompFactory.LVL1.JGTowerNoiseAlg(
100 "JTowerNoiseAlg", InputTowers="JTowers", DoJFEX=True
101 )
102 )
103 return result
104
105
106def GTowersCfg(flags, superCellsIn):
107 """Create the algorithms required for the GTower configuration
108
109 Sequences the GCaloTower builder, then the GTower and noise algorithms
110 """
111 result = ComponentAccumulator()
112 result.merge(GTowerBuilderCfg(flags, superCellsIn))
113 result.addEventAlgo(
114 CompFactory.LVL1.GTowersFromGCaloTowers(
115 "GTowersFromGCaloTowers",
116 InputTowers="GCaloTowers",
117 OutputTowers="GTowers",
118 MappingData="GTowerMappingData",
119 )
120 )
121 result.addEventAlgo(
122 CompFactory.LVL1.JGTowerNoiseAlg(
123 "GTowerNoiseAlg",
124 InputTowers="GTowers",
125 DoJFEX=False,
126 )
127 )
128 return result
129
130
131def AllJGTowerContainersCfg(flags, superCellsIn):
132 """ Helper method to create all of the J/G tower containers commonly used """
133 result = ComponentAccumulator()
134
135 # JTowers
136 result.merge(JTowersCfg(flags, superCellsIn=superCellsIn))
137 result.addEventAlgo(
138 CompFactory.LVL1.JTowerRhoSubtractionAlg(
139 "JTowerRhoSubtractionAlg",
140 InputTowers="JTowers",
141 OutputTowers="JTowerRhoSubtracted",
142 OutputRho="JFEXRho",
143 )
144 )
145
146 # GTowers
147 result.merge(GTowersCfg(flags, superCellsIn))
148 result.addEventAlgo(
149 CompFactory.LVL1.GTowerRhoSubtractionAlg(
150 "GTowerRhoSubtractionAlg",
151 InputTowers="GTowers",
152 OutputTowers="GTowerRhoSubtracted",
153 OutputRho="GFEXRho",
154 )
155 )
156 return result
GTowersCfg(flags, superCellsIn)
AllJGTowerContainersCfg(flags, superCellsIn)
JTowerBuilderCfg(flags, superCellsIn)
GTowerBuilderCfg(flags, superCellsIn)
JTowersCfg(flags, superCellsIn)