ATLAS Offline Software
SCT_GeoModelConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 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  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
26  acc = ComponentAccumulator()
27  if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
28  from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
29  if flags.GeoModel.Align.Dynamic:
30  acc.merge(addFoldersSplitOnline(flags, "INDET",
31  ["/Indet/Onl/AlignL1/ID", "/Indet/Onl/AlignL2/SCT"],
32  ["/Indet/AlignL1/ID", "/Indet/AlignL2/SCT"]))
33  acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL3", "/Indet/AlignL3"))
34  else:
35  acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align"))
36  else:
37  from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_AlignCondAlgCfg
38  acc.merge(SCT_AlignCondAlgCfg(flags))
39  return acc
40 
41 
42 @AccumulatorCache
44  # main GeoModel config
45  acc = SCT_GeoModelCfg(flags)
46  acc.merge(SCT_AlignmentCfg(flags))
47  return acc
48 
49 
50 @AccumulatorCache
52  # main GeoModel config
53  acc = SCT_GeoModelCfg(flags)
54  acc.merge(SCT_AlignmentCfg(flags))
55  from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementCondAlgCfg
56  acc.merge(SCT_DetectorElementCondAlgCfg(flags))
57  return acc
python.SCT_ConditionsAlgorithmsConfig.SCT_AlignCondAlgCfg
def SCT_AlignCondAlgCfg(flags, name="SCT_AlignCondAlg", **kwargs)
Definition: SCT_ConditionsAlgorithmsConfig.py:9
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
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:51
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:43
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