ATLAS Offline Software
Functions | Variables
python.TrigTLAMonitorAlgorithm Namespace Reference

Functions

def tla_chains (inputFlags, log=None)
 
def TrigTLAMonConfig (inputFlags, tdt)
 

Variables

 parser
 
 nargs
 
 default
 
 action
 
 help
 
 type
 
 int
 
 args
 
 flags
 
 MaxEvents
 
 Files
 
 isMC
 
 HISTFileName
 
 triggerMenuSetup
 
 triggerConfig
 
 cfg
 
 tdt
 
 parentName
 
 pfChains
 
 triggers
 
 tool
 
 noL1
 
 sequenceName
 
 TrackCollection
 
 PrimaryVertexCollectionName
 
 trigTLAMonitorAcc
 
 withDetails
 

Function Documentation

◆ tla_chains()

def python.TrigTLAMonitorAlgorithm.tla_chains (   inputFlags,
  log = None 
)
Read in the TLA trigger chain names as submitted to the MonGroups 

Definition at line 12 of file TrigTLAMonitorAlgorithm.py.

12 def tla_chains(inputFlags,log=None):
13  '''
14  Read in the TLA trigger chain names as submitted to the MonGroups
15  '''
16  tla_triglist = []
17  # Trigger list from monitoring groups: signatures = TLAMon to be agreed w/ MonGroups management
18  from TrigConfigSvc.TriggerConfigAccess import getHLTMonitoringAccess
19  moniAccess=getHLTMonitoringAccess(inputFlags)
20  TLAChainsE=moniAccess.monitoredChains(signatures="tlaMon",monLevels=["t0"])
21  if log is not None:
22  log.info (" ==> tla_chainlist t0: %s", TLAChainsE)
23  for chain in TLAChainsE:
24  chain = "E_"+chain
25  tla_triglist.append(chain)
26  TLAChainsS=moniAccess.monitoredChains(signatures="tlaMon",monLevels=["shifter"])
27  if log is not None:
28  log.info (" ==> tla_chainlist shifter: %s", TLAChainsS)
29  for chain in TLAChainsS:
30  chain = "S_"+chain
31  tla_triglist.append(chain)
32  if log is not None:
33  log.info (" ==> tla_triglist: %s", tla_triglist)
34  return tla_triglist
35 
36 

◆ TrigTLAMonConfig()

def python.TrigTLAMonitorAlgorithm.TrigTLAMonConfig (   inputFlags,
  tdt 
)
Function to configures some algorithms in the monitoring system.

Definition at line 37 of file TrigTLAMonitorAlgorithm.py.

37 def TrigTLAMonConfig(inputFlags, tdt):
38  '''Function to configures some algorithms in the monitoring system.'''
39 
40  from AthenaCommon.Logging import logging
41  log = logging.getLogger( 'TrigTLAMonitorAlgorithm.py' )
42 
43 
49 
50  # The following class will make a sequence, configure algorithms, and link
51  # them to GenericMonitoringTools
52  from AthenaMonitoring import AthMonitorCfgHelper
53  helper = AthMonitorCfgHelper(inputFlags,'TrigTLAAthMonitorCfg')
54 
55 
57 
58  from AthenaConfiguration.ComponentFactory import CompFactory
59  trigTLAMonAlg = helper.addAlgorithm(CompFactory.TrigTLAMonitorAlgorithm,'TrigTLAMonAlg')
60 
61 
66  trigTLAMonAlg.TriggerChain = ''
67  trigTLAMonAlg.TriggerDecisionTool = tdt
68 
69 
70  tla_triglist=tla_chains(inputFlags,log=None)
71 
72  # Add a generic monitoring tool (a "group" in old language). The returned
73  # object here is the standard GenericMonitoringTool.
74  TLAMonGroup = helper.addGroup(trigTLAMonAlg,'TrigTLAMonitor','HLT/TLAMon/')
75 
76 
77  from TrigTLAMonitoring.TrigTLAMonitorHistograms import (
78  histdefs_eventinfo, histdefs_particle, histdefs_tracks, histdefs_dR, histdefs_jetcalibscales, histdefs_jetvariables
79  )
80  # Configure histograms
81  #NB! The histograms defined here must match the ones in the cxx file exactly
82  histdefs_global=[]
83  histdefs_global+=histdefs_eventinfo('eventInfo')
84  histdefs=[]
85  histdefs+=histdefs_particle('jet' ,'jet')
86  histdefs+=histdefs_particle('pfjet','particle-flow jet')
87  histdefs+=histdefs_particle('ph' ,'photon')
88  histdefs+=histdefs_particle('muon' ,'muon')
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' )
94  histdefs+=histdefs_jetcalibscales('jet' ,'jet')
95  histdefs+=histdefs_jetcalibscales('pfjet','particle-flow jet', True)
96  histdefs+=histdefs_jetvariables('jet', 'jet')
97  histdefs+=histdefs_jetvariables('pfjet', 'particle-flow jet', True)
98 
99 
100  AllChains = []
101  for chain in tla_triglist :
102  AllChains.append(chain[2:])
103 
104  for histdef in histdefs:
105  HistName = histdef['name'] + '_' + chain[2:]
106 
107  xlabel=histdef.get('xlabel',histdef['name' ])
108  if 'xunit' in histdef:
109  xlabel+=f' [{histdef["xunit"]}'
110  ylabel=histdef.get('ylabel',histdef['ylabel'])
111 
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'])
118 
119  # global histograms added here
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'])
128 
129  log.info (" ==> In TrigTLAMonitorAlgorithm.py: AllChains list: %s", AllChains)
130  trigTLAMonAlg.AllChains = AllChains
131 
132 
137  return helper.result()
138 
139 

