1 """Define methods to configure SCTLorentzAngleTool
3 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
7 from SCT_ConditionsTools.SCT_ConditionsToolsConfig
import SCT_SiliconConditionsCfg
8 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
11 """Return a SiLorentzAngleTool configured for SCT"""
13 kwargs.setdefault(
"DetectorName",
"SCT")
14 kwargs.setdefault(
"SiLorentzAngleCondData",
"SCTSiLorentzAngleCondData")
15 kwargs.setdefault(
"DetEleCollKey",
"SCT_DetectorElementCollection")
16 acc.setPrivateTools(CompFactory.SiLorentzAngleTool(name, **kwargs))
28 forceUseGeoModel = kwargs.get(
"forceUseGeoModel",
not (flags.InDet.useSctDCS
or flags.Common.isOnline))
30 algkwargs[
"UseMagFieldCache"] = kwargs.get(
"UseMagFieldCache",
True)
31 algkwargs[
"UseMagFieldDcs"] = kwargs.get(
"UseMagFieldDcs",
not flags.Common.isOnline)
32 algkwargs[
"UseGeoModel"] = forceUseGeoModel
33 algkwargs[
"useSctDefaults"] = kwargs.get(
"useSctDefaults",
False)
34 if not algkwargs[
"useSctDefaults"]:
35 if kwargs.get(
"SiConditionsTool"):
36 algkwargs[
"SiConditionsTool"] = kwargs.get(
"SiConditionsTool")
39 if kwargs.get(
"DCSConditionsTool"):
40 sikwargs[
"DCSConditionsTool"] = kwargs.get(
"DCSConditionsTool")
41 sikwargs[
"ForceUseGeoModel"] = forceUseGeoModel
43 acc.addCondAlgo(CompFactory.SCTSiLorentzAngleCondAlg(name, **algkwargs))