ATLAS Offline Software
SCT_GeoModelConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
3 
4 
5 def SCT_GeoModelCfg(flags):
6  from AtlasGeoModel.GeometryDBConfig import InDetGeometryDBSvcCfg
7  db = InDetGeometryDBSvcCfg(flags)
8 
9  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
10  acc = GeoModelCfg(flags)
11  geoModelSvc = acc.getPrimary()
12 
13  from AthenaConfiguration.ComponentFactory import CompFactory
14  sctDetectorTool = CompFactory.SCT_DetectorTool()
15  sctDetectorTool.GeometryDBSvc = db.getPrimary()
16  sctDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
17  sctDetectorTool.Alignable = True # make this a flag?
18  sctDetectorTool.DetectorName = "SCT"
19  geoModelSvc.DetectorTools += [ sctDetectorTool ]
20  acc.merge(db)
21  return acc
22 
23 
24 def SCT_AlignmentCfg(flags):
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 SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_AlignCondAlgCfg
30  return SCT_AlignCondAlgCfg(flags)
31 
32 
33 @AccumulatorCache
35  # main GeoModel config
36  acc = SCT_GeoModelCfg(flags)
37  acc.merge(SCT_AlignmentCfg(flags))
38  return acc
39 
40 
41 @AccumulatorCache
43  # main GeoModel config
44  acc = SCT_GeoModelCfg(flags)
45  acc.merge(SCT_AlignmentCfg(flags))
46  from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementCondAlgCfg
47  acc.merge(SCT_DetectorElementCondAlgCfg(flags))
48  return acc
python.SCT_ConditionsAlgorithmsConfig.SCT_AlignCondAlgCfg
def SCT_AlignCondAlgCfg(flags, name="SCT_AlignCondAlg", **kwargs)
Definition: SCT_ConditionsAlgorithmsConfig.py:9
SCT_GeoModelConfig.SCT_AlignmentCfg
def SCT_AlignmentCfg(flags)
Definition: SCT_GeoModelConfig.py:24
python.GeometryDBConfig.InDetGeometryDBSvcCfg
def InDetGeometryDBSvcCfg(flags)
Definition: GeometryDBConfig.py:7
SCT_GeoModelConfig.SCT_ReadoutGeometryCfg
def SCT_ReadoutGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:42
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
SCT_GeoModelConfig.SCT_GeoModelCfg
def SCT_GeoModelCfg(flags)
Definition: SCT_GeoModelConfig.py:5
SCT_GeoModelConfig.SCT_SimulationGeometryCfg
def SCT_SimulationGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:34
python.SCT_ConditionsAlgorithmsConfig.SCT_DetectorElementCondAlgCfg
def SCT_DetectorElementCondAlgCfg(flags, name="SCT_DetectorElementCondAlg", **kwargs)
Definition: SCT_ConditionsAlgorithmsConfig.py:66
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16