Variable Documentation

◆ action

python.TrigTLAMonitorAlgorithm.action

Definition at line 146 of file TrigTLAMonitorAlgorithm.py.

◆ args

python.TrigTLAMonitorAlgorithm.args

Definition at line 148 of file TrigTLAMonitorAlgorithm.py.

◆ cfg

python.TrigTLAMonitorAlgorithm.cfg

Definition at line 180 of file TrigTLAMonitorAlgorithm.py.

◆ default

python.TrigTLAMonitorAlgorithm.default

Definition at line 145 of file TrigTLAMonitorAlgorithm.py.

◆ Files

python.TrigTLAMonitorAlgorithm.Files

Definition at line 165 of file TrigTLAMonitorAlgorithm.py.

◆ flags

python.TrigTLAMonitorAlgorithm.flags

Definition at line 159 of file TrigTLAMonitorAlgorithm.py.

◆ help

python.TrigTLAMonitorAlgorithm.help

Definition at line 146 of file TrigTLAMonitorAlgorithm.py.

◆ HISTFileName

python.TrigTLAMonitorAlgorithm.HISTFileName

Definition at line 169 of file TrigTLAMonitorAlgorithm.py.

◆ int

python.TrigTLAMonitorAlgorithm.int

Definition at line 147 of file TrigTLAMonitorAlgorithm.py.

◆ isMC

python.TrigTLAMonitorAlgorithm.isMC

Definition at line 166 of file TrigTLAMonitorAlgorithm.py.

◆ MaxEvents

python.TrigTLAMonitorAlgorithm.MaxEvents

Definition at line 162 of file TrigTLAMonitorAlgorithm.py.

◆ nargs

python.TrigTLAMonitorAlgorithm.nargs

Definition at line 145 of file TrigTLAMonitorAlgorithm.py.

◆ noL1

python.TrigTLAMonitorAlgorithm.noL1

Definition at line 196 of file TrigTLAMonitorAlgorithm.py.

◆ parentName

python.TrigTLAMonitorAlgorithm.parentName

Definition at line 192 of file TrigTLAMonitorAlgorithm.py.

◆ parser

python.TrigTLAMonitorAlgorithm.parser

Definition at line 143 of file TrigTLAMonitorAlgorithm.py.

◆ pfChains

python.TrigTLAMonitorAlgorithm.pfChains

Definition at line 193 of file TrigTLAMonitorAlgorithm.py.

◆ PrimaryVertexCollectionName

python.TrigTLAMonitorAlgorithm.PrimaryVertexCollectionName

Definition at line 204 of file TrigTLAMonitorAlgorithm.py.

◆ sequenceName

python.TrigTLAMonitorAlgorithm.sequenceName

Definition at line 197 of file TrigTLAMonitorAlgorithm.py.

◆ tdt

python.TrigTLAMonitorAlgorithm.tdt

Definition at line 185 of file TrigTLAMonitorAlgorithm.py.

◆ tool

python.TrigTLAMonitorAlgorithm.tool

Definition at line 196 of file TrigTLAMonitorAlgorithm.py.

◆ TrackCollection

python.TrigTLAMonitorAlgorithm.TrackCollection

Definition at line 203 of file TrigTLAMonitorAlgorithm.py.

◆ triggerConfig

python.TrigTLAMonitorAlgorithm.triggerConfig

Definition at line 173 of file TrigTLAMonitorAlgorithm.py.

◆ triggerMenuSetup

python.TrigTLAMonitorAlgorithm.triggerMenuSetup

Definition at line 172 of file TrigTLAMonitorAlgorithm.py.

◆ triggers

python.TrigTLAMonitorAlgorithm.triggers

Definition at line 196 of file TrigTLAMonitorAlgorithm.py.

◆ trigTLAMonitorAcc

python.TrigTLAMonitorAlgorithm.trigTLAMonitorAcc

Definition at line 210 of file TrigTLAMonitorAlgorithm.py.

◆ type

python.TrigTLAMonitorAlgorithm.type

Definition at line 147 of file TrigTLAMonitorAlgorithm.py.

◆ withDetails

python.TrigTLAMonitorAlgorithm.withDetails

Definition at line 219 of file TrigTLAMonitorAlgorithm.py.

python.TrigTLAMonitorAlgorithm.tla_chains
def tla_chains(inputFlags, log=None)
Definition: TrigTLAMonitorAlgorithm.py:12
python.TrigTLAMonitorHistograms.histdefs_jetcalibscales
def histdefs_jetcalibscales(pprefix, plabel, pflow=False)
Definition: TrigTLAMonitorHistograms.py:172
python.TrigTLAMonitorAlgorithm.TrigTLAMonConfig
def TrigTLAMonConfig(inputFlags, tdt)
Definition: TrigTLAMonitorAlgorithm.py:37
python.TriggerConfigAccess.getHLTMonitoringAccess
HLTMonitoringAccess getHLTMonitoringAccess(flags=None)
Definition: TriggerConfigAccess.py:256
python.TrigTLAMonitorHistograms.histdefs_eventinfo
def histdefs_eventinfo(pprefix)
Definition: TrigTLAMonitorHistograms.py:11
python.TrigTLAMonitorHistograms.histdefs_particle
def histdefs_particle(pprefix, plabel)
Definition: TrigTLAMonitorHistograms.py:215
python.TrigTLAMonitorHistograms.histdefs_jetvariables
def histdefs_jetvariables(pprefix, plabel, pflow=False)
Definition: TrigTLAMonitorHistograms.py:45