1 """Define functions to configure Pixel conditions algorithms
3 Copyright (C) 2002-2025 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 CondArgs.update(kwargs)
38 acc.addCondAlgo(CompFactory.PixelModuleConfigCondAlg(name, **CondArgs))
42 """Return a ComponentAccumulator with configured PixelAlignCondAlg for ITk"""
45 if flags.GeoModel.Align.Dynamic:
46 raise RuntimeError(
"Dynamic alignment not supported for ITk yet")
48 if not flags.ITk.Align.useLocalDatabase:
49 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/Align", flags.ITk.Geometry.alignmentFolder , className=
"AlignableTransformContainer"))
51 kwargs.setdefault(
"DetManagerName",
"ITkPixel")
52 kwargs.setdefault(
"UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
53 kwargs.setdefault(
"ReadKeyStatic", flags.ITk.Geometry.alignmentFolder)
57 kwargs.setdefault(
"ReadKeyIBLDist",
"")
58 kwargs.setdefault(
"WriteKey",
"ITkPixelAlignmentStore")
60 acc.addCondAlgo(CompFactory.PixelAlignCondAlg(name, **kwargs))
64 """Return a ComponentAccumulator with configured PixelChargeCalibCondAlg for ITk"""
67 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
69 kwargs.setdefault(
"PixelDetEleCollKey",
"ITkPixelDetectorElementCollection")
70 kwargs.setdefault(
"WriteKey",
"ITkPixelChargeCalibCondData")
71 acc.addCondAlgo(CompFactory.ITkPixChargeCalibAlg(name, **kwargs))
75 """Return a ComponentAccumulator with configured PixelDCSCondHVAlg for ITk"""
78 kwargs.setdefault(
"ReadKey",
"")
79 kwargs.setdefault(
"PixelModuleData",
"ITkPixelModuleData")
80 kwargs.setdefault(
"WriteKey",
"ITkPixelDCSHVCondData")
81 acc.addCondAlgo(CompFactory.PixelDCSCondHVAlg(name, **kwargs))
85 """Return a ComponentAccumulator with configured PixelDCSCondStateAlg for ITk"""
87 kwargs.setdefault(
"ReadKeyState",
"")
88 kwargs.setdefault(
"WriteKeyState",
"ITkPixelDCSStateCondData")
89 acc.addCondAlgo(CompFactory.PixelDCSCondStateAlg(name, **kwargs))
93 """Return a ComponentAccumulator with configured PixelDCSCondStatusAlg for ITk"""
95 kwargs.setdefault(
"ReadKeyStatus",
"")
96 kwargs.setdefault(
"WriteKeyStatus",
"ITkPixelDCSStatusCondData")
97 acc.addCondAlgo(CompFactory.PixelDCSCondStatusAlg(name, **kwargs))
101 """Return a ComponentAccumulator with configured PixelDCSCondTempAlg for ITk"""
103 kwargs.setdefault(
"ReadKey",
"")
104 kwargs.setdefault(
"WriteKey",
"ITkPixelDCSTempCondData")
105 acc.addCondAlgo(CompFactory.PixelDCSCondTempAlg(name, **kwargs))
109 """Return a ComponentAccumulator with configured PixelDeadMapCondAlg for ITk"""
113 kwargs.setdefault(
"ReadKey",
"")
115 kwargs.setdefault(
"JsonPath",flags.ITk.JsonPathPixelModuleVeto)
116 kwargs.setdefault(
"WriteKey",
"ITkPixelDeadMapCondData")
117 acc.addCondAlgo(CompFactory.PixelDeadMapCondAlg(name, **kwargs))
121 """Return a ComponentAccumulator with configured PixelDetectorElementCondAlg for ITk"""
124 kwargs.setdefault(
"DetManagerName",
"ITkPixel")
125 kwargs.setdefault(
"PixelAlignmentStore",
"ITkPixelAlignmentStore")
126 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementCollection")
127 acc.addCondAlgo(CompFactory.PixelDetectorElementCondAlg(name, **kwargs))
131 """Return a ComponentAccumulator with configured PixelDistortionAlg for ITk"""
133 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/PixelDist",
"/Indet/PixelDist", className=
"DetCondCFloat"))
134 kwargs.setdefault(
"ReadKey",
"/Indet/PixelDist")
135 kwargs.setdefault(
"WriteKey",
"ITkPixelDistortionData")
136 from RngComps.RngCompsConfig
import AthRNGSvcCfg
137 kwargs.setdefault(
"RndmSvc", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)))
138 acc.addCondAlgo(CompFactory.PixelDistortionAlg(name, **kwargs))
142 """Return a ComponentAccumulator with configured ITkPixelOfflineCalibCondAlg"""
146 if flags.ITk.Conditions.PixelOfflineCalibTag:
147 folderName =
'/PIXEL/ITkClusterError'
149 CalibTag = flags.ITk.Conditions.PixelOfflineCalibTag
150 if flags.ITk.Conditions.PixelOfflineCalibFile:
151 acc.merge(
addFolders(flags, folderName, flags.ITk.Conditions.PixelOfflineCalibFile, tag=CalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
153 acc.merge(
addFolders(flags, folderName,
"PIXEL_OFL", tag=CalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
156 folderName =
"/ITk/PixelClusterError"
157 acc.merge(
addFolders(flags, folderName,
"INDET_OFL", db=
"OFLP200", className=
"CondAttrListCollection"))
159 kwargs.setdefault(
"ReadKey", folderName)
160 kwargs.setdefault(
"WriteKey",
"ITkPixelOfflineCalibData")
161 kwargs.setdefault(
"InputSource", 2)
162 acc.addCondAlgo(CompFactory.ITk.PixelOfflineCalibCondAlg(name, **kwargs))
167 Condition alg to precompute the pixel detector element status.
168 This algorithm does not consider the byte stream errors which are event data.
171 if 'ConditionsSummaryTool' not in kwargs :
172 from PixelConditionsTools.ITkPixelConditionsSummaryConfig
import ITkPixelConditionsSummaryCfg
174 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementStatusNoByteStream")
175 acc.addCondAlgo( CompFactory.InDet.SiDetectorElementStatusCondAlg(name, **kwargs) )
180 Event alg which could extend the pixel detector element status conditions data with bytestream errors.
183 if 'ConditionsSummaryTool' not in kwargs:
184 element_status_input=
None
186 element_status_input=
"ITkPixelDetectorElementStatusNoByteStream"
187 from PixelConditionsTools.ITkPixelConditionsSummaryConfig
import ITkByteStreamErrorDetectorElementStatusToolCfg
188 kwargs.setdefault(
"ConditionsSummaryTool",
191 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementStatus")
195 acc.addEventAlgo( CompFactory.InDet.SiDetectorElementStatusAlg(name, **kwargs) )