ATLAS Offline Software
Functions | Variables
TrigHIMonitoringMT Namespace Reference

Functions

def split_num (str l1)
 
def ranges_from_chain (chain)
 
def TrigHIMonCfg (flags)
 

Variables

 log
 
 flags
 
 Environment
 
 NumConcurrentEvents
 
 HISTFileName
 
 cfg
 
 withDetails
 

Function Documentation

◆ ranges_from_chain()

def TrigHIMonitoringMT.ranges_from_chain (   chain)

Definition at line 20 of file TrigHIMonitoringMT.py.

20 def ranges_from_chain(chain):
21  _, l1 = chain.split('L1')
22 
23  # Extract (Vj)TE items and separate numbers from them, e.g.: 'VjTE200' -> {'VTE': 200}
24  l1_te_items = dict(map(split_num, filter(lambda x: 'TE' in x, l1.split('_'))))
25 
26  xmax = l1_te_items.pop('VTE', 20e3 if 'hi_ucc' in chain else 100) * 1.2
27  # TODO: xmin from (j)TE?
28 
29  xbins = xmax if 'hi_ucc' not in chain else 240
30  if xbins < 50:
31  xbins *= 2
32 
33  ranges = {'xbins': int(xbins), 'xmin': 0., 'xmax': xmax}
34  ranges_fwd = {'xbins': int(xbins), 'xmin': 0., 'xmax': xmax / 3.}
35 
36  return ranges, ranges_fwd
37 
38 

◆ split_num()

def TrigHIMonitoringMT.split_num ( str  l1)

Definition at line 14 of file TrigHIMonitoringMT.py.

14 def split_num(l1: str):
15  head = l1.rstrip('0123456789')
16  tail = l1[len(head):]
17  return head.replace('j', ''), int(tail)
18 
19 

◆ TrigHIMonCfg()

def TrigHIMonitoringMT.TrigHIMonCfg (   flags)

Definition at line 39 of file TrigHIMonitoringMT.py.

