1 """Define functions to configure Pixel conditions algorithms
3 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from IOVDbSvc.IOVDbSvcConfig
import addFolders, addFoldersSplitOnline
10 """Return a ComponentAccumulator with configured PixelConfigCondAlg for ITk"""
12 kwargs.setdefault(
"WriteKey",
"ITkPixelModuleData")
16 BarrelToTThreshold = [-1,-1,-1,-1,-1],
17 BarrelCrossTalk = [ 0.06, 0.06, 0.06, 0.06, 0.06],
18 BarrelNoiseOccupancy = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
19 BarrelDisableProbability = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
20 BarrelLorentzAngleCorr = [ 1.0, 1.0, 1.0, 1.0, 1.0],
21 DefaultBarrelBiasVoltage = [ 150.0, 150.0, 150.0, 150.0, 150.0],
22 BarrelFluence = [0.0e14,0.0e14,0.0e14,0.0e14,0.0e14],
23 BarrelFluenceMap = [
"PixelDigitization/maps_IBL_PL_80V_fl0e14.root",
24 "PixelDigitization/maps_IBL_PL_80V_fl0e14.root",
25 "PixelDigitization/maps_IBL_PL_80V_fl0e14.root",
26 "PixelDigitization/maps_IBL_PL_80V_fl0e14.root",
27 "PixelDigitization/maps_IBL_PL_80V_fl0e14.root"],
28 EndcapToTThreshold = [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],
29 EndcapCrossTalk = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06],
30 EndcapNoiseOccupancy = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
31 EndcapDisableProbability = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
32 EndcapLorentzAngleCorr = [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
33 InnermostNoiseShape = [0.0, 1.0],
34 NextInnermostNoiseShape = [0.0, 1.0],
35 PixelNoiseShape = [0.0, 1.0],
37 DefaultBarrelAnalogThreshold = [900, 600, 600, 600, 600],
38 DefaultEndcapAnalogThreshold = [600, 600, 600, 600, 600, 600, 600, 600, 600],
39 DefaultBarrelAnalogThresholdSigma = [36, 24, 24, 24, 24],
40 DefaultEndcapAnalogThresholdSigma = [24, 24, 24, 24, 24, 24, 24, 24, 24],
41 DefaultBarrelAnalogThresholdNoise = [110, 75, 75, 75, 75],
42 DefaultEndcapAnalogThresholdNoise = [75, 75, 75, 75, 75, 75, 75, 75, 75],
43 DefaultBarrelInTimeThreshold = [1000, 1000, 1000, 1000, 1000],
44 DefaultEndcapInTimeThreshold = [1500, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000],
45 DefaultCalibrationParameterA = 14.0,
46 DefaultCalibrationParameterE = -1000.0,
47 DefaultCalibrationParameterC = 8000.0,
49 CondArgs.update(kwargs)
50 acc.addCondAlgo(CompFactory.PixelModuleConfigCondAlg(name, **CondArgs))
54 """Return a ComponentAccumulator with configured PixelAlignCondAlg for ITk"""
57 if flags.GeoModel.Align.Dynamic:
58 raise RuntimeError(
"Dynamic alignment not supported for ITk yet")
60 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/Align", flags.ITk.Geometry.alignmentFolder , className=
"AlignableTransformContainer"))
62 kwargs.setdefault(
"DetManagerName",
"ITkPixel")
63 kwargs.setdefault(
"UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
64 kwargs.setdefault(
"ReadKeyStatic", flags.ITk.Geometry.alignmentFolder)
68 kwargs.setdefault(
"ReadKeyIBLDist",
"")
69 kwargs.setdefault(
"WriteKey",
"ITkPixelAlignmentStore")
71 acc.addCondAlgo(CompFactory.PixelAlignCondAlg(name, **kwargs))
75 """Return a ComponentAccumulator with configured PixelChargeCalibCondAlg for ITk"""
79 if flags.ITk.Conditions.PixelChargeCalibTag:
80 folderName =
"/ITk/PixelChargeCalib"
81 if flags.ITk.Conditions.PixelChargeCalibFile:
82 acc.merge(
addFolders(flags, folderName, flags.ITk.Conditions.PixelChargeCalibFile, tag=flags.ITk.Conditions.PixelChargeCalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
84 acc.merge(
addFolders(flags, folderName,
"INDET_OFL", tag=flags.ITk.Conditions.PixelChargeCalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
85 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
87 kwargs.setdefault(
"PixelDetEleCollKey",
"ITkPixelDetectorElementCollection")
88 kwargs.setdefault(
"PixelModuleData",
"ITkPixelModuleData")
89 kwargs.setdefault(
"ReadKey", folderName)
90 kwargs.setdefault(
"WriteKey",
"ITkPixelChargeCalibCondData")
91 acc.addCondAlgo(CompFactory.PixelChargeLUTCalibCondAlg(name, **kwargs))
95 """Return a ComponentAccumulator with configured PixelDCSCondHVAlg for ITk"""
98 kwargs.setdefault(
"ReadKey",
"")
99 kwargs.setdefault(
"PixelModuleData",
"ITkPixelModuleData")
100 kwargs.setdefault(
"WriteKey",
"ITkPixelDCSHVCondData")
101 acc.addCondAlgo(CompFactory.PixelDCSCondHVAlg(name, **kwargs))
105 """Return a ComponentAccumulator with configured PixelDCSCondStateAlg for ITk"""
107 kwargs.setdefault(
"ReadKeyState",
"")
108 kwargs.setdefault(
"WriteKeyState",
"ITkPixelDCSStateCondData")
109 acc.addCondAlgo(CompFactory.PixelDCSCondStateAlg(name, **kwargs))
113 """Return a ComponentAccumulator with configured PixelDCSCondStatusAlg for ITk"""
115 kwargs.setdefault(
"ReadKeyStatus",
"")
116 kwargs.setdefault(
"WriteKeyStatus",
"ITkPixelDCSStatusCondData")
117 acc.addCondAlgo(CompFactory.PixelDCSCondStatusAlg(name, **kwargs))
121 """Return a ComponentAccumulator with configured PixelDCSCondTempAlg for ITk"""
124 kwargs.setdefault(
"ReadKey",
"")
125 kwargs.setdefault(
"WriteKey",
"ITkPixelDCSTempCondData")
126 acc.addCondAlgo(CompFactory.PixelDCSCondTempAlg(name, **kwargs))
130 """Return a ComponentAccumulator with configured PixelDeadMapCondAlg for ITk"""
135 kwargs.setdefault(
"ReadKey",
"")
137 kwargs.setdefault(
"JsonPath",flags.ITk.JsonPathPixelModuleVeto)
138 kwargs.setdefault(
"WriteKey",
"ITkPixelDeadMapCondData")
139 acc.addCondAlgo(CompFactory.PixelDeadMapCondAlg(name, **kwargs))
143 """Return a ComponentAccumulator with configured PixelDetectorElementCondAlg for ITk"""
146 kwargs.setdefault(
"DetManagerName",
"ITkPixel")
147 kwargs.setdefault(
"PixelAlignmentStore",
"ITkPixelAlignmentStore")
148 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementCollection")
149 acc.addCondAlgo(CompFactory.PixelDetectorElementCondAlg(name, **kwargs))
153 """Return a ComponentAccumulator with configured PixelDistortionAlg for ITk"""
156 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/PixelDist",
"/Indet/PixelDist", className=
"DetCondCFloat"))
157 kwargs.setdefault(
"ReadKey",
"/Indet/PixelDist")
158 kwargs.setdefault(
"WriteKey",
"ITkPixelDistortionData")
159 from RngComps.RngCompsConfig
import AthRNGSvcCfg
160 kwargs.setdefault(
"RndmSvc", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
161 acc.addCondAlgo(CompFactory.PixelDistortionAlg(name, **kwargs))
165 """Return a ComponentAccumulator with configured ITkPixelOfflineCalibCondAlg"""
169 if flags.ITk.Conditions.PixelOfflineCalibTag:
170 folderName =
'/PIXEL/ITkClusterError'
171 CalibTag = flags.ITk.Conditions.PixelOfflineCalibTag
172 if flags.ITk.Conditions.PixelOfflineCalibFile:
173 acc.merge(
addFolders(flags, folderName, flags.ITk.Conditions.PixelOfflineCalibFile, tag=CalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
175 acc.merge(
addFolders(flags, folderName,
"PIXEL_OFL", tag=CalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
182 kwargs.setdefault(
"ReadKey",
"/PIXEL/ITkClusterError")
183 kwargs.setdefault(
"WriteKey",
"ITkPixelOfflineCalibData")
184 kwargs.setdefault(
"InputSource", 2)
185 acc.addCondAlgo(CompFactory.ITk.PixelOfflineCalibCondAlg(name, **kwargs))
190 Condition alg to precompute the pixel detector element status.
191 This algorithm does not consider the byte stream errors which are event data.
194 if 'ConditionsSummaryTool' not in kwargs :
195 from PixelConditionsTools.ITkPixelConditionsSummaryConfig
import ITkPixelConditionsSummaryCfg
197 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementStatusNoByteStream")
198 acc.addCondAlgo( CompFactory.InDet.SiDetectorElementStatusCondAlg(name, **kwargs) )
203 Event alg which could extend the pixel detector element status conditions data with bytestream errors.
206 if 'ConditionsSummaryTool' not in kwargs:
207 element_status_input=
None
209 element_status_input=
"ITkPixelDetectorElementStatusNoByteStream"
210 from PixelConditionsTools.ITkPixelConditionsSummaryConfig
import ITkByteStreamErrorDetectorElementStatusToolCfg
211 kwargs.setdefault(
"ConditionsSummaryTool",
214 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementStatus")
218 acc.addEventAlgo( CompFactory.InDet.SiDetectorElementStatusAlg(name, **kwargs) )