From bf116d73d06f9376d5a3150e31449af6bdfe66a5 Mon Sep 17 00:00:00 2001 From: Bertrand Martin <martindl@cern.ch> Date: Tue, 9 Apr 2019 10:28:26 +0200 Subject: [PATCH] Resubmission of !22476 Hello, This is a basic resubmission of !22476 for which the CI fails with some weird error. !22476 was submitted before !22450 was merged while it depended on it. Maybe it has something to do, maybe not... Cheers, Bertrand --- .../python/TrigTauAlgorithmsHolder.py | 66 ++++++++++++++--- .../TrigTauRec/python/TrigTauRecConfig.py | 71 ++++++++++++------- .../TriggerMenu/python/menu/MC_pp_v7.py | 22 +----- .../TriggerMenu/python/menu/MC_pp_v8.py | 11 --- .../TriggerMenu/python/menu/Physics_pp_v7.py | 10 --- .../python/menu/Physics_pp_v7_primaries.py | 3 +- .../TriggerMenu/python/menu/SignatureDicts.py | 6 +- .../TriggerMenu/python/tau/TauDef.py | 56 ++++++--------- .../TriggerMenu/python/tau/TauHypoProvider.py | 28 +++----- .../python/tau/generateTauChainDefs.py | 9 +-- 10 files changed, 137 insertions(+), 145 deletions(-) diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py index 491fc8c3c849..6662b5b02e7c 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauAlgorithmsHolder.py @@ -771,7 +771,6 @@ def getTauTrackClassifier(): cppyy.loadDictionary('xAODTau_cDict') input_file_name = 'EFtracks_BDT_classifier_v0.root' - calibrationFolder = 'TrigTauRec/00-11-02/' BDTcut = 0.45 deltaZ0 = 1.0 @@ -782,8 +781,7 @@ def getTauTrackClassifier(): Threshold = BDTcut, DeltaZ0 = deltaZ0, ExpectedFlag = ROOT.xAOD.TauJetParameters.unclassified, - inTrigger = True, - calibFolder = calibrationFolder + inTrigger = True ) ToolSvc += EFtrackBDT @@ -813,6 +811,26 @@ def getTauIDVarCalculator(): cached_instances[_name] = TauIDVarCalculator return TauIDVarCalculator +######################################################################## +# TauJetBDTEvaluator +def getTauJetBDTEvaluator(suffix="TauJetBDT", weightsFile="", calibFolder="", minNTracks=0, maxNTracks=10000): + + _name = sPrefix + suffix + if _name in cached_instances: + return cached_instances[_name] + + from tauRecTools.tauRecToolsConf import TauJetBDTEvaluator + TauJetBDTEvaluator = TauJetBDTEvaluator(name=_name, + weightsFile=weightsFile, + calibFolder=calibFolder, + minNTracks=minNTracks, + maxNTracks=maxNTracks) + from AthenaCommon.AppMgr import ToolSvc + ToolSvc += TauJetBDTEvaluator + cached_instances[_name] = TauJetBDTEvaluator + return TauJetBDTEvaluator + + ######################################################################## # TauJetRNNEvaluator def getTauJetRNNEvaluator(NetworkFile0P="", NetworkFile1P="", NetworkFile3P="", OutputVarname="RNNJetScore", @@ -845,6 +863,40 @@ def getTauJetRNNEvaluator(NetworkFile0P="", NetworkFile1P="", NetworkFile3P="", cached_instances[_name] = TauJetRNNEvaluator return TauJetRNNEvaluator + +######################################################################## +# TauWPDecoratorJetBDT +def getTauWPDecoratorJetBDT(): + + _name = sPrefix + 'TauWPDecoratorJetBDT' + if _name in cached_instances: + return cached_instances[_name] + + import PyUtils.RootUtils as ru + ROOT = ru.import_root() + import cppyy + cppyy.loadDictionary('xAODTau_cDict') + + from AthenaCommon.AppMgr import ToolSvc + from tauRecTools.tauRecToolsConf import TauWPDecorator + TauWPDecorator = TauWPDecorator( name=_name, + flatteningFile1Prong = "FlatJetBDT1P_trigger_v1.root", + flatteningFile3Prong = "FlatJetBDT3P_trigger_v1.root", + CutEnumVals=[ + ROOT.xAOD.TauJetParameters.JetBDTSigVeryLoose, + ROOT.xAOD.TauJetParameters.JetBDTSigLoose, + ROOT.xAOD.TauJetParameters.JetBDTSigMedium, + ROOT.xAOD.TauJetParameters.JetBDTSigTight], + SigEff1P = [0.995, 0.99, 0.97, 0.90], + SigEff3P = [0.995, 0.94, 0.88, 0.78], + ScoreName = "BDTJetScore", + NewScoreName = "BDTJetScoreSigTrans", + DefineWPs = True) + + ToolSvc += TauWPDecorator + cached_instances[_name] = TauWPDecorator + return TauWPDecorator + ######################################################################## # TauWPDecoratorJetRNN def getTauWPDecoratorJetRNN(): @@ -873,18 +925,12 @@ def getTauWPDecoratorJetRNN(): SigEff3P = [0.99, 0.98, 0.865, 0.80], ScoreName = "RNNJetScore", NewScoreName = "RNNJetScoreSigTrans", - DefineWPs = True, - ) + DefineWPs = True ) ToolSvc += TauWPDecorator cached_instances[_name] = TauWPDecorator return TauWPDecorator -# target efficiencies used for 2017 BDT: -# SigEff1P = [0.995, 0.99, 0.97, 0.90], -# SigEff3P = [0.995, 0.94, 0.88, 0.78], - - # end diff --git a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py index 0b6c7b4fa94a..0142f6d6f3be 100644 --- a/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py +++ b/Trigger/TrigAlgorithms/TrigTauRec/python/TrigTauRecConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration """ TrigTauRec """ @@ -56,9 +56,7 @@ class TrigTauRecMerged_Tau (TrigTauRecMerged) : for tool in tools: tool.inTrigger = True - tool.calibFolder = 'TrigTauRec/00-11-02/' - pass - + tool.calibFolder = 'TrigTauRec/00-11-02/' self.Tools = tools @@ -112,7 +110,6 @@ class TrigTauRecMerged_Tau2012 (TrigTauRecMerged) : for tool in tools: tool.inTrigger = True tool.calibFolder = 'TrigTauRec/00-11-02/' - pass self.Tools = tools @@ -171,13 +168,12 @@ class TrigTauRecMerged_TauPreselection (TrigTauRecMerged) : # Cluster-based sub-structure, with dRMax also tools.append(taualgs.getTauSubstructure()) # tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) - tools.append(taualgs.getPileUpCorrection()) + #tools.append(taualgs.getPileUpCorrection()) for tool in tools: tool.inTrigger = True tool.calibFolder = 'TrigTauRec/00-11-02/' - pass self.Tools = tools @@ -235,13 +231,12 @@ class TrigTauRecMerged_TauFTK (TrigTauRecMerged) : # Cluster-based sub-structure, with dRMax also tools.append(taualgs.getTauSubstructure()) # tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) - tools.append(taualgs.getPileUpCorrection()) + #tools.append(taualgs.getPileUpCorrection()) for tool in tools: tool.inTrigger = True tool.calibFolder = 'TrigTauRec/00-11-02/' - pass self.Tools = tools @@ -290,7 +285,6 @@ class TrigTauRecMerged_TauCaloOnly (TrigTauRecMerged) : for tool in tools: tool.inTrigger = True tool.calibFolder = 'TrigTauRec/00-11-02/' - pass self.Tools = tools @@ -338,7 +332,6 @@ class TrigTauRecMerged_TauCaloOnlyMVA (TrigTauRecMerged) : for tool in tools: tool.inTrigger = True tool.calibFolder = 'TrigTauRec/00-11-02/' - pass self.Tools = tools @@ -392,12 +385,25 @@ class TrigTauRecMerged_TauPrecision (TrigTauRecMerged) : # Cluster-based sub-structure, with dRMax also tools.append(taualgs.getTauSubstructure()) # tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) - tools.append(taualgs.getPileUpCorrection()) - + #tools.append(taualgs.getPileUpCorrection()) + tools.append(taualgs.getTauIDVarCalculator()) + tools.append(taualgs.getTauJetBDTEvaluator(suffix="JetBDTEvaluator_1p", + weightsFile="vars2016_pt_gamma_1p_isofix.root", + calibFolder="tauRecTools/00-02-00/", + minNTracks=0, + maxNTracks=1)) + tools.append(taualgs.getTauJetBDTEvaluator(suffix="JetBDTEvaluator_mp", + weightsFile="vars2016_pt_gamma_3p_isofix.root", + calibFolder="tauRecTools/00-02-00/", + minNTracks=2, + maxNTracks=1000)) + tools.append(taualgs.getTauWPDecoratorJetBDT()) + for tool in tools: tool.inTrigger = True - tool.calibFolder = 'TrigTauRec/00-11-02/' - pass + # all but JetBDTEvaluator tunes + if "JetBDTEvaluator" not in "{}".format(tool.name): + tool.calibFolder = 'TrigTauRec/00-11-02/' self.Tools = tools @@ -410,7 +416,7 @@ class TrigTauRecMerged_TauPrecision (TrigTauRecMerged) : class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMerged) : __slots__ = [ '_mytools'] - def __init__(self, name = "TrigTauRecMerged_TauPrecisionMVA", doMVATES=False, doTrackBDT=False, doRNN=False): + def __init__(self, name = "TrigTauRecMerged_TauPrecisionMVA", doMVATES=False, doRNN=False): super( TrigTauRecMerged_TauPrecisionMVA , self ).__init__( name ) @@ -452,10 +458,6 @@ class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMerged) : # tightened to 0.75 mm for tracktwoMVA (until the track BDT can be used) tools.append(taualgs.getTauTrackFinder(applyZ0cut=True, maxDeltaZ0=0.75, prefix='TrigTauTightDZ_')) - if doTrackBDT: - # BDT track classification - tools.append(taualgs.getTauTrackClassifier()) - # Calibrate to calo TES tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=True, correctAxis=False, postfix='_onlyEnergy')) @@ -474,10 +476,25 @@ class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMerged) : # Cluster-based sub-structure, with dRMax also tools.append(taualgs.getTauSubstructure()) # tools.append(taualgs.getEnergyCalibrationLC(correctEnergy=False, correctAxis=True, postfix='_onlyAxis')) - tools.append(taualgs.getPileUpCorrection()) - + #tools.append(taualgs.getPileUpCorrection()) + + # tracktwoEF + if not doMVATES: + tools.append(taualgs.getTauIDVarCalculator()) + tools.append(taualgs.getTauJetBDTEvaluator(suffix="JetBDTEvaluator_1p", + weightsFile="vars2016_pt_gamma_1p_isofix.root", + calibFolder="tauRecTools/00-02-00/", + minNTracks=0, + maxNTracks=1)) + tools.append(taualgs.getTauJetBDTEvaluator(suffix="JetBDTEvaluator_mp", + weightsFile="vars2016_pt_gamma_3p_isofix.root", + calibFolder="tauRecTools/00-02-00/", + minNTracks=2, + maxNTracks=1000)) + tools.append(taualgs.getTauWPDecoratorJetBDT()) + + # tracktwoMVA if doRNN: - # RNN tau ID tools.append(taualgs.getTauJetRNNEvaluator(NetworkFile0P="rnnid_config_0p_v3.json", NetworkFile1P="rnnid_config_1p_v3.json", NetworkFile3P="rnnid_config_mp_v3.json", @@ -487,12 +504,12 @@ class TrigTauRecMerged_TauPrecisionMVA (TrigTauRecMerged) : # flattened RNN score and WP tools.append(taualgs.getTauWPDecoratorJetRNN()) - for tool in tools: tool.inTrigger = True - tool.calibFolder = 'TrigTauRec/00-11-02/' - pass - + # all but JetBDTEvaluator tunes + if "JetBDTEvaluator" not in "{}".format(tool.name): + tool.calibFolder = 'TrigTauRec/00-11-02/' + self.Tools = tools ## add beam type flag diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py index ecb6f8ea0168..0989e06627b2 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v7.py @@ -9,7 +9,7 @@ from copy import deepcopy from AthenaCommon.Logging import logging -log = logging.getLogger( 'MC_pp_v6.py' ) +log = logging.getLogger( 'MC_pp_v7.py' ) #--------------------------------------------------------------------- @@ -981,18 +981,12 @@ def setupMenu(): ['tau35_perf_tracktwo_tau25_perf_tracktwo_ditauT', 'L1_TAU20IM_2TAU12IM' , ['L1_TAU20IM','L1_TAU12IM'],[PhysicsStream, 'express'], ['RATE:MultiTau','BW:Tau'], -1], - ['tau25_idperf_tracktwo2015', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_perf_tracktwo2015', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_medium1_tracktwo2015', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - # Run-II - No BDT: variations ['tau25_perf_calo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_perf_calo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_perf_trackcalo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_perf_tracktwocalo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], # Run-II - With BDT: main calo-based items ['tau25_medium1_calo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_medium1_trackcalo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwocalo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], # Run-II - High-pT variations ['tau35_medium1_calo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], @@ -1009,7 +1003,6 @@ def setupMenu(): ['tau35_perf_ptonly_tau25_perf_ptonly_L1TAU20IM_2TAU12IM', 'L1_TAU20IM_2TAU12IM',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_perf_ptonly","tau25_perf_ptonly"]]], ['tau35_loose1_tracktwo_tau25_loose1_tracktwo_L1TAU20IM_2TAU12IM', 'L1_TAU20IM_2TAU12IM',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_loose1_tracktwo","tau25_loose1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_L1TAU20IM_2TAU12IM', 'L1_TAU20IM_2TAU12IM',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], # Works now ['tau35_medium1_tracktwo_L1TAU20_tau25_medium1_tracktwo_L1TAU12', 'L1_TAU20_2TAU12',['L1_TAU20','L1_TAU12'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo_L1TAU20","tau25_medium1_tracktwo_L1TAU12"]]], @@ -1023,8 +1016,6 @@ def setupMenu(): # new L1Topo chains with 0DR25 (ATR-14349,ATR-15225) ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR27_L1DR25-TAU20ITAU12I', 'L1_DR25-TAU20ITAU12I',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR27_L1DR25-TAU20ITAU12I-J25', 'L1_DR25-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR27_L1DR25-TAU20ITAU12I', 'L1_DR25-TAU20ITAU12I',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR27_L1DR25-TAU20ITAU12I-J25', 'L1_DR25-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], ['tau80_medium1_tracktwo_L1TAU60_tau25_medium1_tracktwo_L1TAU12','L1_TAU60',['L1_TAU60','L1_TAU12'],[PhysicsStream],['RATE:MultiTau', 'BW:Tau'],-1,['serial',-1,["tau80_medium1_tracktwo_L1TAU60","tau25_medium1_tracktwo_L1TAU12"]]], @@ -1034,14 +1025,11 @@ def setupMenu(): # Run-I comparison ['tau25_perf_track_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], # Run-II - With BDT: no pre-selection - ['tau25_medium1_mvonly', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_loose1_ptonly', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_medium1_track', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_medium1_tracktwo_L1TAU20', 'L1_TAU20', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_medium1_ptonly', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_medium1_ptonly_L1TAU20', 'L1_TAU20', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau35_tight1_tracktwo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau35_tight1_ptonly', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_perf_tracktwo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_perf_ptonly', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau125_perf_tracktwo', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], @@ -3233,14 +3221,10 @@ ps_perform_list = [ 'tau125_perf_ptonly', 'tau160_perf_track', 'tau25_idperf_track', - 'tau25_idperf_tracktwo2015', 'tau25_loose1_ptonly', 'tau25_medium1_calo', - 'tau25_medium1_mvonly', 'tau25_medium1_ptonly', 'tau25_medium1_track', - 'tau25_medium1_trackcalo', - 'tau25_medium1_tracktwo2015', 'tau25_medium1_tracktwocalo', 'tau25_perf_calo', 'tau25_perf_calo_L1TAU12', @@ -3248,18 +3232,14 @@ ps_perform_list = [ 'tau25_perf_ptonly_L1TAU12', 'tau25_perf_track', 'tau25_perf_track_L1TAU12', - 'tau25_perf_trackcalo', - 'tau25_perf_tracktwo2015', 'tau25_perf_tracktwo_L1TAU12', 'tau25_perf_tracktwocalo', - 'tau25_tight1_ptonly', 'tau35_loose1_ptonly', 'tau35_medium1_calo', 'tau35_medium1_ptonly', 'tau35_medium1_ptonly_L1TAU20', 'tau35_medium1_track', 'tau35_perf_ptonly', - 'tau35_tight1_ptonly', 'tau5_perf_ptonly_L1TAU8', 'tau80_medium1_calo', 'tau80_medium1_track', diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py index b0fbcaafe01f..f1e72ffddeac 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/MC_pp_v8.py @@ -570,15 +570,10 @@ def setupMenu(): ['tau25_perf_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_loose1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_tight1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_idperf_tracktwoEF', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_perf_tracktwoEF', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwoEF', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_idperf_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_perf_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_medium1NoPt_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_medium1_tracktwoEFmvaTES', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_idperf_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_perf_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], @@ -621,11 +616,7 @@ def setupMenu(): ['tau35_medium1_tracktwo_tau25_medium1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], ['tau35_medium1_tracktwoEF_tau25_medium1_tracktwoEF', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwoEF","tau25_medium1_tracktwoEF"]]], ['tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_mediumRNN_tracktwoMVA","tau25_mediumRNN_tracktwoMVA"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM', 'L1_TAU20IM_2TAU12IM',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], ['tau80_medium1_tracktwo_L1TAU60_tau50_medium1_tracktwo_L1TAU12', 'L1_TAU60',['L1_TAU60','L1_TAU12'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau80_medium1_tracktwo_L1TAU60","tau50_medium1_tracktwo_L1TAU12"]]], ['tau125_medium1_tracktwo_tau50_medium1_tracktwo_L1TAU12', 'L1_TAU60',['L1_TAU60','L1_TAU12'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau125_medium1_tracktwo","tau50_medium1_tracktwo_L1TAU12"]]], ['tau35_perf_tracktwo_tau25_perf_tracktwo_ditauM', 'L1_TAU20IM_2TAU12IM' , ['L1_TAU20IM','L1_TAU12IM'],[PhysicsStream, 'express'], ['RATE:MultiTau','BW:Tau'], -1], @@ -646,8 +637,6 @@ def setupMenu(): ['tau35_tightRNN_tracktwoMVA', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_tightRNN_tracktwoMVA_L1TAU12IM', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_tightRNN_tracktwoMVA_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau35_tight1_tracktwoEF_tau25_tight1_tracktwoEF_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwoEF","tau25_tight1_tracktwoEF"]]], - ['tau35_tight1_tracktwoEF_tau25_tight1_tracktwoEF_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['Primary:20000','RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwoEF","tau25_tight1_tracktwoEF"]]], #ATR-19269 ['tau0_perf_ptonly_L1TAU12', 'L1_TAU12', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py index b3ebb41353eb..06c996ef8e4b 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7.py @@ -1402,13 +1402,11 @@ def setupMenu(): ['tau25_medium1_track', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_loose1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_tight1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], # Run-II - With BDT: main calo-based items # Run-II - With BDT: pt only ['tau25_loose1_ptonly', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_medium1_ptonly', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau25_tight1_ptonly', 'L1_TAU12IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], # Run-II - High-pT variations ['tau35_loose1_tracktwo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_medium1_tracktwo', 'L1_TAU20IM', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], @@ -1438,7 +1436,6 @@ def setupMenu(): ['tau35_loose1_tracktwo_tau25_loose1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_loose1_tracktwo","tau25_loose1_tracktwo"]]], ['tau35_medium1_tracktwo_tau25_medium1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM', 'L1_TAU20IM_2TAU12IM',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], @@ -1460,9 +1457,6 @@ def setupMenu(): ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], # chains for 2e34 backup (ATR-15225) - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30', 'L1_TAU20IM_2TAU12IM_J25_2J20_3J12',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream, 'express'], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30_L1DR-TAU20ITAU12I', 'L1_DR-TAU20ITAU12I',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], ['tau80_medium1_tracktwo_L1TAU60_tau35_medium1_tracktwo_L1TAU12IM_L1TAU60_DR-TAU20ITAU12I', 'L1_TAU60_DR-TAU20ITAU12I',['L1_TAU60','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau80_medium1_tracktwo_L1TAU60","tau35_medium1_tracktwo_L1TAU12IM"]]] , @@ -1495,10 +1489,6 @@ def setupMenu(): ['tau35_kaonpi1_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau25_kaonpi2_tracktwo', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ['tau35_kaonpi2_tracktwo_L1TAU12', 'L1_TAU12', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - - ['tau160_medium1HighptL_tracktwo', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau160_medium1HighptM_tracktwo', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], - ['tau160_medium1HighptH_tracktwo', 'L1_TAU60', [], [PhysicsStream], ['RATE:SingleTau', 'BW:Tau'], -1], ] diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py index 393a3e4deed2..6eddb77e47ba 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py @@ -222,12 +222,11 @@ def setupMenu(): ['tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_medium1_tracktwo","tau25_medium1_tracktwo"]]], - ['tau35_tight1_tracktwo_tau25_tight1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25', 'L1_DR-TAU20ITAU12I-J25',['L1_TAU20IM','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau35_tight1_tracktwo","tau25_tight1_tracktwo"]]], - ['tau80_medium1_tracktwo_L1TAU60_tau35_medium1_tracktwo_L1TAU12IM_L1TAU60_DR-TAU20ITAU12I', 'L1_TAU60_DR-TAU20ITAU12I',['L1_TAU60','L1_TAU12IM'], [PhysicsStream], ['RATE:MultiTau', 'BW:Tau'], -1,['serial',-1,["tau80_medium1_tracktwo_L1TAU60","tau35_medium1_tracktwo_L1TAU12IM"]]] , #ATR-19062 ['tau25_medium1_tracktwo', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], + ['tau25_mediumRNN_tracktwoMVA', 'L1_TAU12IM', [], [PhysicsStream, 'express'], ['RATE:SingleTau', 'BW:Tau'], -1], ] if TriggerFlags.doFTK(): diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py index a10f9132559b..68785341ebd3 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py @@ -259,15 +259,15 @@ TauChainParts = { 'L1item' : '', 'chainPartName': '', 'threshold' : '', - 'preselection' : ['r1', 'FTK', 'FTKRefit', 'FTKNoPrec', 'calo', 'track', 'mvonly', 'ptonly', 'caloonly', 'trackonly', 'tracktwo', 'trackcalo', 'tracktwocalo','tracktwo2015'], - 'selection' : ['medium0','loose1', 'medium1', 'tight1', 'perf', 'perf0', 'r1medium1', 'r1perf', 'cosmic', 'kaonpi1', 'kaonpi2', 'dipion1', 'dipion1loose', 'dipion2', 'dikaon', 'dikaontight', 'dikaonmass', 'dikaonmasstight', 'singlepion', 'singlepiontight', 'medium1HighptL', 'medium1HighptM', 'medium1HighptH'], + 'preselection' : ['r1', 'FTK', 'FTKRefit', 'FTKNoPrec', 'calo', 'track', 'ptonly', 'tracktwo', 'tracktwoEF', 'tracktwoMVA', 't2MVA' ], + 'selection' : ['medium0', 'loose1', 'medium1', 'medium1NoPt', 'perf', 'perf0', 'cosmic', 'kaonpi1', 'kaonpi2', 'dipion1', 'dipion1loose', 'dipion2', 'dipion3', 'dikaon', 'dikaontight', 'dikaonmass', 'dikaonmasstight', 'singlepion', 'singlepiontight', 'verylooseRNN', 'looseRNN', 'mediumRNN', 'mRNN', 'tightRNN'], 'multiplicity' : '', 'trigType' : ['tau'], 'trkInfo' : ['idperf'], 'extra' : '', 'recoAlg' : '', 'calib' : '', - 'addInfo' : ['IdTest'], + 'addInfo' : '', 'topo' : AllowedTopos_Tau, } TauChainParts_Default = { diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py index ed6f36146ee7..b102e6987f34 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauDef.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration """ Tau slice signatures """ @@ -14,7 +14,6 @@ from TrigCaloRec.TrigCaloRecConfig import TrigCaloCellMaker_tau, TrigCaloCluster from TrigFTK_RecAlgs.TrigFTK_RecAlgs_Config import TrigFTK_VxPrimary_EF from TrigInDetConf.TrigInDetFTKSequence import TrigInDetFTKSequence from TrigInDetConf.TrigInDetSequence import TrigInDetSequence -from TrigTauDiscriminant.TrigTauDiscriGetter import TrigTauDiscriGetter2015 from TrigTauHypo.TrigTauHypoBase import HLTTrackTauHypo_rejectNoTracks from TrigTauHypo.TrigTauHypoConf import HLTTauCaloRoiUpdater, HLTTauTrackRoiUpdater from TrigTauRec.TrigTauRecConfig import (TrigTauRecMerged_TauCaloOnly, @@ -291,16 +290,15 @@ class L2EFChain_tau(L2EFChainDef): # Cleaner if-statements # Strategies which need calorimeter pre-selection - needsCaloPre = ['calo', 'ptonly', 'mvonly', 'caloonly', - 'track', 'trackonly', 'tracktwo', 'tracktwoEF', - 'trackcalo', 'tracktwocalo','tracktwo2015'] - needsCaloMVAPre = ['tracktwoEFmvaTES','tracktwoMVA'] + needsCaloPre = ['calo', 'ptonly', + 'track', 'tracktwo', 'tracktwoEF'] + needsCaloMVAPre = ['tracktwoMVA'] # Strategies which need fast-track finding - needsTrackTwoPre = ['tracktwo', 'tracktwoonly', 'tracktwocalo','tracktwo2015'] - needsTrackTwoNoPre = ['tracktwoEF','tracktwoEFmvaTES','tracktwoMVA'] - needsTrackPre = ['track', 'trackonly', 'trackcalo', 'FTK', 'FTKRefit', 'FTKNoPrec'] + needsTrackTwoPre = ['tracktwo', 'tracktwoonly'] + needsTrackTwoNoPre = ['tracktwoEF','tracktwoMVA'] + needsTrackPre = ['track', 'FTK', 'FTKRefit', 'FTKNoPrec'] # Strategies which need Run-II final hypo - needsRun2Hypo = ['calo', 'ptonly', 'mvonly', 'caloonly', 'trackonly', 'track', 'tracktwo', 'tracktwoEF', 'tracktwoEFmvaTES', 'tracktwoMVA', 'tracktwocalo', 'trackcalo', 'FTK', 'FTKRefit', 'FTKNoPrec', 'tracktwo2015'] + needsRun2Hypo = ['calo', 'ptonly', 'track', 'tracktwo', 'tracktwoEF', 'tracktwoMVA', 'FTK', 'FTKRefit', 'FTKNoPrec'] fastTrackingUsed = needsTrackPre + needsTrackTwoPre + needsTrackTwoNoPre @@ -308,17 +306,15 @@ class L2EFChain_tau(L2EFChainDef): preselection2018 = needsCaloMVAPre + needsTrackTwoNoPre # MVA TES for preselection and precision steps MVATES = preselection in needsCaloMVAPre - # track counting based on EF tracks + BDT classification for core tracks - #TrackBDT = preselection in ['tracktwoMVA'] - # can't afford to use track BDT unfortunately, rates too high (especially when including 0p) - TrackBDT = False - # evaluate RNN for triggers using RNN ID, and 2018 support triggers (even those using BDT ID, to avoid too many different precision sequences) - RNN = selection in ['verylooseRNN', 'looseRNN', 'mediumRNN', 'tightRNN'] or preselection in preselection2018 + # evaluate RNN for tracktwoMVA chains + RNN = selection in ['verylooseRNN', 'looseRNN', 'mediumRNN', 'tightRNN'] or preselection in ['tracktwoMVA'] # chains using 2018 features - needsAlgo2018 = (preselection in preselection2018) or MVATES or TrackBDT or RNN + needsAlgo2018 = (preselection in preselection2018) or MVATES or RNN # give unique name to precision sequence + # we could now live with a single flag, but will keep two in case modularity is needed for Run3 triggers + # tracktwoEF is (MVATES=false, RNN=false) and tracktwoMVA is (MVATES=true, RNN=true) use = {True:'', False:'no'} - MVAprefix = '{0}MVATES_{1}TrackBDT_{2}RNN'.format(use[MVATES], use[TrackBDT], use[RNN]) + MVAprefix = '{0}MVATES_{1}RNN'.format(use[MVATES], use[RNN]) #Set the default values @@ -366,7 +362,7 @@ class L2EFChain_tau(L2EFChainDef): if preselection in needsRun2Hypo: # Only run tracking and tau-rec : no need for topoclustering - if preselection == 'caloonly' or preselection == 'trackonly' or selection == 'cosmic': + if selection == 'cosmic': theEFHypo = self.hypoProvider.GetHypo('EF', threshold, 'perf', '', 'r1') else: theEFHypo = self.hypoProvider.GetHypo('EF', threshold, selection, '', 'r1') @@ -377,7 +373,7 @@ class L2EFChain_tau(L2EFChainDef): recmerged = TrigTauRecCosmics_Tau2012() else: if needsAlgo2018: - recmerged = TrigTauRecMerged_TauPrecisionMVA(name='TrigTauMVA_{}'.format(MVAprefix), doMVATES=MVATES, doTrackBDT=TrackBDT, doRNN=RNN) + recmerged = TrigTauRecMerged_TauPrecisionMVA(name='TrigTauMVA_{}'.format(MVAprefix), doMVATES=MVATES, doRNN=RNN) else: recmerged = TrigTauRecMerged_TauPrecision() @@ -393,21 +389,14 @@ class L2EFChain_tau(L2EFChainDef): efidinsideout, self.continueChain('EF', 'tr')]] - # TrigTauRec and Hypo (no BDT) - if selection == 'kaonpi1' or selection == 'kaonpi2' or selection == 'dipion1' or selection=='dipion1loose' or selection == 'dipion2' or selection == 'dipion3' or selection == 'dikaon' or selection == 'dikaontight' or selection == 'dikaonmass' or selection == 'dikaonmasstight' or selection == 'singlepion' or selection == 'singlepiontight': + # TrigTauRec and Hypo (BDT not needed, but now included in TrigTauRecMerged_TauPrecision) + if selection in [ 'kaonpi1', 'kaonpi2', 'dipion1', 'dipion1loose', 'dipion2', 'dipion3', 'dikaon', 'dikaontight', 'dikaonmass', 'dikaonmasstight', 'singlepion', 'singlepiontight' ]: self.EFsequenceList += [[[ self.currentItem ], [recmerged, theEFHypo], - self.continueChain('EF', 'effinal')]] + self.continueChain('EF', 'effinal')]] elif needsAlgo2018: - # don't evaluate BDT for RNN chains - EFsequence = [] - if selection not in ['verylooseRNN', 'looseRNN', 'mediumRNN', 'tightRNN']: - EFsequence.append( TrigTauDiscriGetter2015() ) - - EFsequence.append( theEFHypo ) - self.EFsequenceList += [[[ self.currentItem ], [recmerged], self.continueChain('EF', 'taurecef')]] @@ -419,13 +408,12 @@ class L2EFChain_tau(L2EFChainDef): self.continueChain('EF', 'trackpre')]] self.EFsequenceList += [[[ self.currentItem ], - EFsequence, + [theEFHypo], self.continueChain('EF', 'effinal')]] else: - # TrigTauRec, BDT and Hypo - efmv = TrigTauDiscriGetter2015() + # TrigTauRec (now includes BDT) and Hypo self.EFsequenceList += [[[ self.currentItem ], - [recmerged, efmv, theEFHypo], + [recmerged, theEFHypo], self.continueChain('EF', 'effinal')]] diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauHypoProvider.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauHypoProvider.py index 9bcb6b2af825..7dbb0a4b77d4 100644 --- a/Trigger/TriggerCommon/TriggerMenu/python/tau/TauHypoProvider.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/TauHypoProvider.py @@ -1,5 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration class TauHypoProvider: # Provide a centralized way to store hypotheses for tau trigger chains @@ -63,17 +62,17 @@ class TauHypoProvider: currentHypoKey = 'ef'+part+'_tau'+threshold+'_'+criteria+'_r1' if part == '': - if criteria== 'perf' or criteria== 'perf0' or criteria== 'cosmic': + if criteria in [ 'perf', 'perf0', 'cosmic' ]: from TrigTauHypo.TrigTauHypoConfig2012 import EFTauMVHypo_tauNoCut currentHypo = EFTauMVHypo_tauNoCut(currentHypoKey.replace(threshold, '')) - elif criteria=='dikaon' or criteria=='dikaontight' or criteria=='dikaonmass' or criteria=='dikaonmasstight' or criteria=='kaonpi1' or criteria=='kaonpi2' or criteria=='dipion1' or criteria=='dipion1loose' or criteria=='dipion2' or criteria=='dipion3': + elif criteria in [ 'dikaon', 'dikaontight', 'dikaonmass', 'dikaonmasstight', 'kaonpi1', 'kaonpi2', 'dipion1', 'dipion1loose', 'dipion2', 'dipion3' ]: from TrigTauHypo.TrigTauHypoConfig2012 import EFTauDiKaonHypo theVars = ['massTrkSysMin', 'massTrkSysMax', 'massTrkSysKaonMin', 'massTrkSysKaonMax', 'massTrkSysKaonPiMin', 'massTrkSysKaonPiMax', 'targetMassTrkSysKaonPi', 'leadTrkPtMin','EtCalibMin','EMPOverTrkSysPMax'] theThresh = self.thresholdsEF_dikaon[(criteria, int(threshold))] currentHypo = EFTauDiKaonHypo(currentHypoKey, theVars, theThresh) - elif criteria=='singlepion' or criteria=='singlepiontight': + elif criteria in ['singlepion', 'singlepiontight' ]: from TrigTauHypo.TrigTauHypoConfig2012 import EFTauDiKaonHypo theVars = ['leadTrkPtMin','EtCalibMin','nTrackMax','nWideTrackMax','dRmaxMax','etOverPtLeadTrkMin','etOverPtLeadTrkMax'] theThresh = self.thresholdsEF_singlepion[(criteria, int(threshold))] @@ -91,7 +90,7 @@ class TauHypoProvider: theThresh = self.thresholdsEF[('medium1', 0)] # do not apply pt cut at EF currentHypo = EFTauMVHypo(currentHypoKey, theVars, theThresh) - elif criteria=='verylooseRNN' or criteria=='looseRNN' or criteria=='mediumRNN' or criteria=='tightRNN': + elif criteria in [ 'verylooseRNN', 'looseRNN', 'mediumRNN', 'tightRNN' ]: from TrigTauHypo.TrigTauHypoConfig2012 import EFTauMVHypo theVars = ['NTrackMax', 'EtCalibMin', 'Level'] theThresh = self.thresholdsEF[(criteria, int(threshold))] @@ -105,7 +104,7 @@ class TauHypoProvider: theThresh = self.thresholdsEF[(criteria, int(threshold))] currentHypo = EFTauMVHypo(currentHypoKey, theVars, theThresh) - if strategy == 'calo' or strategy =='ptonly' or strategy == 'mvonly' or strategy == 'caloonly' or strategy == 'track' or strategy == 'trackonly' or strategy == 'tracktwo' or strategy == 'tracktwoEF' or strategy == 'tracktwoEFmvaTES' or strategy == 'tracktwoMVA' or strategy == 'trackcalo' or strategy == 'tracktwocalo' or strategy == 'tracktwo2015' or strategy == 'FTK' or strategy == 'FTKRefit' or strategy == 'FTKNoPrec': + if strategy in [ 'calo', 'ptonly', 'track', 'tracktwo', 'tracktwoEF', 'tracktwoMVA', 'FTK', 'FTKRefit', 'FTKNoPrec' ]: # Simple implementation of 2015 pre-selection currentHypoKey = 'l2'+part+'_tau'+threshold+'_'+criteria+'_'+strategy @@ -120,7 +119,7 @@ class TauHypoProvider: theDetails = [int(-1)] theFormulas = ['y > '+myThreshold] - if strategy =='calo' or strategy == 'caloonly' or strategy == 'tracktwocalo' or strategy == 'trackcalo': + if strategy in [ 'calo' ]: # centFrac cut (detail #24: 2nd order fit, turn-off at ~ 55 GeV, 95% efficiency) theDetails += [24] theFormulas += ['x > (0.945 - (1.26e-05*TMath::Min(y, 50000.)) + (1.05e-10*TMath::Min(y, 50000.)*TMath::Min(y, 50000.)))'] @@ -129,17 +128,6 @@ class TauHypoProvider: currentHypo.Details = theDetails currentHypo.Formulas = theFormulas - #if part == 'calo': - # from TrigTauHypo.TrigTauHypoBase import HLTCaloTauHypo - # theVars = ['LowerPtCut', 'UseCellCut', 'CoreFractionCut', 'HadRadiusCut'] - # if strategy == 'calo' or strategy == 'caloonly': - # theThresh = [int(threshold)*self.GeV, 1, 0.63, 0.8] - # if strategy == 'ptonly' or strategy == 'trackonly' or strategy == 'track' or strategy == 'tracktwo': - # theThresh = [int(threshold)*self.GeV, 0, 0.0, 0.8] - # if strategy == 'mvonly': - # theThresh = [0, 0, 0.0, 0.8] - # currentHypo = HLTCaloTauHypo(currentHypoKey, theVars, theThresh) - if part == 'id': from TrigTauHypo.TrigTauHypoBase import HLTTrackTauHypo from TrigTauHypo.TrigTauHypoConfig2012 import EFTauMVHypo @@ -154,7 +142,7 @@ class TauHypoProvider: theThresh = [0,3,1,0.*self.GeV,-1111,0] currentHypo = EFTauMVHypo(currentHypoKey, theVars, theThresh) else: - if strategy != 'tracktwo' and strategy != 'tracktwoEF' and strategy != 'tracktwoEFmvaTES' and strategy != 'tracktwoMVA' and strategy != 'FTK' and strategy != 'FTKRefit' and strategy != 'FTKNoPrec': + if strategy not in [ 'tracktwo', 'tracktwoEF', 'tracktwoMVA', 'FTK', 'FTKRefit', 'FTKNoPrec' ]: theVars = ['LowerPtCut','LowerTrackPtCut'] theThresh = [int(threshold)*self.GeV,1.*self.GeV] currentHypo = HLTTrackTauHypo(currentHypoKey, theVars, theThresh) diff --git a/Trigger/TriggerCommon/TriggerMenu/python/tau/generateTauChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/tau/generateTauChainDefs.py index 3fea9c29e45d..9a5b66e009cb 100755 --- a/Trigger/TriggerCommon/TriggerMenu/python/tau/generateTauChainDefs.py +++ b/Trigger/TriggerCommon/TriggerMenu/python/tau/generateTauChainDefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration ########################################################################################## ########################################################################################## @@ -31,13 +31,8 @@ def generateChainDefs(chainDict): myProvider = TauHypoProvider() - - for subChainDict in listOfChainDicts: - if "IdTest" in subChainDict["chainParts"]["addInfo"]: - Tau = L2EFChain_tau_IdTest(subChainDict, myProvider) - else: - Tau = L2EFChain_tau(subChainDict, myProvider) + Tau = L2EFChain_tau(subChainDict, myProvider) listOfChainDefs += [Tau.generateHLTChainDef()] -- GitLab