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=11
62  globalStatus_xlabels = [
63  "All",
64  "unsuitable readout",
65  "HLT_mistimemonj400",
66  "L1_Trigger",
67  "<= 4 bad peak TT",
68  "<= 4 bad central TT",
69  "<= 4 bad late TT",
70  ">= 2 late TT",
71  "<= 3 in-time",
72  ">= 1 significant TT in EM layer",
73  "spatial overlap"
74  ]
75 
76 
77  NumberofEvents = MistimedMonAlg.MaxEvents
78 
79  # add monitoring algorithm to group, with group name and main directory
80  myGroup = helper.addGroup(MistimedMonAlg, groupName , mainDir)
81 
82 
83 
84  myGroup.defineHistogram('cutFlowX;1d_cutFlow_mistimedStreamAna',title='Total events selected by the MistimedStream analysis for this run',
85  type='TH1F',
86  path=trigPath,
87  xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,xlabels=globalStatus_xlabels,
88  opt='kAlwaysCreate')
89 
90  groupMapsEvents = helper.addGroup(MistimedMonAlg, 'Event_', mainDir)
91  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)
92  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)
93 
94  groupMapsEvents_all = helper.addGroup(MistimedMonAlg, 'Event_all_', mainDir)
95  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)
96  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)
97 
98  groupMapsEfexin = helper.addGroup(MistimedMonAlg, 'Efex_maxTOB_in', mainDir)
99  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)
100  groupMapsEfexin.defineHistogram('TOBTransverseEnergy;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)
101 
102  groupMapsEfexout = helper.addGroup(MistimedMonAlg, 'Efex_maxTOB_out', mainDir)
103  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)
104  groupMapsEfexout.defineHistogram('TOBTransverseEnergy;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)
105 
106  groupMapsJfex = helper.addGroup(MistimedMonAlg, 'Jfex_maxTOB', mainDir)
107  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)
108  groupMapsJfex.defineHistogram('jFexEt;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)
109 
110  groupMapsGfex = helper.addGroup(MistimedMonAlg, 'Gfex_maxTOB', mainDir)
111  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)
112  groupMapsGfex.defineHistogram('gFexEt;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)
113 
114  # add monitoring algorithm to group, with group name and main directory
115  histPath = trigPath+'/EventofInterest'
116 
117  for i in range(0, NumberofEvents):
118 
119  # LUT per BCN (Both EM & HAD together)
120  groupMapsEM = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_TT_EM', mainDir)
121  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)
122  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)
123 
124  groupMapsHAD = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_TT_HAD', mainDir)
125  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)
126  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)
127 
128  groupMapsEM0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM0', mainDir)
129  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)
130  groupMapsEM1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM1', mainDir)
131  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)
132  groupMapsEM2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_EM2', mainDir)
133  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)
134 
135  groupMapsHAD0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD0', mainDir)
136  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)
137  groupMapsHAD1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD1', mainDir)
138  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)
139  groupMapsHAD2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_lut_HAD2', mainDir)
140  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)
141 
142  groupMapsEfex0 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex0', mainDir)
143  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)
144  groupMapsEfex1 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex1', mainDir)
145  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)
146  groupMapsEfex2 = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_Efex2', mainDir)
147  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)
148 
149  groupMapsJfexEmulated = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexEmulated', mainDir)
150  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)
151 
152  groupMapsJfexSRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexSRJet', mainDir)
153  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)
154  groupMapsJfexTau = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_JfexTau', mainDir)
155  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)
156 
157  groupMapsgFexSRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_GfexSRJet', mainDir)
158  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)
159  groupMapsgFexLRJet = helper.addGroup(MistimedMonAlg, 'EventofInterest_'+str(i)+'_GfexLRJet', mainDir)
160  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)
161 
162  acc = helper.result()
163  result.merge(acc)
164  return result
165 
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:195
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