ATLAS Offline Software
Loading...
Searching...
No Matches
python.LArCalib_Delay_OFCCaliConfig Namespace Reference

Functions

 LArDelay_OFCCaliCfg (flags)
 LArDelay_OFCCali_PoolDumpCfg (flags)
 LArXtalkDelayCfg (flags)

Variables

 ConfigFlags = initConfigFlags()
 Dir
 Type
 RunNumbers
 Database
 Files
 ROOTFile
 POOLFile
 DBConnection
 GlobalTag
 AtlasVersion
 cfg = MainServicesCfg(ConfigFlags)
 DBInstance

Function Documentation

◆ LArDelay_OFCCali_PoolDumpCfg()

python.LArCalib_Delay_OFCCaliConfig.LArDelay_OFCCali_PoolDumpCfg ( flags)

Definition at line 259 of file LArCalib_Delay_OFCCaliConfig.py.

259def LArDelay_OFCCali_PoolDumpCfg(flags):
260
261 #Get basic services and cond-algos
262 from LArCalibProcessing.LArCalibBaseConfig import LArCalibBaseCfg
263 result=LArCalibBaseCfg(flags)
264
265 bcKey = "LArBadChannelSC" if flags.LArCalib.isSC else "LArBadChannel"
266
267 #CondProxyProvider
268 from EventSelectorAthenaPool.CondProxyProviderConfig import CondProxyProviderCfg
269 result.merge (CondProxyProviderCfg (flags, flags.LArCalib.Input.Files))
270
271 #ROOT ntuple writing:
272 rootfile=flags.LArCalib.Output.ROOTFile
273 rootfile2=flags.LArCalib.Output.ROOTFile2
274 if rootfile:
275 result.addEventAlgo(CompFactory.LArCaliWaves2Ntuple(KeyList = ["CaliWave",] if flags.LArCalib.isSC else ["LArCaliWave",],
276 NtupleName = "CALIWAVE",
277 AddFEBTempInfo = False,
278 SaveDerivedInfo = True,
279 ApplyCorrection = True,
280 BadChanKey = bcKey,
281 AddCalib=True,
282 SaveJitter=True if flags.LArCalib.CaliWave.Nsteps >= 24 else False,
283 isSC=flags.LArCalib.isSC
284 ))
285
286 if not rootfile2:
287 result.addEventAlgo(CompFactory.LArOFC2Ntuple(ContainerKey = "LArOFC",
288 AddFEBTempInfo = False,
289 BadChanKey = bcKey,
290 AddCalib=True,
291 isSC=flags.LArCalib.isSC
292 ))
293
294 import os
295 if os.path.exists(rootfile):
296 os.remove(rootfile)
297 result.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='"+rootfile+"' OPT='NEW'" ]))
298 result.setAppProperty("HistogramPersistency","ROOT")
299
300 if rootfile2:
301 if rootfile == rootfile2:
302 result.addEventAlgo(CompFactory.LArOFC2Ntuple(ContainerKey = "LArOFC",
303 AddFEBTempInfo = False,
304 NtupleFile = "FILE1",
305 BadChanKey = bcKey,
306 AddCalib=True,
307 isSC=flags.LArCalib.isSC
308 ))
309 else:
310 result.addEventAlgo(CompFactory.LArOFC2Ntuple(ContainerKey = "LArOFC",
311 AddFEBTempInfo = False,
312 NtupleFile = "FILE2",
313 BadChanKey = bcKey,
314 AddCalib=True,
315 isSC=flags.LArCalib.isSC
316 ))
317
318 import os
319 if os.path.exists(rootfile2):
320 os.remove(rootfile2)
321 if not rootfile:
322 result.addService(CompFactory.NTupleSvc(Output = [ "FILE2 DATAFILE='"+rootfile2+"' OPT='NEW'" ]))
323 else:
324 result.getService("NTupleSvc").Output += [ "FILE2 DATAFILE='"+rootfile2+"' OPT='NEW'" ]
325 result.setAppProperty("HistogramPersistency","ROOT")
326
327
328 return result
329

◆ LArDelay_OFCCaliCfg()

python.LArCalib_Delay_OFCCaliConfig.LArDelay_OFCCaliCfg ( flags)

Definition at line 7 of file LArCalib_Delay_OFCCaliConfig.py.

