ATLAS Offline Software
Loading...
Searching...
No Matches
ActsGeometryConfig Namespace Reference

Functions

ComponentAccumulator ActsTrackingGeometrySvcCfg (flags, str name="ActsTrackingGeometrySvc", **kwargs)
ComponentAccumulator ITkMaterialDecoratorToolCfg (flags, name="ITkMaterialDecorator", **kwargs)
ComponentAccumulator ActsExtrapolationToolCfg (flags, str name="ActsExtrapolationTool", **kwargs)
ComponentAccumulator ActsGeometryRealmConvToolCfg (flags, str name="ActsGeometryRealmConvTool", **kwargs)
ComponentAccumulator ActsObjWriterToolCfg (flags, str name="ActsObjWriterTool", **kwargs)
ComponentAccumulator ActsExtrapolationAlgCfg (flags, str name="ActsExtrapolationAlg", **kwargs)
ComponentAccumulator ActsWriteTrackingGeometryCfg (flags, str name="ActsWriteTrackingGeometry", **kwargs)
ComponentAccumulator ActsWriteTrackingGeometryTransformsAlgCfg (flags, str name="ActsWriteTrackingGeometryTransformsAlg", **dict kwargs)
ComponentAccumulator ActsVolumeIdToDetectorCollectionMappingAlgCfg (flags, str name="ActsVolumeIdToDetectorCollectionMappingAlgCfg", **kwargs)
ComponentAccumulator ActsInDetVolumeIdToDetectorCollectionMappingAlgCfg (flags, str name="ActsInDetVolumeIdToDetectorCollectionMappingAlgCfg", **kwargs)
ComponentAccumulator BeamPipeBlueprintNodeBuilderCfg (flags, str name="BeamPipeBlueprintNodeBuilder", **kwargs)
ComponentAccumulator ItkBlueprintNodeBuilderCfg (flags, str name="ItkBlueprintNodeBuilder", **kwargs)
ComponentAccumulator HgtdBlueprintNodeBuilderCfg (flags, str name="HgtdBlueprintNodeBuilder", **kwargs)
ComponentAccumulator caloBlueprintNodeBuilderCfg (flags, str name="CaloBlueprintNodeBuilder", **kwargs)

Function Documentation

◆ ActsExtrapolationAlgCfg()

ComponentAccumulator ActsExtrapolationAlgCfg ( flags,
str name = "ActsExtrapolationAlg",
** kwargs )

Definition at line 214 of file ActsGeometryConfig.py.

216 **kwargs) -> ComponentAccumulator:
217 acc = ComponentAccumulator()
218
219 if "ExtrapolationTool" not in kwargs:
220 kwargs.setdefault("ExtrapolationTool", acc.popToolsAndMerge(ActsExtrapolationToolCfg(flags))) # PrivateToolHandle
221 from MuonConfig.MuonConfigUtils import setupHistSvcCfg
222 acc.merge(setupHistSvcCfg(flags, outFile="propsteps.root", outStream = "ActsExtrapolationRecord"))
223 acc.addEventAlgo(CompFactory.ActsTrk.ExtrapolationTestAlg(name, **kwargs))
224 return acc
225

◆ ActsExtrapolationToolCfg()

ComponentAccumulator ActsExtrapolationToolCfg ( flags,
str name = "ActsExtrapolationTool",
** kwargs )

Definition at line 184 of file ActsGeometryConfig.py.

186 **kwargs) -> ComponentAccumulator:
187 acc = ComponentAccumulator()
188 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
189 acc.merge(AtlasFieldCacheCondAlgCfg(flags))
190 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
191 acc.merge(ActsGeometryContextAlgCfg(flags))
192 acc.merge(ActsTrackingGeometrySvcCfg(flags))
193 acc.setPrivateTools(CompFactory.ActsTrk.ExtrapolationTool(name, **kwargs))
194 return acc
195
196

◆ ActsGeometryRealmConvToolCfg()

ComponentAccumulator ActsGeometryRealmConvToolCfg ( flags,
str name = "ActsGeometryRealmConvTool",
** kwargs )

Definition at line 197 of file ActsGeometryConfig.py.

197def ActsGeometryRealmConvToolCfg(flags, name: str = "ActsGeometryRealmConvTool", **kwargs) -> ComponentAccumulator:
198 acc = ComponentAccumulator()
199 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
200 acc.merge(ActsGeometryContextAlgCfg(flags))
201 acc.merge(ActsTrackingGeometrySvcCfg(flags))
202 kwargs.setdefault("ExtractMuonSurfaces", flags.Muon.usePhaseIIGeoSetup)
203 acc.addPublicTool(CompFactory.ActsTrk.GeometryRealmConvTool(name, **kwargs), primary = True)
204 return acc
205

