ATLAS Offline Software
Loading...
Searching...
No Matches
PLR_GeoModelConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3def PLR_GeometryCfg(flags):
4 from AtlasGeoModel.GeoModelConfig import GeoModelCfg
5 acc = GeoModelCfg(flags)
6 geoModelSvc = acc.getPrimary()
7
8 from AthenaConfiguration.ComponentFactory import CompFactory
9 plrDetectorTool = CompFactory.PLRDetectorTool()
10 plrDetectorTool.DetectorName = "PLR"
11 if flags.Detector.GeometryITkPixel:
12 # if pixel is present, PLR will be placed inside it, so it needs to know
13 # which volume to start from rather than ATLAS
14 plrDetectorTool.ContainingDetector = "ITkPixel"
15 if flags.ITk.Geometry.PLRLocal:
16 # Setting this filename triggers reading from local file rather than DB
17 plrDetectorTool.GmxFilename = flags.ITk.Geometry.PLRFilename
18 if flags.ITk.Geometry.PLRClobOutputName:
19 plrDetectorTool.ClobOutputName = flags.ITk.Geometry.PLRClobOutputName
20 geoModelSvc.DetectorTools += [ plrDetectorTool ]
21 return acc
22
23
25 if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
26 from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
27 return addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align")
28 else:
29 from PixelConditionsAlgorithms.PLR_ConditionsConfig import PLR_AlignCondAlgCfg
30 return PLR_AlignCondAlgCfg(flags)
31
32
34 # main GeoModel config
35 acc = PLR_GeometryCfg(flags)
36 acc.merge(PLR_AlignmentCfg(flags))
37 return acc
38
39
40def PLR_ReadoutGeometryCfg(flags, **kwargs):
41 # main GeoModel config
42 acc = PLR_GeometryCfg(flags)
43 acc.merge(PLR_AlignmentCfg(flags))
44 from PixelConditionsAlgorithms.PLR_ConditionsConfig import PLR_DetectorElementCondAlgCfg
45 acc.merge(PLR_DetectorElementCondAlgCfg(flags))
46 return acc
PLR_ReadoutGeometryCfg(flags, **kwargs)