2 from AthenaConfiguration.ComponentFactory
import CompFactory
3 from AthenaConfiguration.Enums
import LHCPeriod, ProductionStep
4 from LArRecUtils.LArADC2MeVCondAlgConfig
import LArADC2MeVCondAlgCfg
5 from LArConfiguration.LArElecCalibDBConfig
import LArElecCalibDBCfg
6 from LArRecUtils.LArRecUtilsConfig
import LArOFCCondAlgCfg
7 from LArConfiguration.LArConfigFlags
import RawChannelSource
8 from IOVDbSvc.IOVDbSvcConfig
import addFolders
13 acc.merge(
addFolders(flags,
"/LAR/IdentifierOfl/OnnxMap",
"LAR_OFL", className=
"CondAttrListCollection", db=
"OFLP200", tag=
"LARIdentifierOflOnnxMap-RUN4-000"))
16 kwargs.setdefault(
"firstSample", flags.LAr.ROD.nPreceedingSamples
if flags.LAr.ROD.nPreceedingSamples!=0
else flags.LAr.ROD.FirstSample)
17 obj =
"AthenaAttributeList"
18 dspkey =
'Run2DSPThresholdsKey'
22 kwargs.setdefault(
"LArRawChannelKey",
"LArRawChannels")
24 if flags.GeoModel.Run
is LHCPeriod.Run1:
25 kwargs.setdefault(
"useDB",
False)
28 fld=
"/LAR/NoiseOfl/DSPThresholds"
32 acc.merge(
addFolders(flags,fld, dbInstance, className=obj, db=dbString))
34 if flags.Common.ProductionStep
is ProductionStep.PileUpPresampling:
35 kwargs.setdefault(
"LArDigitKey", flags.Overlay.BkgPrefix +
"LArDigitContainer_MC")
37 kwargs.setdefault(
"LArDigitKey",
"LArDigitContainer_MC")
40 if flags.Overlay.DataOverlay:
41 kwargs.setdefault(
"LArDigitKey",
"LArDigitContainer_MC")
42 kwargs.setdefault(
"LArRawChannelKey",
"LArRawChannels")
44 kwargs.setdefault(
"LArRawChannelKey",
"LArRawChannels_FromDigits")
46 if 'COMP200' in flags.IOVDb.DatabaseInstance:
47 fld=
'/LAR/Configuration/DSPThreshold/Thresholds'
48 obj=
'LArDSPThresholdsComplete'
49 dspkey =
'Run1DSPThresholdsKey'
50 sgkey=
'LArDSPThresholds'
53 fld=
"/LAR/Configuration/DSPThresholdFlat/Thresholds"
57 acc.merge(
addFolders(flags,fld, dbInstance, className=obj, db=dbString))
59 kwargs.setdefault(dspkey, sgkey)
61 if flags.LAr.ROD.forceIter
or flags.LAr.RawChannelSource
is RawChannelSource.Calculated:
63 LArRawChannelBuilderIterAlg=CompFactory.LArRawChannelBuilderIterAlg
64 kwargs.setdefault(
'minSample',2)
65 kwargs.setdefault(
'maxSample',12)
66 kwargs.setdefault(
'minADCforIterInSigma',4)
67 kwargs.setdefault(
'minADCforIter',15)
68 kwargs.setdefault(
'defaultPhase',12)
71 larformat=
getLArFormatForRun(flags.Input.RunNumbers[0],connstring=
"COOLONL_LAR/"+flags.IOVDb.DatabaseInstance)
72 if larformat
is not None:
73 nominalPeakSample = larformat.firstSample()
75 print(
"WARNING: larformat not found, use nominalPeakSample = 2")
77 if (nominalPeakSample > 1) :
78 kwargs.setdefault(
'DefaultShiftTimeSample',nominalPeakSample-2)
80 kwargs.setdefault(
'DefaultShiftTimeSample',0)
85 acc.addEventAlgo(CompFactory.LArNNRawChannelBuilder(name, **kwargs))