22 helper -- AthMonitorCfgHelper(Old) instance
23 alg -- algorithm Configurable object returned from addAlgorithm
24 kwargs -- jo agruments
26 doOnline = kwargs.get(
'doOnline',
False)
27 doLumiBlock = kwargs.get(
'doLumiBlock',
False)
28 path =
'/Pixel/Errors/'
29 pathExpert =
'/Pixel/ErrorsExpert/'
30 pathLowStat =
'/Pixel/LumiBlock/'
32 errorGroup = helper.addGroup(alg,
'Error')
34 histoGroupName =
'ErrorsPerLumi'
35 title =
'Average Total Errors'
36 yaxistext =
';# errors/event'
39 histoGroupName =
'ErrorStatePerLumi'
40 title =
'Average Errors by Error States'
41 ylabels = [[i[1]
for i
in ErrStateLabelsFEI3]]*len(layers)
42 defineMapVsLumiLayers(helper, alg, histoGroupName, title, path,
';lumi block',
';error state', ybins=errbbinsy, ymins=errbminsy, binsizes=errbbsizy, ylabels=ylabels, type=
'TProfile2D', onlylayers=fei3layers)
43 ylabels = [[i[1]
for i
in ErrStateLabelsFEI4]]*len(layers)
44 defineMapVsLumiLayers(helper, alg, histoGroupName, title, path,
';lumi block',
';error state', ybins=errbbinsy, ymins=errbminsy, binsizes=errbbsizy, ylabels=ylabels, type=
'TProfile2D', onlylayers=fei4layers)
46 histoGroupName =
'ErrorCatRODModPerLumi'
47 title =
'Average Errors by Error Types'
48 ylabels = [[i[1]
for i
in ErrCatRODModLabels]]*len(layers)
49 defineMapVsLumiLayers(helper, alg, histoGroupName, title, path,
';lumi block',
';error type', ybins=errtbinsy, ymins=errbminsy, binsizes=errbbsizy, ylabels=ylabels, type=
'TProfile2D')
52 for i, cat
in enumerate(ErrCatRODModLabels):
55 histoGroupName = cat[0]
56 title =
"Total "+cat[1]
59 for cat
in ErrCatLabels:
60 histoGroupName = cat[0]
61 title =
"Total "+cat[1]
64 yaxistext =
';# errors/module/event'
65 for i, cat
in enumerate(ErrCatRODModLabelsNorm):
67 title =
"Average "+ErrCatRODModLabels[i][1]+
" per Module"
70 for i, cat
in enumerate(ErrCatLabelsNorm):
72 title =
"Average "+ErrCatLabels[i][1]+
" per Module"
75 histoGroupName =
"FEMCCErrorwords"
76 title =
"Average FE/MCC Error Words"
77 define2DProfHist(helper, alg, histoGroupName, title, path, type=
'TProfile2D', onlylayers=fei3layers)
79 histoGroupName =
"TruncatedROBErrors"
80 title =
"Truncated ROB Errors"
83 histoGroupName =
"MaskedROBErrors"
84 title =
"Masked ROB Errors"
88 histoGroupName =
"ErrorsLB"
90 define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type=
'TH2F', doWeight=
True, lifecycle=
'lowStat')
92 histoGroupName =
"ErrorsModSyncLB"
93 title =
"Errors_ModSync"
94 define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type=
'TH2F', lifecycle=
'lowStat')
96 histoGroupName =
"ErrorsRODSyncLB"
97 title =
"Errors_RODSync"
98 define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type=
'TH2F', lifecycle=
'lowStat')
100 matches = [
"SEU",
"EOC",
"Warning"]
101 for state
in ErrStateLabelsFEI3:
102 title = state[1]+
" Errors"
103 if any(st
in state[0]
for st
in matches):
104 histoGroupName = state[0]+
"FEMap"
107 title +=
' reset every 15 LBs'
108 define2DProfPerFEHist(helper, alg, histoGroupName, title, pathExpert, type=
'TH2F', doWeight=
True, opt=
'kLBNHistoryDepth=15', histname=state[0]+
"FEMapMon")
110 histoGroupName = state[0]+
"Map"
111 define2DProfHist(helper, alg, histoGroupName, title, pathExpert, type=
'TH2F', doWeight=
True)
113 title +=
' reset every 15 LBs'
114 define2DProfHist(helper, alg, histoGroupName, title, pathExpert, type=
'TH2F', doWeight=
True, opt=
'kLBNHistoryDepth=15', histname=state[0]+
"MapMon")
115 histoGroupName = state[0]+
"PerLumi"
116 title =
'Average '+state[1]+
" Errors per module per event"
117 yaxistext =
';# errors/module/event'
118 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathExpert, yaxistext, type=
'TProfile', onlylayers=fei3layers)
120 for state
in ErrStateLabelsFEI4:
121 histoGroupName = state[0]+
"Map"
122 title = state[1]+
" Errors"
123 define2DProfHist(helper, alg, histoGroupName, title, pathExpert, type=
'TH2F', doWeight=
True)
124 histoGroupName = state[0]+
"PerLumi"
125 title =
'Average '+state[1]+
" Errors per module per event"
126 yaxistext =
';# errors/module/event'
127 define1DProfLumiLayers(helper, alg, histoGroupName, title, pathExpert, yaxistext, type=
'TProfile', onlylayers=fei4layers)
129 varName =
'ServiceRecord_val'
130 title =
fullDressTitle(
'IBL ServiceRecord Unweighted',
False,
';SR',
';# errors')
131 varName +=
';ServiceRecordUnweighted_IBL'
132 errorGroup.defineHistogram(varName,
133 type=
'TH1F', path=pathExpert, title=title,
134 xbins=32, xmin=-0.5, xmax=31.5)
135 varName =
'ServiceRecord_val'
136 title =
fullDressTitle(
'IBL ServiceRecord Weighted with Payload',
False,
';SR',
';# errors')
137 varName +=
';ServiceRecordWeighted_IBL'
138 errorGroup.defineHistogram(varName, weight=
'ServiceRecord_wgt',
139 type=
'TH1F', path=pathExpert, title=title,
140 xbins=32, xmin=-0.5, xmax=31.5)
143 desynchistoname =
'AvgSyncErrPerBCID'
145 title =
'Average syncrohisation error per BCID, {0}'.
format(layer) + runtext +
';BCID;# hits/pixel/event'
147 fullvarstr =
'pixdesyncmontool_bcid'
148 fullvarstr+=
',{0}_{1}'.
format(desynchistoname,
'val')
149 fullvarstr+=
';' + desynchistoname +
'_{0}'.
format(layer)
150 layerGroup.defineHistogram(fullvarstr,
151 type=
'TProfile', path=
'/Pixel/Errors', title=title,
152 xbins=bcidbinsx, xmin=-0.5, xmax=-0.5+bcidbinsx)