7def LArDelay_OFCCaliCfg(flags):
8
9 #Get basic services and cond-algos
10 from LArCalibProcessing.LArCalibBaseConfig import LArCalibBaseCfg,chanSelStr
11 result=LArCalibBaseCfg(flags)
12
13 #Add ByteStream reading
14 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
15 result.merge(ByteStreamReadCfg(flags))
16
17 #Calibration runs are taken in fixed gain.
18 #The SG key of the digit-container is name of the gain
19 gainStrMap={0:"HIGH",1:"MEDIUM",2:"LOW"}
20 digKey=gainStrMap[flags.LArCalib.Gain]
21
22 from LArCalibProcessing.utils import FolderTagResolver
23 FolderTagResolver._globalTag=flags.IOVDb.GlobalTag
24 tagResolver=FolderTagResolver(dbname=flags.LArCalib.Input.CoolOflP1Replica)
25 caliWaveTag=tagResolver.getFolderTag(flags.LArCalib.CaliWave.Folder)
26 caliOFCTag=tagResolver.getFolderTag(flags.LArCalib.OFCCali.Folder)
27 if (flags.LArCalib.Input.Database == "LAR_OFL" and flags.LArCalib.Input.Database2 == "LAR_OFL"):
28 pedestalTag=tagResolver.getFolderTag(flags.LArCalib.Pedestal.Folder)
29 acTag=tagResolver.getFolderTag(flags.LArCalib.AutoCorr.Folder)
30 else:
31 pedestalTag=None
32 acTag=None
33
34 del tagResolver
35 from IOVDbSvc.IOVDbSvcConfig import addFolders
36 result.merge(addFolders(flags,flags.LArCalib.Pedestal.Folder,detDb=flags.LArCalib.Input.Database, tag=pedestalTag, modifiers=chanSelStr(flags),
37 className="LArPedestalComplete"))
38 result.merge(addFolders(flags,flags.LArCalib.AutoCorr.Folder,detDb=flags.LArCalib.Input.Database, tag=acTag,modifiers=chanSelStr(flags)))
39
40 if not flags.LArCalib.isSC:
41 if flags.LArCalib.Input.isRawData:
42 result.addEventAlgo(CompFactory.LArRawDataReadingAlg(LArRawChannelKey="", LArDigitKey=digKey, LArFebHeaderKey="LArFebHeader"))
43 from LArCalibProcessing.LArCalib_CalibDigitsMakerConfig import LArCalibDigitsMakerCfg
44 result.merge(LArCalibDigitsMakerCfg(flags,digKey))
45 else:
46 result.addEventAlgo(CompFactory.LArRawCalibDataReadingAlg(LArAccCalibDigitKey=digKey,
47 LArFebHeaderKey="LArFebHeader",
48 SubCaloPreselection=flags.LArCalib.Input.SubDet,
49 PosNegPreselection=flags.LArCalib.Preselection.Side,
50 BEPreselection=flags.LArCalib.Preselection.BEC,
51 FTNumPreselection=flags.LArCalib.Preselection.FT))
52
53 from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
54 result.merge(LArFebErrorSummaryMakerCfg(flags))
55 result.getEventAlgo("LArFebErrorSummaryMaker").CheckAllFEB=False
56
57 if flags.LArCalib.Input.SubDet == "EM":
58 theLArCalibShortCorrector = CompFactory.LArCalibShortCorrector(KeyList = [digKey,])
59 result.addEventAlgo(theLArCalibShortCorrector)
60
61 from LArCalibProcessing.LArStripsXtalkCorrConfig import LArStripsXtalkCorrCfg
62 result.merge(LArStripsXtalkCorrCfg(flags,[digKey,]))
63 else:
64 digKey="SC"
65 theLArLATOMEDecoder = CompFactory.LArLATOMEDecoder("LArLATOMEDecoder")
66 if flags.LArCalib.Input.isRawData:
67 result.addEventAlgo(CompFactory.LArRawSCDataReadingAlg(adcCollKey = digKey, adcBasCollKey = "", etCollKey = "",
68 etIdCollKey = "", LATOMEDecoder = theLArLATOMEDecoder))
69 from LArCalibProcessing.LArCalib_CalibDigitsMakerConfig import LArCalibDigitsMakerCfg
70 result.merge(LArCalibDigitsMakerCfg(flags,digKey))
71
72 else:
73 # this needs also legacy maps
74 from LArCabling.LArCablingConfig import LArCalibIdMappingCfg,LArOnOffIdMappingCfg
75 result.merge(LArOnOffIdMappingCfg(flags))
76 result.merge(LArCalibIdMappingCfg(flags))
77 result.addEventAlgo(CompFactory.LArRawSCCalibDataReadingAlg(LArSCAccCalibDigitKey = digKey,
78 CalibCablingKeyLeg="LArCalibLineMap",
79 OnOffMapLeg="LArOnOffIdMap",
80 LATOMEDecoder = theLArLATOMEDecoder, ))
81
82 bcKey = "LArBadChannelSC" if flags.LArCalib.isSC else "LArBadChannel"
83
84 theLArCaliWaveBuilder = CompFactory.LArCaliWaveBuilder()
85 theLArCaliWaveBuilder.KeyList= [digKey,]
86 theLArCaliWaveBuilder.KeyOutput="LArCaliWave"
87 theLArCaliWaveBuilder.GroupingType = flags.LArCalib.GroupingType
88 theLArCaliWaveBuilder.SubtractPed = True
89 theLArCaliWaveBuilder.NSteps = flags.LArCalib.CaliWave.Nsteps
90 theLArCaliWaveBuilder.CheckEmptyPhases = not flags.LArCalib.isSC
91 theLArCaliWaveBuilder.NBaseline = 0 # to avoid the use of the baseline when Pedestal are missing
92 theLArCaliWaveBuilder.UseDacAndIsPulsedIndex = False # should have an impact only for HEC
93 theLArCaliWaveBuilder.RecAllCells = False
94 theLArCaliWaveBuilder.isSC = flags.LArCalib.isSC
95 result.addEventAlgo(theLArCaliWaveBuilder)
96
97
98 if flags.LArCalib.Input.SubDet == "HEC" or flags.LArCalib.Input.SubDet == "HECFCAL":
99 theLArCaliWaveBuilder.KeyOutput="LArCaliWave_multi"
100 theLArCaliWaveSelector = CompFactory.LArCaliWaveSelector("LArCaliWaveSelector")
101 theLArCaliWaveSelector.KeyList = ["LArCaliWave_multi",]
102 theLArCaliWaveSelector.KeyOutput = "LArCaliWave"
103 theLArCaliWaveSelector.GroupingType = flags.LArCalib.GroupingType
104 if flags.LArCalib.Gain==0: #HIGH gain
105 theLArCaliWaveSelector.SelectionList = [ "HEC/0/0/460","HEC/1/0/460","HEC/2/0/230","HEC/3/0/230" ]
106 theLArCaliWaveSelector.SelectionList += [ "FCAL/0/0/500","FCAL/1/0/500","FCAL/2/0/500","FCAL/3/0/500" ]
107
108 elif flags.LArCalib.Gain==1: #MEDIUM gain
109 theLArCaliWaveSelector.SelectionList = [ "HEC/0/1/3600","HEC/1/1/3600","HEC/2/1/1800","HEC/3/1/1800"]
110 theLArCaliWaveSelector.SelectionList += [ "FCAL/0/1/5000","FCAL/1/1/5000","FCAL/2/1/5000","FCAL/3/1/5000" ]
111
112 elif flags.LArCalib.Gain==2: #LOW gain
113 theLArCaliWaveSelector.SelectionList = [ "HEC/0/2/24000","HEC/1/2/24000","HEC/2/2/18000","HEC/3/2/18000" ]
114 theLArCaliWaveSelector.SelectionList += [ "FCAL/0/2/40000","FCAL/1/2/40000","FCAL/2/2/40000","FCAL/3/2/40000" ]
115
116 result.addEventAlgo(theLArCaliWaveSelector)
117 pass
118
119 if flags.LArCalib.CorrectBadChannels:
120 theLArCaliWavePatcher=CompFactory.getComp("LArCalibPatchingAlg<LArCaliWaveContainer>")("LArCaliWavePatch")
121 theLArCaliWavePatcher.ContainerKey = "LArCaliWave"
122 theLArCaliWavePatcher.BadChanKey = bcKey
123 theLArCaliWavePatcher.SuperCells = flags.LArCalib.isSC
124 #theLArCaliWavePatcher.PatchMethod="PhiNeighbor" ##take the first neigbour
125 theLArCaliWavePatcher.PatchMethod = "PhiAverage"
126 if flags.LArCalib.isSC:
127 theLArCaliWavePatcher.ProblemsToPatch = [
128 "deadCalib","deadReadout","deadPhys","maskedOSUM","OffOFCs","transmissionErrorFibre",]
129 theLArCaliWavePatcher.OnOffMap="LArOnOffIdMapSC"
130 theLArCaliWavePatcher.CalibLineKey="LArCalibIdMapSC"
131 else:
132 theLArCaliWavePatcher.ProblemsToPatch = [
133 "deadCalib","deadReadout","deadPhys","almostDead","short", ]
134
135 result.addEventAlgo(theLArCaliWavePatcher)
136 pass
137
138 if flags.LArCalib.doValidation:
139
140 result.merge(addFolders(flags,flags.LArCalib.CaliWave.Folder+"<key>LArCaliWaveRef</key>","LAR_OFL"))
141
142 from LArCalibDataQuality.Thresholds import cwAmpThr,cwFWHMThr,cwAmpThrFEB,cwFWHMThrFEB
143 from AthenaCommon.Constants import WARNING
144
145 theCaliWaveValidationAlg=CompFactory.LArCaliWaveValidationAlg("CaliWaveVal")
146 if flags.LArCalib.isSC:
147 theCaliWaveValidationAlg.ProblemsToMask=["deadCalib","deadReadout","deadPhys","maskedOSUM",
148 "OffOFCs","transmissionErrorFibre",]
149 else:
150 theCaliWaveValidationAlg.ProblemsToMask=["deadReadout","deadCalib","deadPhys","almostDead",
151 "highNoiseHG","highNoiseMG","highNoiseLG"]
152 theCaliWaveValidationAlg.ValidationKey="LArCaliWave"
153 theCaliWaveValidationAlg.ReferenceKey="LArCaliWaveRef"
154 theCaliWaveValidationAlg.MsgLevelForDeviations=WARNING
155 theCaliWaveValidationAlg.ListOfDevFEBs="caliWaveFebs.txt"
156 theCaliWaveValidationAlg.AmplitudeTolerance=cwAmpThr
157 theCaliWaveValidationAlg.CaliWaveFWHMTolerance=cwFWHMThr
158 theCaliWaveValidationAlg.AmplitudeToleranceFEB=cwAmpThrFEB
159 theCaliWaveValidationAlg.CaliWaveFWHMToleranceFEB=cwFWHMThrFEB
160 theCaliWaveValidationAlg.TimeShiftDetection=True
161 theCaliWaveValidationAlg.PatchMissingFEBs=True
162 theCaliWaveValidationAlg.UseCorrChannels=False
163 theCaliWaveValidationAlg.BadChanKey = bcKey
164 theCaliWaveValidationAlg.SuperCells = flags.LArCalib.isSC
165
166 if flags.LArCalib.isSC:
167 theCaliWaveValidationAlg.CablingKey = "LArOnOffIdMapSC"
168 theCaliWaveValidationAlg.CalibLineKey = "LArCalibIdMapSC"
169
170 result.addEventAlgo(theCaliWaveValidationAlg)
171
172
173 if flags.LArCalib.doOFCCali:
174
175 LArCaliOFCAlg = CompFactory.LArOFCAlg("LArCaliOFCAlg")
176 LArCaliOFCAlg.ReadCaliWave = True
177 LArCaliOFCAlg.KeyList = [ "LArCaliWave" ]
178 LArCaliOFCAlg.Nphase = 50
179 LArCaliOFCAlg.Dphase = 1
180 LArCaliOFCAlg.Ndelay = 24
181 LArCaliOFCAlg.Nsample = 5
182 LArCaliOFCAlg.Normalize = True
183 LArCaliOFCAlg.TimeShift = False
184 LArCaliOFCAlg.TimeShiftByIndex = -1
185 LArCaliOFCAlg.Verify = True
186 LArCaliOFCAlg.FillShape = False
187 #LArCaliOFCAlg.DumpOFCfile = "LArOFCCali.dat"
188 LArCaliOFCAlg.GroupingType = flags.LArCalib.GroupingType
189 LArCaliOFCAlg.isSC = flags.LArCalib.isSC
190 LArCaliOFCAlg.DecoderTool=CompFactory.LArAutoCorrDecoderTool(isSC=flags.LArCalib.isSC)
191 result.addEventAlgo(LArCaliOFCAlg)
192
193
194 #ROOT ntuple writing:
195 rootfile=flags.LArCalib.Output.ROOTFile
196 rootfile2=flags.LArCalib.Output.ROOTFile2
197 if rootfile != "":
198 result.addEventAlgo(CompFactory.LArCaliWaves2Ntuple(KeyList = ["LArCaliWave",],
199 NtupleName = "CALIWAVE",
200 AddFEBTempInfo = False,
201 RealGeometry = True,
202 SaveDerivedInfo = True,
203 ApplyCorrection = True,
204 isSC = flags.LArCalib.isSC,
205 BadChanKey = bcKey,
206 OffId=True,
207 AddCalib=True,
208 SaveJitter=True if flags.LArCalib.CaliWave.Nsteps >= 24 else False
209 ))
210
211 import os
212 if os.path.exists(rootfile):
213 os.remove(rootfile)
214 result.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='"+rootfile+"' OPT='NEW'" ]))
215 result.setAppProperty("HistogramPersistency","ROOT")
216 pass # end if ROOT ntuple writing
217
218 if rootfile2 != "" and flags.LArCalib.doOFCCali:
219 result.addEventAlgo(CompFactory.LArOFC2Ntuple(ContainerKey = "LArOFC",
220 AddFEBTempInfo = False,
221 NtupleFile = "FILE2",
222 BadChanKey = bcKey,
223 isSC = flags.LArCalib.isSC,
224 AddCalib=True
225 ))
226
227 import os
228 if os.path.exists(rootfile2):
229 os.remove(rootfile2)
230 if rootfile == "":
231 result.addService(CompFactory.NTupleSvc(Output = [ "FILE2 DATAFILE='"+rootfile2+"' OPT='NEW'" ]))
232 else:
233 result.getService("NTupleSvc").Output += [ "FILE2 DATAFILE='"+rootfile2+"' OPT='NEW'" ]
234 result.setAppProperty("HistogramPersistency","ROOT")
235 pass # end if ROOT ntuple writing
236
237 #Output (POOL + sqlite) file writing:
238 from RegistrationServices.OutputConditionsAlgConfig import OutputConditionsAlgCfg
239 result.merge(OutputConditionsAlgCfg(flags,
240 outputFile=flags.LArCalib.Output.POOLFile,
241 ObjectList=["LArCaliWaveContainer#LArCaliWave#"+flags.LArCalib.CaliWave.Folder,],
242 IOVTagList=[caliWaveTag,],
243 Run1=flags.LArCalib.IOVStart,
244 Run2=flags.LArCalib.IOVEnd
245 ))
246 if flags.LArCalib.doOFCCali:
247 result.getEventAlgo("OutputConditionsAlg").ObjectList += ["LArOFCComplete#LArOFC#"+flags.LArCalib.OFCCali.Folder]
248 result.getEventAlgo("OutputConditionsAlg").IOVTagList += [caliOFCTag]
249
250 #RegistrationSvc
251 result.addService(CompFactory.IOVRegistrationSvc(RecreateFolders = False))
252
253
254 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
255 result.merge(PerfMonMTSvcCfg(flags))
256
257 return result
258

◆ LArXtalkDelayCfg()

python.LArCalib_Delay_OFCCaliConfig.LArXtalkDelayCfg ( flags)

Definition at line 330 of file LArCalib_Delay_OFCCaliConfig.py.

330def LArXtalkDelayCfg(flags):
331
332 #Get basic services and cond-algos
333 from LArCalibProcessing.LArCalibBaseConfig import LArCalibBaseCfg,chanSelStr
334 result=LArCalibBaseCfg(flags)
335
336 #Add ByteStream reading
337 from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
338 result.merge(ByteStreamReadCfg(flags))
339
340 #Calibration runs are taken in fixed gain.
341 #The SG key of the digit-container is name of the gain
342 gainStrMap={0:"HIGH",1:"MEDIUM",2:"LOW"}
343 digKey=gainStrMap[flags.LArCalib.Gain]
344
345 from IOVDbSvc.IOVDbSvcConfig import addFolders
346 if "ONL" in flags.LArCalib.Input.Database:
347 result.merge(addFolders(flags,flags.LArCalib.Pedestal.Folder,detDb=flags.LArCalib.Input.Database, className="CondAttrListCollection", db="CONDBR2"))
348 LArPedestalCondAlg = CompFactory.getComp("LArFlatConditionsAlg<LArPedestalFlat>")
349 result.addCondAlgo(LArPedestalCondAlg(ReadKey=flags.LArCalib.Pedestal.Folder, WriteKey="Pedestal"))
350 else:
351 from LArCalibProcessing.utils import FolderTagResolver
352 FolderTagResolver._globalTag=flags.IOVDb.GlobalTag
353 tagResolver=FolderTagResolver()
354 pedestalTag=tagResolver.getFolderTag(flags.LArCalib.Pedestal.Folder)
355 result.merge(addFolders(flags,flags.LArCalib.Pedestal.Folder,detDb=flags.LArCalib.Input.Database, tag=pedestalTag, modifiers=chanSelStr(flags),
356 className="LArPedestalComplete"))
357
358
359 from LArCalibProcessing.LArCalib_CalibDigitsMakerConfig import LArCalibDigitsMakerCfg
360 result.merge(LArCalibDigitsMakerCfg(flags,DigitsKey=digKey,ntrigg=flags.LArCalib.OFC.Ncoll,notrun=True))
361
362 if not flags.LArCalib.isSC:
363 if flags.LArCalib.Input.isRawData:
364 result.addEventAlgo(CompFactory.LArRawDataReadingAlg(LArRawChannelKey="", LArDigitKey=digKey, LArFebHeaderKey="LArFebHeader"))
365 else:
366 result.addEventAlgo(CompFactory.LArRawCalibDataReadingAlg(LArAccCalibDigitKey=digKey,
367 LArFebHeaderKey="LArFebHeader",
368 SubCaloPreselection=flags.LArCalib.Input.SubDet,
369 PosNegPreselection=flags.LArCalib.Preselection.Side,
370 BEPreselection=flags.LArCalib.Preselection.BEC,
371 FTNumPreselection=flags.LArCalib.Preselection.FT))
372
373 from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
374 result.merge(LArFebErrorSummaryMakerCfg(flags))
375 result.getEventAlgo("LArFebErrorSummaryMaker").CheckAllFEB=False
376
377 else:
378 digKey="SC"
379 theLArLATOMEDecoder = CompFactory.LArLATOMEDecoder("LArLATOMEDecoder")
380 if flags.LArCalib.Input.isRawData:
381 result.addEventAlgo(CompFactory.LArRawSCDataReadingAlg(adcCollKey = digKey, adcBasCollKey = "", etCollKey = "",
382 etIdCollKey = "", LATOMEDecoder = theLArLATOMEDecoder))
383 from LArCalibProcessing.LArCalib_CalibDigitsMakerConfig import LArCalibDigitsMakerCfg
384 result.merge(LArCalibDigitsMakerCfg(flags,digKey))
385
386 else:
387 # this needs also legacy maps
388 from LArCabling.LArCablingConfig import LArCalibIdMappingCfg,LArOnOffIdMappingCfg
389 result.merge(LArOnOffIdMappingCfg(flags))
390 result.merge(LArCalibIdMappingCfg(flags))
391 result.addEventAlgo(CompFactory.LArRawSCCalibDataReadingAlg(LArSCAccCalibDigitKey = digKey,
392 CalibCablingKeyLeg="LArCalibLineMap",
393 OnOffMapLeg="LArOnOffIdMap",
394 LATOMEDecoder = theLArLATOMEDecoder, ))
395
396 bcKey = "LArBadChannelSC" if flags.LArCalib.isSC else "LArBadChannel"
397
398 theLArCaliWaveBuilder = CompFactory.LArCaliWaveBuilder()
399 theLArCaliWaveBuilder.KeyList= [digKey,]
400 theLArCaliWaveBuilder.KeyOutput="LArCaliWave"
401 theLArCaliWaveBuilder.GroupingType = flags.LArCalib.GroupingType
402 theLArCaliWaveBuilder.SubtractPed = True
403 theLArCaliWaveBuilder.NSteps = flags.LArCalib.CaliWave.Nsteps
404 theLArCaliWaveBuilder.CheckEmptyPhases = False
405 theLArCaliWaveBuilder.NBaseline = 0 # to avoid the use of the baseline when Pedestal are missing
406 theLArCaliWaveBuilder.UseDacAndIsPulsedIndex = False # should have an impact only for HEC
407 theLArCaliWaveBuilder.RecAllCells = True
408 theLArCaliWaveBuilder.UseParamsSel = True
409 theLArCaliWaveBuilder.UsePattern = flags.LArCalib.OFC.Nsamples
410 theLArCaliWaveBuilder.NumSubStep = flags.LArCalib.CaliWave.NSubSteps
411 theLArCaliWaveBuilder.isSC = flags.LArCalib.isSC
412 result.addEventAlgo(theLArCaliWaveBuilder)
413
414
415
416 #ROOT ntuple writing:
417 rootfile=flags.LArCalib.Output.ROOTFile
418 if rootfile != "":
419 result.addEventAlgo(CompFactory.LArCaliWaves2Ntuple(KeyList = ["LArCaliWave",],
420 NtupleName = "CALIWAVE",
421 AddFEBTempInfo = False,
422 RealGeometry = True,
423 SaveDerivedInfo = True,
424 ApplyCorrection = False,
425 isSC = flags.LArCalib.isSC,
426 BadChanKey = bcKey,
427 OffId=True,
428 AddCalib=True,
429 SaveJitter=True if flags.LArCalib.CaliWave.Nsteps >= 24 else False
430 ))
431
432 import os
433 if os.path.exists(rootfile):
434 os.remove(rootfile)
435 result.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='"+rootfile+"' OPT='NEW'" ]))
436 result.setAppProperty("HistogramPersistency","ROOT")
437 pass # end if ROOT ntuple writing
438
439 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
440 result.merge(PerfMonMTSvcCfg(flags))
441
442 return result
443

Variable Documentation

◆ AtlasVersion

python.LArCalib_Delay_OFCCaliConfig.AtlasVersion

Definition at line 463 of file LArCalib_Delay_OFCCaliConfig.py.

◆ cfg

python.LArCalib_Delay_OFCCaliConfig.cfg = MainServicesCfg(ConfigFlags)

Definition at line 472 of file LArCalib_Delay_OFCCaliConfig.py.

◆ ConfigFlags

python.LArCalib_Delay_OFCCaliConfig.ConfigFlags = initConfigFlags()

Definition at line 449 of file LArCalib_Delay_OFCCaliConfig.py.

◆ Database

python.LArCalib_Delay_OFCCaliConfig.Database

Definition at line 454 of file LArCalib_Delay_OFCCaliConfig.py.

◆ DBConnection

python.LArCalib_Delay_OFCCaliConfig.DBConnection

Definition at line 461 of file LArCalib_Delay_OFCCaliConfig.py.

◆ DBInstance

python.LArCalib_Delay_OFCCaliConfig.DBInstance

Definition at line 474 of file LArCalib_Delay_OFCCaliConfig.py.

◆ Dir

python.LArCalib_Delay_OFCCaliConfig.Dir

Definition at line 451 of file LArCalib_Delay_OFCCaliConfig.py.

◆ Files

python.LArCalib_Delay_OFCCaliConfig.Files

Definition at line 455 of file LArCalib_Delay_OFCCaliConfig.py.

◆ GlobalTag

python.LArCalib_Delay_OFCCaliConfig.GlobalTag

Definition at line 462 of file LArCalib_Delay_OFCCaliConfig.py.

◆ POOLFile

python.LArCalib_Delay_OFCCaliConfig.POOLFile

Definition at line 459 of file LArCalib_Delay_OFCCaliConfig.py.

◆ ROOTFile

python.LArCalib_Delay_OFCCaliConfig.ROOTFile

Definition at line 458 of file LArCalib_Delay_OFCCaliConfig.py.

◆ RunNumbers

python.LArCalib_Delay_OFCCaliConfig.RunNumbers

Definition at line 453 of file LArCalib_Delay_OFCCaliConfig.py.

◆ Type

python.LArCalib_Delay_OFCCaliConfig.Type

Definition at line 452 of file LArCalib_Delay_OFCCaliConfig.py.