ATLAS Offline Software
Loading...
Searching...
No Matches
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"""
5from AthenaConfiguration.ComponentFactory import CompFactory
6from MagFieldServices.MagFieldServicesConfig import AtlasFieldCacheCondAlgCfg
7from PixelConditionsAlgorithms.ITkPixelConditionsConfig import (
8 ITkPixelDCSCondHVAlgCfg, ITkPixelDCSCondTempAlgCfg
9)
10from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
11from SiPropertiesTool.ITkPixelSiPropertiesConfig import ITkPixelSiPropertiesToolCfg
12
13
14def 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
25def 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
ITkPixelLorentzAngleCondAlgCfg(flags, name="ITkPixelSiLorentzAngleCondAlg", **kwargs)
ITkPixelLorentzAngleToolCfg(flags, name="ITkPixelLorentzAngleTool", **kwargs)