27 from LArMonitoring.GlobalVariables
import lArDQGlobals
29 larDelayMonAlgTest = helper.addAlgorithm(algoinstance,
'larCalibDelayMonAlgTest')
32 larDelayMonAlgTest.LArAccumulatedDigitContainerKey=gain
34 larDelayMonAlgTest.LArAccumulatedCalibDigitContainerKey=gain
36 larDelayMonAlgTest.LArCalibDigitContainerKey=gain
38 GroupName=
"DelayMonGroup"
40 larDelayMonAlgTest.LArDelayGroupName=GroupName
41 larDelayMonAlgTest.PartitionNames=lArDQGlobals.Partitions
42 larDelayMonAlgTest.SubDetNames=lArDQGlobals.SubDet
44 Group = helper.addGroup(larDelayMonAlgTest,GroupName,
'/LAr/'+GroupName+
'/')
48 summary_hist_path=
'Summary/'
50 FEBchan_n = lArDQGlobals.FEB_N_channels
51 FEBchan_low = lArDQGlobals.FEB_channels_Min
52 FEBchan_up = lArDQGlobals.FEB_channels_Max
54 Group.defineHistogram(
'febchid,sample_max;FEBvsMaxSamples',
55 title=
'Max samples per FEB;FEB_N_channels;MaxSample',
57 path=summary_hist_path,
58 xbins=FEBchan_n, xmin=FEBchan_low, xmax=FEBchan_up)
59 Group.defineHistogram(
'febchid,sample_min;FEBvsMinSamples',
60 title=
'Min samples per FEB;FEB_N_channels;MinSample',
62 path=summary_hist_path,
63 xbins=FEBchan_n, xmin=FEBchan_low, xmax=FEBchan_up)
64 Group.defineHistogram(
'sample_max;NbOfMaxSamples',
65 title=
'Max samples;ADC;Events',
67 path=summary_hist_path,
68 xbins=lArDQGlobals.Samples_Bins*lArDQGlobals.FEB_N_channels-2,
69 xmin=-0.5, xmax=lArDQGlobals.Samples_Bins*lArDQGlobals.FEB_N_channels-2.5)
70 Group.defineHistogram(
'sample_min;NbOfMinSamples',
71 title=
'Min samples;ADC;Events',
73 path=summary_hist_path,
74 xbins=lArDQGlobals.Samples_Bins*lArDQGlobals.FEB_N_channels-2,
75 xmin=-0.5, xmax=lArDQGlobals.Samples_Bins*lArDQGlobals.FEB_N_channels-2.5)
76 Group.defineHistogram(
'dac;ValueOfDAC',
77 title=
'Value of dac;DAC;Events',
79 path=summary_hist_path,
81 xmin=0.-0.5, xmax=6000.+0.5)
82 Group.defineHistogram(
'delay;ValueOfDelay',
83 title=
'Value of delay;Delay;Events',
85 path=summary_hist_path,
87 xmin=-0.5, xmax=200.+0.5)
88 Group.defineHistogram(
'febchid,dac;FEBvsDAC',
89 title=
'DAC per FEB;FEB_N_channels;DAC',
91 path=summary_hist_path,
92 xbins=FEBchan_n, xmin=FEBchan_low, xmax=FEBchan_up)
93 Group.defineHistogram(
'febchid,delay;FEBvsDelay',
94 title=
'Delay per FEB;FEB_N_channels;Delay',
96 path=summary_hist_path,
97 xbins=FEBchan_n, xmin=FEBchan_low, xmax=FEBchan_up)
100 for subdet
in range(0,lArDQGlobals.N_SubDet):
101 hist_path=
'/LAr/'+GroupName+
'/'+lArDQGlobals.SubDet[subdet]+
'/'
102 slot_low = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
103 slot_up = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
104 slot_n =
int(slot_up - slot_low)
105 ft_low = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
106 ft_up = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
107 ft_n =
int(ft_up - ft_low)
109 darray = helper.addArray([lArDQGlobals.Partitions[2*subdet:2*subdet+2]],larDelayMonAlgTest,lArDQGlobals.SubDet[subdet])
111 darray.defineHistogram(
'slot,FT;NbOfEvents2D',
112 title=
'Number of Events;Slot;FT',
115 xbins=slot_n,xmin=slot_low,xmax=slot_up,
116 ybins=ft_n, ymin=ft_low, ymax=ft_up)
117 darray.defineHistogram(
'slot,FT,sample_max;SlotvsFTvsMaxSamples',
118 title=
'Average of MaxSamples;Slot;FT',
121 xbins=slot_n,xmin=slot_low,xmax=slot_up,
122 ybins=ft_n, ymin=ft_low, ymax=ft_up)
123 darray.defineHistogram(
'slot,FT,sample_min;SlotvsFTvsMinSamples',
124 title=
'Average of MinSamples;Slot;FT',
127 xbins=slot_n,xmin=slot_low,xmax=slot_up,
128 ybins=ft_n, ymin=ft_low, ymax=ft_up)
129 darray.defineHistogram(
'slot30,FT30,sample_max30;SlotvsFTvsMaxSamples30',
130 title=
'Average of MaxSamples>3000;Slot;FT',
133 xbins=slot_n,xmin=slot_low,xmax=slot_up,
134 ybins=ft_n, ymin=ft_low, ymax=ft_up)