ATLAS Offline Software
Loading...
Searching...
No Matches
MistimedStreamMonitorAlgorithm Namespace Reference

Classes

struct  MonitorCPM
 Struct to contain CPM tower info. More...
struct  MonitorJE
 Struct to contain JE info. More...
struct  MonitorTT
 Struct to contain PPM trigger tower info. More...

Functions

 MistimedStreamMonitorConfig (flags, myflags)

Function Documentation

◆ MistimedStreamMonitorConfig()

MistimedStreamMonitorAlgorithm.MistimedStreamMonitorConfig ( flags,
myflags )
Function to configure LVL1 Mistimed Stream algorithm in the monitoring system.

Definition at line 5 of file MistimedStreamMonitorAlgorithm.py.

5def MistimedStreamMonitorConfig(flags, myflags):
6 '''Function to configure LVL1 Mistimed Stream algorithm in the monitoring system.'''
7 import math
8
9 # get the component factory - used for getting the algorithms
10 from AthenaConfiguration.ComponentFactory import CompFactory
11 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12 result = ComponentAccumulator()
13
14 # make the athena monitoring helper
15 from AthenaMonitoring import AthMonitorCfgHelper
16 helper = AthMonitorCfgHelper(flags,'MistimedStreamMonitorCfg')
17
18 # get any algorithms
19 MistimedMonAlg = helper.addAlgorithm(CompFactory.MistimedStreamMonitorAlgorithm,'MistimedStreamMonitorAlg')
20 if myflags.get("legacy") is True:
21 MistimedMonAlg.UseLegacy = True
22 if myflags.get("phaseI") is True:
23 MistimedMonAlg.UsePhase1 = True
24
25 MistimedMonAlg.IsIons = myflags.get("ions")
26
27 MistimedMonAlg.EfexTriggers = myflags.get("efex")
28 MistimedMonAlg.JfexTriggers = myflags.get("jfex")
29 MistimedMonAlg.GfexTriggers = myflags.get("gfex")
30
31 # import tools
32 from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
33 helper.result().merge(DetDescrCnvSvcCfg(flags))
34
35 from TrigT1CaloCondSvc.L1CaloCondConfig import L1CaloCondAlgCfg
36 helper.result().merge(L1CaloCondAlgCfg(flags,Physics=True, Calib1=False, Calib2=False))
37
38 from TrigConfxAOD.TrigConfxAODConfig import getxAODConfigSvc
39 helper.result().getPrimaryAndMerge(getxAODConfigSvc(flags))
40
41 # add any steering
42 groupName = 'MistimedStreamMonitor' # the monitoring group name is also used for the package name
43 MistimedMonAlg.PackageName = groupName
44
45 # Histogram paths
46 mainDir = 'L1Calo'
47 trigPath = 'MistimedStream'
48
49 # Trigger tower plots: eta-phi granularity
50 etabins = [-4.9,-4.475,-4.050,-3.625,-3.2,-3.1,-2.9,
51 -2.7,-2.5,-2.4,-2.3,-2.2,-2.1,-2.0,-1.9,
52 -1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,
53 -1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,
54 -0.2,-0.1,0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,
55 0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,
56 1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5,2.7,2.9,
57 3.1,3.2,3.625,4.050,4.475,4.9]
58
59
60
61
62 phibins = 64
63 phimin = 0
64
65
66 NumberOfGlobalErrors=8
67 globalStatus_xlabels = [
68 "All",
69 "unsuitable readout",
70 "HLT_mistimemonj400",
71 "L1_Trigger",
72 ">= 2 late TTs",
73 ">= 2 late eTOBs",
74 "<= 3 in-time",
75 "spatial overlap"
76 ]
77
78
79 NumberofEvents = MistimedMonAlg.MaxEvents
80
81 # add monitoring algorithm to group, with group name and main directory
82 myGroup = helper.addGroup(MistimedMonAlg, groupName , mainDir)
83
84
85
86 myGroup.defineHistogram('cutFlowX;1d_cutFlow_mistimedStreamAna',title='Total events selected by the MistimedStream analysis for this run',
87 type='TH1F',
88 path=trigPath,
89 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,xlabels=globalStatus_xlabels,
90 opt='kAlwaysCreate')
91
92 groupMapsEvents = helper.addGroup(MistimedMonAlg, 'Event_', mainDir)
93 groupMapsEvents.defineHistogram('eventMonitor_legacy,lbMonitor;1d_selectedEvents_mistimedStreamAna_legacy', title='Events of interest - Lumi Block;Events of interest;Lumi Block',type='TH2I', xbins=NumberofEvents, ybins=NumberofEvents, path=trigPath)
94 groupMapsEvents.defineHistogram('eventMonitor_phaseI,lbMonitor;1d_selectedEvents_mistimedStreamAna_phaseI', title='Events of interest - Lumi Block;Events of interest;Lumi Block',type='TH2I', xbins=NumberofEvents, ybins=NumberofEvents, path=trigPath)
95
96 groupMapsEvents_all = helper.addGroup(MistimedMonAlg, 'Event_all_', mainDir)
97 groupMapsEvents_all.defineHistogram('eventMonitor_all_legacy,lbMonitor_all;1d_selectedEvents_mistimedStreamAna_notSaved_legacy', title='Events of interest - Lumi Block (not saved);Events of interest;Lumi Block',type='TH2I', path=trigPath)
98 groupMapsEvents_all.defineHistogram('eventMonitor_all_phaseI,lbMonitor_all;1d_selectedEvents_mistimedStreamAna_notSaved_phaseI', title='Events of interest - Lumi Block (not saved);Events of interest;Lumi Block',type='TH2I', path=trigPath)
99
100 groupMapsEfexin = helper.addGroup(MistimedMonAlg, 'Efex_maxTOB_in', mainDir)
101 groupMapsEfexin.defineHistogram('TOBEta_max, TOBPhi_max;Efex_2d_etaPhi_in_mistimedStreamAna', title='#eta - #phi Map of max Efex TOBs (in-time) ;#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TH2D', path=trigPath)
102 groupMapsEfexin.defineHistogram('TOBTransverseEnergy_max;Efex_TOBenergy_in_mistimedStreamAna', title='Energy of Efex TOBs (in-time);TOB E_T [GeV];Entries', xbins=90,xmin=0.0,xmax=450.0, type='TH1D', path=trigPath)
103
104 groupMapsEfexout = helper.addGroup(MistimedMonAlg, 'Efex_maxTOB_out', mainDir)
105 groupMapsEfexout.defineHistogram('TOBEta_max, TOBPhi_max;Efex_2d_etaPhi_out_mistimedStreamAna', title='#eta - #phi Map of max Efex TOBs (out-of-time) ;#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TH2D', path=trigPath)
106 groupMapsEfexout.defineHistogram('TOBTransverseEnergy_max;Efex_TOBenergy_out_mistimedStreamAna', title='Energy of Efex TOBs (out-of-time);TOB E_T [GeV];Entries', xbins=90,xmin=0.0,xmax=450.0, type='TH1D', path=trigPath)
107
108 groupMapsJfex = helper.addGroup(MistimedMonAlg, 'Jfex_maxTOB', mainDir)
109 groupMapsJfex.defineHistogram('TOBEta_max, TOBPhi_max;Jfex_2d_etaPhi_mistimedStreamAna', title='#eta - #phi Map of max Jfex TOBs;#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TH2D', path=trigPath)
110 groupMapsJfex.defineHistogram('TOBTransverseEnergy_max;Jfex_TOBenergy_mistimedStreamAna', title='Energy of Jfex TOBs;TOB E_T [GeV];Entries', xbins=90,xmin=0.0,xmax=450.0, type='TH1D', path=trigPath)
111
112 groupMapsGfex = helper.addGroup(MistimedMonAlg, 'Gfex_maxTOB', mainDir)
113 groupMapsGfex.defineHistogram('TOBEta_max, TOBPhi_max;Gfex_2d_etaPhi_mistimedStreamAna', title='#eta - #phi Map of max Gfex TOBs;#eta;#phi' , xbins=50,xmin=-5.0,xmax=5.0,ybins=32,ymin=0.,ymax=2*math.pi, type='TH2D', path=trigPath)
114 groupMapsGfex.defineHistogram('TOBTransverseEnergy_max;Gfex_TOBenergy_mistimedStreamAna', title='Energy of Gfex TOBs;TOB E_T [GeV];Entries', xbins=90,xmin=0.0,xmax=450.0, type='TH1D', path=trigPath)
115
116 # add monitoring algorithm to group, with group name and main directory
117 histPath = trigPath+'/EventofInterest'
118
119 for i in range(0, NumberofEvents):
120
121 # LUT per BCN (Both EM & HAD together)
122 groupMapsEM = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_TT_EM', mainDir)
123 groupMapsEM.defineHistogram('etaTT_2D,phiTT_2D,pulseCat;EventofInterest_'+str(i)+'_em_2d_etaPhi_tt_classification_mistimedStreamAna', title='#eta - #phi Map of TT classification, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
124 groupMapsEM.defineHistogram('etaTT_2D,phiTT_2D,bcidWord;EventofInterest_'+str(i)+'_em_2d_etaPhi_tt_pseBits_mistimedStreamAna', title='#eta - #phi Map of TT PSE Bits, EM layer: event of interest no. '+str(i)+';#eta;#phi', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins,type='TProfile2D', path=histPath)
125
126 groupMapsHAD = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_TT_HAD', mainDir)
127 groupMapsHAD.defineHistogram('etaTT_2D,phiTT_2D,pulseCat;EventofInterest_'+str(i)+'_had_2d_etaPhi_tt_classification_mistimedStreamAna', title='#eta - #phi Map of TT classification, HAD layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
128 groupMapsHAD.defineHistogram('etaTT_2D,phiTT_2D,bcidWord;EventofInterest_'+str(i)+'_had_2d_etaPhi_tt_pseBits_mistimedStreamAna', title='#eta - #phi Map of TT PSE Bits, HAD layer: event of interest no. '+str(i)+';#eta;#phi', xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
129
130 groupMapsEM0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM0', mainDir)
131 groupMapsEM0.defineHistogram('etalut,philut,emLUT0;EventofInterest_'+str(i)+'_em_2d_etaPhi_tt_lut0_mistimedStreamAna', title='#eta - #phi Map of TT LUT in timeslice 0 = BCID-1, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
132 groupMapsEM1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM1', mainDir)
133 groupMapsEM1.defineHistogram('etalut,philut,emLUT1;EventofInterest_'+str(i)+'_em_2d_etaPhi_tt_lut1_mistimedStreamAna', title='#eta - #phi Map of TT LUT in timeslice 1 = BCID, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
134 groupMapsEM2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM2', mainDir)
135 groupMapsEM2.defineHistogram('etalut,philut,emLUT2;EventofInterest_'+str(i)+'_em_2d_etaPhi_tt_lut2_mistimedStreamAna', title='#eta - #phi Map of TT LUT in timeslice 2 = BCID+1, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
136
137 groupMapsHAD0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD0', mainDir)
138 groupMapsHAD0.defineHistogram('etalut,philut,hadLUT0;EventofInterest_'+str(i)+'_had_2d_etaPhi_tt_lut0_mistimedStreamAna', title='#eta - #phi Map of TT LUT in timeslice 0 = BCID-1, HAD layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
139 groupMapsHAD1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD1', mainDir)
140 groupMapsHAD1.defineHistogram('etalut,philut,hadLUT1;EventofInterest_'+str(i)+'_had_2d_etaPhi_tt_lut1_mistimedStreamAna', title='#eta - #phi Map of TT LUT in timeslice 1 = BCID, HAD layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
141 groupMapsHAD2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD2', mainDir)
142 groupMapsHAD2.defineHistogram('etalut,philut,hadLUT2;EventofInterest_'+str(i)+'_had_2d_etaPhi_tt_lut2_mistimedStreamAna', title='#eta - #phi Map of TT LUT in timeslice 2 = BCID+1, HAD layer: eventof interest no. '+str(i)+';#eta;#phi' , xbins=etabins, ybins=phibins, ymin=phimin, ymax=phibins, type='TProfile2D', path=histPath)
143
144 groupMapsEfex0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex0', mainDir)
145 groupMapsEfex0.defineHistogram('TOBEta, TOBPhi, TOBTransverseEnergy;EventofInterest_'+str(i)+'_Efex0_2d_etaPhi_out_mistimedStreamAna', title='#eta - #phi Map of Efex TT in timeslice 0 = BCID-1, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
146 groupMapsEfex1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex1', mainDir)
147 groupMapsEfex1.defineHistogram('TOBEta, TOBPhi, TOBTransverseEnergy;EventofInterest_'+str(i)+'_Efex1_2d_etaPhi_mistimedStreamAna', title='#eta - #phi Map of Efex TT in timeslice 1 = BCID, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
148 groupMapsEfex2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex2', mainDir)
149 groupMapsEfex2.defineHistogram('TOBEta, TOBPhi, TOBTransverseEnergy;EventofInterest_'+str(i)+'_Efex2_2d_etaPhi_out_mistimedStreamAna', title='#eta - #phi Map of Efex TT in timeslice 2 = BCID+1, EM layer: event of interest no. '+str(i)+';#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
150
151 groupMapsJfexEmulated = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexEmulated', mainDir)
152 groupMapsJfexEmulated.defineHistogram('jFexEta, jFexPhi, jFexEt;EventofInterest_'+str(i)+'_Jfex_2d_etaPhi_emulatedTowers_mistimedStreamAna', title='#eta - #phi Map of Jfex Emulated Towers in time, events of interest no. '+str(i)+';#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
153
154 groupMapsJfexSRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexSRJet', mainDir)
155 groupMapsJfexSRJet.defineHistogram('jFexEta, jFexPhi, jFexEt;EventofInterest_'+str(i)+'_Jfex_2d_etaPhi_SRJet_mistimedStreamAna', title='#eta - #phi Map of Jfex SRJets in time, events of interest no. '+str(i)+';#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
156 groupMapsJfexTau = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexTau', mainDir)
157 groupMapsJfexTau.defineHistogram('jFexEta, jFexPhi, jFexEt;EventofInterest_'+str(i)+'_Jfex_2d_etaPhi_Tau_mistimedStreamAna', title='#eta - #phi Map of Jfex Tau in time, event of interest no. '+str(i)+';#eta;#phi' , xbins=100,xmin=-5.0,xmax=5.0,ybins=64,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
158
159 groupMapsgFexSRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_GfexSRJet', mainDir)
160 groupMapsgFexSRJet.defineHistogram('gFexEta, gFexPhi, gFexEt;EventofInterest_'+str(i)+'_Gfex_2d_etaPhi_SRJet_mistimedStreamAna', title='#eta - #phi Map of Gfex Jets in time, events of interest no. '+str(i)+';#eta;#phi' , xbins=50,xmin=-5.0,xmax=5.0,ybins=32,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
161 groupMapsgFexLRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_GfexLRJet', mainDir)
162 groupMapsgFexLRJet.defineHistogram('gFexEta, gFexPhi, gFexEt;EventofInterest_'+str(i)+'_Gfex_2d_etaPhi_LRJet_mistimedStreamAna', title='#eta - #phi Map of Gfex Jets in time, events of interest no. '+str(i)+';#eta;#phi' , xbins=50,xmin=-5.0,xmax=5.0,ybins=32,ymin=0.,ymax=2*math.pi, type='TProfile2D', path=histPath)
163
164 acc = helper.result()
165 result.merge(acc)
166 return result
167
Definition merge.py:1