◆ ActsInDetVolumeIdToDetectorCollectionMappingAlgCfg()

ComponentAccumulator ActsInDetVolumeIdToDetectorCollectionMappingAlgCfg ( flags,
str name = "ActsInDetVolumeIdToDetectorCollectionMappingAlgCfg",
** kwargs )

Definition at line 266 of file ActsGeometryConfig.py.

268 **kwargs) -> ComponentAccumulator:
269 # Inner Detector version of ActsVolumeIdToDetectorCollectionMappingAlgCfg
270 acc = ComponentAccumulator()
271 kwargs.setdefault('ActsVolumeIdToDetectorElementCollectionMap', 'VolumeIdToDetectorElementCollectionMap')
272
273 def filterCollections(flags, pixel_det_el, strip_det_el) :
274 ret=[]
275 if flags.Detector.GeometryPixel:
276 ret += [ pixel_det_el ]
277 if flags.Detector.GeometrySCT:
278 ret += [ strip_det_el ]
279 return ret
280 kwargs.setdefault('DetectorElementsKeys', filterCollections( flags,
281 'PixelDetectorElementCollection',
282 'SCT_DetectorElementCollection'))
283
284 acc.addCondAlgo(CompFactory.ActsTrk.ActsVolumeIdToDetectorElementCollectionMappingAlg(name, **kwargs))
285 return acc
286

◆ ActsObjWriterToolCfg()

ComponentAccumulator ActsObjWriterToolCfg ( flags,
str name = "ActsObjWriterTool",
** kwargs )

Definition at line 206 of file ActsGeometryConfig.py.

208 **kwargs) -> ComponentAccumulator:
209 acc = ComponentAccumulator()
210 acc.addPublicTool(CompFactory.ActsObjWriterTool(name, **kwargs), primary=True)
211 return acc
212
213

◆ ActsTrackingGeometrySvcCfg()

ComponentAccumulator ActsTrackingGeometrySvcCfg ( flags,
str name = "ActsTrackingGeometrySvc",
** kwargs )

Definition at line 6 of file ActsGeometryConfig.py.

