ATLAS Offline Software
PLR_ConditionsConfig.py
Go to the documentation of this file.
1 """Define functions to configure PLR conditions algorithms
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 IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
8 
9 
10 def PLR_ConfigCondAlgCfg(flags, name="PLR_ConfigCondAlg", **kwargs):
11  """Return a ComponentAccumulator with configured PixelConfigCondAlg for PLR"""
12  kwargs.setdefault("WriteKey", "PLR_ModuleData")
13  # This one has the highest chance of premature divergence so just take the default Pixel for now
14  from PixelConditionsAlgorithms.PixelConditionsConfig import PixelConfigCondAlgCfg
15  return PixelConfigCondAlgCfg(flags, name, **kwargs)
16 
17 
18 def PLR_AlignCondAlgCfg(flags, name="PLR_AlignCondAlg", **kwargs):
19  """Return a ComponentAccumulator with configured PixelAlignCondAlg for PLR"""
20  acc = ComponentAccumulator()
21 
22  if flags.GeoModel.Align.Dynamic:
23  raise RuntimeError("Dynamic alignment not supported for PLR yet")
24  else:
25  acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer"))
26 
27  kwargs.setdefault("DetManagerName", "PLR")
28  kwargs.setdefault("UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
29  kwargs.setdefault("ReadKeyStatic", "/Indet/Align")
30  # kwargs.setdefault("ReadKeyDynamicL1", "/Indet/AlignL1/ID")
31  # kwargs.setdefault("ReadKeyDynamicL2", "/Indet/AlignL2/PIX")
32  # kwargs.setdefault("ReadKeyDynamicL3", "/Indet/AlignL3")
33  kwargs.setdefault("ReadKeyIBLDist", "")
34  kwargs.setdefault("WriteKey", "PLR_AlignmentStore")
35 
36  acc.addCondAlgo(CompFactory.PixelAlignCondAlg(name, **kwargs))
37  return acc
38 
39 
40 def PLR_ChargeCalibCondAlgCfg(flags, name="PLR_ChargeCalibCondAlg", **kwargs):
41  """Return a ComponentAccumulator with configured PixelChargeCalibCondAlg for PLR"""
42  acc = ComponentAccumulator()
43  acc.merge(PLR_ConfigCondAlgCfg(flags))
44 
45  folderName = "" # disabled for now
46 
47  from PLRGeoModelXml.PLR_GeoModelConfig import PLR_ReadoutGeometryCfg
48  acc.merge(PLR_ReadoutGeometryCfg(flags))
49 
50  kwargs.setdefault("PixelIDName", "PLR_ID")
51  kwargs.setdefault("PixelDetEleCollKey", "PLR_DetectorElementCollection")
52  kwargs.setdefault("PixelModuleData", "PLR_ModuleData")
53  kwargs.setdefault("ReadKey", folderName)
54  kwargs.setdefault("WriteKey", "PLR_ChargeCalibCondData")
55  acc.addCondAlgo(CompFactory.PixelChargeLUTCalibCondAlg(name, **kwargs))
56  return acc
57 
58 
59 def PLR_DCSCondHVAlgCfg(flags, name="PLR_DCSCondHVAlg", **kwargs):
60  """Return a ComponentAccumulator with configured PixelDCSCondHVAlg for PLR"""
61  acc = ComponentAccumulator()
62  acc.merge(PLR_ConfigCondAlgCfg(flags))
63  kwargs.setdefault("ReadKey", "") # disabled for now
64  kwargs.setdefault("PixelModuleData", "PLR_ModuleData")
65  kwargs.setdefault("WriteKey", "PLR_DCSHVCondData")
66  acc.addCondAlgo(CompFactory.PixelDCSCondHVAlg(name, **kwargs))
67  return acc
68 
69 
70 def PLR_DCSCondTempAlgCfg(flags, name="PLR_DCSCondTempAlg", **kwargs):
71  """Return a ComponentAccumulator with configured PixelDCSCondTempAlg for PLR"""
72  acc = ComponentAccumulator()
73  acc.merge(PLR_ConfigCondAlgCfg(flags))
74  kwargs.setdefault("ReadKey", "") # disabled for now
75  kwargs.setdefault("WriteKey", "PLR_DCSTempCondData")
76  acc.addCondAlgo(CompFactory.PixelDCSCondTempAlg(name, **kwargs))
77  return acc
78 
79 
80 def PLR_DetectorElementCondAlgCfg(flags, name="PLR_DetectorElementCondAlg", **kwargs):
81  """Return a ComponentAccumulator with configured PixelDetectorElementCondAlg for PLR"""
82  acc = ComponentAccumulator()
83  acc.merge(PLR_AlignCondAlgCfg(flags))
84  kwargs.setdefault("DetManagerName", "PLR")
85  kwargs.setdefault("PixelAlignmentStore", "PLR_AlignmentStore")
86  kwargs.setdefault("WriteKey", "PLR_DetectorElementCollection")
87  acc.addCondAlgo(CompFactory.PixelDetectorElementCondAlg(name, **kwargs))
88  return acc
89 
90 
91 def PLR_DistortionAlgCfg(flags, name="PLR_DistortionAlg", **kwargs):
92  """Return a ComponentAccumulator with configured PixelDistortionAlg for PLR"""
93  acc = ComponentAccumulator()
94  acc.merge(PLR_ConfigCondAlgCfg(flags))
95  acc.merge(addFoldersSplitOnline(flags,"INDET", "/Indet/Onl/PixelDist", "/Indet/PixelDist", className="DetCondCFloat"))
96  kwargs.setdefault("ReadKey", "/Indet/PixelDist")
97  kwargs.setdefault("WriteKey", "PLR_DistortionData")
98  acc.addCondAlgo(CompFactory.PixelDistortionAlg(name, **kwargs))
99  return acc
PLR_ConditionsConfig.PLR_DCSCondHVAlgCfg
def PLR_DCSCondHVAlgCfg(flags, name="PLR_DCSCondHVAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:59
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
PLR_ConditionsConfig.PLR_AlignCondAlgCfg
def PLR_AlignCondAlgCfg(flags, name="PLR_AlignCondAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:18
PixelConditionsConfig.PixelConfigCondAlgCfg
def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs)
Definition: PixelConditionsConfig.py:11
PLR_ConditionsConfig.PLR_DistortionAlgCfg
def PLR_DistortionAlgCfg(flags, name="PLR_DistortionAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:91
PLR_ConditionsConfig.PLR_DCSCondTempAlgCfg
def PLR_DCSCondTempAlgCfg(flags, name="PLR_DCSCondTempAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:70
python.IOVDbSvcConfig.addFoldersSplitOnline
def addFoldersSplitOnline(flags, detDb, onlineFolders, offlineFolders, className=None, extensible=False, addMCString='_OFL', splitMC=False, tag=None, forceDb=None, modifiers='')
Definition: IOVDbSvcConfig.py:153
PLR_ConditionsConfig.PLR_ConfigCondAlgCfg
def PLR_ConfigCondAlgCfg(flags, name="PLR_ConfigCondAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:10
PLR_ConditionsConfig.PLR_ChargeCalibCondAlgCfg
def PLR_ChargeCalibCondAlgCfg(flags, name="PLR_ChargeCalibCondAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:40
PLR_ConditionsConfig.PLR_DetectorElementCondAlgCfg
def PLR_DetectorElementCondAlgCfg(flags, name="PLR_DetectorElementCondAlg", **kwargs)
Definition: PLR_ConditionsConfig.py:80
PLR_GeoModelConfig.PLR_ReadoutGeometryCfg
def PLR_ReadoutGeometryCfg(flags, **kwargs)
Definition: PLR_GeoModelConfig.py:42