ATLAS Offline Software
Classes | Functions | Variables
TrigTauHypoTool Namespace Reference

Classes

class  TauCuts
 

Functions

def TrigTauPrecisionHypoToolFromDict (flags, chainDict)
 
def TrigTauPrecisionIDHypoToolFromDict (flags, chainDict)
 
def TrigTauPrecisionDiKaonHypoToolFromDict (flags, chainDict)
 
def TrigTauPrecTrackHypoToolFromDict (chainDict)
 
def TrigTauFastTrackHypoToolFromDict (chainDict)
 
def TrigTauCaloMVAHypoToolFromDict (chainDict)
 

Variables

 log
 
 DiKaonCuts
 
 thresholds_dikaon
 
 SinglePionCuts
 
 thresholds_singlepion
 

Function Documentation

◆ TrigTauCaloMVAHypoToolFromDict()

def TrigTauHypoTool.TrigTauCaloMVAHypoToolFromDict (   chainDict)

Definition at line 220 of file TrigTauHypoTool.py.

220 def TrigTauCaloMVAHypoToolFromDict(chainDict):
221  name = chainDict['chainName']
222  threshold = float(chainDict['chainParts'][0]['threshold'])
223 
224  from AthenaConfiguration.ComponentFactory import CompFactory
225  currentHypo = CompFactory.TrigTauCaloHypoTool(name)
226  currentHypo.PtMin = threshold * GeV
227 
228  return currentHypo
229 

◆ TrigTauFastTrackHypoToolFromDict()

def TrigTauHypoTool.TrigTauFastTrackHypoToolFromDict (   chainDict)

Definition at line 207 of file TrigTauHypoTool.py.

207 def TrigTauFastTrackHypoToolFromDict(chainDict):
208  name = chainDict['chainName']
209 
210  from AthenaConfiguration.ComponentFactory import CompFactory
211  currentHypo = CompFactory.TrigTauFastTrackHypoTool(name)
212 
213  return currentHypo
214 
215 
216 
217 #============================================================================================
218 # CaloMVA step hypothesis tool
219 #============================================================================================

◆ TrigTauPrecisionDiKaonHypoToolFromDict()

def TrigTauHypoTool.TrigTauPrecisionDiKaonHypoToolFromDict (   flags,
  chainDict 
)
TrigTauPrecisionDiKaonHypoTool configuration for the meson cut-based Tau triggers (ATR-22644)

Definition at line 152 of file TrigTauHypoTool.py.

152 def TrigTauPrecisionDiKaonHypoToolFromDict(flags, chainDict):
153  '''TrigTauPrecisionDiKaonHypoTool configuration for the meson cut-based Tau triggers (ATR-22644)'''
154  name = chainDict['chainName']
155  chainPart = chainDict['chainParts'][0]
156 
157  # Setup the Hypothesis tool
158  from AthenaConfiguration.ComponentFactory import CompFactory
159  currentHypo = CompFactory.TrigTauPrecisionDiKaonHypoTool(name)
160 
161  key = (chainPart['selection'], int(chainPart['threshold']))
162  if key in thresholds_dikaon:
163  thr = thresholds_dikaon[key]
164  currentHypo.PtMin = thr.PtMin
165  currentHypo.leadTrkPtMin = thr.leadTrkPtMin
166  currentHypo.massTrkSysMin = thr.massTrkSysMin
167  currentHypo.massTrkSysMax = thr.massTrkSysMax
168  currentHypo.massTrkSysKaonMin = thr.massTrkSysKaonMin
169  currentHypo.massTrkSysKaonMax = thr.massTrkSysKaonMax
170  currentHypo.massTrkSysKaonPiMin = thr.massTrkSysKaonPiMin
171  currentHypo.massTrkSysKaonPiMax = thr.massTrkSysKaonPiMax
172  currentHypo.targetMassTrkSysKaonPi = thr.targetMassTrkSysKaonPi
173  currentHypo.EMPOverTrkSysPMax = thr.EMPOverTrkSysPMax
174 
175  elif key in thresholds_singlepion:
176  thr = thresholds_singlepion[key]
177  currentHypo.PtMin = thr.PtMin
178  currentHypo.NTracksMax = thr.NTracksMax
179  currentHypo.NIsoTracksMax = thr.NIsoTracksMax
180  currentHypo.leadTrkPtMin = thr.leadTrkPtMin
181  currentHypo.dRmaxMax = thr.dRmaxMax
182  currentHypo.etOverPtLeadTrkMin = thr.etOverPtLeadTrkMin
183  currentHypo.etOverPtLeadTrkMax = thr.etOverPtLeadTrkMax
184 
185  currentHypo.MonTool = getTrigTauPrecisionDiKaonHypoToolMonitoring(flags, name)
186 
187  return currentHypo
188 
189 
190 
191 #============================================================================================
192 # Precision Tracking step hypothesis tool (without selection)
193 #============================================================================================

