ATLAS Offline Software
Loading...
Searching...
No Matches
PLR_LorentzAngleConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentFactory import CompFactory
3from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
4from PixelConditionsAlgorithms.PLR_ConditionsConfig import (
5 PLR_DCSCondHVAlgCfg, PLR_DCSCondTempAlgCfg
6)
7from PLRGeoModelXml.PLR_GeoModelConfig import PLR_ReadoutGeometryCfg
8from SiPropertiesTool.PLR_SiPropertiesConfig import PLR_SiPropertiesToolCfg
9
10
11def PLR_LorentzAngleCondAlgCfg(flags, name="PLR_SiLorentzAngleCondAlg", **kwargs):
12 acc = AtlasFieldCacheCondAlgCfg(flags)
13 acc.merge(PLR_ReadoutGeometryCfg(flags)) # To produce PLR_DetectorElementCollection
14 acc.merge(PLR_DCSCondHVAlgCfg(flags))
15 acc.merge(PLR_DCSCondTempAlgCfg(flags))
16 kwargs.setdefault("SiPropertiesTool", acc.popToolsAndMerge(PLR_SiPropertiesToolCfg(flags)))
17 kwargs.setdefault("PixelIDName", "PLR_ID")
18 kwargs.setdefault("UseMagFieldCache", True)
19 kwargs.setdefault("UseMagFieldDcs", not flags.Common.isOnline)
20 kwargs.setdefault("ReadKeyeTemp", "PLR_DCSTempCondData")
21 kwargs.setdefault("ReadKeyHV", "PLR_DCSHVCondData")
22 kwargs.setdefault("PixelDetEleCollKey", "PLR_DetectorElementCollection")
23 kwargs.setdefault("WriteKey", "PLR_SiLorentzAngleCondData")
24 acc.addCondAlgo(CompFactory.PixelSiLorentzAngleCondAlg(name, **kwargs))
25 return acc
26
27
28def PLR_LorentzAngleToolCfg(flags, name="PLR_LorentzAngleTool", **kwargs):
29 """Return a SiLorentzAngleTool configured for PLR"""
30 acc = PLR_LorentzAngleCondAlgCfg(flags)
31 kwargs.setdefault("DetectorName", "PLR")
32 kwargs.setdefault("SiLorentzAngleCondData", "PLR_SiLorentzAngleCondData")
33 kwargs.setdefault("DetEleCollKey", "PLR_DetectorElementCollection")
34 kwargs.setdefault("UseMagFieldCache", True)
35 acc.setPrivateTools(CompFactory.SiLorentzAngleTool(name, **kwargs))
36 return acc
PLR_LorentzAngleToolCfg(flags, name="PLR_LorentzAngleTool", **kwargs)
PLR_LorentzAngleCondAlgCfg(flags, name="PLR_SiLorentzAngleCondAlg", **kwargs)