ATLAS Offline Software
TRT_GeoModelConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
5 
6 
7 def TRT_GeoModelCfg(flags):
8  from AtlasGeoModel.GeometryDBConfig import InDetGeometryDBSvcCfg
9  db = InDetGeometryDBSvcCfg(flags)
10 
11  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
12  acc = GeoModelCfg(flags)
13  geoModelSvc = acc.getPrimary()
14 
15  from AthenaConfiguration.ComponentFactory import CompFactory
16  trtDetectorTool = CompFactory.TRT_DetectorTool()
17  trtDetectorTool.GeometryDBSvc = db.getPrimary()
18  trtDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
19  # Use default TRT active gas in geo model unless in simulation.
20  from AthenaConfiguration.Enums import Project, ProductionStep
21  if (flags.Common.Project is not Project.AthSimulation
22  and flags.Common.ProductionStep not in [ProductionStep.Simulation, ProductionStep.FastChain]):
23  trtDetectorTool.DoXenonArgonMixture = False
24  trtDetectorTool.DoKryptonMixture = False
25 
26  from TRT_ConditionsServices.TRT_ConditionsServicesConfig import TRT_StrawStatusSummaryToolCfg
27  acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags, forceLegacyAccess=True)) # FIXME: if we set the tool, things break for unknown reasons
28  geoModelSvc.DetectorTools += [ trtDetectorTool ]
29  acc.merge(db)
30  return acc
31 
32 
33 def TRT_AlignmentCfg(flags):
34  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
35  acc = ComponentAccumulator()
36  if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
37  from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
38  acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/DX", "/TRT/Calib/DX"))
39  acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Align", "/TRT/Align"))
40  else:
41  from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTAlignCondAlgCfg
42  acc.merge(TRTAlignCondAlgCfg(flags))
43  return acc
44 
45 
46 @AccumulatorCache
48  # main GeoModel config
49  acc = TRT_GeoModelCfg(flags)
50  acc.merge(TRT_AlignmentCfg(flags))
51  return acc
52 
53 
54 @AccumulatorCache
56  # main GeoModel config
57  acc = TRT_GeoModelCfg(flags)
58  acc.merge(TRT_AlignmentCfg(flags))
59  # Note: this has almost the same content but different name on purpose if
60  # we ever split readout geometry in a separate conditions algorithm
61  from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTAlignCondAlgCfg
62  acc.merge(TRTAlignCondAlgCfg(flags))
63  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TRT_GeoModelConfig.TRT_GeoModelCfg
def TRT_GeoModelCfg(flags)
Definition: TRT_GeoModelConfig.py:7
TRT_GeoModelConfig.TRT_ReadoutGeometryCfg
def TRT_ReadoutGeometryCfg(flags)
Definition: TRT_GeoModelConfig.py:55
python.GeometryDBConfig.InDetGeometryDBSvcCfg
def InDetGeometryDBSvcCfg(flags)
Definition: GeometryDBConfig.py:7
python.TRT_ConditionsServicesConfig.TRT_StrawStatusSummaryToolCfg
def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **kwargs)
Definition: TRT_ConditionsServicesConfig.py:23
TRT_GeoModelConfig.TRT_AlignmentCfg
def TRT_AlignmentCfg(flags)
Definition: TRT_GeoModelConfig.py:33
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
TRT_GeoModelConfig.TRT_SimulationGeometryCfg
def TRT_SimulationGeometryCfg(flags)
Definition: TRT_GeoModelConfig.py:47
python.TRT_ConditionsAlgsConfig.TRTAlignCondAlgCfg
def TRTAlignCondAlgCfg(flags, name="TRTAlignCondAlg", **kwargs)
Definition: TRT_ConditionsAlgsConfig.py:8
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16