223 for cable
in range(2):
224 name =
'CableElec_'+
str(cable+2)
225 name +=
';Topo'+
str(cable+2)+
'El'
226 title = f
'Topo Electric Cable {cable+2}'
228 label_topo_all += labels
229 alg.MonTool.defineHistogram(name, path=
'EXPERT', type=
'TH1I',
230 title=title, xbins=64, xlabels=labels,
233 for cable
in range(4):
234 topoName =
'Topo1Opt'+
str(cable)
235 name =
'CableOpti_'+
str(cable)
236 weight = name+
'_weight'
237 name += f
';{topoName}'
238 title = f
'Topo Optical Cable {cable}'
240 xlabels = [x
for x
in labels
if x]
241 alg.MonTool.defineHistogram(name, path=
'EXPERT', type=
'TH1I',
242 title=title, xbins=len(xlabels), xlabels=xlabels,
244 xmin=0, xmax=len(xlabels))
245 for cable
in range(4):
246 topoName =
'Topo1Opt'+
str(cable)
247 name =
'HdwTopo1Opt'+
str(cable)
248 weight = name+
'_weight'
249 name += f
';{topoName}_data'
250 title = f
'Topo Optical Cable {cable} (Data)'
252 xlabels = [x
for x
in labels
if x]
253 alg.MonTool.defineHistogram(name, path=
'EXPERT', type=
'TH1I',
254 title=title, xbins=len(xlabels), xlabels=xlabels,
256 xmin=0, xmax=len(xlabels))
258 for cable
in range(4):
259 ylabels = [
'#splitline{Sim counts <}{Hdw counts}',
'#splitline{Sim counts >}{Hdw counts}',
'#splitline{Sim counts =}{Hdw counts}']
260 topoName =
'Topo1Opt'+
str(cable)
261 name =
'MultiplicityTopo1Opt'+
str(cable)+
',MultiplicityMatchTopo1Opt'+
str(cable)
262 name += f
';{topoName}_mismatch'
263 title = f
'Topo Optical Cable {cable} Miss/Matches Summary'
265 xlabels = [x
for x
in labels
if x]
266 alg.MonTool.defineHistogram(name, path=
'EXPERT', type=
'TH2F',
267 title=title, xbins=len(xlabels), ybins=3,
268 xlabels=xlabels,ylabels=ylabels,
269 xmin=0, xmax=len(xlabels),
270 ymin=0, ymax=len(ylabels))
272 for cable
in range(4):
273 topoName =
'Topo1Opt'+
str(cable)
275 labels = [x
for x
in labels
if x]
276 for i,label
in enumerate(labels):
277 name = f
'Topo1Opt{cable}_{i}_Sim,Topo1Opt{cable}_{i}_Hdw;Topo1Opt{cable}_{label}'
278 title = f
'Topo1Opt{cable}_{label};Simulation Counts;Hardware Counts'
279 alg.MonTool.defineHistogram(name, path=
'EXPERT', type=
'TH2F',
280 title=title,xbins=10,ybins=10,
284 alg.MonTool.defineHistogram(
'TopoSim', path=
'EXPERT', type=
'TH1I',
285 title=
'Simulation Results for L1Topo', xbins=128, xlabels=label_topo_all,
287 alg.MonTool.defineHistogram(
'TopoSim_overflows', path=
'EXPERT', type=
'TH1I',
288 title=
'Overflow Simulation Results for L1Topo', xbins=128, xlabels=label_topo_all,
290 alg.MonTool.defineHistogram(
'TopoSim_ambiguity', path=
'EXPERT', type=
'TH1I',
291 title=
'Ambiguity Results for L1Topo', xbins=128, xlabels=label_topo_all,
295 alg.MonTool.defineHistogram(
'TopoCTP', path=
'EXPERT', type=
'TH1I',
296 title=
'CTP Results for L1Topo', xbins=128, xlabels=label_topo_all,
300 alg.MonTool.defineHistogram(
'SimNotHdwL1TopoResult', path=
'EXPERT', type=
'TH1I',
301 title=
'L1Topo events with simulation accept and hardware fail',
302 xbins=128, xlabels=label_topo_all,
304 alg.MonTool.defineHistogram(
'HdwNotSimL1TopoResult', path=
'EXPERT', type=
'TH1I',
305 title=
'L1Topo events with hardware accept and simulation fail',
306 xbins=128, xlabels=label_topo_all,
308 alg.MonTool.defineHistogram(
'Ambiguity_SimANDHdwDecisions', path=
'EXPERT', type=
'TH1I',
309 title=
'L1Topo ambiguity events with simulation accept and hardware accept',
310 xbins=128, xlabels=label_topo_all,
312 alg.MonTool.defineHistogram(
'Ambiguity_DecisionMismatches', path=
'EXPERT', type=
'TH1I',
313 title=
'L1Topo ambiguity events with mismatches between simulation and hardware',
314 xbins=128, xlabels=label_topo_all,
318 ylabels = [
'#frac{HdwNotSim}{Hdw}',
'#frac{SimNotHdw}{Sim}',
'#frac{HdwAndSim}{HdwOrSim}',
'#frac{Hdw}{Sim}']
319 for topo
in [(0,
'2a'),(1,
'2b'),(2,
'3a'),(3,
'3b')]:
320 name = f
'Phase1TopoTrigger_{topo[0]},Phase1TopoMissMatch_{topo[0]};Ph1Topo{topo[1]}'
321 title = f
'Phase1 Topo{topo[1]} Miss/Matches Summary'
322 alg.MonTool.defineHistogram(name, path=
'EXPERT', type=
'TH2F',
323 title=title,xbins=32,ybins=4,
324 weight=f
'Phase1TopoWeight_{topo[0]}',
325 xlabels=label_topo_all[topo[0]*32:(topo[0]+1)*32],
328 ymin=0, ymax=len(ylabels))
329 ylabelsOF = [
'#frac{HdwOFnotSimOF}{HdwOF}',
'#frac{SimOFnotHdwOF}{SimOF}',
'#frac{HdwOFandSimOF}{HdwOForSimOF}',
'#frac{HdwOF}{SimOF}']
330 for topo
in [(0,
'2a'),(1,
'2b'),(2,
'3a'),(3,
'3b')]:
331 name_OF = f
'Phase1TopoTrigger_{topo[0]},Phase1TopoMissMatch_{topo[0]};Ph1Topo{topo[1]}_overflows'
332 title_OF = f
'Phase1 Topo{topo[1]} Overflow Miss/Matches Summary'
333 alg.MonTool.defineHistogram(name_OF, path=
'EXPERT', type=
'TH2F',
334 title=title_OF,xbins=32,ybins=4,
335 weight=f
'Phase1TopoOFWeight_{topo[0]}',
336 xlabels=label_topo_all[topo[0]*32:(topo[0]+1)*32],
339 ymin=0, ymax=len(ylabelsOF))
342 alg.MonTool.defineHistogram(
'HdwResults', path=
'EXPERT', type=
'TH1I',
343 title=
'Hardware Results for L1Topo', xbins=128, xlabels=label_topo_all,
345 alg.MonTool.defineHistogram(
'OverflowResults', path=
'EXPERT', type=
'TH1I',
346 title=
'Overflow Results for L1Topo', xbins=128, xlabels=label_topo_all,
348 rod_errors_labels = [
"CT",
"pc",
"hc",
"pe",
"lm",
"hm",
"pt"]
349 alg.MonTool.defineHistogram(
'ROD_Errors', path=
'EXPERT', type=
'TH1I',
350 title=
'Counts of ROD errors', xbins=len(rod_errors_labels), xlabels=rod_errors_labels,
351 xmin=0, xmax=len(rod_errors_labels))
352 fpga_errors_labels = [
"CT",
"sm",
"pe",
"lm",
"hm",
"pt"]
353 fpga_indexes = [
"topo1fpga1",
"topo1fpga0",
"topo2fpga1",
"topo2fpga0",
"topo3fpga1",
"topo3fpga0"]
354 alg.MonTool.defineHistogram(
'FPGA_Errors, FPGA_Labels; FPGA_Errors', path=
'EXPERT', type=
'TH2I',
355 title=
'Counts of FPGA errors',xbins=len(fpga_errors_labels),ybins=len(fpga_indexes),
356 xlabels=fpga_errors_labels,
357 ylabels=fpga_indexes,
358 xmin=0, xmax=len(fpga_errors_labels),
359 ymin=0, ymax=len(fpga_indexes))
362 mon_failure_labels = [
'doHwMon',
'doSimMon',
'doHwMonCTP',
'doComp',
'doMultComp']
363 alg.MonTool.defineHistogram(
'MonitoringFailures', path=
'EXPERT', type=
'TH1F',
364 title=
'Counts of mon functions returning failure;;Entries',
365 xlabels=mon_failure_labels, xbins=len(mon_failure_labels),
366 xmin=0, xmax=len(mon_failure_labels))