87def MuonAlignStoreCfg(flags):
88 result = ComponentAccumulator()
89 if not flags.Muon.usePhaseIIGeoSetup: return result
90 from MuonCondAlgR4.ConditionsConfig import ActsMuonAlignCondAlgCfg
91 result.merge(ActsMuonAlignCondAlgCfg(flags))
92 from ActsAlignmentAlgs.AlignmentAlgsConfig import ActsAlignStoreProviderAlgCfg
93
94 from MuonG4TrfCache.MuonTrfCacheConfig import MuonTransformCacheCfg
95 result.merge(MuonTransformCacheCfg(flags))
96
97 setCondDep = flags.Muon.enableAlignment or flags.Sim.ReleaseGeoModel
98 from ROOT.ActsTrk import DetectorType
99 if flags.Detector.GeometryMDT:
100 result.merge(ActsAlignStoreProviderAlgCfg(flags,
101 name="ActsDetAlignmentAlgMdt",
102 CondAlignStore="MdtActsAlignContainer" if setCondDep else "",
103 EventAlignStore="MdtActsAlignContainer",
104 SplitPhysVolCache = False,
105 SplitActsTrfCache = False,
106 FillAlignCache = False,
107 DetectorType=DetectorType.Mdt))
108 if flags.Detector.GeometryRPC:
109 result.merge(ActsAlignStoreProviderAlgCfg(flags,
110 name="ActsDetAlignmentAlgRpc",
111 CondAlignStore="RpcActsAlignContainer" if setCondDep else "",
112 EventAlignStore="RpcActsAlignContainer",
113 SplitPhysVolCache = False,
114 SplitActsTrfCache = False,
115 FillAlignCache = False,
116 DetectorType=DetectorType.Rpc))
117 if flags.Detector.GeometryTGC:
118 result.merge(ActsAlignStoreProviderAlgCfg(flags,
119 name="ActsDetAlignmentAlgTgc",
120 CondAlignStore="TgcActsAlignContainer" if setCondDep else "",
121 EventAlignStore="TgcActsAlignContainer",
122 SplitPhysVolCache = False,
123 SplitActsTrfCache = False,
124 FillAlignCache = False,
125 DetectorType=DetectorType.Tgc))
126 if flags.Detector.GeometrysTGC:
127 result.merge(ActsAlignStoreProviderAlgCfg(flags,
128 name="ActsDetAlignmentAlgSTGC",
129 CondAlignStore="sTgcActsAlignContainer" if setCondDep else "",
130 EventAlignStore="sTgcActsAlignContainer",
131 SplitPhysVolCache = False,
132 SplitActsTrfCache = False,
133 FillAlignCache = False,
134 DetectorType=DetectorType.sTgc))
135
136 if flags.Detector.GeometryMM:
137 result.merge(ActsAlignStoreProviderAlgCfg(flags,
138 name="ActsDetAlignmentAlgMM",
139 CondAlignStore="MmActsAlignContainer" if setCondDep or \
140 flags.Muon.applyMMPassivation else "",
141 EventAlignStore="MmActsAlignContainer",
142 SplitPhysVolCache = False,
143 SplitActsTrfCache = False,
144 FillAlignCache = False,
145 DetectorType=DetectorType.Mm))
146
147
148 return result
149