ATLAS Offline Software
Functions
MistimedStreamMonitorAlgorithm Namespace Reference

Functions

def MistimedStreamMonitorConfig (flags, Legacy, PhaseI)
 

Function Documentation

◆ MistimedStreamMonitorConfig()

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

Definition at line 6 of file MistimedStreamMonitorAlgorithm.py.

6 def MistimedStreamMonitorConfig(flags, Legacy, PhaseI):
7  '''Function to configure LVL1 Mistimed Stream algorithm in the monitoring system.'''
8  import math
9 
10  # get the component factory - used for getting the algorithms
11  from AthenaConfiguration.ComponentFactory import CompFactory
12  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
13  result = ComponentAccumulator()
14 
15  # make the athena monitoring helper
16  from AthenaMonitoring import AthMonitorCfgHelper
17  helper = AthMonitorCfgHelper(flags,'MistimedStreamMonitorCfg')
18 
19  # get any algorithms
20  MistimedMonAlg = helper.addAlgorithm(CompFactory.MistimedStreamMonitorAlgorithm,'MistimedStreamMonitorAlg')
21  if (Legacy):
22  MistimedMonAlg.UseLegacy = True
23  if (PhaseI):
24  MistimedMonAlg.UsePhase1 = True
25 
26  # import tools
27  from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
28  helper.result().merge(DetDescrCnvSvcCfg(flags))
29 
30  from TrigT1CaloCondSvc.L1CaloCondConfig import L1CaloCondAlgCfg
31  helper.result().merge(L1CaloCondAlgCfg(flags,Physics=True, Calib1=False, Calib2=False))
32 
33  from TrigConfxAOD.TrigConfxAODConfig import getxAODConfigSvc
34  helper.result().getPrimaryAndMerge(getxAODConfigSvc(flags))
35 
36  # add any steering
37  groupName = 'MistimedStreamMonitor' # the monitoring group name is also used for the package name
38  MistimedMonAlg.PackageName = groupName
39 
40  # Histogram paths
41  mainDir = 'L1Calo'
42  trigPath = 'MistimedStream'
43 
44  # Trigger tower plots: eta-phi granularity
45  etabins = [-4.9,-4.475,-4.050,-3.625,-3.2,-3.1,-2.9,
46  -2.7,-2.5,-2.4,-2.3,-2.2,-2.1,-2.0,-1.9,
47  -1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,
48  -1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,
49  -0.2,-0.1,0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,
50  0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,
51  1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5,2.7,2.9,
52  3.1,3.2,3.625,4.050,4.475,4.9]
53 
54 
55 
56 
57  phibins = 64
58  phimin = 0
59 
60 
61  NumberOfGlobalErrors=7
62  globalStatus_xlabels = [
63  "All",
64  "unsuitable readout",
65  "HLT_mistimemonj400",
66  "L1_Trigger",
67  ">= 2 late TT",
68  "<= 3 in-time",
69  "spatial overlap"
70  ]
71 
72 
73  NumberofEvents = MistimedMonAlg.MaxEvents
74 
75  # add monitoring algorithm to group, with group name and main directory
76  myGroup = helper.addGroup(MistimedMonAlg, groupName , mainDir)
77 
78 
79 
80  myGroup.defineHistogram('cutFlowX;1d_cutFlow_mistimedStreamAna',title='Total events selected by the MistimedStream analysis for this run',
81  type='TH1F',
82  path=trigPath,
83  xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,xlabels=globalStatus_xlabels,
84  opt='kAlwaysCreate')
85 
86  groupMapsEvents = helper.addGroup(MistimedMonAlg, 'Event_', mainDir)
87  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)
88  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)
89 
90  groupMapsEvents_all = helper.addGroup(MistimedMonAlg, 'Event_all_', mainDir)
91  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)
92  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)
93 
94  groupMapsEfexin = helper.addGroup(MistimedMonAlg, 'Efex_maxTOB_in', mainDir)
95  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)
96  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)
97 
98  groupMapsEfexout = helper.addGroup(MistimedMonAlg, 'Efex_maxTOB_out', mainDir)
99  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)
100  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)
101 
102  groupMapsJfex = helper.addGroup(MistimedMonAlg, 'Jfex_maxTOB', mainDir)
103  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)
104  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)
105 
106  groupMapsGfex = helper.addGroup(MistimedMonAlg, 'Gfex_maxTOB', mainDir)
107  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)
108  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)
109 
110  # add monitoring algorithm to group, with group name and main directory
111  histPath = trigPath+'/EventofInterest'
112 
113  for i in range(0, NumberofEvents):
114 
115  # LUT per BCN (Both EM & HAD together)
116  groupMapsEM = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_TT_EM', mainDir)
117  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)
118  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)
119 
120  groupMapsHAD = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_TT_HAD', mainDir)
121  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)
122  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)
123 
124  groupMapsEM0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM0', mainDir)
125  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)
126  groupMapsEM1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM1', mainDir)
127  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)
128  groupMapsEM2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM2', mainDir)
129  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)
130 
131  groupMapsHAD0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD0', mainDir)
132  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)
133  groupMapsHAD1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD1', mainDir)
134  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)
135  groupMapsHAD2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD2', mainDir)
136  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)
137 
138  groupMapsEfex0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex0', mainDir)
139  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)
140  groupMapsEfex1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex1', mainDir)
141  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)
142  groupMapsEfex2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex2', mainDir)
143  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)
144 
145  groupMapsJfexEmulated = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexEmulated', mainDir)
146  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)
147 
148  groupMapsJfexSRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexSRJet', mainDir)
149  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)
150  groupMapsJfexTau = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexTau', mainDir)
151  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)
152 
153  groupMapsgFexSRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_GfexSRJet', mainDir)
154  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)
155  groupMapsgFexLRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_GfexLRJet', mainDir)
156  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)
157 
158  acc = helper.result()
159  result.merge(acc)
160  return result
161 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrigConfxAODConfig.getxAODConfigSvc
def getxAODConfigSvc(flags)
Definition: TrigConfxAODConfig.py:5
python.DetDescrCnvSvcConfig.DetDescrCnvSvcCfg
def DetDescrCnvSvcCfg(flags, **kwargs)
Definition: DetDescrCnvSvcConfig.py:6
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
L1CaloCondConfig.L1CaloCondAlgCfg
def L1CaloCondAlgCfg(flags, readTest=False, Physics=True, Calib1=False, Calib2=False)
Definition: L1CaloCondConfig.py:6
MistimedStreamMonitorAlgorithm.MistimedStreamMonitorConfig
def MistimedStreamMonitorConfig(flags, Legacy, PhaseI)
Definition: MistimedStreamMonitorAlgorithm.py:6
str
Definition: BTagTrackIpAccessor.cxx:11
merge
Definition: merge.py:1