38 '''Function to configures some algorithms in the monitoring system.'''
40 from AthenaCommon.Logging
import logging
41 log = logging.getLogger(
'TrigTLAMonitorAlgorithm.py' )
52 from AthenaMonitoring
import AthMonitorCfgHelper
53 helper = AthMonitorCfgHelper(inputFlags,
'TrigTLAAthMonitorCfg')
58 from AthenaConfiguration.ComponentFactory
import CompFactory
59 trigTLAMonAlg = helper.addAlgorithm(CompFactory.TrigTLAMonitorAlgorithm,
'TrigTLAMonAlg')
66 trigTLAMonAlg.TriggerChain =
''
67 trigTLAMonAlg.TriggerDecisionTool = tdt
74 TLAMonGroup = helper.addGroup(trigTLAMonAlg,
'TrigTLAMonitor',
'HLT/TLAMon/')
77 from TrigTLAMonitoring.TrigTLAMonitorHistograms
import (
78 histdefs_eventinfo, histdefs_particle, histdefs_tracks, histdefs_dR, histdefs_jetcalibscales, histdefs_jetvariables
89 histdefs+=histdefs_tracks (
'trk' ,
'track')
90 histdefs+=histdefs_dR (
'jet0' ,
'jet1' ,
'leading jet' ,
'subleading jet' )
91 histdefs+=histdefs_dR (
'pfjet0',
'pfjet1',
'leading pf jet',
'subleading pf jet')
92 histdefs+=histdefs_dR (
'jet0' ,
'ph0' ,
'leading jet' ,
'leading photon' )
93 histdefs+=histdefs_dR (
'pfjet0',
'ph0' ,
'leading pf jet',
'leading photon' )
101 for chain
in tla_triglist :
102 AllChains.append(chain[2:])
104 for histdef
in histdefs:
105 HistName = histdef[
'name'] +
'_' + chain[2:]
107 xlabel=histdef.get(
'xlabel',histdef[
'name' ])
108 if 'xunit' in histdef:
109 xlabel+=f
' [{histdef["xunit"]}'
110 ylabel=histdef.get(
'ylabel',histdef[
'ylabel'])
112 if chain[0:1] ==
"E" :
113 TLAMonGroup.defineHistogram(HistName, title=f
'Distribution of {histdef["name"]};{xlabel};{ylabel}',
114 path=
'Expert/' +chain[2:],xbins=histdef[
'xbins'],xmin=histdef[
'xmin'],xmax=histdef[
'xmax'])
115 if chain[0:1] ==
"S" :
116 TLAMonGroup.defineHistogram(HistName, title=f
'Distribution of {histdef["name"]};{xlabel};{ylabel}',
117 path=
'Shifter/'+chain[2:],xbins=histdef[
'xbins'],xmin=histdef[
'xmin'],xmax=histdef[
'xmax'])
120 for histdef
in histdefs_global:
121 HistName = histdef[
'name']
122 xlabel=histdef.get(
'xlabel',histdef[
'name' ])
123 if 'xunit' in histdef:
124 xlabel+=f
' [{histdef["xunit"]}'
125 ylabel=histdef.get(
'ylabel',histdef[
'ylabel'])
126 TLAMonGroup.defineHistogram(HistName, title=f
'Distribution of {histdef["name"]};{xlabel};{ylabel}',
127 path=
'Expert/EventInfo',xbins=histdef[
'xbins'],xmin=histdef[
'xmin'],xmax=histdef[
'xmax'])
129 log.info (
" ==> In TrigTLAMonitorAlgorithm.py: AllChains list: %s", AllChains)
130 trigTLAMonAlg.AllChains = AllChains
137 return helper.result()