1 """Define functions to configure Pixel conditions algorithms
3 Copyright (C) 2002-2022 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", setAlignmentFolderName, className=
"AlignableTransformContainer"))
62 kwargs.setdefault(
"DetManagerName",
"ITkPixel")
63 kwargs.setdefault(
"UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
64 kwargs.setdefault(
"ReadKeyStatic", setAlignmentFolderName)
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",
"")
136 kwargs.setdefault(
"WriteKey",
"ITkPixelDeadMapCondData")
137 acc.addCondAlgo(CompFactory.PixelDeadMapCondAlg(name, **kwargs))
141 """Return a ComponentAccumulator with configured PixelDetectorElementCondAlg for ITk"""
144 kwargs.setdefault(
"DetManagerName",
"ITkPixel")
145 kwargs.setdefault(
"PixelAlignmentStore",
"ITkPixelAlignmentStore")
146 kwargs.setdefault(
"WriteKey",
"ITkPixelDetectorElementCollection")
147 acc.addCondAlgo(CompFactory.PixelDetectorElementCondAlg(name, **kwargs))
151 """Return a ComponentAccumulator with configured PixelDistortionAlg for ITk"""
154 acc.merge(
addFoldersSplitOnline(flags,
"INDET",
"/Indet/Onl/PixelDist",
"/Indet/PixelDist", className=
"DetCondCFloat"))
155 kwargs.setdefault(
"ReadKey",
"/Indet/PixelDist")
156 kwargs.setdefault(
"WriteKey",
"ITkPixelDistortionData")
157 from RngComps.RngCompsConfig
import AthRNGSvcCfg
158 kwargs.setdefault(
"RndmSvc", acc.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
159 acc.addCondAlgo(CompFactory.PixelDistortionAlg(name, **kwargs))
163 """Return a ComponentAccumulator with configured ITkPixelOfflineCalibCondAlg"""
167 if flags.ITk.Conditions.PixelOfflineCalibTag:
168 folderName =
'/PIXEL/ITkClusterError'
169 CalibTag = flags.ITk.Conditions.PixelOfflineCalibTag
170 if flags.ITk.Conditions.PixelOfflineCalibFile:
171 acc.merge(
addFolders(flags, folderName, flags.ITk.Conditions.PixelOfflineCalibFile, tag=CalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
173 acc.merge(
addFolders(flags, folderName,
"PIXEL_OFL", tag=CalibTag, db=
"OFLP200", className=
"CondAttrListCollection"))
180 kwargs.setdefault(
"ReadKey",
"/PIXEL/ITkClusterError")
181 kwargs.setdefault(
"WriteKey",
"ITkPixelOfflineCalibData")
182 kwargs.setdefault(
"InputSource", 2)
183 acc.addCondAlgo(CompFactory.ITk.PixelOfflineCalibCondAlg(name, **kwargs))