ATLAS Offline Software
Functions | Variables
TrigFwdAFPMonitoring Namespace Reference

Functions

def TrigFwdAFPMonitoringCfg (flags)
 
def TrigFwdAFPJetMonitoringCfg (flags)
 
def TrigFwdAFPAllMonitoringCfg (flags)
 

Variables

 log
 
 jet_containers
 
 flags
 
 HISTFileName
 
 cfg
 
 withDetails
 

Function Documentation

◆ TrigFwdAFPAllMonitoringCfg()

def TrigFwdAFPMonitoring.TrigFwdAFPAllMonitoringCfg (   flags)
Collect all configured AFP chains algorithms 

Definition at line 101 of file TrigFwdAFPMonitoring.py.

101 def TrigFwdAFPAllMonitoringCfg(flags):
102  """ Collect all configured AFP chains algorithms """
103 
104  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
105  acc = ComponentAccumulator()
106 
107  acc.merge(TrigFwdAFPMonitoringCfg(flags))
108  acc.merge(TrigFwdAFPJetMonitoringCfg(flags))
109 
110  return acc
111 
112 

◆ TrigFwdAFPJetMonitoringCfg()

def TrigFwdAFPMonitoring.TrigFwdAFPJetMonitoringCfg (   flags)
Configure AFP+jet chains monitoring algs 

Definition at line 43 of file TrigFwdAFPMonitoring.py.

44  """ Configure AFP+jet chains monitoring algs """
45 
46  monConfig = AthMonitorCfgHelper(flags, 'FwdAFPJetMonitoringAlgs')
47  monAccess = getHLTMonitoringAccess(flags)
48 
49  # Select non-noalg AFP chains seeded from L1 jet
50  chains_afp = getMinBiasChains(monAccess, '(afpdijet)')
51  ref_chains = ['HLT_mb_sp_L1RD0_FILLED', 'HLT_mb_sptrk_L1RD0_FILLED', 'HLT_noalg_L1RD0_FILLED',
52  'HLT_noalg_L1AFP_A_OR_C', 'HLT_noalg_L1AFP_A_OR_C']
53 
54  log.info(f'Monitoring {len(chains_afp)} AFP+DiJet chains')
55  log.debug([name for name, _ in chains_afp])
56 
57  # Jet monitoring algs for different jet containers
58  for jet, container in jet_containers.items():
59  algEff = monConfig.addAlgorithm(CompFactory.FwdAFPJetMonitoringAlg, 'FwdAFP' + jet + 'JetMonitoringAlg')
60 
61  algEff.chains = [name for name, _ in chains_afp]
62  algEff.jetContainer = container
63 
64  for chain, level in chains_afp:
65  afpJetGroup = monConfig.addGroup(algEff, f'{chain}_{container}', topPath=f'HLT/FwdAFP/{level}/Jet/{chain}/{container}/')
66  afpJetGroup.defineHistogram('jetPt', title=f'{jet} jet pT;Jet pT [GeV];Entries', xbins=100, xmin=0, xmax=200)
67  afpJetGroup.defineHistogram('jetEta', title=f'{jet} jet eta;Jet #eta;Entries', xbins=100, xmin=-4.9, xmax=4.9)
68  afpJetGroup.defineHistogram('jetPhi', title=f'{jet} jet phi;Jet #varphi;Entries', xbins=100, xmin=-math.pi, xmax=math.pi)
69  afpJetGroup.defineHistogram('jetEta,jetPhi', type='TH2F', title=f'{jet} jet eta vs phi;Jet #eta;Jet #varphi;Entries',
70  xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=-math.pi, ymax=math.pi)
71  afpJetGroup.defineHistogram('jetEta,jetPt', type='TH2F', title=f'{jet} jet eta vs phi;Jet #eta;Jet pT [GeV];Entries',
72  xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=0, ymax=200)
73 
74  afpJetGroup.defineHistogram('leadingJetPt', title=f'Leading {jet} jet pT;Leading jet pT [GeV];Entries',
75  xbins=100, xmin=0, xmax=200)
76  afpJetGroup.defineHistogram('leadingJetEta', title=f'Leading {jet} jet eta;Leading jet #eta;Entries',
77  xbins=100, xmin=-4.9, xmax=4.9)
78  afpJetGroup.defineHistogram('leadingJetPhi', title=f'Leading {jet} jet phi;Leading jet #varphi;Entries',
79  xbins=100, xmin=-math.pi, xmax=math.pi)
80  afpJetGroup.defineHistogram('leadingJetEta,leadingJetPhi', type='TH2F',
81  title=f'Leading {jet} jet eta vs phi;Leading jet #eta;Leading jet #varphi;Entries',
82  xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=-math.pi, ymax=math.pi)
83  afpJetGroup.defineHistogram('leadingJetEta,leadingJetPt', type='TH2F',
84  title=f'Leading {jet} jet eta vs phi;Leading jet #eta;Leading jet pT [GeV];Entries',
85  xbins=40, xmin=-4.9, xmax=4.9, ybins=40, ymin=0, ymax=200)
86 
87  # Efficiency alg
88  algEff = monConfig.addAlgorithm(CompFactory.FwdAFPJetEffMonitoringAlg, 'FwdAFPJetEffMonitoringAlg')
89  algEff.chains = [name for name, _l in chains_afp for _r in range(len(ref_chains))]
90  algEff.references = ref_chains * len(chains_afp)
91 
92  for chain, level in chains_afp:
93  for ref in ref_chains:
94  afpJetEffGroup = monConfig.addGroup(algEff, f'{chain}_{ref}', topPath=f'HLT/FwdAFP/{level}/Jet/Eff/')
95  afpJetEffGroup.defineHistogram(f'effPassed,leadingJetPt;{chain}_vs_{ref}', type='TEfficiency',
96  title=f'{chain} vs {ref};Leading jet pT [GeV];Efficiency', xbins=100, xmin=0, xmax=200)
97 
98  return monConfig.result()
99 
100 

