ATLAS Offline Software
Loading...
Searching...
No Matches
PLR_GeoModelConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 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 # ITkPixelDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
11 plrDetectorTool.Alignable = False # make this a flag? Set true as soon as decided on folder structure
12 plrDetectorTool.DetectorName = "PLR"
13 if flags.Detector.GeometryITkPixel:
14 # if pixel is present, PLR will be placed inside it, so it needs to know
15 # which volume to start from rather than ATLAS
16 plrDetectorTool.ContainingDetector = "ITkPixel"
17 if flags.ITk.Geometry.PLRLocal:
18 # Setting this filename triggers reading from local file rather than DB
19 plrDetectorTool.GmxFilename = flags.ITk.Geometry.PLRFilename
20 if flags.ITk.Geometry.PLRClobOutputName:
21 plrDetectorTool.ClobOutputName = flags.ITk.Geometry.PLRClobOutputName
22 geoModelSvc.DetectorTools += [ plrDetectorTool ]
23 return acc
24
25
27 if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
28 from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
29 return addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align")
30 else:
31 from PixelConditionsAlgorithms.PLR_ConditionsConfig import PLR_AlignCondAlgCfg
32 return PLR_AlignCondAlgCfg(flags)
33
34
36 # main GeoModel config
37 acc = PLR_GeometryCfg(flags)
38 acc.merge(PLR_AlignmentCfg(flags))
39 return acc
40
41
42def PLR_ReadoutGeometryCfg(flags, **kwargs):
43 # main GeoModel config
44 acc = PLR_GeometryCfg(flags)
45 acc.merge(PLR_AlignmentCfg(flags))
46 from PixelConditionsAlgorithms.PLR_ConditionsConfig import PLR_DetectorElementCondAlgCfg
47 acc.merge(PLR_DetectorElementCondAlgCfg(flags))
48 return acc
PLR_ReadoutGeometryCfg(flags, **kwargs)