ATLAS Offline Software
Loading...
Searching...
No Matches
AlignmentErrorToolConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentFactory import CompFactory
4from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5
6def AlignmentErrorToolCfg(flags, name="AlignmentErrorTool", **kwargs):
7 acc = ComponentAccumulator()
8
9 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
10 acc.merge(MuonGeoModelCfg(flags))
11
12 if not (flags.IOVDb.DatabaseInstance == 'COMP200' \
13 or 'HLT' in flags.IOVDb.GlobalTag \
14 or flags.Common.isOnline or flags.Muon.MuonTrigger) :
15 from MuonConfig.MuonGeometryConfig import MuonAlignmentErrorDbAlgCfg
16 acc.merge(MuonAlignmentErrorDbAlgCfg(flags))
17
18
21
22
23 from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
24 kwargs.setdefault("MuonIdHelperSvc", acc.getPrimaryAndMerge(MuonIdHelperSvcCfg(flags)))
25
26 acc.setPrivateTools(
27 CompFactory.MuonAlign.AlignmentErrorTool(name, **kwargs))
28
29 return acc
30
AlignmentErrorToolCfg(flags, name="AlignmentErrorTool", **kwargs)