2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
7 name: str =
"ActsTrackingGeometrySvc",
8 **kwargs) -> ComponentAccumulator:
11 from ROOT.ActsTrk
import DetectorType
12 kwargs.setdefault(
"NotAlignDetectors", [DetectorType.Trt,
16 if flags.Detector.GeometryBpipe:
17 from BeamPipeGeoModel.BeamPipeGMConfig
import BeamPipeGeometryCfg
19 kwargs.setdefault(
"BuildBeamPipe",
True)
21 if flags.Detector.GeometryPixel:
22 subDetectors += [
"Pixel"]
23 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
26 if flags.Detector.GeometrySCT:
27 subDetectors += [
"SCT"]
28 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
31 if flags.Detector.GeometryTRT:
35 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
38 if flags.Detector.GeometryCalo:
47 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
49 from TileGeoModel.TileGMConfig
import TileGMCfg
52 if flags.Detector.GeometryITkPixel:
53 subDetectors += [
"ITkPixel"]
54 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
57 if flags.Detector.GeometryITkStrip:
58 subDetectors += [
"ITkStrip"]
59 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
62 if flags.Detector.GeometryHGTD:
63 subDetectors += [
"HGTD"]
64 if flags.HGTD.Geometry.useGeoModelXml:
65 from HGTD_GeoModelXml.HGTD_GeoModelConfig
import HGTD_ReadoutGeometryCfg
67 from HGTD_GeoModel.HGTD_GeoModelConfig
import HGTD_ReadoutGeometryCfg
70 actsTrackingGeometrySvc = CompFactory.ActsTrackingGeometrySvc(name,
71 BuildSubDetectors=subDetectors,
73 if flags.Acts.TrackingGeometry.MaterialSource ==
"Default":
74 if flags.Detector.GeometryITk:
76 if flags.Detector.GeometryHGTD:
78 actsTrackingGeometrySvc.UseMaterialMap =
True
79 actsTrackingGeometrySvc.MaterialMapCalibFolder = flags.Acts.TrackingGeometry.MaterialCalibrationFolder
80 actsTrackingGeometrySvc.MaterialMapInputFile = \
81 "material-maps-" + flags.GeoModel.AtlasVersion +
"-" + extension +
".json"
83 elif flags.Acts.TrackingGeometry.MaterialSource.find(
".json") != -1:
84 actsTrackingGeometrySvc.UseMaterialMap =
True
85 actsTrackingGeometrySvc.MaterialMapCalibFolder = flags.Acts.TrackingGeometry.MaterialCalibrationFolder
86 actsTrackingGeometrySvc.MaterialMapInputFile = flags.Acts.TrackingGeometry.MaterialSource
88 acc.addService(actsTrackingGeometrySvc, primary =
True)
93 name: str =
"ActsPropStepRootWriterSvc",
94 **kwargs) -> ComponentAccumulator:
96 acc.addService(CompFactory.ActsPropStepRootWriterSvc(name, **kwargs))
101 name: str =
"ActsTrackingGeometryTool" ) -> ComponentAccumulator:
104 from ActsAlignmentAlgs.AlignmentAlgsConfig
import ActsGeometryContextAlgCfg
106 acc.setPrivateTools(CompFactory.ActsTrackingGeometryTool(name))
110 name: str =
"ActsExtrapolationTool",
111 **kwargs) -> ComponentAccumulator:
113 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
116 acc.setPrivateTools(CompFactory.ActsExtrapolationTool(name, **kwargs))
121 name: str =
"ActsMaterialTrackWriterSvc",
122 **kwargs) -> ComponentAccumulator:
125 acc.addService(CompFactory.ActsMaterialTrackWriterSvc(name, **kwargs), primary=
True)
130 name: str =
"ActsMaterialStepConverterTool",
131 **kwargs ) -> ComponentAccumulator:
133 acc.addPublicTool(CompFactory.ActsMaterialStepConverterTool(name, **kwargs), primary=
True)
138 name: str =
"ActsSurfaceMappingTool",
139 **kwargs ) -> ComponentAccumulator:
142 acc.addPublicTool(CompFactory.ActsSurfaceMappingTool(name, **kwargs), primary=
True)
147 name: str =
"ActsVolumeMappingTool",
148 **kwargs ) -> ComponentAccumulator:
151 acc.addPublicTool(CompFactory.ActsVolumeMappingTool(name, **kwargs), primary=
True)
156 name: str =
"ActsMaterialJsonWriterTool",
157 **kwargs) -> ComponentAccumulator:
159 acc.addPublicTool(CompFactory.ActsMaterialJsonWriterTool(name, **kwargs), primary=
True)
164 name: str =
"ActsObjWriterTool",
165 **kwargs) -> ComponentAccumulator:
167 acc.addPublicTool(CompFactory.ActsObjWriterTool(name, **kwargs), primary=
True)
172 name: str =
"ActsExtrapolationAlg",
173 **kwargs) -> ComponentAccumulator:
176 if "ExtrapolationTool" not in kwargs:
180 acc.addEventAlgo(CompFactory.ActsExtrapolationAlg(name, **kwargs))
184 name: str =
"ActsWriteTrackingGeometry",
185 **kwargs) -> ComponentAccumulator:
188 if 'TrackingGeometryTool' not in kwargs:
191 if 'MaterialJsonWriterTool' not in kwargs:
193 OutputFile =
"geometry-maps.json",
194 processSensitives =
False,
195 processNonMaterial =
True) ))
198 if flags.Detector.GeometryBpipe:
199 subDetectors = [
"BeamPipe"]
201 if flags.Detector.GeometryPixel:
202 subDetectors += [
"Pixel"]
203 if flags.Detector.GeometryITkPixel:
204 subDetectors += [
"ITkPixel"]
206 if flags.Detector.GeometrySCT:
207 subDetectors += [
"SCT"]
208 if flags.Detector.GeometryITkStrip:
209 subDetectors += [
"ITkStrip"]
210 if flags.Detector.GeometryHGTD:
211 subDetectors += [
"HGTD"]
213 if 'ObjWriterTool' not in kwargs:
214 kwargs.setdefault(
"ObjWriterTool",
216 OutputDirectory =
"obj",
217 SubDetectors = subDetectors) ))
219 acc.addEventAlgo(CompFactory.ActsWriteTrackingGeometry(name, **kwargs))
223 name: str =
"ActsWriteTrackingGeometryTransformsAlg",
224 **kwargs: dict) -> ComponentAccumulator:
227 if 'TrackingGeometryTool' not in kwargs:
230 acc.addEventAlgo(CompFactory.ActsWriteTrackingGeometryTransforms(name,**kwargs))
234 name: str =
"ActsMaterialMapping",
235 **kwargs) -> ComponentAccumulator:
238 if 'MaterialStepConverterTool' not in kwargs:
241 if 'SurfaceMappingTool' not in kwargs:
244 if 'VolumeMappingTool' not in kwargs:
247 if 'MaterialJsonWriterTool' not in kwargs:
248 kwargs.setdefault(
"MaterialJsonWriterTool",
250 OutputFile =
"material-maps.json",
251 processSensitives =
False,
252 processNonMaterial =
False) ))
254 acc.addEventAlgo(CompFactory.ActsMaterialMapping(name, **kwargs))
258 name: str =
"ActsDetectorElementToActsGeometryIdMappingAlg",
259 **kwargs) -> ComponentAccumulator:
261 if 'TrackingGeometryTool' not in kwargs :
262 kwargs.setdefault(
'TrackingGeometryTool',
264 kwargs.setdefault(
'DetectorElementToActsGeometryIdMapKey',
'DetectorElementToActsGeometryIdMap')
266 acc.addCondAlgo(CompFactory.ActsTrk.DetectorElementToActsGeometryIdMappingAlg(name, **kwargs))