8def L1MuonBSConverterMonitoringCfg(flags, name, encoder=False):
9 acc = ComponentAccumulator()
11 tool.HistPath = f'HLTFramework/L1BSConverters/{name}'
12 tool.defineHistogram('NumWordsInROD', path='EXPERT', type='TH1F',
13 title='Size of the MUCTPI ROD payload;N words;N events',
14 xbins=100, xmin=0, xmax=100)
15 tool.defineHistogram('WordType,WordTypeCount;WordTypeCounts', path='EXPERT', type='TH2F',
16 title='Counts of each word type in MUCTPI ROD payload;;Count per event',
17 xbins=6, xmin=0, xmax=6,
18 ybins=150, ymin=0, ymax=150,
19 xlabels=['Undefined', 'Timeslice', 'Multiplicity', 'Candidate', 'Topo', 'Status'])
20 tool.defineHistogram('BCIDOffsetsWrtROB', path='EXPERT', type='TH1F',
21 title='BCID difference between timeslice header and ROB header;BCID difference;N time slices',
22 xbins=201, xmin=-100.5, xmax=100.5)
23 tool.defineHistogram('SubsysID', path='EXPERT', type='TH1F',
24 title='RoI candidate subsys ID;;N RoIs',
25 xbins=4, xmin=0, xmax=4,
26 xlabels=['Undefined','Barrel', 'Forward', 'Endcap'])
27 if flags.Trigger.L1.doMuonTopoInputs:
28 tool.defineHistogram('topoSubsysID', path='EXPERT', type='TH1F',
29 title='Topo TOB subsys ID;;N RoIs',
30 xbins=4, xmin=0, xmax=4,
31 xlabels=['Undefined','Barrel', 'Forward', 'Endcap'])
32
33
34 if not encoder:
35 tool.defineHistogram('BCOffset,NumOutputRoIs;NumOutputRoIs', path='EXPERT', type='TH2F',
36 title='Number of output xAOD::MuonRoI objects in each time slice per event;Time slice;N RoIs',
37 xbins=5, xmin=-2, xmax=3,
38 xlabels=[str(n) for n in range(-2,3)],
39 ybins=100, ymin=0, ymax=100)
40 tool.defineHistogram('DataStatusWordErrors', path='EXPERT', type='TH1F',
41 title='Error bits set in data status word;Bit number;N errors',
42 xbins=16, xmin=0, xmax=16)
43 if flags.Trigger.L1.doMuonTopoInputs:
44 tool.defineHistogram('BCOffset,NumOutputTopoTOBs;NumOutputTopoTOBs', path='EXPERT', type='TH2F',
45 title='Number of output LVL1::MuCTPIL1TopoCandidate objects in each time slice per event;Time slice;N TOBs',
46 xbins=5, xmin=-2, xmax=3,
47 xlabels=[str(n) for n in range(-2,3)],
48 ybins=100, ymin=0, ymax=100)
49 tool.defineHistogram('BCOffset,NumOutputDiffRoITopo;NumOutputDiffRoITopo', path='EXPERT', type='TProfile',
50 title='Average difference between the number of output RoIs and Topo TOBs;Time slice;N RoIs - N TOBs',
51 xbins=5, xmin=-2, xmax=3,
52 xlabels=[str(n) for n in range(-2,3)])
53
54 for subsysName in ['Barrel', 'Forward', 'Endcap']:
55 tool.defineHistogram(f'roiEta_{subsysName}', path='EXPERT', type='TH1F',
56 title=f'Eta of output RoIs in the {subsysName} subsystem;eta;N RoIs',
57 xbins=60, xmin=-3, xmax=3)
58 tool.defineHistogram(f'roiPhi_{subsysName}', path='EXPERT', type='TH1F',
59 title=f'Phi of output RoIs in the {subsysName} subsystem;phi;N RoIs',
60 xbins=64, xmin=-3.2, xmax=3.2)
61 if flags.Trigger.L1.doMuonTopoInputs:
62 tool.defineHistogram(f'topoEta_{subsysName}', path='EXPERT', type='TH1F',
63 title=f'Eta of output Topo TOBs in the {subsysName} subsystem;eta;N TOBs',
64 xbins=60, xmin=-3, xmax=3)
65 tool.defineHistogram(f'topoPhi_{subsysName}', path='EXPERT', type='TH1F',
66 title=f'Phi of output Topo TOBs in the {subsysName} subsystem;phi;N TOBs',
67 xbins=64, xmin=-3.2, xmax=3.2)
68 tool.defineHistogram(f'topoPtThreshold_{subsysName}', path='EXPERT', type='TH1F',
69 title=f'pT threshold [GeV] of output Topo TOBs in the {subsysName} subsystem;pT threshold [GeV];N TOBs',
70 xbins=50, xmin=0, xmax=50)
71
72 acc.setPrivateTools(tool)
73 return acc
74