ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
SiLorentzAngleTool
python
ITkStripLorentzAngleConfig.py
Go to the documentation of this file.
1
"""Define methods to configure ITkStripLorentzAngleTool
2
3
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4
"""
5
from
AthenaConfiguration.ComponentFactory
import
CompFactory
6
from
MagFieldServices.MagFieldServicesConfig
import
AtlasFieldCacheCondAlgCfg
7
from
SCT_ConditionsTools.ITkStripConditionsToolsConfig
import
ITkStripSiliconConditionsCfg
8
from
StripGeoModelXml.ITkStripGeoModelConfig
import
ITkStripReadoutGeometryCfg
9
10
def
ITkStripLorentzAngleToolCfg
(flags, name="ITkStripLorentzAngleTool", **kwargs):
11
"""Return a SiLorentzAngleTool configured for ITk Strip"""
12
acc =
ITkStripLorentzAngleCondAlgCfg
(flags)
13
#Update to ITkStrip eventually - tool assumes Pixel or SCT for the moment
14
kwargs.setdefault(
"DetectorName"
,
"SCT"
)
15
kwargs.setdefault(
"SiLorentzAngleCondData"
,
"SCTSiLorentzAngleCondData"
)
16
kwargs.setdefault(
"DetEleCollKey"
,
"ITkStripDetectorElementCollection"
)
17
acc.setPrivateTools(CompFactory.SiLorentzAngleTool(name=
"ITkStripLorentzAngleTool"
, **kwargs))
18
return
acc
19
20
def
ITkStripLorentzAngleCondAlgCfg
(flags, name="ITkStripSiLorentzAngleCondAlg",
21
forceUseGeoModel=True, **kwargs):
22
# Condition algorithm
23
# construct with field services
24
acc = AtlasFieldCacheCondAlgCfg(flags)
25
# For SCT_ID and SCT_DetectorElementCollection used
26
# in SCTSiLorentzAngleCondAlg and SiLorentzAngleTool
27
acc.merge(ITkStripReadoutGeometryCfg(flags))
28
# set up SCTSiLorentzAngleCondAlg
29
algkwargs = {}
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"
)
37
else
:
38
sikwargs = {}
39
if
kwargs.get(
"DCSConditionsTool"
):
40
sikwargs[
"DCSConditionsTool"
] = kwargs.get(
"DCSConditionsTool"
)
41
sikwargs[
"ForceUseGeoModel"
] = forceUseGeoModel
42
algkwargs[
"SiConditionsTool"
] = acc.popToolsAndMerge(ITkStripSiliconConditionsCfg(flags, **sikwargs))
43
#Specify correct DetElCollection for ITkStrip
44
algkwargs[
"SCTDetEleCollKey"
] =
"ITkStripDetectorElementCollection"
45
acc.addCondAlgo(CompFactory.SCTSiLorentzAngleCondAlg(name, **algkwargs))
46
return
acc
python.ITkStripLorentzAngleConfig.ITkStripLorentzAngleToolCfg
ITkStripLorentzAngleToolCfg(flags, name="ITkStripLorentzAngleTool", **kwargs)
Definition
ITkStripLorentzAngleConfig.py:10
python.ITkStripLorentzAngleConfig.ITkStripLorentzAngleCondAlgCfg
ITkStripLorentzAngleCondAlgCfg(flags, name="ITkStripSiLorentzAngleCondAlg", forceUseGeoModel=True, **kwargs)
Definition
ITkStripLorentzAngleConfig.py:21
Generated on
for ATLAS Offline Software by
1.17.0