ATLAS Offline Software
ITkStripSiPropertiesConfig.py
Go to the documentation of this file.
1 """Define methods to configure ITkStrip SiProperties
2 
3 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 """
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from SCT_ConditionsTools.ITkStripConditionsToolsConfig import ITkStripSiliconConditionsCfg
8 from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
9 
10 
11 def ITkStripSiPropertiesCondAlgCfg(flags, name="ITkStripSiPropertiesCondAlg", **kwargs):
12  """Return configured ComponentAccumulator and tool for ITkStripSiProperties
13 
14  SiConditionsTool and/or DCSConditionsTool may be provided in kwargs
15  """
16  acc = ComponentAccumulator()
17 
18  # Condition algorithm
19  # SCTSiPropertiesCondAlg needs outputs of SCT_SiliconConditions algorithms
20  if not kwargs.get("SiConditionsTool"):
21  kwargs["SiConditionsTool"] = acc.popToolsAndMerge(ITkStripSiliconConditionsCfg(flags))
22 
23  kwargs.setdefault("SCTDetEleCollKey", "ITkStripDetectorElementCollection")
24  kwargs.setdefault("WriteKey", "ITkStripSiliconPropertiesVector")
25  kwargs.setdefault("ForceUseGeoModel", True)
26  acc.merge(ITkStripReadoutGeometryCfg(flags))
27  acc.addCondAlgo(CompFactory.SCTSiPropertiesCondAlg(name, **kwargs))
28  return acc
29 
30 
31 def ITkStripSiPropertiesToolCfg(flags, name="ITkStripSiPropertiesTool", **kwargs):
32  """Return a SiPropertiesTool configured for ITk Strip"""
33  SiConditionsTool = kwargs.pop("SiConditionsTool", None)
34  acc = ITkStripSiPropertiesCondAlgCfg(flags, SiConditionsTool=SiConditionsTool)
35  kwargs.setdefault("DetectorName", "SCT")
36  kwargs.setdefault("ReadKey", "ITkStripSiliconPropertiesVector")
37  acc.setPrivateTools(CompFactory.SiPropertiesTool(name, **kwargs))
38  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.ITkStripConditionsToolsConfig.ITkStripSiliconConditionsCfg
def ITkStripSiliconConditionsCfg(flags, name="ITkStripSilicon", **kwargs)
Definition: ITkStripConditionsToolsConfig.py:186
python.ITkStripSiPropertiesConfig.ITkStripSiPropertiesCondAlgCfg
def ITkStripSiPropertiesCondAlgCfg(flags, name="ITkStripSiPropertiesCondAlg", **kwargs)
Definition: ITkStripSiPropertiesConfig.py:11
ITkStripGeoModelConfig.ITkStripReadoutGeometryCfg
def ITkStripReadoutGeometryCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkStripGeoModelConfig.py:39
python.ITkStripSiPropertiesConfig.ITkStripSiPropertiesToolCfg
def ITkStripSiPropertiesToolCfg(flags, name="ITkStripSiPropertiesTool", **kwargs)
Definition: ITkStripSiPropertiesConfig.py:31