17 from AthenaMonitoring
import AthMonitorCfgHelper
18 monConfig = AthMonitorCfgHelper(configFlags,
'HLTMBTSMonitoringAlgMTflags')
20 from AthenaConfiguration.ComponentFactory
import CompFactory
21 alg = monConfig.addAlgorithm(
22 CompFactory.HLTMBTSMonitoringAlgMT,
'HLTMBTSMonitoringAlgMT')
27 log.info(f
'Monitoring {len(mbts_chains)} MBTS chains')
28 log.debug([name
for name, _
in mbts_chains])
30 alg.triggerList = [name
for name, _
in mbts_chains]
31 channelLabels = [f
'A{i:0>2d}' for i
in range(16)]
32 channelLabels += [f
'C{i:0>2d}' for i
in range(16)]
34 length = len(alg.triggerList)
38 mbtsGroup = monConfig.addGroup(alg,
'MBTSall', topPath=
'HLT/MBTSMon/')
39 mbtsGroup.defineHistogram(
'TrigCounts', title=
'Trigger counts;;Event rate',
40 xbins=length, xmin=0, xmax=length, xlabels=
list(alg.triggerList))
42 for chain, level
in mbts_chains:
44 mbShiftGroup = monConfig.addGroup(alg, chain+
'_shifter', topPath=f
'HLT/MBTSMon/{level}/{chain}/')
46 mbShiftGroup.defineHistogram(
'MBTS_A_hits', type=
'TH1I', title=
'MBTS hits side A; Entry rate; MBTS side A',
47 xbins=MBTS_countsSideA+1, xmin=-0.5, xmax=MBTS_countsSideA+0.5)
48 mbShiftGroup.defineHistogram(
'MBTS_C_hits', type=
'TH1I', title=
'MBTS hits side C; Entry rate; MBTS side C',
49 xbins=MBTS_countsSideC+1, xmin=-0.5, xmax=MBTS_countsSideC+0.5)
50 mbShiftGroup.defineHistogram(
'MBTS_A_EWTime,MBTS_C_EWTime', type=
'TH2I', title=
'MBTS timing correlation; MBTS side A; MBTS side C',
51 xbins=40, xmin=-80, xmax=80, ybins=40, ymin=-80, ymax=80)
52 mbShiftGroup.defineHistogram(
'MBTS_A_hits,MBTS_C_hits', type=
'TH2I', title=
'MBTS hits correlation; MBTS side A; MBTS side C',
53 xbins=MBTS_countsSideA+1, xmin=-0.5, xmax=MBTS_countsSideA+0.5, ybins=MBTS_countsSideC+1, ymin=-0.5, ymax=MBTS_countsSideC+0.5)
55 mbShiftGroup.defineHistogram(
56 'MBTS_time', type=
'TH1F', title=
'MBTS time in all pads; MBTS time [ns]', xbins=100, xmin=-100, xmax=100)
57 mbShiftGroup.defineHistogram(
58 'MBTS_energy', type=
'TH1F', title=
'MBTS energy in all pads; MBTS energy [pC]', xbins=100, xmin=0.1, xmax=9.9)
59 mbShiftGroup.defineHistogram(
'MBTS_channelID;MBTS_counts_per_channel', type=
'TH1F', title=
'Counts per MBTS Channel ID; Channel ID; Count',
60 xbins=MBTS_countsSideA+MBTS_countsSideC, xmin=0, xmax=MBTS_countsSideA+MBTS_countsSideC, xlabels=
list(channelLabels))
61 mbShiftGroup.defineHistogram(
'MBTS_channelID,MBTS_time', type=
'TH2F', title=
'MBTS time; Channel ID;MBTS time [ns]; Entry rate',
62 xbins=MBTS_countsSideA+MBTS_countsSideC, xmin=0, xmax=MBTS_countsSideA+MBTS_countsSideC, xlabels=
list(channelLabels), ybins=100, ymin=-100, ymax=100)
63 mbShiftGroup.defineHistogram(
'MBTS_channelID,MBTS_time;MBTS_time_zoom_vs_MBTS_channel_ID', type=
'TH2F', title=
'MBTS time zoom; Channel ID;MBTS time [ns]; Entry rate',
64 xbins=MBTS_countsSideA+MBTS_countsSideC, xmin=0, xmax=MBTS_countsSideA+MBTS_countsSideC, xlabels=
list(channelLabels), ybins=100, ymin=-50, ymax=50)
65 mbShiftGroup.defineHistogram(
'MBTS_channelID,MBTS_energy', type=
'TH2F', title=
'MBTS energy; Channel ID;MBTS energy [pC]; Entry rate',
66 xbins=MBTS_countsSideA+MBTS_countsSideC, xmin=0, xmax=MBTS_countsSideA+MBTS_countsSideC, xlabels=
list(channelLabels), ybins=100, ymin=-0.1, ymax=1.9)
68 mbShiftGroup.defineHistogram(
'MBTS_diff_timeMean', type=
'TH1F', title=
'Mean MBTS time difference between sides; MBTS time [ns]',
69 xbins=100, xmin=-100, xmax=100)
70 mbShiftGroup.defineHistogram(
'MBTS_diff_weightedTimeMean', type=
'TH1F', title=
'Energy weighted mean MBTS time difference between sides; MBTS time [ns]',
71 xbins=100, xmin=-100, xmax=100)
73 mbExpGroup = monConfig.addGroup(alg, chain+
'_expert',
74 topPath=
'HLT/MBTSMon/'+chain+
'/')
75 mbExpGroup.defineHistogram(
76 'MBTShits', type=
'TH2F', title=
'MBTS total hits;# of Hits;Entry Rate', xbins=24, xmin=0, xmax=100)
78 mbExpGroup.defineHistogram(
'MBTS_A_meanEnergy', type=
'TH1F',
79 title=
'Mean MBTS Energy A side passed;MBTS Energy [pC];Entry Rate', xbins=100, xmin=-0.1, xmax=9.9)
80 mbExpGroup.defineHistogram(
'MBTS_C_meanEnergy', type=
'TH1F',
81 title=
'Mean MBTS Energy C side passed;MBTS Energy [pC];Entry Rate', xbins=100, xmin=-0.1, xmax=9.9)
83 mbExpGroup.defineHistogram(
'MBTS_A_meanTime', type=
'TH1F',
84 title=
'Mean MBTS Time A side; MBTS time [ns]', xbins=100, xmin=-100, xmax=100)
85 mbExpGroup.defineHistogram(
'MBTS_C_meanTime', type=
'TH1F',
86 title=
'Mean MBTS Time C side; MBTS time [ns]', xbins=100, xmin=-100, xmax=100)
88 return monConfig.result()