◆ TrigTauPrecisionHypoToolFromDict()

def TrigTauHypoTool.TrigTauPrecisionHypoToolFromDict (   flags,
  chainDict 
)

Definition at line 15 of file TrigTauHypoTool.py.

15 def TrigTauPrecisionHypoToolFromDict(flags, chainDict):
16  chainPart = chainDict['chainParts'][0]
17 
18  from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getChainIDConfigName
19  identification = getChainIDConfigName(chainPart)
20 
21  if identification == 'MesonCuts':
22  # Meson cut-based triggers (ATR-22644)
23  return TrigTauPrecisionDiKaonHypoToolFromDict(flags, chainDict)
24  else:
25  # Everything else
26  return TrigTauPrecisionIDHypoToolFromDict(flags, chainDict)
27 
28 #-----------------------------------------------------------------
29 # Standard tau triggers configuration
30 #-----------------------------------------------------------------

◆ TrigTauPrecisionIDHypoToolFromDict()

def TrigTauHypoTool.TrigTauPrecisionIDHypoToolFromDict (   flags,
  chainDict 
)
TrigTauPrecisionIDHypoTool configuration for the standard Tau triggers

Definition at line 56 of file TrigTauHypoTool.py.

56 def TrigTauPrecisionIDHypoToolFromDict(flags, chainDict):
57  '''TrigTauPrecisionIDHypoTool configuration for the standard Tau triggers'''
58  name = chainDict['chainName']
59  chainPart = chainDict['chainParts'][0]
60  cuts = TauCuts(chainPart)
61 
62  # Setup the Hypothesis tool
63  from AthenaConfiguration.ComponentFactory import CompFactory
64  currentHypo = CompFactory.TrigTauPrecisionIDHypoTool(
65  name,
66  PtMin=cuts.pt_min,
67  NTracksMax=cuts.n_track_max,
68  NIsoTracksMax=cuts.n_iso_track_max,
69  IDWP=cuts.id_wp,
70  )
71 
72  from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getChainIDConfigName, getChainPrecisionSeqName, useBuiltInTauJetRNNScore, getPrecisionSequenceTauIDs, getTauIDScoreVariables
73 
74  id_score_monitoring = {}
75 
76  precision_seq_name = getChainPrecisionSeqName(chainPart)
77  identification = getChainIDConfigName(chainPart)
78  if identification in ['perf', 'idperf']:
79  if identification == 'idperf':
80  currentHypo.AcceptAll = True
81 
82  # Monitor all the included algorithms
83  used_builtin_rnnscore = False
84  for tau_id in getPrecisionSequenceTauIDs(precision_seq_name):
85  # Skip algs without inference scores
86  if tau_id in ['MesonCuts']: continue
87 
88  # We can only have at most one alg. using the built-in TauJet RNN score variables
89  if useBuiltInTauJetRNNScore(tau_id, precision_seq_name):
90  if used_builtin_rnnscore:
91  raise ValueError('Cannot have two TauID algorithms with scores stored in the built-in TauJet RNN score variables')
92  used_builtin_rnnscore = True
93 
94  id_score_monitoring[tau_id] = getTauIDScoreVariables(tau_id, precision_seq_name)
95 
96  else:
97  if useBuiltInTauJetRNNScore(identification, precision_seq_name):
98  # To support the legacy tracktwoMVA/LLP/LRT chains, only in those cases we store the
99  # ID score and passed WPs in the native TauJet variables
100  currentHypo.IDMethod = 1 # TauJet built-in RNN score
101  else:
102  # Decorator-based triggers
103  currentHypo.IDMethod = 2 # Use decorators
104  currentHypo.IDWPNames = [f'{identification}_{wp}' for wp in getattr(flags.Trigger.Offline.Tau, identification).WPNames]
105 
106  # Monitor this algorithm only
107  id_score_monitoring[identification] = getTauIDScoreVariables(identification, precision_seq_name)
108 
109  # For any triggers following the tracktwo reconstruction (2023 DeepSet)
110  if chainPart['reconstruction'] == 'tracktwoMVA':
111  currentHypo.TrackPtCut = 1.5*GeV
112  currentHypo.HighPtSelectionLooseIDThr = 200*GeV
113  currentHypo.HighPtSelectionJetThr = 430*GeV
114 
115  # Only monitor chains with the 'tauMon:online' groups
116  if 'tauMon:online' in chainDict['monGroups']:
117  currentHypo.MonTool = getTrigTauPrecisionIDHypoToolMonitoring(flags, name, id_score_monitoring.keys())
118 
119  # TauID Score monitoring
120  currentHypo.MonitoredIDScores = id_score_monitoring
121 
122  return currentHypo
123 
124 
125 #-----------------------------------------------------------------
126 # Meson cut-based triggers configuration (ATR-22644 + ATR-23239)
127 #-----------------------------------------------------------------

