ATLAS Offline Software
PLR_LorentzAngleConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
4 from PixelConditionsAlgorithms.PLR_ConditionsConfig import (
5  PLR_DCSCondHVAlgCfg, PLR_DCSCondTempAlgCfg
6 )
7 from PLRGeoModelXml.PLR_GeoModelConfig import PLR_ReadoutGeometryCfg
8 from SiPropertiesTool.PLR_SiPropertiesConfig import PLR_SiPropertiesToolCfg
9 
10 
11 def 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 
28 def 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_ConditionsConfig.PLR_DCSCondHVAlgCfg
def PLR_DCSCondHVAlgCfg(flags, name="PLR_DCSCondHVAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:59
python.PLR_LorentzAngleConfig.PLR_LorentzAngleToolCfg
def PLR_LorentzAngleToolCfg(flags, name="PLR_LorentzAngleTool", **kwargs)
Definition: PLR_LorentzAngleConfig.py:28
python.PLR_SiPropertiesConfig.PLR_SiPropertiesToolCfg
def PLR_SiPropertiesToolCfg(flags, name="PLR_SiPropertiesTool", **kwargs)
Definition: PLR_SiPropertiesConfig.py:30
python.PLR_LorentzAngleConfig.PLR_LorentzAngleCondAlgCfg
def PLR_LorentzAngleCondAlgCfg(flags, name="PLR_SiLorentzAngleCondAlg", **kwargs)
Definition: PLR_LorentzAngleConfig.py:11
PLR_ConditionsConfig.PLR_DCSCondTempAlgCfg
def PLR_DCSCondTempAlgCfg(flags, name="PLR_DCSCondTempAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:70
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
PLR_GeoModelConfig.PLR_ReadoutGeometryCfg
def PLR_ReadoutGeometryCfg(flags, **kwargs)
Definition: PLR_GeoModelConfig.py:42