◆ TrigFwdAFPMonitoringCfg()

def TrigFwdAFPMonitoring.TrigFwdAFPMonitoringCfg (   flags)
Configure general AFP chains monitoring algs 

Definition at line 22 of file TrigFwdAFPMonitoring.py.

22 def TrigFwdAFPMonitoringCfg(flags):
23  """ Configure general AFP chains monitoring algs """
24 
25  monConfig = AthMonitorCfgHelper(flags, 'FwdAFPMonitoringAlgs')
26 
27  monAccess = getHLTMonitoringAccess(flags)
28  afp_chains = getMinBiasChains(monAccess, '(AFP|afp)')
29 
30  # Counting alg for all AFP triggers
31  algCount = monConfig.addAlgorithm(CompFactory.FwdAFPCountMonitoringAlg, 'FwdAFPCountMonitoringAlg')
32  algCount.chains = [name for name, _ in afp_chains]
33 
34  log.info(f'Monitoring {len(afp_chains)} AFP chains')
35 
36  afpCountGroup = monConfig.addGroup(algCount, 'AFPCount', topPath='HLT/FwdAFP/')
37  afpCountGroup.defineHistogram('counts', title='Trigger counts;;Counts', xbins=len(algCount.chains),
38  xmin=0, xmax=len(algCount.chains), xlabels=list(algCount.chains))
39 
40  return monConfig.result()
41 
42 

Variable Documentation

◆ cfg

TrigFwdAFPMonitoring.cfg

Definition at line 126 of file TrigFwdAFPMonitoring.py.

◆ flags

TrigFwdAFPMonitoring.flags

Definition at line 118 of file TrigFwdAFPMonitoring.py.

◆ HISTFileName

TrigFwdAFPMonitoring.HISTFileName

Definition at line 119 of file TrigFwdAFPMonitoring.py.

◆ jet_containers

TrigFwdAFPMonitoring.jet_containers

Definition at line 14 of file TrigFwdAFPMonitoring.py.

◆ log

TrigFwdAFPMonitoring.log

Definition at line 12 of file TrigFwdAFPMonitoring.py.

◆ withDetails

TrigFwdAFPMonitoring.withDetails

Definition at line 130 of file TrigFwdAFPMonitoring.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TriggerConfigAccess.getHLTMonitoringAccess
HLTMonitoringAccess getHLTMonitoringAccess(flags=None)
Definition: TriggerConfigAccess.py:256
TrigFwdAFPMonitoring.TrigFwdAFPAllMonitoringCfg
def TrigFwdAFPAllMonitoringCfg(flags)
Definition: TrigFwdAFPMonitoring.py:101
TrigFwdAFPMonitoring.TrigFwdAFPJetMonitoringCfg
def TrigFwdAFPJetMonitoringCfg(flags)
Definition: TrigFwdAFPMonitoring.py:43
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
TrigFwdAFPMonitoring.TrigFwdAFPMonitoringCfg
def TrigFwdAFPMonitoringCfg(flags)
Definition: TrigFwdAFPMonitoring.py:22
utils.getMinBiasChains
def getMinBiasChains(monAccess, wildcard='')
Definition: Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/utils.py:7