ATLAS Offline Software
ITkPixelLorentzAngleConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 """Define methods to configure ITkPixelLorentzAngleTool
4 """
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
7 from PixelConditionsAlgorithms.ITkPixelConditionsConfig import (
8  ITkPixelDCSCondHVAlgCfg, ITkPixelDCSCondTempAlgCfg
9 )
10 from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
11 from SiPropertiesTool.ITkPixelSiPropertiesConfig import ITkPixelSiPropertiesToolCfg
12 
13 
14 def ITkPixelLorentzAngleToolCfg(flags, name="ITkPixelLorentzAngleTool", **kwargs):
15  """Return a SiLorentzAngleTool configured for ITk Pixel"""
17  kwargs.setdefault("DetectorName", "Pixel")
18  kwargs.setdefault("SiLorentzAngleCondData", "ITkPixelSiLorentzAngleCondData")
19  kwargs.setdefault("DetEleCollKey", "ITkPixelDetectorElementCollection")
20  kwargs.setdefault("UseMagFieldCache", True)
21  acc.setPrivateTools(CompFactory.SiLorentzAngleTool(name, **kwargs))
22  return acc
23 
24 
25 def ITkPixelLorentzAngleCondAlgCfg(flags, name="ITkPixelSiLorentzAngleCondAlg", **kwargs):
26  acc = AtlasFieldCacheCondAlgCfg(flags)
27  acc.merge(ITkPixelReadoutGeometryCfg(flags)) # To produce ITkPixelDetectorElementCollection
28  acc.merge(ITkPixelDCSCondHVAlgCfg(flags))
29  acc.merge(ITkPixelDCSCondTempAlgCfg(flags))
30  kwargs.setdefault("SiPropertiesTool", acc.popToolsAndMerge(ITkPixelSiPropertiesToolCfg(flags)))
31  kwargs.setdefault("UseMagFieldCache", True)
32  kwargs.setdefault("UseMagFieldDcs", not flags.Common.isOnline)
33  kwargs.setdefault("Disable3DCorrection", True) # ITk-specific
34  kwargs.setdefault("ReadKeyeTemp", "ITkPixelDCSTempCondData")
35  kwargs.setdefault("ReadKeyHV", "ITkPixelDCSHVCondData")
36  kwargs.setdefault("PixelDetEleCollKey", "ITkPixelDetectorElementCollection")
37  kwargs.setdefault("WriteKey", "ITkPixelSiLorentzAngleCondData")
38  acc.addCondAlgo(CompFactory.PixelSiLorentzAngleCondAlg(name, **kwargs))
39  return acc
python.ITkPixelLorentzAngleConfig.ITkPixelLorentzAngleToolCfg
def ITkPixelLorentzAngleToolCfg(flags, name="ITkPixelLorentzAngleTool", **kwargs)
Definition: ITkPixelLorentzAngleConfig.py:14
python.ITkPixelSiPropertiesConfig.ITkPixelSiPropertiesToolCfg
def ITkPixelSiPropertiesToolCfg(flags, name="ITkPixelSiPropertiesTool", **kwargs)
Definition: ITkPixelSiPropertiesConfig.py:28
python.ITkPixelLorentzAngleConfig.ITkPixelLorentzAngleCondAlgCfg
def ITkPixelLorentzAngleCondAlgCfg(flags, name="ITkPixelSiLorentzAngleCondAlg", **kwargs)
Definition: ITkPixelLorentzAngleConfig.py:25
ITkPixelConditionsConfig.ITkPixelDCSCondHVAlgCfg
def ITkPixelDCSCondHVAlgCfg(flags, name="ITkPixelDCSCondHVAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:94
ITkPixelGeoModelConfig.ITkPixelReadoutGeometryCfg
def ITkPixelReadoutGeometryCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkPixelGeoModelConfig.py:39
python.MagFieldServicesConfig.AtlasFieldCacheCondAlgCfg
def AtlasFieldCacheCondAlgCfg(flags, **kwargs)
Definition: MagFieldServicesConfig.py:8
ITkPixelConditionsConfig.ITkPixelDCSCondTempAlgCfg
def ITkPixelDCSCondTempAlgCfg(flags, name="ITkPixelDCSCondTempAlg", **kwargs)
Definition: ITkPixelConditionsConfig.py:120