ATLAS Offline Software
Loading...
Searching...
No Matches
TrigTauHypoTool Namespace Reference

Classes

class  TauCuts

Functions

 TrigTauPrecisionHypoToolFromDict (AthConfigFlags flags, dict[str, Any] chainDict)
 TrigTauPrecisionIDHypoToolFromDict (AthConfigFlags flags, dict[str, Any] chainDict)
 TrigTauPrecisionDiKaonHypoToolFromDict (AthConfigFlags flags, dict[str, Any] chainDict)
 TrigTauTrackingHypoToolFromDict (AthConfigFlags flags, dict[str, Any] chainDict)
 TrigTauCaloMVAHypoToolFromDict (AthConfigFlags flags, dict[str, Any] chainDict)

Variables

 log = logging.getLogger('TrigHLTTauHypoTool')
 DiKaonCuts = namedtuple('DiKaonCuts', 'massTrkSysMin massTrkSysMax massTrkSysKaonMin massTrkSysKaonMax massTrkSysKaonPiMin massTrkSysKaonPiMax targetMassTrkSysKaonPi leadTrkPtMin PtMin EMPOverTrkSysPMax')
dict thresholds_dikaon
 SinglePionCuts = namedtuple('SinglePionCuts', 'leadTrkPtMin PtMin NTracksMax NIsoTracksMax dRmaxMax etOverPtLeadTrkMin etOverPtLeadTrkMax')
dict thresholds_singlepion

Function Documentation

◆ TrigTauCaloMVAHypoToolFromDict()

TrigTauHypoTool.TrigTauCaloMVAHypoToolFromDict ( AthConfigFlags flags,
dict[str, Any] chainDict )

Definition at line 262 of file TrigTauHypoTool.py.

262def TrigTauCaloMVAHypoToolFromDict(flags: AthConfigFlags, chainDict: dict[str, Any]):
263 name = chainDict['chainName']
264 threshold = float(chainDict['chainParts'][0]['threshold'])
265
266 from AthenaConfiguration.ComponentFactory import CompFactory
267 currentHypo = CompFactory.TrigTauCaloHypoTool(name)
268 currentHypo.PtMin = threshold * GeV
269
270 return currentHypo
271

◆ TrigTauPrecisionDiKaonHypoToolFromDict()

TrigTauHypoTool.TrigTauPrecisionDiKaonHypoToolFromDict ( AthConfigFlags flags,
dict[str, Any] chainDict )
TrigTauPrecisionDiKaonHypoTool configuration for the meson cut-based Tau triggers (ATR-22644)

Definition at line 207 of file TrigTauHypoTool.py.

207def TrigTauPrecisionDiKaonHypoToolFromDict(flags: AthConfigFlags, chainDict: dict[str, Any]):
208 '''TrigTauPrecisionDiKaonHypoTool configuration for the meson cut-based Tau triggers (ATR-22644)'''
209 name = chainDict['chainName']
210 chainPart = chainDict['chainParts'][0]
211
212 # Setup the Hypothesis tool
213 from AthenaConfiguration.ComponentFactory import CompFactory
214 currentHypo = CompFactory.TrigTauPrecisionDiKaonHypoTool(name)
215
216 key = (chainPart['selection'], int(chainPart['threshold']))
217 if key in thresholds_dikaon:
218 thr = thresholds_dikaon[key]
219 currentHypo.PtMin = thr.PtMin
220 currentHypo.leadTrkPtMin = thr.leadTrkPtMin
221 currentHypo.massTrkSysMin = thr.massTrkSysMin
222 currentHypo.massTrkSysMax = thr.massTrkSysMax
223 currentHypo.massTrkSysKaonMin = thr.massTrkSysKaonMin
224 currentHypo.massTrkSysKaonMax = thr.massTrkSysKaonMax
225 currentHypo.massTrkSysKaonPiMin = thr.massTrkSysKaonPiMin
226 currentHypo.massTrkSysKaonPiMax = thr.massTrkSysKaonPiMax
227 currentHypo.targetMassTrkSysKaonPi = thr.targetMassTrkSysKaonPi
228 currentHypo.EMPOverTrkSysPMax = thr.EMPOverTrkSysPMax
229
230 elif key in thresholds_singlepion:
231 thr = thresholds_singlepion[key]
232 currentHypo.PtMin = thr.PtMin
233 currentHypo.NTracksMax = thr.NTracksMax
234 currentHypo.NIsoTracksMax = thr.NIsoTracksMax
235 currentHypo.leadTrkPtMin = thr.leadTrkPtMin
236 currentHypo.dRmaxMax = thr.dRmaxMax
237 currentHypo.etOverPtLeadTrkMin = thr.etOverPtLeadTrkMin
238 currentHypo.etOverPtLeadTrkMax = thr.etOverPtLeadTrkMax
239
240 currentHypo.MonTool = getTrigTauPrecisionDiKaonHypoToolMonitoring(flags, name)
241
242 return currentHypo
243
244
245
246#============================================================================================
247# Tracking step hypothesis tool (without selection)
248#============================================================================================

