From c338daef31f42c003bf68ff7a3dedd2e905e5282 Mon Sep 17 00:00:00 2001 From: Nils Erik Krumnack <nils.erik.krumnack@cern.ch> Date: Wed, 4 Nov 2020 15:04:07 +0000 Subject: [PATCH] Merge branch '21.2-AT-METbugfix' into '21.2' fixing bug in MET initialization See merge request atlas/athena!37887 (cherry picked from commit 73261ae39e8a857ee0962cae5978d80767d1512b) 65da2c87 fixing bug in MET initialization --- .../xAOD/TopCPTools/Root/TopJetMETCPTools.cxx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopJetMETCPTools.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopJetMETCPTools.cxx index 5e8070464237..bbc12e482acf 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopJetMETCPTools.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopCPTools/Root/TopJetMETCPTools.cxx @@ -204,30 +204,30 @@ namespace top { top::check(jetUpdateJvtTool->initialize(), "Failed to initialize"); m_jetUpdateJvtTool = jetUpdateJvtTool; } - + ///-- Calculate fJVT --/// //Only setup fJVT tool if user actually wants it if (m_config->doForwardJVTinMET() || m_config->getfJVTWP() != "None") { - + const std::string fjvt_tool_name = "JetSelectfJvtTool"; if (asg::ToolStore::contains<IJetModifier>(fjvt_tool_name)) { - m_jetSelectfJvtTool = asg::ToolStore::get<IJetModifier>(fjvt_tool_name); + m_jetSelectfJvtTool = asg::ToolStore::get<IJetModifier>(fjvt_tool_name); } else { - IJetModifier* JetSelectfJvtTool = new JetForwardJvtTool(fjvt_tool_name); - top::check(asg::setProperty(JetSelectfJvtTool, "JvtMomentName", "AnalysisTop_JVT"), //fJVT uses JVT decision - "Failed to set JvtMomentName for JetForwardJvtTool"); - - //Default fJVT WP is medium but this can't be used with default Tight MET WP - //MET WP takes precidence so making ATop default fJVT=Tight - if (m_config->getfJVTWP() != "Medium"){ - top::check(asg::setProperty(JetSelectfJvtTool, "UseTightOP", true), - "Failed to set UseTightOP for JetForwardJvtTool"); - } - top::check(asg::setProperty(JetSelectfJvtTool, "OutputDec", "AnalysisTop_fJVTdecision"), //Adds custom decorator, 'AnalysisTop_fJVTdecision', to all jets - "Failed to set OutputDec for JetForwardJvtTool"); - - top::check(JetSelectfJvtTool->initialize(), "Failed to initialize " + fjvt_tool_name); - m_jetSelectfJvtTool = JetSelectfJvtTool; + IJetModifier* JetSelectfJvtTool = new JetForwardJvtTool(fjvt_tool_name); + top::check(asg::setProperty(JetSelectfJvtTool, "JvtMomentName", "AnalysisTop_JVT"), //fJVT uses JVT decision + "Failed to set JvtMomentName for JetForwardJvtTool"); + + //Default fJVT WP is medium but this can't be used with default Tight MET WP + //MET WP takes precidence so making ATop default fJVT=Tight + if (m_config->getfJVTWP() != "Medium"){ + top::check(asg::setProperty(JetSelectfJvtTool, "UseTightOP", true), + "Failed to set UseTightOP for JetForwardJvtTool"); + } + top::check(asg::setProperty(JetSelectfJvtTool, "OutputDec", "AnalysisTop_fJVTdecision"), //Adds custom decorator, 'AnalysisTop_fJVTdecision', to all jets + "Failed to set OutputDec for JetForwardJvtTool"); + + top::check(JetSelectfJvtTool->initialize(), "Failed to initialize " + fjvt_tool_name); + m_jetSelectfJvtTool = JetSelectfJvtTool; } } @@ -540,14 +540,14 @@ namespace top { } if (m_config->doForwardJVTinMET()) { - if (m_config->getfJVTWP() == "Medium") { - top::check(metMaker->setProperty("JetSelection", "Tenacious"), "Failed to set METMaker JetSelection to Tenacious"); - } + if (m_config->getfJVTWP() == "Medium") { + top::check(metMaker->setProperty("JetSelection", "Tenacious"), "Failed to set METMaker JetSelection to Tenacious"); + } top::check(metMaker->setProperty("JetRejectionDec","AnalysisTop_fJVTdecision"), "Failed to set METMaker JetRejectionDec to AnalysisTop_fJVTdecision"); - top::check(metMaker->initialize(), "Failed to initialize"); - metMaker->msg().setLevel(MSG::INFO); - m_met_maker = metMaker; } + top::check(metMaker->initialize(), "Failed to initialize"); + metMaker->msg().setLevel(MSG::INFO); + m_met_maker = metMaker; } // MET Systematics tool -- GitLab