6def TRT_GeoModelCfg(flags):
7 from AtlasGeoModel.GeoModelConfig import GeoModelCfg
8 acc = GeoModelCfg(flags)
9 geoModelSvc = acc.getPrimary()
10
11 from AthenaConfiguration.ComponentFactory import CompFactory
12 trtDetectorTool = CompFactory.TRT_DetectorTool()
13 trtDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
14
15 from AthenaConfiguration.Enums import LHCPeriod
16 from AthenaConfiguration.Enums import Project, ProductionStep
17 if (flags.Common.Project is not Project.AthSimulation
18 and flags.Common.ProductionStep not in [ProductionStep.Simulation, ProductionStep.FastChain]) or flags.GeoModel.Run is LHCPeriod.Run1:
19 trtDetectorTool.DoXenonArgonMixture = False
20 trtDetectorTool.DoKryptonMixture = False
21 if flags.GeoModel.Run is LHCPeriod.Run3:
22
23 trtDetectorTool.StrawStatusFile = 'TRTGeometry/Run3MCStrawStatus.txt'
24 elif flags.GeoModel.Run is LHCPeriod.Run2:
25
26 trtDetectorTool.StrawStatusFile = 'TRTGeometry/Run2MC_pp_StrawStatus.txt'
27 if flags.Input.ConditionsRunNumber in [222506, 222507, 313000] or (flags.Input.ConditionsRunNumber >= 226000 and flags.Input.ConditionsRunNumber < 228000):
28
29 trtDetectorTool.StrawStatusFile = 'TRTGeometry/Run2MC_HI_StrawStatus.txt'
30 elif flags.GeoModel.Run is not LHCPeriod.Run1:
31
32 raise ValueError(f'Cannot configure the TRT geometry for LHCPeriod {flags.GeoModel.Run.value}, please check the configuration of "flags.GeoModel.Run".')
33
34
38 geoModelSvc.DetectorTools += [ trtDetectorTool ]
39 return acc
40
41