◆ TrigTauPrecTrackHypoToolFromDict()

def TrigTauHypoTool.TrigTauPrecTrackHypoToolFromDict (   chainDict)

Definition at line 194 of file TrigTauHypoTool.py.

194 def TrigTauPrecTrackHypoToolFromDict(chainDict):
195  name = chainDict['chainName']
196 
197  from AthenaConfiguration.ComponentFactory import CompFactory
198  currentHypo = CompFactory.TrigTauPrecTrackHypoTool(name)
199 
200  return currentHypo
201 
202 
203 
204 #============================================================================================
205 # FTF steps hypothesis tools (without selection)
206 #============================================================================================

Variable Documentation

◆ DiKaonCuts

TrigTauHypoTool.DiKaonCuts

Definition at line 130 of file TrigTauHypoTool.py.

◆ log

TrigTauHypoTool.log

Definition at line 10 of file TrigTauHypoTool.py.

◆ SinglePionCuts

TrigTauHypoTool.SinglePionCuts

Definition at line 147 of file TrigTauHypoTool.py.

◆ thresholds_dikaon

TrigTauHypoTool.thresholds_dikaon

Definition at line 131 of file TrigTauHypoTool.py.

◆ thresholds_singlepion

TrigTauHypoTool.thresholds_singlepion

Definition at line 148 of file TrigTauHypoTool.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TrigTauHypoTool.TrigTauPrecisionDiKaonHypoToolFromDict
def TrigTauPrecisionDiKaonHypoToolFromDict(flags, chainDict)
Definition: TrigTauHypoTool.py:152
python.HLT.Tau.TauConfigurationTools.useBuiltInTauJetRNNScore
bool useBuiltInTauJetRNNScore(str tau_id, str precision_sequence)
Definition: TauConfigurationTools.py:82
TrigTauHypoTool.TrigTauPrecisionIDHypoToolFromDict
def TrigTauPrecisionIDHypoToolFromDict(flags, chainDict)
Definition: TrigTauHypoTool.py:56
TrigTauHypoTool.TrigTauFastTrackHypoToolFromDict
def TrigTauFastTrackHypoToolFromDict(chainDict)
Definition: TrigTauHypoTool.py:207
TrigTauHypoMonitoring.getTrigTauPrecisionIDHypoToolMonitoring
def getTrigTauPrecisionIDHypoToolMonitoring(flags, str name, list[str] tau_ids)
Definition: TrigTauHypoMonitoring.py:5
python.HLT.Tau.TauConfigurationTools.getChainPrecisionSeqName
str getChainPrecisionSeqName(chainPart)
Definition: TauConfigurationTools.py:67
python.HLT.Tau.TauConfigurationTools.getTauIDScoreVariables
tuple[str, str] getTauIDScoreVariables(str tau_id, str precision_sequence)
Definition: TauConfigurationTools.py:91
python.HLT.Tau.TauConfigurationTools.getPrecisionSequenceTauIDs
list[str] getPrecisionSequenceTauIDs(str precision_sequence)
Sequence TauIDs.
Definition: TauConfigurationTools.py:15
TrigTauHypoMonitoring.getTrigTauPrecisionDiKaonHypoToolMonitoring
def getTrigTauPrecisionDiKaonHypoToolMonitoring(flags, str name)
Definition: TrigTauHypoMonitoring.py:35
TrigTauHypoTool.TrigTauPrecisionHypoToolFromDict
def TrigTauPrecisionHypoToolFromDict(flags, chainDict)
Definition: TrigTauHypoTool.py:15
python.HLT.Tau.TauConfigurationTools.getChainIDConfigName
str getChainIDConfigName(chainPart)
Definition: TauConfigurationTools.py:35
TrigTauHypoTool.TrigTauPrecTrackHypoToolFromDict
def TrigTauPrecTrackHypoToolFromDict(chainDict)
Definition: TrigTauHypoTool.py:194
TrigTauHypoTool.TrigTauCaloMVAHypoToolFromDict
def TrigTauCaloMVAHypoToolFromDict(chainDict)
Definition: TrigTauHypoTool.py:220
readCCLHist.float
float
Definition: readCCLHist.py:83