◆ TrigTauPrecisionHypoToolFromDict()

TrigTauHypoTool.TrigTauPrecisionHypoToolFromDict ( AthConfigFlags flags,
dict[str, Any] chainDict )

Definition at line 18 of file TrigTauHypoTool.py.

18def TrigTauPrecisionHypoToolFromDict(flags: AthConfigFlags, chainDict: dict[str, Any]):
19 chainPart = chainDict['chainParts'][0]
20
21 identification = getChainIDConfigName(flags, chainPart)
22
23 if identification == 'MesonCuts':
24 # Meson cut-based triggers (ATR-22644)
25 return TrigTauPrecisionDiKaonHypoToolFromDict(flags, chainDict)
26 else:
27 # Everything else
28 return TrigTauPrecisionIDHypoToolFromDict(flags, chainDict)
29
30
31#-----------------------------------------------------------------
32# Standard tau triggers configuration
33#-----------------------------------------------------------------

◆ TrigTauPrecisionIDHypoToolFromDict()

TrigTauHypoTool.TrigTauPrecisionIDHypoToolFromDict ( AthConfigFlags flags,
dict[str, Any] chainDict )
TrigTauPrecisionIDHypoTool configuration for the standard Tau triggers

Definition at line 110 of file TrigTauHypoTool.py.

110def TrigTauPrecisionIDHypoToolFromDict(flags: AthConfigFlags, chainDict: dict[str, Any]):
111 '''TrigTauPrecisionIDHypoTool configuration for the standard Tau triggers'''
112 name = chainDict['chainName']
113 chainPart = chainDict['chainParts'][0]
114 cuts = TauCuts(flags, chainPart)
115
116 # Setup the Hypothesis tool
117 from AthenaConfiguration.ComponentFactory import CompFactory
118 currentHypo = CompFactory.TrigTauPrecisionIDHypoTool(
119 name,
120 PtMin=cuts.pt_min,
121 NTracksMax=cuts.n_track_max,
122 NIsoTracksMax=cuts.n_iso_track_max,
123 IDWP=cuts.id_wp_decor,
124 HighPtIDWP=cuts.highpt_id_wp_decor,
125 )
126
127 from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getChainPrecisionSeqName, useBuiltInTauJetRNNScore, getPrecisionSequenceTauIDs, getTauIDScoreVariables
128
129 id_score_monitoring = {}
130
131 precision_seq_name = getChainPrecisionSeqName(chainPart)
132 identification = getChainIDConfigName(flags, chainPart)
133 if identification in ['idperf', 'noperf', 'perf', 'perfcore', 'perfiso']:
134 if identification == 'idperf':
135 # Disable everything, even the pT cut
136 currentHypo.AcceptAll = True
137
138 # Monitor all the included algorithms
139 used_builtin_rnnscore = False
140 for tau_id in getPrecisionSequenceTauIDs(flags, precision_seq_name):
141 # Skip algs without inference scores
142 if tau_id in ['MesonCuts']: continue
143
144 # We can only have at most one alg. using the built-in TauJet RNN score variables
145 if useBuiltInTauJetRNNScore(tau_id, precision_seq_name):
146 if used_builtin_rnnscore:
147 raise ValueError('Cannot have two TauID algorithms with scores stored in the built-in TauJet RNN score variables')
148 used_builtin_rnnscore = True
149
150 id_score_monitoring[tau_id] = getTauIDScoreVariables(tau_id, precision_seq_name)
151
152 else:
153 if useBuiltInTauJetRNNScore(identification, precision_seq_name):
154 # To support the legacy tracktwoMVA/LLP/LRT chains, only in those cases we store the
155 # ID score and passed WPs in the native TauJet variables
156 currentHypo.IDMethod = 1 # TauJet built-in RNN score
157 else:
158 # Decorator-based triggers
159 currentHypo.IDMethod = 2 # Use decorators
160
161 # Monitor this algorithm only
162 id_score_monitoring[identification] = getTauIDScoreVariables(identification, precision_seq_name)
163
164 # For any triggers following the tracktwoMVA reconstruction (2023+ DeepSet and GNTau)
165 if chainPart['reconstruction'] == 'tracktwoMVA':
166 currentHypo.TrackPtCut = 1.5*GeV
167 currentHypo.HighPtSelectionIDThr = 200*GeV
168 currentHypo.HighPtSelectionJetThr = 430*GeV
169
170 # Only monitor chains with the 'tauMon:online' groups
171 if 'tauMon:online' in chainDict['monGroups']:
172 currentHypo.MonTool = getTrigTauPrecisionIDHypoToolMonitoring(flags, name, id_score_monitoring.keys())
173
174 # TauID Score monitoring
175 currentHypo.MonitoredIDScores = id_score_monitoring
176
177 return currentHypo
178
179
180#-----------------------------------------------------------------
181# Meson cut-based triggers configuration (ATR-22644 + ATR-23239)
182#-----------------------------------------------------------------