8 **kwargs) -> ComponentAccumulator:
9 acc = ComponentAccumulator()
10
11 from ROOT.ActsTrk import DetectorType
12 kwargs.setdefault("NotAlignDetectors", [DetectorType.Trt,
13 DetectorType.Hgtd])
14 kwargs.setdefault("UseBlueprint", flags.Acts.TrackingGeometry.UseBlueprint)
15 kwargs.setdefault("BuildDetrayGeometry", flags.Acts.TrackingGeometry.BuildDetrayGeometry)
16 kwargs.setdefault("ObjDebugOutput", flags.Acts.TrackingGeometry.ObjDebugOutput)
17 kwargs.setdefault("KeepGoingOnMaterialMergeFailure", flags.Acts.TrackingGeometry.KeepGoingOnMaterialMergeFailure)
18
19 subDetectors = []
20 blueprintTools = []
21 refineTools = []
22
23 # This is a (hopefully) temporary workaround to the issue described in
24 # ATEAM-1134. Once Athena moves to using ROOT 6.38+, this should no longer
25 # be necessary.
26 import ROOT
27 from AthenaServices.ROOTMessageFilterSvcConfig import ROOTMessageFilterSvcCfg
28 acc.merge(ROOTMessageFilterSvcCfg(flags,
29 SuppressionRules=[('TCling::LoadPCM',
30 '.*libGeom_rdict.pcm.*',
31 ROOT.kError)]))
32
33 if flags.Detector.GeometryBpipe:
34 from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
35 acc.merge(BeamPipeGeometryCfg(flags))
36 kwargs.setdefault("BuildBeamPipe", True)
37
38 if flags.Detector.GeometryPixel:
39 subDetectors += ["Pixel"]
40 from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
41 acc.merge(PixelReadoutGeometryCfg(flags))
42
43
44 if flags.Detector.GeometrySCT:
45 subDetectors += ["SCT"]
46 from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
47 acc.merge(SCT_ReadoutGeometryCfg(flags))
48
49 if flags.Detector.GeometryTRT:
50 # Commented out because TRT is not production ready yet and we don't
51 # want to turn it on even if the global flag is set
52 # subDetectors += ["TRT"]
53 from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
54 acc.merge(TRT_ReadoutGeometryCfg(flags))
55
56 if flags.Detector.GeometryCalo:
57 #No non-blueprint mode exists for calo, so all we do here is
58 #to setup both the LAr and Tile geometry to enable access to the
59 #CaloDetDescrManager geometry information. This is needed
60 #for the Acts calo blueprint builder tool
61 #Note that in blueprint mode the calo geometry is built
62 #in initialize of the TrackingGeometrySvc and so we use
63 #a static calo geometry. To avoid errors the flag Lar.doAlign
64 #must be set to false (when flag values are set)
65 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
66 acc.merge(LArGMCfg(flags))
67 from TileGeoModel.TileGMConfig import TileGMCfg
68 acc.merge(TileGMCfg(flags))
69
70 #first add the itk builder and then the muon system - this is the correct order
71 if flags.Acts.TrackingGeometry.UseBlueprint:
72 blueprintTools += [acc.popToolsAndMerge(BeamPipeBlueprintNodeBuilderCfg(flags))]
73 if flags.Detector.GeometryITkPixel or flags.Detector.GeometryITkStrip:
74 if flags.Acts.TrackingGeometry.ITkHgtdMaterialSource != "None":
75 refineTools += [acc.popToolsAndMerge(ITkMaterialDecoratorToolCfg(flags))]
76 blueprintTools += [acc.popToolsAndMerge(ItkBlueprintNodeBuilderCfg(flags))]
77 if flags.Detector.GeometryHGTD:
78 blueprintTools += [acc.popToolsAndMerge(HgtdBlueprintNodeBuilderCfg(flags))]
79 if flags.Detector.GeometryCalo:
80 subDetectors += ["Calo"]
81 blueprintTools += [acc.popToolsAndMerge(caloBlueprintNodeBuilderCfg(flags))]
82 # Muon system is currently disabled for simulation. Enabling it for non-simulation use cases.
83 if flags.Muon.usePhaseIIGeoSetup and 'ACTS' not in flags.Sim.ISF.Simulator.value:
84 subDetectors += ["Muon"]
85 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
86 acc.merge(MuonGeoModelCfg(flags))
87 from ActsMuonDetector.ActsMuonDetectorCfg import MuonBlueprintNodeBuilderCfg, MuonMaterialDecoratorToolCfg
88 blueprintTools += [acc.popToolsAndMerge(MuonBlueprintNodeBuilderCfg(flags))]
89
91 if flags.Muon.trackGeometryPassiveMaterial and \
92 len(flags.Muon.trackGeometryMaterialMap) > 0:
93 refineTools+= [acc.popToolsAndMerge(MuonMaterialDecoratorToolCfg(flags))]
94
95
96 if flags.Detector.GeometryITkPixel:
97 subDetectors += ["ITkPixel"]
98 from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
99 acc.merge(ITkPixelReadoutGeometryCfg(flags))
100
101 if flags.Detector.GeometryITkStrip:
102 subDetectors += ["ITkStrip"]
103 from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
104 acc.merge(ITkStripReadoutGeometryCfg(flags))
105
106
107 if flags.Detector.GeometryHGTD:
108 subDetectors += ["HGTD"]
109 if flags.HGTD.Geometry.useGeoModelXml:
110 from HGTD_GeoModelXml.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
111 else:
112 from HGTD_GeoModel.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
113 acc.merge(HGTD_ReadoutGeometryCfg(flags))
114
115 if kwargs.get("BuildDetrayGeometry", False):
116 # The Detray geometry is built once, at initialize, and stays on the host,
117 # so a plain host memory resource is all it needs. A workflow that copies
118 # the geometry to a device can override HostMR with the backend specific
119 # tool from AthDeviceComps.AthDeviceCompsConfig.HostMemoryResourceToolCfg,
120 # to get the detector allocated in pinned memory.
121 kwargs.setdefault("HostMR",
122 CompFactory.AthDevice.HostMemoryResourceTool("ActsDetrayHostMR"))
123
124 actsTrackingGeometrySvc = CompFactory.ActsTrk.TrackingGeometrySvc(name,
125 BuildSubDetectors=subDetectors,
126 BlueprintNodeBuilders=blueprintTools,
127 RefinementTools=refineTools,
128 **kwargs)
129
130 if flags.Acts.TrackingGeometry.MaterialSource == "Default":
131 if flags.Detector.GeometryITk:
132 extension = "ITk"
133 if flags.Detector.GeometryHGTD:
134 extension += "-HGTD"
135 if flags.Acts.TrackingGeometry.InsertITkPassiveMaterialLayers:
136 extension += "-passiveLayers"
137 if flags.Acts.TrackingGeometry.MaterialFileExtension:
138 extension += "-"+flags.Acts.TrackingGeometry.MaterialFileExtension
139 actsTrackingGeometrySvc.UseMaterialMap = True
140 actsTrackingGeometrySvc.MaterialMapCalibFolder = flags.Acts.TrackingGeometry.MaterialCalibrationFolder
141 actsTrackingGeometrySvc.MaterialMapInputFile = \
142 "material-maps-" + flags.GeoModel.AtlasVersion + "-" + extension + ".json"
143
144 elif flags.Acts.TrackingGeometry.MaterialSource.find(".json") != -1:
145 actsTrackingGeometrySvc.UseMaterialMap = True
146 actsTrackingGeometrySvc.MaterialMapCalibFolder = flags.Acts.TrackingGeometry.MaterialCalibrationFolder
147 actsTrackingGeometrySvc.MaterialMapInputFile = flags.Acts.TrackingGeometry.MaterialSource
148
149 if flags.Acts.TrackingGeometry.InsertITkPassiveMaterialLayers:
150 actsTrackingGeometrySvc.PassiveITkInnerPixelBarrelLayerRadii = flags.Acts.TrackingGeometry.PassiveITkInnerPixelBarrelLayerRadii
151 actsTrackingGeometrySvc.PassiveITkInnerPixelBarrelLayerHalflengthZ = flags.Acts.TrackingGeometry.PassiveITkInnerPixelBarrelLayerHalflengthZ
152 actsTrackingGeometrySvc.PassiveITkInnerPixelBarrelLayerThickness = flags.Acts.TrackingGeometry.PassiveITkInnerPixelBarrelLayerThickness
153 actsTrackingGeometrySvc.PassiveITkOuterPixelBarrelLayerRadii = flags.Acts.TrackingGeometry.PassiveITkOuterPixelBarrelLayerRadii
154 actsTrackingGeometrySvc.PassiveITkOuterPixelBarrelLayerHalflengthZ = flags.Acts.TrackingGeometry.PassiveITkOuterPixelBarrelLayerHalflengthZ
155 actsTrackingGeometrySvc.PassiveITkOuterPixelBarrelLayerThickness = flags.Acts.TrackingGeometry.PassiveITkOuterPixelBarrelLayerThickness
156 actsTrackingGeometrySvc.PassiveITkStripBarrelLayerRadii = flags.Acts.TrackingGeometry.PassiveITkStripBarrelLayerRadii
157 actsTrackingGeometrySvc.PassiveITkStripBarrelLayerHalflengthZ = flags.Acts.TrackingGeometry.PassiveITkStripBarrelLayerHalflengthZ
158 actsTrackingGeometrySvc.PassiveITkStripBarrelLayerThickness = flags.Acts.TrackingGeometry.PassiveITkStripBarrelLayerThickness
159
160
161
162 acc.addService(actsTrackingGeometrySvc, primary = True)
163 return acc
164
165
166

