Skip to content
Snippets Groups Projects
Commit 2762d606 authored by Jean Yves Beaucamp's avatar Jean Yves Beaucamp Committed by Tim Martin
Browse files

Implement Dev menu-specific TauID inferences for the HLT Tau reconstruction

Implement Dev menu-specific TauID inferences for the HLT Tau reconstruction
parent aba1f5d2
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ def TrigTauPrecisionIDHypoToolFromDict(flags, chainDict): ...@@ -81,7 +81,7 @@ def TrigTauPrecisionIDHypoToolFromDict(flags, chainDict):
# Monitor all the included algorithms # Monitor all the included algorithms
used_builtin_rnnscore = False used_builtin_rnnscore = False
for tau_id in getPrecisionSequenceTauIDs(precision_seq_name): for tau_id in getPrecisionSequenceTauIDs(flags, precision_seq_name):
# Skip algs without inference scores # Skip algs without inference scores
if tau_id in ['MesonCuts']: continue if tau_id in ['MesonCuts']: continue
......
...@@ -12,15 +12,23 @@ log = logging.getLogger(__name__) ...@@ -12,15 +12,23 @@ log = logging.getLogger(__name__)
# we split the reconstruction according to the primary ID algorithm to be used, to avoid running unnecesary long inferences # we split the reconstruction according to the primary ID algorithm to be used, to avoid running unnecesary long inferences
# The configuration for each TauID algorithm is contained in the flags.Trigger.Offline.Tau.<TauID> subdirectory # The configuration for each TauID algorithm is contained in the flags.Trigger.Offline.Tau.<TauID> subdirectory
def getPrecisionSequenceTauIDs(precision_sequence: str) -> list[str]: def getPrecisionSequenceTauIDs(flags, precision_sequence: str) -> list[str]:
'''Get the list of TauIDs for each HLT tau trigger sequence''' '''Get the list of TauIDs for each HLT tau trigger sequence'''
tau_ids = { tau_ids = {
'MVA': ['GNTau', 'DeepSet', 'MesonCuts'], 'MVA': ['DeepSet', 'MesonCuts'],
'LLP': ['RNNLLP'], 'LLP': ['RNNLLP'],
'LRT': ['RNNLLP'], 'LRT': ['RNNLLP'],
} }
return tau_ids[precision_sequence] # Additional Tau ID algorithms to run ONLY if we're using the Dev menu
dev_tau_ids = {
'MVA': ['GNTau'],
}
ret = tau_ids[precision_sequence]
if 'Dev_' in flags.Trigger.triggerMenuSetup and precision_sequence in dev_tau_ids: ret += dev_tau_ids[precision_sequence]
return ret
##################################################################### #####################################################################
# This file contains helper functions for the Tau Trigger signature # This file contains helper functions for the Tau Trigger signature
......
...@@ -477,7 +477,7 @@ def tauPrecisionSequenceGenCfg(flags, seq_name, output_name=None, is_probe_leg=F ...@@ -477,7 +477,7 @@ def tauPrecisionSequenceGenCfg(flags, seq_name, output_name=None, is_probe_leg=F
from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getPrecisionSequenceTauIDs from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getPrecisionSequenceTauIDs
return _tauPrecisionSeq(newflags, seq_name, tau_ids=getPrecisionSequenceTauIDs(seq_name), output_name=output_name, is_probe_leg=is_probe_leg) return _tauPrecisionSeq(newflags, seq_name, tau_ids=getPrecisionSequenceTauIDs(flags, seq_name), output_name=output_name, is_probe_leg=is_probe_leg)
@AccumulatorCache @AccumulatorCache
...@@ -487,4 +487,4 @@ def tauPrecisionLRTSequenceGenCfg(flags, seq_name, output_name=None, is_probe_le ...@@ -487,4 +487,4 @@ def tauPrecisionLRTSequenceGenCfg(flags, seq_name, output_name=None, is_probe_le
from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getPrecisionSequenceTauIDs from TriggerMenuMT.HLT.Tau.TauConfigurationTools import getPrecisionSequenceTauIDs
return _tauPrecisionSeq(newflags, seq_name, tau_ids=getPrecisionSequenceTauIDs(seq_name), output_name=output_name, is_probe_leg=is_probe_leg) return _tauPrecisionSeq(newflags, seq_name, tau_ids=getPrecisionSequenceTauIDs(flags, seq_name), output_name=output_name, is_probe_leg=is_probe_leg)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment