41def LArDigitalTriggMonConfig(flags,larLATOMEBuilderAlg, nsamples=32, streamTypes=[]):
42 '''Function to configures some algorithms in the monitoring system.'''
43
44
45
46 from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelper
47 helper = AthMonitorCfgHelper(flags,'LArDigitalTriggMonAlgCfg')
48
49 from LArMonitoring.GlobalVariables import lArDQGlobals
50
51 from AthenaCommon.Logging import logging
52 mlog = logging.getLogger( 'LArDigitalTriggMon' )
53
54 if not flags.DQ.enableLumiAccess:
55 from LumiBlockComps.LuminosityCondAlgConfig import LuminosityCondAlgCfg
56 helper.resobj.merge(LuminosityCondAlgCfg(flags))
57
58
59 from LArCabling.LArCablingConfig import LArOnOffIdMappingSCCfg
60 helper.resobj.merge(LArOnOffIdMappingSCCfg(flags))
61
62
63 from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDBSCCfg
64 helper.resobj.merge(LArElecCalibDBSCCfg(flags, condObjs=["Ramp","DAC2uA", "Pedestal", "uA2MeV", "MphysOverMcal", "OFC", "Shape", "HVScaleCorr"]))
65
66
67
68 hasEtId = False
69 hasEt = False
70 hasAdc = False
71 hasAdcBas = False
72 RawSCContainerKey = ""
73 DigitContainerKey = ""
74 for i in range(0,len(streamTypes)):
75 mlog.info("runinfo.streamTypes()[i]: "+str(streamTypes[i]))
76 if streamTypes[i] == "SelectedEnergy":
77 hasEtId = True
78 RawSCContainerKey = "SC_ET_ID"
79 if streamTypes[i] == "Energy":
80 hasEt = True
81 RawSCContainerKey = "SC_ET"
82 if streamTypes[i] == "RawADC":
83 hasAdc = True
84 larLATOMEBuilderAlg.LArDigitKey = "SC"
85 larLATOMEBuilderAlg.isADCBas = False
86 DigitContainerKey = "SC"
87 if streamTypes[i] == "ADC":
88 hasAdcBas = True
89 DigitContainerKey = "SC_ADC_BAS"
90 larLATOMEBuilderAlg.isADCBas = True
91 larLATOMEBuilderAlg.LArDigitKey = "SC_ADC_BAS"
92
93
94 if len(RawSCContainerKey)==0:
95 print(
"No energies, not including LArDigitalTriggMonAlg")
96 return helper.result()
97
98 larDigitalTriggMonAlg = helper.addAlgorithm(CompFactory.LArDigitalTriggMonAlg('larDigitalTriggMonAlg'))
99 larDigitalTriggMonAlg.ProblemsToMask=["maskedOSUM"]
100 if nsamples < 4:
101 larDigitalTriggMonAlg.LArRawSCEtRecoContainerKey=""
102
103 larDigitalTriggMonAlg.isADCBas = hasAdcBas
104 larDigitalTriggMonAlg.LArRawSCContainerKey = RawSCContainerKey
105 larDigitalTriggMonAlg.LArDigitContainerKey = DigitContainerKey
106
107 if (hasEtId and hasEt):
108 hasEt = False
109
110
111 if (hasAdc and hasAdcBas):
112 hasAdc = False
113 larDigitalTriggMonAlg.isADCBas=False
114
115 mlog.info("Mux settings from COOL:")
116 mlog.info("has ET Id: "+str(hasEtId))
117 mlog.info("has ET: "+str(hasEt))
118 mlog.info("has ADC: "+str(hasAdc))
119 mlog.info("has ADC Bas: "+str(hasAdcBas))
120
121 SCGroupName="SC"
122 larDigitalTriggMonAlg.SCMonGroup=SCGroupName
123
124
125
126 SCGroup = helper.addGroup(
127 larDigitalTriggMonAlg,
128 SCGroupName,
129 '/LArDigitalTrigger/',
130 'run'
131 )
132
133 sc_hist_path='/'
134
135 LatomeDetBinMapping = dict([
136 ("0x48",{"Subdet":"FCALC","Bin":1}),
137 ("0x4c",{"Subdet":"EMEC/HECC","Bin":3}),
138 ("0x44",{"Subdet":"EMECC","Bin":11}),
139 ("0x4a",{"Subdet":"EMB/EMECC","Bin":27}),
140 ("0x42",{"Subdet":"EMBC","Bin":43}),
141 ("0x41",{"Subdet":"EMBA","Bin":59}),
142 ("0x49",{"Subdet":"EMB/EMECA","Bin":75}),
143 ("0x43",{"Subdet":"EMECA","Bin":91}),
144 ("0x4b",{"Subdet":"EMEC/HECA","Bin":107}),
145 ("0x47",{"Subdet":"FCALA","Bin":115})
146 ])
147 NLatomeBins=117
148 NLatomeBins_side=59
149
150 BinLabel_LATOME=[]
151 BinLabel_LATOME_A=[]
152 BinLabel_LATOME_C=[]
153 phi=0
154 for bb in range (0,NLatomeBins):
155 Label=""
156 for detID in LatomeDetBinMapping:
157 if bb==(LatomeDetBinMapping[detID]["Bin"]-1):
158 Label=LatomeDetBinMapping[detID]["Subdet"]
159 phi=1
160 break
161 if bb < NLatomeBins_side:
162 BinLabel_LATOME_C+=[Label+str(phi)]
163 else:
164 BinLabel_LATOME_A+=[Label+str(phi)]
165
166 BinLabel_LATOME+=[Label+str(phi)]
167 phi+=1
168
169 NLTDBbins = 124
170 BinLabel_LTDB = [
171 "H09L","H08R","H08L","H07R","H07L","H06R","H06L","H05R","H05L","H04R","H04L","H03R",
172 "H03L","H02R","H02L","H01R","H01L","H16R","H16L","H15R","H15L","H14R","H14L","H13R",
173 "H13L","H12R","H12L","H11R","H11L","H10R","H10L","H09R",
174 "I01L","I02R","I02L","I03R","I03L","I04R","I04L","I05R","I05L","I06R","I06L","I07R",
175 "I07L","I08R","I08L","I09R","I09L","I10R","I10L","I11R","I11L","I12R","I12L","I13R",
176 "I13L","I14R","I14L","I15R","I15L","I16R","I16L","I01R",
177 "C07R","C07L","C06L","C06R","C06H","C05R","C05L","C04R","C04L","C03R","C03L","C02L",
178 "C02R","C02H","C01R","C01L","C13R","C13L","C12L","C12R","C12H","C11R","C11L","C10R",
179 "C10L","C09L","C09R","C09H","C08R","C08L",
180 "A01R","A01L","A02L","A02R","A02H","A03R","A03L","A04R","A04L","A05R","A05L","A06L",
181 "A06R","A06H","A07R","A07L","A08R","A08L","A09L","A09R","A09H","A10R","A10L","A11R",
182 "A11L","A12L","A12R","A12H","A13R","A13L"
183 ]
184
185 iphi_bins_dict = {"ALL": 63, "EMB": 63, "EMEC": 63, "HEC": 63, "FCAL": 15}
186
187
188
189
190 SCGroup.defineHistogram('lumi_block,event_size;EventSize_vs_LB',
191 title='Digital trigger event size per LB; LumiBlock; Event size [MB]',
192 type='TProfile',
193 path=sc_hist_path,
194 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max)
195
196
197
198
199 partGroup_digi = helper.addArray([larDigitalTriggMonAlg.LayerNames], larDigitalTriggMonAlg, 'LArDigitalTriggerMon_digi', topPath='/LArDigitalTrigger/')
200 partGroup_sc = helper.addArray([larDigitalTriggMonAlg.LayerNames], larDigitalTriggMonAlg, 'LArDigitalTriggerMon_sc', topPath='/LArDigitalTrigger/')
201
202 for part in larDigitalTriggMonAlg.LayerNames:
203 selStrPart = {}
204 for sel in selStr.keys():
205 selStrPart[sel] = "in "+part+" "+selStr[sel]
206 iphi_bins = 63
207 for key in iphi_bins_dict.keys():
208 if part.startswith(key):
209 iphi_bins = iphi_bins_dict[key]
210
211 if part == "ALL":
212 partxbins=lArDQGlobals.SuperCell_Variables["etaRange"]["All"]["All"]
213 partybins=lArDQGlobals.SuperCell_Variables["phiRange"]["All"]["All"]
214 topPath=""
215 else:
216 topPath="PerPartition/"
217 Side = part[-1]
218 if "HEC" in part:
219 Sampling = "0"
220 Part = part[:-1]
221 else:
222 Sampling = part[-2]
223 Part = part[:-2]
224 if Part == "FCAL":
225 Part = "FCal"
226 if Sampling == "P":
227 Sampling = "0"
228 partxbins=lArDQGlobals.SuperCell_Variables["etaRange"][Part][Side][Sampling]
229 partybins=lArDQGlobals.SuperCell_Variables["phiRange"][Part][Side][Sampling]
230
231
232
233
234 for thisSel in [ "passDigiNom", "badNotMasked"]:
235 thisTopPath=f"/{thisSel}/{topPath}"
236
237 if part == "ALL":
238 partGroup_digi.defineHistogram('Digi_part_maxpos,Digi_part_partition;Partition_vs_maxSamplePosition_'+thisSel,
239 title='Partition vs. position of max sample '+selStrPart[thisSel],
240 cutmask='Digi_part_'+thisSel,
241 type='TH2F',
242 path=thisTopPath,
243 xbins=nsamples,xmin=0.5,xmax=nsamples+0.5,
244 ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5,
245 xlabels = [str(x) for x in range(1,nsamples+1)],
246 ylabels=lArDQGlobals.Partitions,
247 pattern=[(part)])
248
249 partGroup_digi.defineHistogram('Digi_part_latomesourceidbin,Digi_part_adc;ADCFullRange_vs_LATOME_'+thisSel,
250 title='ADC vs LATOME name '+selStrPart[thisSel]+'; ; ADC',
251 cutmask='Digi_part_'+thisSel,
252 type='TH2F',
253 path=thisTopPath,
254 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
255 ybins=500, ymin=-2, ymax=2500,
256 xlabels=BinLabel_LATOME,
257 pattern=[(part)])
258
259 partGroup_digi.defineHistogram('Digi_part_latomesourceidbin,Digi_part_pedestal;Pedestal_vs_LATOME_'+thisSel,
260 title='Pedestal vs LATOME name '+selStrPart[thisSel]+'; ; Pedestal',
261 cutmask='Digi_part_'+thisSel,
262 type='TH2F',
263 path=thisTopPath,
264 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
265 ybins=500, ymin=-2, ymax=2500,
266 xlabels=BinLabel_LATOME,
267 pattern=[(part)])
268
269 partGroup_digi.defineHistogram('Digi_part_latomesourceidbin,Digi_part_maxpos;MaxSamplePosition_vs_LATOME_'+thisSel,
270 title='Position of max sample vs. LATOME '+selStrPart[thisSel],
271 type='TH2F',
272 cutmask='Digi_part_'+thisSel,
273 path=thisTopPath,
274 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
275 ybins=nsamples,ymin=0.5,ymax=nsamples+0.5,
276 xlabels=BinLabel_LATOME,
277 ylabels = [str(x) for x in range(1,nsamples+1)],
278 pattern=[(part)])
279
280 partGroup_digi.defineHistogram('Digi_part_latomesourceidbin,Digi_part_diff_adc0_ped;Diff_ADC0_Ped_vs_LATOME_'+thisSel,
281 title='ADC[0] - Pedestal vs LATOME name '+selStrPart[thisSel]+'; ; ADC[0] - Pedestal',
282 type='TH2F',
283 cutmask='Digi_part_'+thisSel,
284 path=thisTopPath,
285 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
286 ybins=64, ymin=-32, ymax=32,
287 xlabels=BinLabel_LATOME,
288 pattern=[(part)])
289
290 partGroup_digi.defineHistogram('Digi_part_latomesourceidbin,Digi_part_diff_adc_ped_norm;Diff_ADC_Ped_Norm_vs_LATOME_'+thisSel,
291 title='(ADC-ped)/fabs(ADC_max-ped) '+selStrPart[thisSel]+'; LATOME Name; (ADC - pedestal) / fabs(ADC_max - pedestal)',
292 type='TH2F',
293 cutmask='Digi_part_'+thisSel,
294 path=thisTopPath,
295 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
296 ybins=64, ymin=-32, ymax=32,
297 xlabels=BinLabel_LATOME,
298 pattern=[(part)])
299
300
301
302 partGroup_digi.defineHistogram('Digi_part_eta,Digi_part_phi;Coverage_Eta_Phi_'+thisSel,
303 title='SC coverage '+selStrPart[thisSel]+': #phi vs #eta;#eta;#phi',
304 type='TH2F',
305 path=thisTopPath+'/Coverage',
306 cutmask='Digi_part_'+thisSel,
307 xbins=partxbins,
308 ybins=partybins,
309 pattern=[(part)])
310
311
312 if not flags.Common.isOnline: continue
313
314 if thisSel != "passDigiNom": continue
315 partGroup_digi.defineHistogram('Digi_part_eta,Digi_part_phi,Digi_part_diff_adc0_ped;Coverage_Diff_ADC0_Ped_'+thisSel,
316 title='ADC[0] - Pedestal'+selStrPart[thisSel]+': #phi vs #eta;#eta;#phi',
317 type='TProfile2D',
318 cutmask='Digi_part_'+thisSel,
319 path=thisTopPath+'/Coverage',
320 xbins=partxbins,
321 ybins=partybins,
322 pattern=[(part)])
323
324
325
326 partGroup_digi.defineHistogram('Digi_part_BCID,Digi_part_iphi,Digi_part_diff_adc_ped;Diff_ADC_Ped_Per_BCID_Per_iphi_'+thisSel,
327 title='ADC - Pedestal (all samples) '+selStrPart[thisSel]+': iphi vs BCID;BCID;iphi',
328 type='TProfile2D',
329 cutmask='Digi_part_'+thisSel,
330 path=thisTopPath,
331 xbins=3564,xmin=-0.5,xmax=3563.5,
332 ybins=iphi_bins+1,ymin=0,ymax=iphi_bins+1,
333 pattern=[(part)])
334
335
336
337
338
339
340 partGroup_digi.defineHistogram('Digi_part_sampos,Digi_part_adc;ADCZoom_vs_SamplePosition_'+thisSel,
341 title='ADC (zoom) vs sample position '+selStrPart[thisSel],
342 cutmask='Digi_part_'+thisSel,
343 type='TH2F',
344 path=thisTopPath,
345 xbins=nsamples,xmin=0.5,xmax=nsamples+0.5,
346 xlabels = [str(x) for x in range(1,nsamples+1)],
347 ybins=750, ymin=0, ymax=1300,
348 pattern=[(part)])
349
350 partGroup_digi.defineHistogram('Digi_part_sampos,Digi_part_adc;ADCFullRange_vs_SamplePosition_'+thisSel,
351 title='ADC vs sample position '+selStrPart[thisSel],
352 cutmask='Digi_part_'+thisSel,
353 type='TH2F',
354 path=thisTopPath,
355 xbins=nsamples,xmin=0.5,xmax=nsamples+0.5,
356 xlabels = [str(x) for x in range(1,nsamples+1)],
357 ybins=500, ymin=0, ymax=5000,
358 pattern=[(part)])
359
360 partGroup_digi.defineHistogram('Digi_part_sampos,Digi_part_pedestal;Pedestal_vs_SamplePosition_'+thisSel,
361 title='Pedestal vs sample position '+selStrPart[thisSel],
362 cutmask='Digi_part_'+thisSel,
363 type='TH2F',
364 path=thisTopPath,
365 xbins=nsamples,xmin=0.5,xmax=nsamples+0.5,
366 xlabels = [str(x) for x in range(1,nsamples+1)],
367 ybins=500, ymin=0, ymax=5000,
368 pattern=[(part)])
369
370 partGroup_digi.defineHistogram('Digi_part_diff_adc0_ped;Diff_ADC0_Ped_'+thisSel,
371 title='LATOME (ADC[0]-ped) '+selStrPart[thisSel]+'; (ADC - pedestal)',
372 type='TH1F',
373 cutmask='Digi_part_'+thisSel,
374 path=thisTopPath,
375 xbins=50,xmin=-25,xmax=25,
376 pattern=[(part)])
377
378 partGroup_digi.defineHistogram('Digi_part_sampos,Digi_part_diff_adc_ped_norm;Diff_ADC_Ped_Norm_vs_SamplePosition_'+thisSel,
379 title='(ADC-ped)/fabs(ADC_max-ped) '+selStrPart[thisSel]+'; Sample position; (ADC - pedestal) / fabs(ADC_max - pedestal)',
380 type='TH2F',
381 cutmask='Digi_part_'+thisSel,
382 path=thisTopPath,
383 ybins=40,ymin=-1,ymax=1,
384 xbins=nsamples,xmin=0.5,xmax=nsamples+0.5,
385 xlabels = [str(x) for x in range(1,nsamples+1)],
386 pattern=[(part)])
387
388 partGroup_digi.defineHistogram('Digi_part_BCID, Digi_part_adc;ADC_vs_BCID_'+thisSel,
389 title='ADC value vs BCID '+selStrPart[thisSel]+'; BCID; ADC Value',
390 type='TProfile',
391 cutmask='Digi_part_'+thisSel,
392 path=thisTopPath,
393 xbins=3564,xmin=-0.5,xmax=3563.5,
394 ybins=500, ymin=0, ymax=5000,
395 pattern=[(part)])
396
397 partGroup_digi.defineHistogram('Digi_part_BCID, Digi_part_diff_adc0_ped;Diff_ADC0_Ped_vs_BCID_'+thisSel,
398 title='ADC[0] - Ped value vs BCID '+selStrPart[thisSel]+'; BCID; ADC[0] Value',
399 type='TProfile',
400 cutmask='Digi_part_'+thisSel,
401 path=thisTopPath,
402 xbins=3564,xmin=-0.5,xmax=3563.5,
403 ybins=500, ymin=-5, ymax=5,
404 pattern=[(part)])
405
406 partGroup_digi.defineHistogram('Digi_part_LB, Digi_part_adc;ADC_vs_LB_'+thisSel,
407 title='ADC value vs LB '+selStrPart[thisSel]+'; LB; ADC Value',
408 type='TProfile',
409 cutmask='Digi_part_'+thisSel,
410 path=thisTopPath,
411 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max,
412 ybins=500, ymin=0, ymax=5000,
413 pattern=[(part)])
414
415 partGroup_digi.defineHistogram("Digi_part_LB, Digi_part_adc_rms;ADC_RMS_vs_LB_"+thisSel,
416 title="RMS of ADC values vs LB "+selStrPart[thisSel]+"; LB; RMS of ADC Values",
417 type="TProfile",
418 cutmask='Digi_part_'+thisSel,
419 path=thisTopPath,
420 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max,
421 ybins=100, ymin=0, ymax=10,
422 pattern=[(part)])
423
424 partGroup_digi.defineHistogram('Digi_part_BCID, Digi_part_adc_rms;ADC_RMS_vs_BCID_'+thisSel,
425 title='RMS of ADC values vs BCID '+selStrPart[thisSel]+'; BCID; RMS of ADC Values',
426 type='TProfile',
427 cutmask='Digi_part_'+thisSel,
428 path=thisTopPath,
429 xbins=3564,xmin=-0.5,xmax=3563.5,
430 ybins=100, ymin=0, ymax=10,
431 pattern=[(part)])
432
433
434 partGroup_digi.defineHistogram('Digi_part_BCID, Digi_part_diff_adc_ped;Diff_ADC_Ped_vs_BCID_'+thisSel,
435 title='ADC - Pedestal (all samples) vs BCID '+selStrPart[thisSel]+'; BCID; ADC Value',
436 type='TProfile',
437 cutmask='Digi_part_'+thisSel,
438 path=thisTopPath,
439 xbins=3564,xmin=-0.5,xmax=3563.5,
440 ybins=500, ymin=-5, ymax=5,
441 pattern=[(part)])
442
443
444
445
446 for thisSel in [ "zeroET", "passSCNom0_0p325", "passSCNom0p325_1", "passSCNom1", "passSCNom10", "passSCNom10tauGt3", "saturNotMasked", "OFCbOFNotMasked", "onlofflEmismatch", "notMaskedEoflNe0", "notMaskedEoflGt1"]:
447 thisTopPath=f"/{thisSel}/{topPath}"
448
449 if part == "ALL":
450 partGroup_sc.defineHistogram('SC_part_latomesourceidbin,SC_part_et_onl;SC_ET_Onl_vs_LATOME_'+thisSel,
451 title='SC ET [GeV] vs LATOME name '+selStrPart[thisSel]+'; ; ET SC [GeV]',
452 type='TH2F',
453 cutmask='SC_part_'+thisSel,
454 path=thisTopPath,
455 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
456 ybins=200, ymin=-10, ymax=200,
457 xlabels=BinLabel_LATOME,
458 pattern=[(part)])
459
460
461 partGroup_sc.defineHistogram('SC_part_LB,SC_part_latomesourceidbin;LB_vs_LATOME_'+thisSel,
462 title='LATOME name vs LB '+selStrPart[thisSel]+';LB;LATOME',
463 type='TH2F',
464 cutmask='SC_part_'+thisSel,
465 path=thisTopPath,
466 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max,
467 ybins=NLatomeBins,ymin=1,ymax=NLatomeBins+1,
468 ylabels=BinLabel_LATOME,
469 pattern=[(part)])
470
471 partGroup_sc.defineHistogram('SC_part_time,SC_part_et_ofl;time_vs_et_ofl_'+thisSel,
472 title='SC coverage '+selStrPart[thisSel]+': #tau vs ET ofl;#tau;ET ofl',
473 type='TH2F',
474 cutmask='SC_part_'+thisSel,
475 path=thisTopPath,
476 xbins=500,xmin=-50,xmax=50,
477 ybins=500,ymin=-10,ymax=70,
478 pattern=[(part)])
479
480
481 partGroup_sc.defineHistogram('SC_part_latomesourceidbin,SC_part_time;MeanOfflineLATOMEtime_vs_LATOME_'+thisSel,
482 title='Average LATOME #tau from Offline computation per LATOME'+selStrPart[thisSel]+'; LATOME ; #tau [ns]',
483 type='TH2F',
484 cutmask='SC_part_'+thisSel,
485 path=thisTopPath,
486 xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1,
487 ybins=200, ymin=-50, ymax=50,
488 xlabels=BinLabel_LATOME,
489 pattern=[(part)])
490
491 partGroup_sc.defineHistogram('SC_part_LB,SC_part_latomesourceidbin,SC_part_time;MeanOfflineLATOMEtime_perLB_perLATOME_'+thisSel,
492 title='SC #tau '+selStrPart[thisSel]+': LATOME vs LB;LB;LATOME',
493 type='TProfile2D',
494 cutmask='SC_part_'+thisSel,
495 path=thisTopPath,
496 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max,
497 ybins=NLatomeBins,ymin=1,ymax=NLatomeBins+1,
498 ylabels=BinLabel_LATOME,
499 pattern=[(part)])
500
501 partGroup_sc.defineHistogram('SC_part_LB,SC_part_time;MeanOfflineLATOMEtime_vs_LB_'+thisSel,
502 title='Average LATOME #tau from Offline computation per LB '+selStrPart[thisSel]+'; LumiBloc; #tau [ns]',
503 type='TProfile',
504 cutmask='SC_part_'+thisSel,
505 path=thisTopPath,
506 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max,
507 pattern=[(part)])
508
509
510
511
512 partGroup_sc.defineHistogram('SC_part_eta,SC_part_phi;Coverage_Eta_Phi_'+thisSel,
513 title='SC coverage '+selStrPart[thisSel]+': #phi vs #eta;#eta;#phi',
514 type='TH2F',
515 cutmask='SC_part_'+thisSel,
516 path=thisTopPath+'/Coverage',
517 xbins=partxbins,
518 ybins=partybins,
519 pattern=[(part)])
520
521
522 partGroup_sc.defineHistogram('SC_part_time;OfflineLATOMEtime_'+thisSel,
523 title='LATOME #tau from Offline Computation '+selStrPart[thisSel]+';#tau [ns]; Evts;',
524 type='TH1F',
525 cutmask='SC_part_'+thisSel,
526 path=thisTopPath,
527 xbins=100,xmin=-25,xmax=25,
528 pattern=[(part)])
529
530
531 if not flags.Common.isOnline: continue
532
533 if thisSel != "passSCNom1": continue
534
535 partGroup_sc.defineHistogram('SC_part_eta,SC_part_phi,SC_part_et_onl;Coverage_Et_Onl_'+thisSel,
536 title='SC Energy '+selStrPart[thisSel]+': #phi vs #eta;#eta;#phi',
537 type='TProfile2D',
538 cutmask='SC_part_'+thisSel,
539 path=thisTopPath+'/Coverage',
540 xbins=partxbins,
541 ybins=partybins,
542 pattern=[(part)])
543
544 partGroup_sc.defineHistogram('SC_part_eta,SC_part_phi,SC_part_time;Coverage_OfflineLATOMEtime_'+thisSel,
545 title='LATOME #tau from Offline Computation '+selStrPart[thisSel]+': #phi vs #eta;#eta;#phi',
546 type='TProfile2D',
547 cutmask='SC_part_'+thisSel,
548 path=thisTopPath+'/Coverage',
549 xbins=partxbins,
550 ybins=partybins,
551 pattern=[(part)])
552
553 partGroup_sc.defineHistogram('SC_part_et_onl,SC_part_et_ofl;ET_Ofl_vs_ET_Onl_'+thisSel,
554 title='LATOME ET vs Offline Computation '+selStrPart[thisSel]+'; ET Onl;ET Offl [GeV]',
555 type='TH2F',
556 cutmask='SC_part_'+thisSel,
557 path=thisTopPath,
558 xbins=0,xmin=0,xmax=20,
559 ybins=0,ymin=0,ymax=20,
560 pattern=[(part)])
561
562 partGroup_sc.defineHistogram('SC_part_et_diff;ET_Diff_OnlOfl_'+thisSel,
563 title='LATOME ET vs Offline Computation '+selStrPart[thisSel]+'; ET Onl - ET Offl [GeV]; Evts;',
564 type='TH1F',
565 cutmask='SC_part_'+thisSel,
566 path=thisTopPath,
567 xbins=200,xmin=-10,xmax=10,
568 pattern=[(part)])
569
570
571 partGroup_sc.defineHistogram('SC_part_et_onl;SC_ET_Onl_'+thisSel,
572 title='SC eT [GeV] '+selStrPart[thisSel],
573 type='TH1F',
574 cutmask='SC_part_'+thisSel,
575 path=thisTopPath,
576 xbins=500, xmin=-100, xmax=400,
577 pattern=[(part)])
578
579
580 partGroup_sc.defineHistogram('SC_part_BCID,SC_part_time;MeanOfflineLATOMEtime_vs_BCID_'+thisSel,
581 title='Average LATOME #tau from Offline computation per BCID '+selStrPart[thisSel]+'; BCID; #tau [ns]',
582 type='TProfile',
583 cutmask='SC_part_'+thisSel,
584 path=thisTopPath,
585 xbins=3564,xmin=-0.5,xmax=3563.5,
586 pattern=[(part)])
587
588 partGroup_sc.defineHistogram('SC_part_BCID,SC_part_et_onl_muscaled;AvEnergyVsBCID_'+thisSel,
589 title='Average Energy vs BCID '+selStrPart[thisSel]+'; BCID; Energy per SC [MeV]',
590 type='TProfile',
591 cutmask='SC_part_'+thisSel,
592 path=thisTopPath,
593 xbins=3564,xmin=-0.5,xmax=3563.5,
594 ybins=10, ymin=-20, ymax=20,
595 pattern=[(part)])
596
597 for thisSel in ["passSCNomInvalid"]:
598 thisTopPath=f"/{thisSel}/{topPath}"
599 partGroup_sc.defineHistogram('SC_part_eta,SC_part_phi;Coverage_Eta_Phi_'+thisSel,
600 title='SC coverage '+selStrPart[thisSel]+': #phi vs #eta;#eta;#phi',
601 type='TH2F',
602 path=thisTopPath+'/Coverage',
603 cutmask='SC_part_'+thisSel,
604 xbins=partxbins,
605 ybins=partybins,
606 pattern=[(part)])
607 if part=="ALL":
608 partGroup_sc.defineHistogram('SC_part_ltdbsourceid;InvalideCodes_vs_LTDB_'+thisSel,
609 title='Invalide code entries vs LTDB '+selStrPart[thisSel]+'; LTDB ; Invalide Codes entries',
610 type='TH1F',
611 cutmask='SC_part_'+thisSel,
612 path=thisTopPath,
613 xbins=NLTDBbins,xmin=0,xmax=NLTDBbins,
614 xlabels=BinLabel_LTDB,
615 pattern=[(part)])
616
617
618 return helper.result()
619
620
void print(char *figname, TCanvas *c1)