39 def TrigHIMonCfg(flags):
40  from AthenaMonitoring import AthMonitorCfgHelper
41  monConfig = AthMonitorCfgHelper(flags, 'HLTHeavyIonMonitoring')
42 
43  from AthenaConfiguration.ComponentFactory import CompFactory
44  alg = monConfig.addAlgorithm(CompFactory.HLTHeavyIonMonAlg, 'HLTHeavyIonMonAlgo')
45 
46  from TrigConfigSvc.TriggerConfigAccess import getHLTMonitoringAccess
47  monAccess = getHLTMonitoringAccess(flags)
48  hiChains = getMinBiasChains(monAccess, '(hi_Fgap|hi_ucc).*(TE)')
49 
50  # For testing use all chains
51  # from TrigConfigSvc.TriggerConfigAccess import getHLTMenuAccess
52  # hiChains = [(c, 'Expert') for c in getHLTMenuAccess(flags) if ('hi_Fgap' in c or 'hi_ucc' in c) and 'TE' in c]
53 
54  log.info(f'Monitoring {len(hiChains)} MinBias heavy-ion chains')
55  log.debug([name for name, _ in hiChains])
56 
57  alg.triggerListMon = [name for name, _ in hiChains]
58 
59  for chain, group in hiChains:
60  hiSumETGroup = monConfig.addGroup(alg, f'{chain}_sumEt', topPath=f'HLT/MinBiasMon/{group}/SumEt/{chain}/')
61 
62  # 1D histograms
63  ranges, ranges_fwd = ranges_from_chain(chain)
64  hiSumETGroup.defineHistogram('sum_L1TE', title='TE sum from legacy L1;L1 Legacy E_{T} [GeV];Events', **ranges)
65  hiSumETGroup.defineHistogram('sum_L1jTE', title='TE sum from jFex L1;L1 jFEX E_{T} [GeV];Events', **ranges)
66  hiSumETGroup.defineHistogram('sum_L1FWDAjTE', title='FwdTE sum from jFex L1 (side A);L1 jFEX FWD_{A} E_{T} [GeV];Events', **ranges_fwd)
67  hiSumETGroup.defineHistogram('sum_L1FWDCjTE', title='FwdTE sum from jFex L1 (side C);L1 jFEX FWD_{C} E_{T} [GeV];Events', **ranges_fwd)
68  hiSumETGroup.defineHistogram('sum_FCalAEt', title='FCal sum from HLT (side A);HLT FCal_{A} E_{T} [GeV];Events', **ranges_fwd)
69  hiSumETGroup.defineHistogram('sum_FCalCEt', title='FCal sum from HLT (side C);HLT FCal_{C} E_{T} [GeV];Events', **ranges_fwd)
70 
71  # 2D histograms
72  ranges |= {'ybins': ranges['xbins'], 'ymin': ranges['xmin'], 'ymax': ranges['xmax']}
73  ranges_fwd |= {'ybins': ranges_fwd['xbins'], 'ymin': ranges_fwd['xmin'], 'ymax': ranges_fwd['xmax']}
74  hiSumETGroup.defineHistogram('sum_L1TE,sum_L1jTE', type='TH2F', title='Legacy vs Phase-I TE;L1 Legacy E_{T} [GeV];L1 jFEX E_{T} [GeV];Events', **ranges)
75  hiSumETGroup.defineHistogram('sum_L1FWDAjTE,sum_L1FWDCjTE', type='TH2F', title='FwdTE A-C side corr.;L1 jFEX FWD_{A} E_{T} [GeV];L1 jFEX FWD_{C} E_{T} [GeV];Events', **ranges_fwd)
76  hiSumETGroup.defineHistogram('sum_FCalAEt,sum_FCalCEt', type='TH2F', title='FCal sum A-C side corr.;HLT FCal_{A} E_{T} [GeV];HLT FCal_{C} E_{T} [GeV];Events', **ranges_fwd)
77  hiSumETGroup.defineHistogram('sum_L1FWDAjTE,sum_FCalAEt', type='TH2F', title='FwdTE vs FCal, A side;L1 jFEX FWD_{A} E_{T} [GeV];HLT FCal_{A} E_{T} [GeV];Events', **ranges_fwd)
78  hiSumETGroup.defineHistogram('sum_L1FWDCjTE,sum_FCalCEt', type='TH2F', title='FwdTE vs FCal, C side;L1 jFEX FWD_{C} E_{T} [GeV];HLT FCal_{C} E_{T} [GeV];Events', **ranges_fwd)
79 
80  return monConfig.result()
81 
82 

Variable Documentation

◆ cfg

TrigHIMonitoringMT.cfg

Definition at line 101 of file TrigHIMonitoringMT.py.

◆ Environment

TrigHIMonitoringMT.Environment

Definition at line 87 of file TrigHIMonitoringMT.py.

◆ flags

TrigHIMonitoringMT.flags

Definition at line 86 of file TrigHIMonitoringMT.py.

◆ HISTFileName

TrigHIMonitoringMT.HISTFileName

Definition at line 90 of file TrigHIMonitoringMT.py.

◆ log

TrigHIMonitoringMT.log

Definition at line 11 of file TrigHIMonitoringMT.py.

◆ NumConcurrentEvents

TrigHIMonitoringMT.NumConcurrentEvents

Definition at line 88 of file TrigHIMonitoringMT.py.

◆ withDetails

TrigHIMonitoringMT.withDetails

Definition at line 108 of file TrigHIMonitoringMT.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.TriggerConfigAccess.getHLTMonitoringAccess
HLTMonitoringAccess getHLTMonitoringAccess(flags=None)
Definition: TriggerConfigAccess.py:256
covarianceTool.filter
filter
Definition: covarianceTool.py:514
TrigHIMonitoringMT.TrigHIMonCfg
def TrigHIMonCfg(flags)
Definition: TrigHIMonitoringMT.py:39
TrigHIMonitoringMT.ranges_from_chain
def ranges_from_chain(chain)
Definition: TrigHIMonitoringMT.py:20
utils.getMinBiasChains
def getMinBiasChains(monAccess, wildcard='')
Definition: Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/utils.py:7
TrigHIMonitoringMT.split_num
def split_num(str l1)
Definition: TrigHIMonitoringMT.py:14