ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_GeoModelConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.AccumulatorCache import AccumulatorCache
3
4
5def 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 geoModelSvc.DetectorTools += [ sctDetectorTool ]
19 acc.merge(db)
20 return acc
21
22
24 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
25 acc = ComponentAccumulator()
26 if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
27 from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
28 if flags.GeoModel.Align.Dynamic:
29 acc.merge(addFoldersSplitOnline(flags, "INDET",
30 ["/Indet/Onl/AlignL1/ID", "/Indet/Onl/AlignL2/SCT"],
31 ["/Indet/AlignL1/ID", "/Indet/AlignL2/SCT"]))
32 acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL3", "/Indet/AlignL3"))
33 else:
34 acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align"))
35 else:
36 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_AlignCondAlgCfg
37 acc.merge(SCT_AlignCondAlgCfg(flags))
38 return acc
39
40
41@AccumulatorCache
43 # main GeoModel config
44 acc = SCT_GeoModelCfg(flags)
45 acc.merge(SCT_AlignmentCfg(flags))
46 return acc
47
48
49@AccumulatorCache
51 # main GeoModel config
52 acc = SCT_GeoModelCfg(flags)
53 acc.merge(SCT_AlignmentCfg(flags))
54 from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConfig import SCT_DetectorElementCondAlgCfg
55 acc.merge(SCT_DetectorElementCondAlgCfg(flags))
56 return acc