29 def LArCalibPedMonConfigCore(helper,algoinstance,flags,gain="",doAccDigit=False,doCalibDigit=False,doAccCalibDigit=False):
31 from LArMonitoring.GlobalVariables
import lArDQGlobals
33 larPedMonAlgTest = helper.addAlgorithm(algoinstance,
'larCalibPedMonAlgTest')
36 larPedMonAlgTest.LArAccumulatedDigitContainerKey=gain
38 larPedMonAlgTest.LArAccumulatedCalibDigitContainerKey=gain
40 larPedMonAlgTest.LArCalibDigitContainerKey=gain
43 GroupName=
"PedMonGroup"
45 larPedMonAlgTest.LArPedGroupName=GroupName
46 larPedMonAlgTest.PartitionNames=lArDQGlobals.Partitions
47 larPedMonAlgTest.SubDetNames=lArDQGlobals.SubDet
49 Group = helper.addGroup(larPedMonAlgTest,GroupName,
'/LAr/'+GroupName+
'/')
53 summary_hist_path=
'Summary/'
58 Group.defineHistogram(
'nbChan;NbOfReadoutChannelsGlobal',
59 title=
'# of readout channels;Total channels for all FEB;Events',
61 path=summary_hist_path,
62 xbins=lArDQGlobals.N_FEB*lArDQGlobals.FEB_N_channels+5,
63 xmin=-0.5, xmax=lArDQGlobals.N_FEB*lArDQGlobals.FEB_N_channels+4.5)
64 Group.defineHistogram(
'nbFEB;NbOfReadoutFEBGlobal',
65 title=
'# of readout FEB/DSP header;N_FEB;Events',
67 path=summary_hist_path,
68 xbins=lArDQGlobals.N_FEB+11, xmin=-0.5, xmax=lArDQGlobals.N_FEB+10+0.5)
69 Group.defineHistogram(
'nbFEBpart,part;NbOfEvts2d',
70 title=
'# of readout FEB/DSP header;N_FEB;Partition',
72 path=summary_hist_path,
73 xbins=lArDQGlobals.N_FEB_Parttions_Max, xmin=-0.5, xmax=lArDQGlobals.N_FEB_Parttions_Max-0.5,
74 ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5,
75 ylabels=lArDQGlobals.Partitions)
76 Group.defineHistogram(
'febError,part;NbOfFEBMonErrors_dE',
77 title=
'# of data corruption errors',
79 path=summary_hist_path,
80 xbins=lArDQGlobals.N_FEBErrors, xmin=0.5, xmax=lArDQGlobals.N_FEBErrors+0.5,
81 ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5,
82 xlabels=lArDQGlobals.FEBErrors, ylabels=lArDQGlobals.Partitions)
83 Group.defineHistogram(
'LB0,EvtRejYield;RAW_YieldOfRejectedEventsVsLB',
84 title=
'Yield of corrupted events (DATACORRUPTED);LBs;Yield(%)',
86 path=summary_hist_path,
87 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max)
88 Group.defineHistogram(
'LB0;NbOfEventsVsLB',
89 title=
'Nb of events per LB;LBs;Events',
91 path=summary_hist_path,
92 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max)
93 Group.defineHistogram(
'LB0,LArEvSize;LAreventSizeVsLB',
94 title=
'LAr event size (w/o ROS headers);LBs;Megabytes',
96 path=summary_hist_path,
97 xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max)
99 for subdet
in range(0,lArDQGlobals.N_SubDet):
100 hist_path=
'/LAr/'+GroupName+
'/'+lArDQGlobals.SubDet[subdet]+
'/'
101 slot_low = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
102 slot_up = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
103 slot_n =
int(slot_up - slot_low)
104 ft_low = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
105 ft_up = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
106 ft_n =
int(ft_up - ft_low)
108 darray = helper.addArray([lArDQGlobals.Partitions[2*subdet:2*subdet+2]],larPedMonAlgTest,lArDQGlobals.SubDet[subdet])
110 darray.defineHistogram(
'nbFEBpart;nbOfFebBlocks',
111 title=
'# of readout FEBs (DSP header check only);N_FEB;Events',
114 xbins=lArDQGlobals.N_FEB_Parttions_Max, xmin=-0.5, xmax=lArDQGlobals.N_FEB_Parttions_Max-0.5)
115 darray.defineHistogram(
'slotnb,FTnb;RAW_nbOfEvts',
116 title=
'Nb of events (DSP header check only);Slot;FT',
119 xbins=slot_n,xmin=slot_low,xmax=slot_up,
120 ybins=ft_n, ymin=ft_low, ymax=ft_up)
122 darray.defineHistogram(
'slotnb,FTnb;RAW_nbOfFT',
123 title=
'Average # of cells with (qfactor+time) readout;Slot;FT',
126 xbins=slot_n,xmin=slot_low,xmax=slot_up,
127 ybins=ft_n, ymin=ft_low, ymax=ft_up)