◆ TrigTauTrackingHypoToolFromDict()

TrigTauHypoTool.TrigTauTrackingHypoToolFromDict ( AthConfigFlags flags,
dict[str, Any] chainDict )

Definition at line 249 of file TrigTauHypoTool.py.

249def TrigTauTrackingHypoToolFromDict(flags: AthConfigFlags, chainDict: dict[str, Any]):
250 name = chainDict['chainName']
251
252 from AthenaConfiguration.ComponentFactory import CompFactory
253 currentHypo = CompFactory.TrigTauTrackingHypoTool(name)
254
255 return currentHypo
256
257
258
259#============================================================================================
260# CaloMVA step hypothesis tool
261#============================================================================================

Variable Documentation

◆ DiKaonCuts

TrigTauHypoTool.DiKaonCuts = namedtuple('DiKaonCuts', 'massTrkSysMin massTrkSysMax massTrkSysKaonMin massTrkSysKaonMax massTrkSysKaonPiMin massTrkSysKaonPiMax targetMassTrkSysKaonPi leadTrkPtMin PtMin EMPOverTrkSysPMax')

Definition at line 185 of file TrigTauHypoTool.py.

◆ log

TrigTauHypoTool.log = logging.getLogger('TrigHLTTauHypoTool')

Definition at line 12 of file TrigTauHypoTool.py.

◆ SinglePionCuts

TrigTauHypoTool.SinglePionCuts = namedtuple('SinglePionCuts', 'leadTrkPtMin PtMin NTracksMax NIsoTracksMax dRmaxMax etOverPtLeadTrkMin etOverPtLeadTrkMax')

Definition at line 202 of file TrigTauHypoTool.py.

◆ thresholds_dikaon

dict TrigTauHypoTool.thresholds_dikaon
Initial value:
1= {
2 ('dikaonmass', 25): DiKaonCuts(0.0*GeV, 1000.0*GeV, 0.987*GeV, 1.060*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 15.0*GeV, 25.0*GeV, 1.5),
3 ('dikaonmass', 35): DiKaonCuts(0.0*GeV, 1000.0*GeV, 0.987*GeV, 1.060*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 25.0*GeV, 35.0*GeV, 1.5),
4
5 ('kaonpi1', 25): DiKaonCuts(0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 0.79*GeV, 0.99*GeV, 0.89*GeV, 15.0*GeV, 25.0*GeV, 1.0),
6 ('kaonpi1', 35): DiKaonCuts(0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 0.79*GeV, 0.99*GeV, 0.89*GeV, 25.0*GeV, 35.0*GeV, 1.0),
7
8 ('kaonpi2', 25): DiKaonCuts(0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 1.8*GeV, 1.93*GeV, 1.865*GeV, 15.0*GeV, 25.0*GeV, 1.0),
9 ('kaonpi2', 35): DiKaonCuts(0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 1.8*GeV, 1.93*GeV, 1.865*GeV, 25.0*GeV, 35.0*GeV, 1.0),
10
11 ('dipion1', 25): DiKaonCuts(0.475*GeV, 1.075*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 15.0*GeV, 25.0*GeV, 1.0),
12 ('dipion2', 25): DiKaonCuts(0.460*GeV, 0.538*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 15.0*GeV, 25.0*GeV, 1.0),
13 ('dipion3', 25): DiKaonCuts(0.279*GeV, 0.648*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 25.0*GeV, 25.0*GeV, 2.2),
14 ('dipion4', 25): DiKaonCuts(0.460*GeV, 1.075*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 1000.0*GeV, 0.0*GeV, 15.0*GeV, 25.0*GeV, 1.0),
15}

Definition at line 186 of file TrigTauHypoTool.py.

◆ thresholds_singlepion

dict TrigTauHypoTool.thresholds_singlepion
Initial value:
1= {
2 ('singlepion', 25): SinglePionCuts(30.0*GeV, 25.0*GeV, 1, 0, 0.06, 0.4, 0.85),
3}

Definition at line 203 of file TrigTauHypoTool.py.