ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrfCacheConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
4
5def MuonTransformTechnologyCfg(flags, name, key="", detType=-1):
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory import CompFactory
8 result = ComponentAccumulator()
9 cond_alg = CompFactory.MuonG4.GeoModelTrfCacheAlg(name= f"{name}CondAlg",
10 writeKey=key,
11 DetectorType=detType)
12 result.addCondAlgo(cond_alg)
13
14 event_alg = CompFactory.MuonG4.AlignStoreProviderAlg(name=f"{name}Alg",
15 writeKey=key, readKey=key)
16 result.addEventAlgo(event_alg)
17 return result
18
19
20def MuonTransformCacheCfg(flags, name="MuonSimHitSortingAlg", **kwargs):
21 from ROOT.ActsTrk import DetectorType
22 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
23 from AthenaConfiguration.Enums import ProductionStep
24
25 result = ComponentAccumulator()
26
27 if (flags.Common.ProductionStep != ProductionStep.Simulation or \
28 not flags.Muon.usePhaseIIGeoSetup):
29 return result
30 if flags.Detector.GeometryMDT:
31 result.merge(MuonTransformTechnologyCfg(flags, name="MuonMdtTrfCache",
32 key="MdtActsAlignContainer",
33 detType=DetectorType.Mdt))
34 if flags.Detector.GeometryRPC:
35 result.merge(MuonTransformTechnologyCfg(flags, name="MuonRpcTrfCache",
36 key="RpcActsAlignContainer",
37 detType=DetectorType.Rpc))
38 if flags.Detector.GeometryTGC:
39 result.merge(MuonTransformTechnologyCfg(flags, name="MuonTgcTrfCache",
40 key="TgcActsAlignContainer",
41 detType=DetectorType.Tgc))
42 if flags.Detector.GeometrysTGC:
43 result.merge(MuonTransformTechnologyCfg(flags, name="MuonsTgcTrfCache",
44 key="sTgcActsAlignContainer",
45 detType=DetectorType.sTgc))
46 if flags.Detector.GeometryMM:
47 result.merge(MuonTransformTechnologyCfg(flags, name="MuonMmTrfCache",
48 key="MmActsAlignContainer",
49 detType=DetectorType.Mm))
50 return result
MuonTransformCacheCfg(flags, name="MuonSimHitSortingAlg", **kwargs)
MuonTransformTechnologyCfg(flags, name, key="", detType=-1)