◆ ActsVolumeIdToDetectorCollectionMappingAlgCfg()

ComponentAccumulator ActsVolumeIdToDetectorCollectionMappingAlgCfg ( flags,
str name = "ActsVolumeIdToDetectorCollectionMappingAlgCfg",
** kwargs )

Definition at line 246 of file ActsGeometryConfig.py.

248 **kwargs) -> ComponentAccumulator:
249 acc = ComponentAccumulator()
250 kwargs.setdefault('ActsVolumeIdToDetectorElementCollectionMap', 'VolumeIdToDetectorElementCollectionMap')
251
252 def filterCollections(flags, pixel_det_el, strip_det_el) :
253 ret=[]
254 if flags.Detector.GeometryITkPixel:
255 ret += [ pixel_det_el ]
256 if flags.Detector.GeometryITkStrip:
257 ret += [ strip_det_el ]
258 return ret
259 kwargs.setdefault('DetectorElementsKeys', filterCollections( flags,
260 'ITkPixelDetectorElementCollection',
261 'ITkStripDetectorElementCollection'))
262
263 acc.addCondAlgo(CompFactory.ActsTrk.ActsVolumeIdToDetectorElementCollectionMappingAlg(name, **kwargs))
264 return acc
265

◆ ActsWriteTrackingGeometryCfg()

ComponentAccumulator ActsWriteTrackingGeometryCfg ( flags,
str name = "ActsWriteTrackingGeometry",
** kwargs )

Definition at line 226 of file ActsGeometryConfig.py.

228 **kwargs) -> ComponentAccumulator:
229 acc = ComponentAccumulator()
230 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
231 acc.merge(AtlasFieldCacheCondAlgCfg(flags))
232 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsGeometryContextAlgCfg
233 acc.merge(ActsGeometryContextAlgCfg(flags))
234 acc.merge(ActsTrackingGeometrySvcCfg(flags))
235 acc.addEventAlgo(CompFactory.ActsTrk.WriteTrackingGeometry(name, **kwargs), primary = True)
236 return acc
237

