4def L1CaloCTPMonitoringConfig(flags):
5 '''Function to configure LVL1 L1CaloCTP algorithm in the monitoring system.'''
6
7
8
9 from AthenaConfiguration.ComponentFactory import CompFactory
10 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
11 result = ComponentAccumulator()
12
13
14
15
16
17
18 from AthenaMonitoring import AthMonitorCfgHelper
19 helper = AthMonitorCfgHelper(flags,'L1CaloCTPMonitoringCfg')
20
21
22 L1CaloCTPMonAlg = helper.addAlgorithm(CompFactory.L1CaloCTPMonitorAlgorithm,'L1CaloCTPMonAlg')
23
24
25 groupName = 'L1CaloCTPMonitor'
26 L1CaloCTPMonAlg.PackageName = groupName
27
28 mainDir = 'LVL1_Interfaces'
29 trigPath = 'CTP/'
30
31
32 myGroup = helper.addGroup(L1CaloCTPMonAlg, groupName , mainDir)
33
34 multiplicity_labels = ['EM1', 'EM2', 'Tau1', 'Tau2', 'Jet1 (3-bit)', 'Jet2 (2-bit)', 'TE (full eta)', 'XE (full eta)', 'XS', 'TE (restr. eta)', 'XE (restr. eta)']
35
36
37 myGroup.defineHistogram('run',title='Run Number;run;Events',
38 path=trigPath,xbins=1000000,xmin=-0.5,xmax=999999.5)
39
40 myGroup.defineHistogram('ctp_1d_L1CaloNeCTPSummary;h_ctp_1d_L1CaloNeCTPSummary', title='L1Calo Ne CTP',
41 type='TH1F', path=trigPath, xlabels=multiplicity_labels, xbins=len(multiplicity_labels),xmin=0,xmax=len(multiplicity_labels))
42
43 myGroup.defineHistogram('ctp_1d_L1CaloEqCTPSummary;h_ctp_1d_L1CaloEqCTPSummary', title='L1Calo Eq CTP',
44 type='TH1F', path=trigPath, xlabels=multiplicity_labels, xbins=len(multiplicity_labels),xmin=0,xmax=len(multiplicity_labels))
45
46 myGroup.defineHistogram('ctp_1d_TIPMatches;h_ctp_1d_TIPMatches', title='TIP Matches',
47 type='TH1F', path=trigPath, xbins=512,xmin=0.0,xmax=512.0)
48
49 myGroup.defineHistogram('ctp_1d_HitNoTIPMismatch;h_ctp_1d_HitNoTIPMismatch', title='Hit No TIP Mismatches',
50 type='TH1F', path=trigPath, xbins=512,xmin=0.0,xmax=512.0)
51
52 myGroup.defineHistogram('ctp_1d_TIPNoHitMismatch;h_ctp_1d_TIPNoHitMismatch', title='TIP No Hit Mismatches',
53 type='TH1F', path=trigPath, xbins=512,xmin=0.0,xmax=512.0)
54
55
56 acc = helper.result()
57 result.merge(acc)
58 return result
59
60