16 kwargs.setdefault(
"firstSample", (configFlags.LAr.ROD.nPreceedingSamples-1)
if configFlags.LAr.ROD.nPreceedingSamples!=0
else configFlags.LAr.ROD.FirstSample)
17 obj =
"AthenaAttributeList"
18 dspkey =
'Run2DSPThresholdsKey'
19 from IOVDbSvc.IOVDbSvcConfig
import addFolders
21 if configFlags.Input.isMC:
23 kwargs.setdefault(
"LArRawChannelKey",
"LArRawChannels")
25 if configFlags.GeoModel.Run
is LHCPeriod.Run1:
26 kwargs.setdefault(
"useDB",
False)
29 fld=
"/LAR/NoiseOfl/DSPThresholds"
33 acc.merge(
addFolders(configFlags,fld, dbInstance, className=obj, db=dbString))
35 if configFlags.Common.ProductionStep
is ProductionStep.PileUpPresampling:
36 kwargs.setdefault(
"LArDigitKey", configFlags.Overlay.BkgPrefix +
"LArDigitContainer_MC")
38 kwargs.setdefault(
"LArDigitKey",
"LArDigitContainer_MC")
41 if configFlags.Overlay.DataOverlay:
42 kwargs.setdefault(
"LArDigitKey",
"LArDigitContainer_MC")
43 kwargs.setdefault(
"LArRawChannelKey",
"LArRawChannels")
45 kwargs.setdefault(
"LArRawChannelKey",
"LArRawChannels_FromDigits")
47 if 'COMP200' in configFlags.IOVDb.DatabaseInstance:
48 fld=
'/LAR/Configuration/DSPThreshold/Thresholds'
49 obj=
'LArDSPThresholdsComplete'
50 dspkey =
'Run1DSPThresholdsKey'
51 sgkey=
'LArDSPThresholds'
54 fld=
"/LAR/Configuration/DSPThresholdFlat/Thresholds"
58 acc.merge(
addFolders(configFlags,fld, dbInstance, className=obj, db=dbString))
60 kwargs.setdefault(dspkey, sgkey)
62 if configFlags.LAr.ROD.forceIter
or configFlags.LAr.RawChannelSource
is RawChannelSource.Calculated:
64 LArRawChannelBuilderIterAlg=CompFactory.LArRawChannelBuilderIterAlg
65 kwargs.setdefault(
'minSample',2)
66 kwargs.setdefault(
'maxSample',12)
67 kwargs.setdefault(
'minADCforIterInSigma',4)
68 kwargs.setdefault(
'minADCforIter',15)
69 kwargs.setdefault(
'defaultPhase',12)
72 larformat=
getLArFormatForRun(configFlags.Input.RunNumbers[0],connstring=
"COOLONL_LAR/"+configFlags.IOVDb.DatabaseInstance)
73 if larformat
is not None:
74 nominalPeakSample = larformat.firstSample()
76 print(
"WARNING: larformat not found, use nominalPeakSample = 2")
78 if (nominalPeakSample > 1) :
79 kwargs.setdefault(
'DefaultShiftTimeSample',nominalPeakSample-2)
81 kwargs.setdefault(
'DefaultShiftTimeSample',0)
86 kwargs.setdefault(
'NNJsonPath', configFlags.LAr.ROD.nnJson)
87 kwargs.setdefault(
'NetworkOutputNode', configFlags.LAr.ROD.nnOutputNode)
88 kwargs.setdefault(
'NetworkInputNode', configFlags.LAr.ROD.nnInputNode)
90 acc.addEventAlgo(CompFactory.LArNNRawChannelBuilder(name, **kwargs))