◆ ActsWriteTrackingGeometryTransformsAlgCfg()

ComponentAccumulator ActsWriteTrackingGeometryTransformsAlgCfg ( flags,
str name = "ActsWriteTrackingGeometryTransformsAlg",
**dict kwargs )

Definition at line 238 of file ActsGeometryConfig.py.

240 **kwargs: dict) -> ComponentAccumulator:
241 acc = ComponentAccumulator()
242
243 acc.addEventAlgo(CompFactory.ActsWriteTrackingGeometryTransforms(name,**kwargs))
244 return acc
245

◆ BeamPipeBlueprintNodeBuilderCfg()

ComponentAccumulator BeamPipeBlueprintNodeBuilderCfg ( flags,
str name = "BeamPipeBlueprintNodeBuilder",
** kwargs )

Definition at line 287 of file ActsGeometryConfig.py.

289) -> ComponentAccumulator:
290 result = ComponentAccumulator()
291 kwargs.setdefault("loadFromDatabase", flags.Detector.GeometryBpipe)
292 result.setPrivateTools(
293 CompFactory.ActsTrk.BeamPipeBlueprintNodeBuilder(name, **kwargs)
294 )
295 return result
296
297

◆ caloBlueprintNodeBuilderCfg()

ComponentAccumulator caloBlueprintNodeBuilderCfg ( flags,
str name = "CaloBlueprintNodeBuilder",
** kwargs )

Definition at line 319 of file ActsGeometryConfig.py.

321 **kwargs) -> ComponentAccumulator:
322 result = ComponentAccumulator()
323 the_tool = CompFactory.ActsTrk.CaloBlueprintNodeBuilder(name, **kwargs)
324 result.setPrivateTools(the_tool)
325 return result

◆ HgtdBlueprintNodeBuilderCfg()

ComponentAccumulator HgtdBlueprintNodeBuilderCfg ( flags,
str name = "HgtdBlueprintNodeBuilder",
** kwargs )

Definition at line 309 of file ActsGeometryConfig.py.

311) -> ComponentAccumulator:
312 result = ComponentAccumulator()
313 the_tool = CompFactory.ActsTrk.HgtdBlueprintNodeBuilder(
314 name, **kwargs)
315 result.setPrivateTools(the_tool)
316 return result
317
318

◆ ItkBlueprintNodeBuilderCfg()

ComponentAccumulator ItkBlueprintNodeBuilderCfg ( flags,
str name = "ItkBlueprintNodeBuilder",
** kwargs )

Definition at line 298 of file ActsGeometryConfig.py.

300 **kwargs) -> ComponentAccumulator:
301 result = ComponentAccumulator()
302 kwargs.setdefault("buildPixel", flags.Detector.GeometryITkPixel)
303 kwargs.setdefault("buildStrip", flags.Detector.GeometryITkStrip)
304 the_tool = CompFactory.ActsTrk.ItkBlueprintNodeBuilder(name, **kwargs)
305 result.setPrivateTools(the_tool)
306 return result
307
308

◆ ITkMaterialDecoratorToolCfg()

ComponentAccumulator ITkMaterialDecoratorToolCfg ( flags,
name = "ITkMaterialDecorator",
** kwargs )

Definition at line 167 of file ActsGeometryConfig.py.

167def ITkMaterialDecoratorToolCfg(flags, name="ITkMaterialDecorator", **kwargs) -> ComponentAccumulator:
168 result = ComponentAccumulator()
169 filename = flags.Acts.TrackingGeometry.ITkHgtdMaterialSource
170 folder = flags.Acts.TrackingGeometry.ITkHgtdMaterialMapPath
171 if flags.Acts.TrackingGeometry.ITkHgtdMaterialSource == "Default":
172 extension = "itk"
173 if flags.Detector.GeometryHGTD:
174 extension += "-hgtd"
175 # ITkMaterialDecoratorTool picks its reader (Json or Root) from the file
176 # extension, so this is what selects the default format read back in.
177 filename = f"material-maps-{extension}-{flags.GeoModel.AtlasVersion}.json"
178 kwargs.setdefault("MaterialDbFile", filename)
179 kwargs.setdefault("MaterialDbFolder", folder)
180 the_tool = CompFactory.ActsTrk.ITkMaterialDecoratorTool(name, **kwargs)
181 result.setPrivateTools(the_tool)
182 return result
183