6def getTrigTauPrecisionIDHypoToolMonitoring(flags: AthConfigFlags, name: str, tau_ids: list[str]):
8 monTool.HistPath = f'TrigTauRecMerged_TrigTauPrecisionIDHypo/{name}'
9
10
11 monTool.defineHistogram('NInputTaus', path='EXPERT', type='TH1F', title='Input Taus (before selection); N Taus; Entries', xbins=10, xmin=0, xmax=10)
12
13 labels = ['Initial', 'p_{T}', 'NTracks & NIsoTracks', 'ID']
14 monTool.defineHistogram('CutCounter', path='EXPERT', type='TH1I', title='Passed Tau cuts; Cut; Entries', xbins=len(labels), xmin=0, xmax=len(labels), xlabels=labels)
15
16 monTool.defineHistogram('PtAccepted', path='EXPERT', type='TH1F', title='Accepted Tau p_{T}; p_{T} [GeV]; Entries', xbins=80, xmin=0, xmax=800)
17 monTool.defineHistogram('NTracksAccepted', path='EXPERT', type='TH1F', title='Accepted Tau Tracks; N Tracks; Entries', xbins=10, xmin=0, xmax=10)
18 monTool.defineHistogram('NIsoTracksAccepted', path='EXPERT', type='TH1F', title='Accepted Tau Isolation Tracks; N Isolation Tracks; Entries', xbins=10, xmin=0, xmax=10)
19
20 for tau_id in tau_ids:
21 tau_id_flags = getattr(flags.Trigger.Offline.Tau, tau_id)
22 if hasattr(tau_id_flags, 'NetworkConfig') or tau_id_flags.OutputDiscriminant == 1: xmax = 1
23 else: xmax = 5
24
25 monTool.defineHistogram(f'{tau_id}_TauJetScoreAccepted_0p', path='EXPERT', type='TH1F', title=f'Accepted 0-prong {tau_id} Tau ID score; Score; Entries', xbins=100, xmin=0, xmax=xmax)
26 monTool.defineHistogram(f'{tau_id}_TauJetScoreTransAccepted_0p', path='EXPERT', type='TH1F', title=f'Accepted 0-prong {tau_id} Tau ID transformed score; Transformed Signal Score; Entries', xbins=100, xmin=0, xmax=1)
27
28 monTool.defineHistogram(f'{tau_id}_TauJetScoreAccepted_1p', path='EXPERT', type='TH1F', title=f'Accepted 1-prong {tau_id} Tau ID score; Score; Entries', xbins=100, xmin=0, xmax=xmax)
29 monTool.defineHistogram(f'{tau_id}_TauJetScoreTransAccepted_1p', path='EXPERT', type='TH1F', title=f'Accepted 1-prong {tau_id} Tau ID transformed score; Transformed Signal Score; Entries', xbins=100, xmin=0, xmax=1)
30
31 monTool.defineHistogram(f'{tau_id}_TauJetScoreAccepted_mp', path='EXPERT', type='TH1F', title=f'Accepted multi-prong {tau_id} Tau ID score; Score; Entries', xbins=100, xmin=0, xmax=xmax)
32 monTool.defineHistogram(f'{tau_id}_TauJetScoreTransAccepted_mp', path='EXPERT', type='TH1F', title=f'Accepted multi-prong {tau_id} Tau ID transformed score; Transformed Signal Score; Entries', xbins=100, xmin=0, xmax=1)
33
34 return monTool
35
36