ATLAS Offline Software
PLR_GeoModelConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 def 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 
26 def PLR_AlignmentCfg(flags):
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 
42 def 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_GeoModelConfig.PLR_AlignmentCfg
def PLR_AlignmentCfg(flags)
Definition: PLR_GeoModelConfig.py:26
PLR_GeoModelConfig.PLR_GeometryCfg
def PLR_GeometryCfg(flags)
Definition: PLR_GeoModelConfig.py:3
PLR_ConditionsConfig.PLR_AlignCondAlgCfg
def PLR_AlignCondAlgCfg(flags, name="PLR_AlignCondAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:18
python.IOVDbSvcConfig.addFoldersSplitOnline
def addFoldersSplitOnline(flags, detDb, onlineFolders, offlineFolders, className=None, extensible=False, addMCString='_OFL', splitMC=False, tag=None, forceDb=None, modifiers='')
Definition: IOVDbSvcConfig.py:153
PLR_GeoModelConfig.PLR_SimulationGeometryCfg
def PLR_SimulationGeometryCfg(flags)
Definition: PLR_GeoModelConfig.py:35
PLR_ConditionsConfig.PLR_DetectorElementCondAlgCfg
def PLR_DetectorElementCondAlgCfg(flags, name="PLR_DetectorElementCondAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:80
PLR_GeoModelConfig.PLR_ReadoutGeometryCfg
def PLR_ReadoutGeometryCfg(flags, **kwargs)
Definition: PLR_GeoModelConfig.py:42
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16