diff --git a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleRemoverAlg.cxx b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleRemoverAlg.cxx index 4dcc740a171ee1ef480b851bf42f2322e2292fae..b73f7434f844b343fc7807014785ef3d0058b74e 100644 --- a/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleRemoverAlg.cxx +++ b/PhysicsAnalysis/AnalysisCommon/EventUtils/src/ParticleRemoverAlg.cxx @@ -93,7 +93,7 @@ StatusCode ParticleRemoverAlg::initialize() } // Abort on an unchecked systematics code - // CP::SystematicCode::enableFailure(); + // StatusCode::enableFailure(); // Build the vector of all input and output container names const std::size_t totSize = 1 + m_suffixes.value().size(); // the '1' comes from the InputContainer diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/DesignDecisions.txt b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/DesignDecisions.txt index fa3b09ebac780d23f96a5da829d84f3b48d70385..049470f9fd64d14a202e13f8e0e11b621eb0fdcd 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/DesignDecisions.txt +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/DesignDecisions.txt @@ -77,6 +77,6 @@ recommendations and only compiles in RootCore (so far). user want to request systematics that no tool supports he will have to add them to the global list manually. - * For the time being SystematicCode is simply a renamed copy of + * For the time being StatusCode is simply a renamed copy of StatusCode from EventLoop which is in turn derived from StatusCode in Athena. diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/Global.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/Global.h index fdb65fae0986470dd6fb8d212fdd43114a16336e..42b8277335342983df1cd89baa8603f3dd4d914a 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/Global.h +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/Global.h @@ -18,7 +18,6 @@ namespace CP template<class T> class ICorrectionTool; class MakeSystematicsVector; class ISystematicsTool; - class SystematicCode; class SystematicVariation; class SystematicSet; class SystematicsTool; diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/ISystematicsTool.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/ISystematicsTool.h index 1f06806b4291c0a4c334d3bc3b131931e2a81dc0..e5098466004652bc7187505a94e1d9ee8135c213 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/ISystematicsTool.h +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/ISystematicsTool.h @@ -11,7 +11,7 @@ #include "AsgTools/IAsgTool.h" // Local include(s): -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicSet.h" @@ -64,7 +64,7 @@ namespace CP { /// failures: unsupported combination of supported systematic /// failures: other tool specific errors /// - virtual SystematicCode applySystematicVariation + virtual StatusCode applySystematicVariation ( const SystematicSet& systConfig ) = 0; }; // class ISystematicsTool diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h deleted file mode 100644 index 2106d0fb595fa146b8b8dc14d533e4f46c6f2ff4..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicCode.h +++ /dev/null @@ -1,110 +0,0 @@ -// Dear emacs, this is -*- c++ -*- -// $Id: SystematicCode.h 717600 2016-01-13 17:48:13Z krumnack $ -#ifndef PATINTERFACES_SYSTEMATICCODE_H -#define PATINTERFACES_SYSTEMATICCODE_H - -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Please feel free to contact me (krumnack@iastate.edu) for bug -// reports, feature suggestions, praise and complaints. - -namespace CP { - - /// Return value from CP tools supporting systematic variations - /// - /// This class needs to be used in CP tools that support systematic - /// variations, and implement the interface described in: - /// https://cds.cern.ch/record/1667206 - /// In short, all such CP tools should implement the two following functions: - /// - /// <code> - /// SystematicCode Tool::applySystematicVariation(<br/> - /// const std::set< SystematicVariation >& systConfig );<br/> - /// bool Tool::isAffectedBySystematic( const SystematicVariation& s ) const;<br/> - /// std::set< SystematicVariation > Tool::affectingSystematics(<br/> - /// const std::set< SystematicVariation >& inputSystList ) const; - /// </code> - /// - /// @author Nils Krumnack <krumnack@iastate.edu> - /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> - /// - /// $Revision: 717600 $ - /// $Date: 2016-01-13 18:48:13 +0100 (Wed, 13 Jan 2016) $ - /// - class -#ifndef __CLING__ - [[nodiscard]] -#endif - SystematicCode { - - public: - /// Possible values for the systematic code - enum ESysCode { - Unsupported = 0, ///< The requested systematic is not supported - Ok = 1 ///< The requested systematic will be applied - }; - - /// Constructor with the systematic code - SystematicCode( ESysCode code ); - /// Copy constructor - SystematicCode( const SystematicCode& parent ); - /// Destructor - ~SystematicCode(); - - /// Assignment operator - SystematicCode& operator= ( const SystematicCode& rhs ); - - /// The code stored internally - ESysCode code() const; - - /// Automatic conversion to the enumeration value - operator ESysCode() const { return code(); } - - /// Ordering operator. To make it possible to use this type as an - /// STL container key - bool operator < ( const SystematicCode& rhs ) const { - return m_code < rhs.m_code; - } - - /// Mark the correction code as checked, ignoring its value - void setChecked() const { m_checked = true; } - /// Ignore the correction code, marking it as checked - void ignore() const { setChecked(); } - - /// Enable failure (with a backtrace) on an unchecked systematic code - static void enableFailure(); - /// Disable failure (no backtrace) on an unchecked systematic code - static void disableFailure(); - - private: - ESysCode m_code; ///< The stored systematic code - mutable bool m_checked; ///< Checked status of the object - - }; // class SystematicCode - -} // namespace CP - -namespace asg -{ - template<typename T> struct CheckHelper; - - template<> struct CheckHelper<CP::SystematicCode> - { - /// \brief whether the status code reports a success - static inline bool isSuccess (const CP::SystematicCode& sc) { - return sc == CP::SystematicCode::Ok; } - - /// \brief produce a status code to report success - static inline CP::SystematicCode successCode () { - return CP::SystematicCode::Ok;} - - /// \brief produce a status code to report failure - static inline CP::SystematicCode failureCode () { - return CP::SystematicCode::Unsupported;} - }; -} - -#endif // PATINTERFACES_SYSTEMATICCODE_H diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicRegistry.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicRegistry.h index 78fbe61ccf5e3966a293ee748ab91f49bba25638..73bb4c444b8fa368e31df5e723283396d7dae9d3 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicRegistry.h +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicRegistry.h @@ -49,7 +49,7 @@ namespace CP // Interface methods for editing the registry /// effects: register all the systematics from the tool - SystematicCode registerSystematics (const ISystematicsTool& tool); + StatusCode registerSystematics (const ISystematicsTool& tool); /// description: add a systematic to the global registry set void registerSystematic(const SystematicVariation& systematic); @@ -59,10 +59,10 @@ namespace CP void registerSystematics(const SystematicSet& systematics); /// description: add a systematic to the recommended set - SystematicCode addSystematicToRecommended(const SystematicVariation& systematic); + StatusCode addSystematicToRecommended(const SystematicVariation& systematic); /// description: add a set of systematics to the recommended set - SystematicCode addSystematicsToRecommended(const SystematicSet& systematics); + StatusCode addSystematicsToRecommended(const SystematicSet& systematics); private: /// Private constructor diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicSet.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicSet.h index fb824d49242366b82991d441110971155097a06a..7500a61704a7f707a4c9edfe726e80028de59c66 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicSet.h +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicSet.h @@ -14,7 +14,7 @@ #include <string> #include <functional> -#include <PATInterfaces/SystematicCode.h> +#include <AsgMessaging/StatusCode.h> #include <PATInterfaces/SystematicVariation.h> @@ -91,7 +91,7 @@ namespace CP MATCHTYPE type=FULL) const; /// description: get the subset of systematics matching basename - /// Should this return a SystematicCode instead? + /// Should this return a StatusCode instead? SystematicSet filterByBaseName(const std::string& basename) const; /// description: get the set of base systematic names from this set @@ -129,7 +129,7 @@ namespace CP /// failures: requesting an unsupported variation on an otherwise /// supported systematic (e.g. a 2 sigma variation and the tool /// only supports 1 sigma variations) - static SystematicCode + static StatusCode filterForAffectingSystematics (const SystematicSet& systConfig, const SystematicSet& affectingSystematics, SystematicSet& filteredSystematics); diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicsTool.h b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicsTool.h index 447bb4a8c53dedd2aa66659b9dcc7bd72aa854aa..c5500c8f7687c3a0504f753f139ce263e8359dd6 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicsTool.h +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/PATInterfaces/SystematicsTool.h @@ -14,7 +14,7 @@ // Local include(s): #include "PATInterfaces/ISystematicsTool.h" #include "PATInterfaces/SystematicVariation.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" namespace CP { @@ -100,7 +100,7 @@ namespace CP { /// only supports 1 sigma variations) /// failures: unsupported combination of supported systematic /// failures: other tool specific errors - virtual SystematicCode applySystematicVariation + virtual StatusCode applySystematicVariation ( const SystematicSet& systConfig ); protected: @@ -110,12 +110,12 @@ namespace CP { /// of systematics, if not already there /// guarantee: strong /// failures: out of memory II - SystematicCode addAffectingSystematic + StatusCode addAffectingSystematic ( const SystematicVariation& systematic, bool recommended ); /// effects: add a systematic to the list of recommended systematics /// failures: unsupported systematic - SystematicCode addRecommendedSystematic + StatusCode addRecommendedSystematic ( const SystematicVariation& systematic ); /// effects: add a SystematicSet to the registered systematics. @@ -123,7 +123,7 @@ namespace CP { ( const SystematicSet& systematics ); /// effects: add a SystematicSet to the recommended systematics. - SystematicCode addRecommendedSystematics + StatusCode addRecommendedSystematics ( const SystematicSet& systematics ); /// effects: configure this tool for the given list of systematic @@ -133,7 +133,7 @@ namespace CP { /// failures: out of memory II /// failures: unsupported combination of supported systematics /// failures: other tool specific errors - virtual SystematicCode sysApplySystematicVariation + virtual StatusCode sysApplySystematicVariation ( const SystematicSet& systConfig ) = 0; public: diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicCode.cxx b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicCode.cxx deleted file mode 100644 index a5d8258853c50882bbbf7b5bc05c6041f5dec6b4..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicCode.cxx +++ /dev/null @@ -1,134 +0,0 @@ -// $Id: SystematicCode.cxx 600738 2014-06-07 14:34:05Z krasznaa $ - -// System include(s): -#include <iostream> -#include <cstdlib> - -// Local include(s): -#include "PATInterfaces/SystematicCode.h" - -namespace { - - /// Private class for keeping track of unchecked systematic codes - class UncheckedCounter { - - public: - /// Default constructor - UncheckedCounter() : m_unsupported( 0 ), m_ok( 0 ) {} - /// Destructor - ~UncheckedCounter() { - // If we need to destruct the object, then there must have been - // some unchecked systematic codes. - std::cerr << "Warning in <CP::SystematicCode>:" << std::endl; - std::cerr << "Warning in <CP::SystematicCode>: " - << "Unchecked correction codes encountered during the job" - << std::endl; - if( m_unsupported ) { - std::cerr << "Error in <CP::SystematicCode>: " - << "Number of unchecked unsupporteds: " - << m_unsupported << std::endl; - } - if( m_ok ) { - std::cerr << "Warning in <CP::SystematicCode>: " - << "Number of unchecked okays: " - << m_ok << std::endl; - } - // Let him/her know how to look up the unchecked codes in the easiest - // way: - std::cerr << "Warning in <CP::SystematicCode>: " - << "To fail on an unchecked code, call " - << "CP::SystematicCode::enableFailure() at the job's start" - << std::endl; - std::cerr << "Warning in <CP::SystematicCode>:" << std::endl; - } - - int m_unsupported; ///< Unchecked Unsupported codes - int m_ok; ///< Unchecked Ok codes - - }; // class UncheckedCounter - -} // private namespace - -namespace CP { - - /// Application-wide setup of whether to fail on unchecked systematic codes - /// - /// By default applications will not fail on an uncecked return code, they - /// will just keep track of how many return codes were left unchecked by - /// the user. - /// - static bool s_failure = false; - - SystematicCode::SystematicCode( ESysCode code ) - : m_code( code ), m_checked( false ) { - - } - - SystematicCode::SystematicCode( const SystematicCode& parent ) - : m_code( parent.m_code ), m_checked( false ) { - - // The parent doesn't have to be checked anymore, whatever - // its status was: - parent.m_checked = true; - } - - SystematicCode::~SystematicCode() { - - if( ! m_checked ) { - // If we are supposed to fail, let's fail right away: - if( s_failure ) { - std::cerr << "Fatal in <CP::SystematicCode::~SystematicCode> " - << "Unchecked systematic code encountered" << std::endl; - std::abort(); - } - // Global variable for keeping track of unchecked systematic codes. - // It gets deleted only at the end of the process. - static ::UncheckedCounter s_counter; - if( m_code == Unsupported ) { - s_counter.m_unsupported += 1; - } else if( m_code == Ok ) { - s_counter.m_ok += 1; - } else { - std::cerr << "Fatal in <CP::SystematicCode::~SystematicCode> " - << "Unknown systematic code encountered" << std::endl; - std::abort(); - } - } - } - - SystematicCode& SystematicCode::operator= ( const SystematicCode& rhs ) { - - // Check if anything needs to be done: - if( this == &rhs ) { - return *this; - } - - // Copy the code: - m_code = rhs.m_code; - - // Update the internal flags: - m_checked = false; - rhs.m_checked = true; - - return *this; - } - - SystematicCode::ESysCode SystematicCode::code() const { - - setChecked(); - return m_code; - } - - void SystematicCode::enableFailure() { - - s_failure = true; - return; - } - - void SystematicCode::disableFailure() { - - s_failure = false; - return; - } - -} // namespace CP diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicRegistry.cxx b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicRegistry.cxx index 5844710b33b3973d06c3bace08cd71f6da9f49ba..5534b12ebe5d342773f0b3348f4fb99449287b28 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicRegistry.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicRegistry.cxx @@ -12,7 +12,7 @@ #include <PATInterfaces/SystematicRegistry.h> #include <PATInterfaces/ISystematicsTool.h> #include <PATInterfaces/SystematicSet.h> -#include <PATInterfaces/SystematicCode.h> +#include <AsgMessaging/StatusCode.h> // // method implementations @@ -41,7 +41,7 @@ namespace CP } - SystematicCode SystematicRegistry :: + StatusCode SystematicRegistry :: registerSystematics (const ISystematicsTool& tool) { registerSystematics (tool.affectingSystematics()); @@ -68,31 +68,31 @@ namespace CP // Add a systematic to the configuratin set - SystematicCode SystematicRegistry::addSystematicToRecommended + StatusCode SystematicRegistry::addSystematicToRecommended (const SystematicVariation& systematic) { // Check for consistency if(!m_globalSystematics.matchSystematic(systematic, SystematicSet::FULLORCONTINUOUS)) { - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } m_recommendedSystematics.insert(systematic); - return SystematicCode::Ok; + return StatusCode::SUCCESS; } // Add a systematic set to the configuration set - SystematicCode SystematicRegistry::addSystematicsToRecommended + StatusCode SystematicRegistry::addSystematicsToRecommended (const SystematicSet& systematics) { std::set<SystematicVariation>::const_iterator sysItr; for(sysItr = systematics.begin(); sysItr != systematics.end(); ++sysItr) { - SystematicCode code = addSystematicToRecommended(*sysItr); - if(code != SystematicCode::Ok) return code; + StatusCode code = addSystematicToRecommended(*sysItr); + if(code != StatusCode::SUCCESS) return code; } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicSet.cxx b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicSet.cxx index 0ab4a057acb0cafda6a0ce9544e4f45715658a1b..dee5cbb6b7ce84f1e3b942d43cc795d8d6ad464f 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicSet.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicSet.cxx @@ -211,7 +211,7 @@ namespace CP // Filter requested systematics with affecting systematics - SystematicCode SystematicSet::filterForAffectingSystematics + StatusCode SystematicSet::filterForAffectingSystematics (const SystematicSet& systConfig, const SystematicSet& affectingSysts, SystematicSet& filteredSysts) { @@ -234,7 +234,7 @@ namespace CP if (iter != requestedMap.end()) { ANA_MSG_ERROR ("inconsistent systematic variations requested: " << sys << " and " << iter->second); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } requestedMap.insert (std::make_pair (basename, sys)); } @@ -266,13 +266,13 @@ namespace CP if (result.find (sys) == result.end()) { ANA_MSG_ERROR ("unsupported systematic variation " << sys << " requested for systematic " << sys.basename()); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } } // everything worked out, let's commit now result.swap (filteredSysts); - return SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicsTool.cxx b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicsTool.cxx index 85224e99f07254232fa8909eca91a764438c2557..a914c13d6a5d4bebe276abf5f821eee9abc91b06 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicsTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/Root/SystematicsTool.cxx @@ -14,7 +14,7 @@ // Local include(s): #include "PATInterfaces/SystematicsTool.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" @@ -68,7 +68,7 @@ namespace CP { return m_appliedSystematics->name(); } - SystematicCode SystematicsTool:: + StatusCode SystematicsTool:: applySystematicVariation( const SystematicSet& systConfig ) { RCU_CHANGE_INVARIANT( this ); @@ -85,8 +85,8 @@ namespace CP { filterForAffectingSystematics( systConfig, m_affectingSystematics, myAppliedSystematics ) != - SystematicCode::Ok ) { - return SystematicCode::Unsupported; + StatusCode::SUCCESS ) { + return StatusCode::FAILURE; } // Insert the new filtered set onto our filter map @@ -97,16 +97,16 @@ namespace CP { // Apply the filtered systematics if( sysApplySystematicVariation( itr->second ) != - SystematicCode::Ok ) { - return SystematicCode::Unsupported; + StatusCode::SUCCESS ) { + return StatusCode::FAILURE; } // Store the filtered systematics m_appliedSystematics = &itr->second; - return SystematicCode::Ok; + return StatusCode::SUCCESS; } - SystematicCode SystematicsTool:: + StatusCode SystematicsTool:: addAffectingSystematic( const SystematicVariation& systematic, bool recommended ) { RCU_READ_INVARIANT( this ); @@ -115,14 +115,14 @@ namespace CP { reg.registerSystematic( systematic ); m_affectingSystematics.insert( systematic ); if( recommended ) { - if( addRecommendedSystematic(systematic) != SystematicCode::Ok ) { - return SystematicCode::Unsupported; + if( addRecommendedSystematic(systematic) != StatusCode::SUCCESS ) { + return StatusCode::FAILURE; } } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } - SystematicCode SystematicsTool:: + StatusCode SystematicsTool:: addRecommendedSystematic( const SystematicVariation& systematic ) { RCU_READ_INVARIANT( this ); @@ -130,10 +130,10 @@ namespace CP { SystematicRegistry& reg = SystematicRegistry::getInstance(); m_recommendedSystematics.insert( systematic ); if( reg.addSystematicToRecommended( systematic ) != - SystematicCode::Ok ) { - return SystematicCode::Unsupported; + StatusCode::SUCCESS ) { + return StatusCode::FAILURE; } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } void SystematicsTool:: @@ -146,7 +146,7 @@ namespace CP { reg.registerSystematics( systematics ); } - SystematicCode SystematicsTool:: + StatusCode SystematicsTool:: addRecommendedSystematics( const SystematicSet& systematics ) { RCU_READ_INVARIANT( this ); @@ -154,10 +154,10 @@ namespace CP { SystematicRegistry& reg = SystematicRegistry::getInstance(); m_recommendedSystematics.insert( systematics ); if( reg.addSystematicsToRecommended( systematics ) != - SystematicCode::Ok ) { - return SystematicCode::Unsupported; + StatusCode::SUCCESS ) { + return StatusCode::FAILURE; } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } void SystematicsTool::testInvariant() const { diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/gt_SystematicSet.cxx b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/gt_SystematicSet.cxx index 49e010b7f4ebedd4328d94ac4a1601e5b6e71816..9fb220ae9ecf1df2748ae65b8dc22afc3cdbc280 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/gt_SystematicSet.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/gt_SystematicSet.cxx @@ -11,6 +11,7 @@ #include <PATInterfaces/SystematicSet.h> +#include <AsgMessaging/MessageCheck.h> #include <RootCoreUtils/Assert.h> #include <cmath> #include <gtest/gtest.h> diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/inc_SystematicCode.cxx b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/inc_SystematicCode.cxx index aae4379d55a65953b325282e647837cb795fb738..8378b992fb6532c6f6d9b215a11203adfae94a3f 100644 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/inc_SystematicCode.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/inc_SystematicCode.cxx @@ -9,7 +9,7 @@ // includes // -#include <PATInterfaces/SystematicCode.h> +#include <AsgMessaging/StatusCode.h> // // main program @@ -17,8 +17,8 @@ int main () { - CP::SystematicCode c1( CP::SystematicCode::Ok ); - CP::SystematicCode c2( CP::SystematicCode::Unsupported ); + StatusCode c1( StatusCode::SUCCESS ); + StatusCode c2( StatusCode::FAILURE ); c2.ignore(); diff --git a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/ut_syst_dict.py b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/ut_syst_dict.py index d0039c22011145e56847b084d67d00734f65929e..8e807822b56948fd8a7f4a6f9b78320614c6c007 100755 --- a/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/ut_syst_dict.py +++ b/PhysicsAnalysis/AnalysisCommon/PATInterfaces/test/ut_syst_dict.py @@ -10,8 +10,9 @@ gSystem.Load('libPATInterfaces.so') gSystem.Load('libRootCoreUtils.so') # For the TestInvariant dependency # Import the systematics classes +from ROOT import StatusCode from ROOT.CP import SystematicVariation, SystematicSet -from ROOT.CP import SystematicCode, SystematicRegistry +from ROOT.CP import SystematicRegistry from ROOT.CP import make_systematics_vector # Build a dumb set of systematics @@ -31,7 +32,7 @@ sys_reg = SystematicRegistry.getInstance() # Register the systematics sys_reg.registerSystematics(sys_set) code = sys_reg.addSystematicsToRecommended(sys_set) -if code.code() != SystematicCode.Ok: +if code.isFailure(): raise Exception('Failed to call SystematicRegistry::addSystematicsToRecommended') # Build a systematics list diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/PMGTools/PMGTruthWeightTool.h b/PhysicsAnalysis/AnalysisCommon/PMGTools/PMGTools/PMGTruthWeightTool.h index 935571ad6e8edc2f9b9f02d831c044dd8d4a6bf3..eeaaf849c5d726e026a29b49829675e73a1652fe 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGTools/PMGTools/PMGTruthWeightTool.h +++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/PMGTools/PMGTruthWeightTool.h @@ -74,7 +74,7 @@ namespace PMGTools virtual CP::SystematicSet recommendedSystematics() const override; /// Implements interface from ISystematicsTool - virtual CP::SystematicCode applySystematicVariation(const CP::SystematicSet& systConfig) override; + virtual StatusCode applySystematicVariation(const CP::SystematicSet& systConfig) override; /// @} diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGTruthWeightTool.cxx b/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGTruthWeightTool.cxx index fc1f8fccc374d93c89f8ab3785bf064c886e8a89..1e5cf58d3c7078ce7b8f3801dce3b1684e1751b6 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGTruthWeightTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/Root/PMGTruthWeightTool.cxx @@ -173,17 +173,17 @@ namespace PMGTools } - CP::SystematicCode PMGTruthWeightTool::applySystematicVariation(const CP::SystematicSet& systConfig) + StatusCode PMGTruthWeightTool::applySystematicVariation(const CP::SystematicSet& systConfig) { auto iter = m_weightData.find (systConfig); if (iter != m_weightData.end()) { m_currentWeightData = &iter->second; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } CP::SystematicSet currentSys; - ANA_CHECK_SET_TYPE (CP::SystematicCode); + ANA_CHECK_SET_TYPE (StatusCode); ANA_CHECK (CP::SystematicSet::filterForAffectingSystematics (systConfig, m_systematicsSet, currentSys)); WeightData currentWeight{}; @@ -196,7 +196,7 @@ namespace PMGTools auto insert = m_weightData.emplace(systConfig, std::move(currentWeight)); m_currentWeightData = &insert.first->second; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/PileupReweighting/PileupReweightingTool.h b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/PileupReweighting/PileupReweightingTool.h index bdd43a31fdb805f949c825395dac7e842344c152..b7892fa32ca5664417808f155d27dca75b69b253 100644 --- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/PileupReweighting/PileupReweightingTool.h +++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/PileupReweighting/PileupReweightingTool.h @@ -123,7 +123,7 @@ namespace CP { bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const; CP::SystematicSet affectingSystematics() const; CP::SystematicSet recommendedSystematics() const; - CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ); + StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ); #ifndef XAOD_STANDALONE void updateHandler(Gaudi::Details::PropertyBase& /*p*/); diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx index 8c5ecf033fa85a47df9a92ea1da1adc3073c3bd8..816917dd6b9641fbc7ef29ae1d3f6a6b6a0c554c 100644 --- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/PileupReweightingTool.cxx @@ -124,21 +124,21 @@ CP::SystematicSet PileupReweightingTool::recommendedSystematics() const { return affectingSystematics(); } -CP::SystematicCode PileupReweightingTool::applySystematicVariation( const CP::SystematicSet& systConfig ) { +StatusCode PileupReweightingTool::applySystematicVariation( const CP::SystematicSet& systConfig ) { if(systConfig.find( m_systUp ) != systConfig.end() && systConfig.find( m_systDown ) != systConfig.end()) { ATH_MSG_ERROR("Errr... what the!? You're trying to do both PRW_DATASF directions at the same time!!!??"); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } if(systConfig.find( m_systUp ) != systConfig.end()) { - if(!m_upTool) { ATH_MSG_ERROR("Requested up variation of PRW_DATASF, but not configured to do this :-("); return SystematicCode::Unsupported; } + if(!m_upTool) { ATH_MSG_ERROR("Requested up variation of PRW_DATASF, but not configured to do this :-("); return StatusCode::FAILURE; } m_activeTool = m_upTool.get(); } else if(systConfig.find( m_systDown ) != systConfig.end() ) { - if(!m_downTool) { ATH_MSG_ERROR("Requested down variation of PRW_DATASF, but not configured to do this :-("); return SystematicCode::Unsupported; } + if(!m_downTool) { ATH_MSG_ERROR("Requested down variation of PRW_DATASF, but not configured to do this :-("); return StatusCode::FAILURE; } m_activeTool = m_downTool.get(); } else m_activeTool = this; - return SystematicCode::Ok; + return StatusCode::SUCCESS; } @@ -271,7 +271,7 @@ StatusCode PileupReweightingTool::initialize() { //register ourselves with the systematic registry! CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); - if( registry.registerSystematics( *this ) != CP::SystematicCode::Ok ) return StatusCode::FAILURE; + if( registry.registerSystematics( *this ) != StatusCode::SUCCESS ) return StatusCode::FAILURE; //delay initializing underlying tool until first usage, just in case user wants to do any advanced initialization options diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/PileupReweightingProvider.h b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/PileupReweightingProvider.h index 03f7434f53f8ca8584761611115351256f7163b4..22fecd441d5befd38afe231cfcdc800b744ab887 100644 --- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/PileupReweightingProvider.h +++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/PileupReweightingProvider.h @@ -75,11 +75,11 @@ class PileupReweightingProvider : public AthAlgorithm { ATH_MSG_VERBOSE("Doing systematic : " << syst.name()); if(! m_tool->isAffectedBySystematic( syst )) continue; CP::SystematicSet tmp; tmp.insert( syst ); - if( m_tool->applySystematicVariation( tmp ) != CP::SystematicCode::Ok ) continue; + if( m_tool->applySystematicVariation( tmp ) != StatusCode::SUCCESS ) continue; CHECK( m_tool->apply(*evtInfo) ); } //make sure we leave the tool in the nominal mode - if( m_tool->applySystematicVariation( CP::SystematicSet() ) != CP::SystematicCode::Ok ) return StatusCode::FAILURE; + if( m_tool->applySystematicVariation( CP::SystematicSet() ) != StatusCode::SUCCESS ) return StatusCode::FAILURE; } return StatusCode::SUCCESS; diff --git a/PhysicsAnalysis/AnalysisCommon/ReweightUtils/ReweightUtils/ParticleScaleFactorTool.h b/PhysicsAnalysis/AnalysisCommon/ReweightUtils/ReweightUtils/ParticleScaleFactorTool.h index 4635d61842834817256eb6a0923132d6a1a8bea8..897ce417d16beda4f239d81930e26f99dde4621d 100644 --- a/PhysicsAnalysis/AnalysisCommon/ReweightUtils/ReweightUtils/ParticleScaleFactorTool.h +++ b/PhysicsAnalysis/AnalysisCommon/ReweightUtils/ReweightUtils/ParticleScaleFactorTool.h @@ -57,7 +57,7 @@ class ParticleScaleFactorTool: public asg::AsgTool, public virtual IObservableTo bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const override { return (m_affectingSysts.find(systematic)!=m_affectingSysts.end()); } CP::SystematicSet affectingSystematics() const override { return m_affectingSysts; } CP::SystematicSet recommendedSystematics() const override { return affectingSystematics(); } - CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ) override; + StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ) override; private: std::string m_configFile; diff --git a/PhysicsAnalysis/AnalysisCommon/ReweightUtils/Root/ParticleScaleFactorTool.cxx b/PhysicsAnalysis/AnalysisCommon/ReweightUtils/Root/ParticleScaleFactorTool.cxx index 464f540fdef147c9ad75cff13f15cfeab7ab51bf..b45634ef66376275240fce3540ae86fb64a432c4 100644 --- a/PhysicsAnalysis/AnalysisCommon/ReweightUtils/Root/ParticleScaleFactorTool.cxx +++ b/PhysicsAnalysis/AnalysisCommon/ReweightUtils/Root/ParticleScaleFactorTool.cxx @@ -181,7 +181,7 @@ StatusCode ParticleScaleFactorTool::initialize() { delete f; f = 0; - if(CP::SystematicRegistry::getInstance().registerSystematics(*this) != CP::SystematicCode::Ok ) return StatusCode::FAILURE; + if(CP::SystematicRegistry::getInstance().registerSystematics(*this) != StatusCode::SUCCESS ) return StatusCode::FAILURE; return StatusCode::SUCCESS; } @@ -238,18 +238,18 @@ const std::pair<CP::SystematicVariation,TH1*> ParticleScaleFactorTool::Hists::ge -CP::SystematicCode ParticleScaleFactorTool::applySystematicVariation( const CP::SystematicSet& systConfig ) { +StatusCode ParticleScaleFactorTool::applySystematicVariation( const CP::SystematicSet& systConfig ) { for(auto& syst : systConfig) { for(auto& s : m_affectingSysts) { if(s.basename()==syst.basename()) { m_currentSyst = syst; m_isNominal=false; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } } } m_currentSyst = CP::SystematicVariation(""); m_isNominal = true; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h index a4ffd2a0ba6e9073121671f00b44ed1766fc170f..4c0624c22067b7b9e8a9accee93d6a9d8b474778 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/AsgElectronEfficiencyCorrectionTool.h @@ -83,9 +83,9 @@ public: } /// Configure this tool for the given systematics - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) ; + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& systConfig ) ; - CP::SystematicCode registerSystematics(); + StatusCode registerSystematics(); int systUncorrVariationIndex( const xAOD::Electron &inputObject) const; @@ -102,7 +102,7 @@ private: /// The main calculate method: the actual correction factors are determined here - CP::SystematicCode InitSystematics(); + StatusCode InitSystematics(); // struct for toys struct SystConf{ diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h index 273a2d606c0c8807e0900075af05a9a69d9f4314..522c3439f88453b5b41b5d1abce619561f4d5d43 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h @@ -74,9 +74,9 @@ namespace CP { /// Returns the list of all systematics this tool recommends to use virtual CP::SystematicSet recommendedSystematics() const; - virtual CP::SystematicCode applySystematicVariation( const SystematicSet& systConfig ); + virtual StatusCode applySystematicVariation( const SystematicSet& systConfig ); - CP::SystematicCode registerSystematics(); + StatusCode registerSystematics(); /// returns: the currently applied systematics const CP::SystematicSet& appliedSystematics() const { diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx index 385b3a75a4d67cf1a3d72461a13d8680dba39229..746c038b404b4f113a99e71270922ef02c89d687 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/AsgElectronEfficiencyCorrectionTool.cxx @@ -228,17 +228,17 @@ AsgElectronEfficiencyCorrectionTool::initialize() { } //Initialize the systematics - if (InitSystematics() != CP::SystematicCode::Ok) { - ATH_MSG_ERROR("(InitSystematics() != CP::SystematicCode::Ok)"); + if (InitSystematics() != StatusCode::SUCCESS) { + ATH_MSG_ERROR("(InitSystematics() != StatusCode::SUCCESS)"); return StatusCode::FAILURE; } // Add the recommended systematics to the registry - if (registerSystematics() != CP::SystematicCode::Ok) { - ATH_MSG_ERROR("(registerSystematics() != CP::SystematicCode::Ok)"); + if (registerSystematics() != StatusCode::SUCCESS) { + ATH_MSG_ERROR("(registerSystematics() != StatusCode::SUCCESS)"); return StatusCode::FAILURE; } // Configure for nominal systematics - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) { + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Could not configure for nominal settings"); return StatusCode::FAILURE; } @@ -465,15 +465,15 @@ AsgElectronEfficiencyCorrectionTool::affectingSystematics() const { return m_affectedSys; } // Register the systematics with the registry and add them to the recommended list -CP::SystematicCode +StatusCode AsgElectronEfficiencyCorrectionTool::registerSystematics() { CP::SystematicRegistry ®istry = CP::SystematicRegistry::getInstance(); - if (registry.registerSystematics(*this) != CP::SystematicCode::Ok) { + if (registry.registerSystematics(*this) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Failed to add systematic to list of recommended systematics."); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } /// returns: the list of all systematics this tool recommends to use CP::SystematicSet @@ -481,7 +481,7 @@ AsgElectronEfficiencyCorrectionTool::recommendedSystematics() const { return affectingSystematics(); } /// Apply one variation at a time -CP::SystematicCode +StatusCode AsgElectronEfficiencyCorrectionTool::applySystematicVariation(const CP::SystematicSet &systConfig) { // First, check if this configuration exists in the filtered map/registy auto itr = m_systFilter.find(systConfig); @@ -497,12 +497,12 @@ AsgElectronEfficiencyCorrectionTool::applySystematicVariation(const CP::Systemat CP::SystematicSet filteredSys; if (!CP::SystematicSet::filterForAffectingSystematics(systConfig, affectingSys, filteredSys)) { ATH_MSG_ERROR("Unsupported combination of systematic variations passed to the tool!"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // Does filtered make sense , only one per time if (filteredSys.size() > 1) { ATH_MSG_ERROR("More than one systematic variation passed at the same time"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } if (filteredSys.empty() && !systConfig.empty()) { @@ -519,10 +519,10 @@ AsgElectronEfficiencyCorrectionTool::applySystematicVariation(const CP::Systemat CP::SystematicSet &mySysConf = itr->second; m_appliedSystematics = &mySysConf; } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } -CP::SystematicCode +StatusCode AsgElectronEfficiencyCorrectionTool::InitSystematics() { // Correlated @@ -561,7 +561,7 @@ AsgElectronEfficiencyCorrectionTool::InitSystematics() { Form("UncorrUncertaintyNP%d", i), -1)); } } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } /* diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx index dc7043aaa8c9ac40188c8772a717c1d5f31bbb48..72322f2e50054c2a5df007e8506923dbd2403460 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx @@ -655,16 +655,16 @@ CP::SystematicSet CP::ElectronChargeEfficiencyCorrectionTool::recommendedSystem ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Gets a SystematicSet and filters it -CP::SystematicCode CP::ElectronChargeEfficiencyCorrectionTool::applySystematicVariation( const SystematicSet& systConfig ) { +StatusCode CP::ElectronChargeEfficiencyCorrectionTool::applySystematicVariation( const SystematicSet& systConfig ) { if (!SystematicSet::filterForAffectingSystematics(systConfig, m_affectingSys, m_mySysConf)){ ATH_MSG_ERROR("Unsupported combination of systematics passed to the tool! "); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/SFHelpers.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/SFHelpers.cxx index 82e01a335a1fb1df8dbe5fe92ddbd3bb335c7f7b..375451720f4486df10cf686c58cdf952ef93012b 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/SFHelpers.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/util/SFHelpers.cxx @@ -43,7 +43,7 @@ int SFHelpers::result(AsgElectronEfficiencyCorrectionTool& tool, double total2{} ; double systematic{}; for(const auto& sys : variations){ - if(tool.applySystematicVariation({sys})!=CP::SystematicCode::Ok || + if(tool.applySystematicVariation({sys})!=StatusCode::SUCCESS || tool.getEfficiencyScaleFactor(el,systematic) != CP::CorrectionCode::Ok){ MSG_ERROR("Error in setting/getting " << sys.name()); return CP::CorrectionCode::Error; @@ -75,7 +75,7 @@ int SFHelpers::result(AsgElectronEfficiencyCorrectionTool& tool, //Do the work for (const auto& sys : toys){ double systematic{}; - CHECK(tool.applySystematicVariation(sys)==CP::SystematicCode::Ok && + CHECK(tool.applySystematicVariation(sys)==StatusCode::SUCCESS && tool.getEfficiencyScaleFactor(el,systematic) == CP::CorrectionCode::Ok); MSG_DEBUG( tool.appliedSystematics().name() << " toy Result : " <<systematic) toysVal.push_back(systematic); diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h index 9be0c21f18002ec2bea751c1d2688bcc9043ce9d..cf7d530c0b9b83d87866754c376f7dce35164422 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h @@ -118,7 +118,7 @@ public: //Systematics to be used for physics analysis virtual CP::SystematicSet recommendedSystematics() const override; //Use specific systematic - virtual CP::SystematicCode applySystematicVariation(const CP::SystematicSet& systConfig) override; + virtual StatusCode applySystematicVariation(const CP::SystematicSet& systConfig) override; virtual void setRandomSeed(unsigned seed=0) override; virtual void setRandomSeedFunction(const IdFunction&& function) { m_set_seed_function = function; } const IdFunction getRandomSeedFuction() const { return m_set_seed_function; } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx index 82397858f7f3491adba774df87a9d38c0e54558b..df8f2686cf82eb310fc2ee9730645d27ddcb8f24 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx @@ -489,7 +489,7 @@ StatusCode EgammaCalibrationAndSmearingTool::initialize() { applySystematicVariation(CP::SystematicSet()).ignore(); // this set the flags for the internal tool without systematics CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); - if ( registry.registerSystematics( *this ) != CP::SystematicCode::Ok ) return StatusCode::FAILURE; + if ( registry.registerSystematics( *this ) != StatusCode::SUCCESS ) return StatusCode::FAILURE; return StatusCode::SUCCESS; } @@ -1144,7 +1144,7 @@ CP::SystematicSet EgammaCalibrationAndSmearingTool::recommendedSystematics() con return affectingSystematics(); } -CP::SystematicCode EgammaCalibrationAndSmearingTool::applySystematicVariation(const CP::SystematicSet& systConfig) { +StatusCode EgammaCalibrationAndSmearingTool::applySystematicVariation(const CP::SystematicSet& systConfig) { // set the nominal one (no systematics) m_currentScaleVariation_MC = egEnergyCorr::Scale::None; @@ -1153,7 +1153,7 @@ CP::SystematicCode EgammaCalibrationAndSmearingTool::applySystematicVariation(co m_currentResolutionVariation_data = egEnergyCorr::Resolution::None; m_currentScalePredicate = [](const xAOD::Egamma&) { return true; }; - if (systConfig.size() == 0) return CP::SystematicCode::Ok; + if (systConfig.size() == 0) return StatusCode::SUCCESS; // the following code allows only ONE systematic variation at a time (1 for scale, 1 for resolution) @@ -1182,7 +1182,7 @@ CP::SystematicCode EgammaCalibrationAndSmearingTool::applySystematicVariation(co } } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } double EgammaCalibrationAndSmearingTool::intermodule_correction(double Ecl, double phi, double eta) const diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx index 221f67b3fb8becafb5698241c3f2a6a917fc4f29..a7cb4415e346ff2f0da585f671d9304cf6ea8b96 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/dumpAllSystematics.cxx @@ -24,7 +24,7 @@ #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h" #include "GaudiKernel/ITHistSvc.h" @@ -343,7 +343,7 @@ StatusCode DumpAllSystematics::do_energy(xAOD::Egamma& particle, int itool) m_nominal_E[itool] = m_energy_variations_sum_up[itool] = m_energy_variations_sum_down[itool] = -999.; std::fill(m_energy_variations[itool].begin(), m_energy_variations[itool].end(), -999.); - if (m_EgammaCalibrationAndSmearingTools[itool]->applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) { + if (m_EgammaCalibrationAndSmearingTools[itool]->applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) { ATH_MSG_ERROR("cannot apply nominal energy"); return StatusCode::FAILURE; } @@ -367,7 +367,7 @@ StatusCode DumpAllSystematics::do_energy(xAOD::Egamma& particle, int itool) CP::SystematicSet ss; ss.insert(sys); - if (m_EgammaCalibrationAndSmearingTools[itool]->applySystematicVariation(ss) != CP::SystematicCode::Ok) { + if (m_EgammaCalibrationAndSmearingTools[itool]->applySystematicVariation(ss) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure calibration tool for systematic"); continue; } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/testAthenaEgammaCalibTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/testAthenaEgammaCalibTool.cxx index 9c07ca10b1edfae3a52ee86d8e240fae642b55a7..538b63bdaf60fd3464b4938afb57d56b6f3a0fa4 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/testAthenaEgammaCalibTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/src/testAthenaEgammaCalibTool.cxx @@ -12,7 +12,7 @@ #include "xAODCore/ShallowCopy.h" #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "ElectronPhotonFourMomentumCorrection/EgammaCalibrationAndSmearingTool.h" // local include @@ -91,7 +91,7 @@ StatusCode testAthenaEgammaCalibTool::execute() for (sysListItr = sysList.begin(); sysListItr != sysList.end(); ++sysListItr) { // Tell the calibration tool which variation to apply - if (m_EgammaCalibrationAndSmearingTool->applySystematicVariation(*sysListItr) != CP::SystematicCode::Ok) + if (m_EgammaCalibrationAndSmearingTool->applySystematicVariation(*sysListItr) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure calibration tool for systematics"); } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx index 905ebc3c195ebd914ea8d3c0f0c3c5ae468008ac..da495d0505f76a1aa860c21883fa5c065b2ee9aa 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx @@ -32,7 +32,7 @@ #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" // for smart slimming #include "xAODCore/tools/IOStats.h" @@ -151,7 +151,7 @@ int main( int argc, char* argv[] ) { std::cout << "\n=============SYSTEMATICS CHECK NOW"; for (auto sys : sysList) { // Tell the calibration tool which variation to apply - if (tool->applySystematicVariation(sys) != CP::SystematicCode::Ok) { + if (tool->applySystematicVariation(sys) != StatusCode::SUCCESS) { Error(APP_NAME, "Cannot configure calibration tool for systematics"); } @@ -191,7 +191,7 @@ int main( int argc, char* argv[] ) { std::cout << "\n=============SYSTEMATICS CHECK NOW"; for (auto sys : sysList) { // Tell the calibration tool which variation to apply - if (tool->applySystematicVariation(sys) != CP::SystematicCode::Ok) { + if (tool->applySystematicVariation(sys) != StatusCode::SUCCESS) { Error(APP_NAME, "Cannot configure calibration tool for systematics"); } diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IIsolationCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IIsolationCorrectionTool.h index b7c68046a19d35e9b35524ffd1c127e1bdb7a18b..6897f7d6ed89f75ce66a347228e92fdbebec9615 100644 --- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IIsolationCorrectionTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IIsolationCorrectionTool.h @@ -46,7 +46,7 @@ namespace CP { //Systematics to be used for physics analysis virtual CP::SystematicSet recommendedSystematics() const = 0; //Use specific systematic - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) = 0; + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& systConfig ) = 0; virtual float GetPtCorrectedIsolation(const xAOD::Egamma&, xAOD::Iso::IsolationType) = 0; virtual float GetPtCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) const = 0; diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h index 717d48646fc355b46b243b2e819c70a361473d2c..e20673a31b347c2b5ffa8286e79425bb73cc19ed 100644 --- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/IsolationCorrections/IsolationCorrectionTool.h @@ -47,7 +47,7 @@ class IsolationCorrectionTool : virtual public IIsolationCorrectionTool, //Systematics to be used for physics analysis virtual CP::SystematicSet recommendedSystematics() const override; //Use specific systematic - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) override; + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& systConfig ) override; virtual float GetPtCorrectedIsolation(const xAOD::Egamma&, xAOD::Iso::IsolationType) override; virtual float GetPtCorrection(const xAOD::Egamma&, xAOD::Iso::IsolationType) const override; diff --git a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx index 3a45f2f785177eda04a2a7aeb011ca2e13906f49..fefde389e9803263c3da8fcc64249457c464f227 100644 --- a/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/IsolationCorrections/Root/IsolationCorrectionTool.cxx @@ -91,7 +91,7 @@ namespace CP { if (m_ddVersion == "2012" or m_ddVersion == "2015") { //register ourselves with the systematic registry! CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); - if( registry.registerSystematics( *this ) != CP::SystematicCode::Ok ) return StatusCode::FAILURE; + if( registry.registerSystematics( *this ) != StatusCode::SUCCESS ) return StatusCode::FAILURE; } else ATH_MSG_WARNING("Unknown data driven correction"); } else{ @@ -242,12 +242,12 @@ namespace CP { return affectingSystematics(); } - CP::SystematicCode IsolationCorrectionTool::applySystematicVariation( const CP::SystematicSet& systConfig ) { + StatusCode IsolationCorrectionTool::applySystematicVariation( const CP::SystematicSet& systConfig ) { if (systConfig.find(m_systDDonoff) != systConfig.end()) m_apply_dd = false; else m_apply_dd = m_apply_ddDefault ? true : false; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } IsolationCorrectionTool::~IsolationCorrectionTool() { diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h index 762996c219db5e9183b58b8770ff54b1eda9465c..0642326666239692ba193ce0855b7105874b2004 100644 --- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h +++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/PhotonEfficiencyCorrection/AsgPhotonEfficiencyCorrectionTool.h @@ -88,9 +88,9 @@ public: } /// Configure this tool for the given systematics - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& systConfig ) override; + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& systConfig ) override; - CP::SystematicCode registerSystematics(); + StatusCode registerSystematics(); // Private member variables private: diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx index bef6ac93bf9f061d2a6e044a93c1724e3f62f575..23923003e442d5483e6a00eba2985ab319177853 100644 --- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx @@ -172,7 +172,7 @@ StatusCode AsgPhotonEfficiencyCorrectionTool::initialize() // Add the recommended systematics to the registry - if ( registerSystematics() != CP::SystematicCode::Ok) { + if ( registerSystematics() != StatusCode::SUCCESS) { return StatusCode::FAILURE; } @@ -369,13 +369,13 @@ CP::SystematicSet AsgPhotonEfficiencyCorrectionTool::affectingSystematics() cons } /// Register the systematics with the registry and add them to the recommended list -CP::SystematicCode AsgPhotonEfficiencyCorrectionTool::registerSystematics() { +StatusCode AsgPhotonEfficiencyCorrectionTool::registerSystematics() { CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); - if (registry.registerSystematics(*this) != CP::SystematicCode::Ok) { + if (registry.registerSystematics(*this) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Failed to add systematic to list of recommended systematics."); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } /// returns: the list of all systematics this tool recommends to use @@ -388,7 +388,7 @@ CP::SystematicSet AsgPhotonEfficiencyCorrectionTool::recommendedSystematics() co } -CP::SystematicCode AsgPhotonEfficiencyCorrectionTool:: +StatusCode AsgPhotonEfficiencyCorrectionTool:: applySystematicVariation ( const CP::SystematicSet& systConfig ) { // First, check if we already know this systematic configuration @@ -402,7 +402,7 @@ applySystematicVariation ( const CP::SystematicSet& systConfig ) CP::SystematicSet filteredSys; if (!CP::SystematicSet::filterForAffectingSystematics(systConfig, affectingSys, filteredSys)){ ATH_MSG_ERROR("Unsupported combination of systematics passed to the tool!"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // Insert filtered set into the map @@ -411,7 +411,7 @@ applySystematicVariation ( const CP::SystematicSet& systConfig ) CP::SystematicSet& mySysConf = itr->second; m_appliedSystematics = &mySysConf; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //=============================================================================== diff --git a/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEfficiencyTool.h b/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEfficiencyTool.h index 18cd37db05233cc780771e903bb401ef7710beca..a33389c17bbe544ac61cd6ef6aefccc91c2b4bb0 100644 --- a/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEfficiencyTool.h +++ b/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEfficiencyTool.h @@ -14,7 +14,7 @@ #include "AsgTools/IAsgTool.h" #include "PATInterfaces/ISystematicsTool.h" #include "PATInterfaces/CorrectionCode.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" #include "xAODJet/Jet.h" diff --git a/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEigenVectorRecompositionTool.h b/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEigenVectorRecompositionTool.h index 711f0a436a0b531e3dc4eeefc1b1d9474b55c385..100ed306364a50e208660fb5c906430b9574e9c8 100644 --- a/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEigenVectorRecompositionTool.h +++ b/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingEigenVectorRecompositionTool.h @@ -24,7 +24,7 @@ which are using different tagger algorighthms. #include "AsgTools/IAsgTool.h" #include "PATInterfaces/ISystematicsTool.h" #include "PATInterfaces/CorrectionCode.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" #include <vector> diff --git a/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingTruthTaggingTool.h b/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingTruthTaggingTool.h index 17e30dcc30f49719c7ba0551bb34df1511292aec..c765d7c631ebcbc214f0e13c1249c9cd8cdaf22d 100644 --- a/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingTruthTaggingTool.h +++ b/PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces/FTagAnalysisInterfaces/IBTaggingTruthTaggingTool.h @@ -9,7 +9,7 @@ #include "AsgTools/IAsgTool.h" #include "PATInterfaces/ISystematicsTool.h" #include "PATInterfaces/CorrectionCode.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" #include <string> @@ -23,7 +23,7 @@ #include "xAODJet/Jet.h" #include "PATInterfaces/CorrectionCode.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" class IBTaggingTruthTaggingTool : virtual public CP::ISystematicsTool { diff --git a/PhysicsAnalysis/Interfaces/MuonAnalysisInterfaces/MuonAnalysisInterfaces/IMuonCalibrationAndSmearingTool.h b/PhysicsAnalysis/Interfaces/MuonAnalysisInterfaces/MuonAnalysisInterfaces/IMuonCalibrationAndSmearingTool.h index ef80de900a84edad42a99c35d70d358ee9c33813..d9cb93ccaed38a52368f7cae9ac4a0ef080de80a 100644 --- a/PhysicsAnalysis/Interfaces/MuonAnalysisInterfaces/MuonAnalysisInterfaces/IMuonCalibrationAndSmearingTool.h +++ b/PhysicsAnalysis/Interfaces/MuonAnalysisInterfaces/MuonAnalysisInterfaces/IMuonCalibrationAndSmearingTool.h @@ -14,7 +14,7 @@ /// Local include(s): #include "PATInterfaces/CorrectionCode.h" #include "PATInterfaces/ISystematicsTool.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicSet.h" #include "PATInterfaces/SystematicVariation.h" diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx index 6191e9cac88b7e09cf6ee98797141b96e9f32455..fb8b6542b2cecec192a9d007b78c95d6474d6f6e 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEfficiencyTool.cxx @@ -19,7 +19,6 @@ using CP::CorrectionCode; using CP::SystematicSet; using CP::SystematicVariation; -using CP::SystematicCode; using CP::SystematicRegistry; using Analysis::Uncertainty; @@ -477,7 +476,7 @@ StatusCode BTaggingEfficiencyTool::initialize() { } // systematics framework SystematicRegistry & registry = SystematicRegistry::getInstance(); - if( registry.registerSystematics(*this) != SystematicCode::Ok) + if( registry.registerSystematics(*this) != StatusCode::SUCCESS) return StatusCode::FAILURE; // Finally, also initialise the selection tool, if needed (for now this is the case only for DL1 tag weight computations, @@ -971,36 +970,36 @@ BTaggingEfficiencyTool::getEigenRecompositionCoefficientMap(const std::string &l // WARNING the behaviour of future calls to getEfficiency and friends are modified by this // method - it indicates which systematic shifts are to be applied for all future calls -SystematicCode BTaggingEfficiencyTool::applySystematicVariation( const SystematicSet & systConfig) { +StatusCode BTaggingEfficiencyTool::applySystematicVariation( const SystematicSet & systConfig) { // First filter out any systematics that do not apply to us SystematicSet filteredSysts; - if (SystematicSet::filterForAffectingSystematics(systConfig, affectingSystematics(), filteredSysts) != SystematicCode::Ok) { + if (SystematicSet::filterForAffectingSystematics(systConfig, affectingSystematics(), filteredSysts) != StatusCode::SUCCESS) { ATH_MSG_ERROR("received unsupported systematics: " << systConfig.name()); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } // check the size of the remaining (filtered) SystematicSet if (filteredSysts.size() == 0) { // If it is 0 then turn off systematics ATH_MSG_VERBOSE("empty systematics set; nothing to be done"); m_applySyst = false; - return SystematicCode::Ok; + return StatusCode::SUCCESS; } else if (filteredSysts.size() > 1) { // Restriction: we allow only a single systematic variation affecting b-tagging ATH_MSG_WARNING("more than a single b-tagging systematic variation requested but not (yet) supported"); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } else { // Interpret the (single) remaining variation SystematicVariation var = *(filteredSysts.begin()); auto mapIter = m_systematicsInfo.find(var); if (mapIter == m_systematicsInfo.end()) { ATH_MSG_WARNING("variation '" << var.name() << "' not found! Cannot apply"); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } m_applySyst = true; m_applyThisSyst = mapIter->second; ATH_MSG_VERBOSE("variation '" << var.name() << "' applied successfully"); } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } // diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEigenVectorRecompositionTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEigenVectorRecompositionTool.cxx index 6a80f5835f5f6556443d02d934c860f058a66ce4..51a078e799460c6e12b905bfc51b9204d45056dd 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEigenVectorRecompositionTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingEigenVectorRecompositionTool.cxx @@ -208,14 +208,14 @@ CP::SystematicSet BTaggingEigenVectorRecompositionTool::affectingSystematics() c // it indicates which systematic shifts are to be applied for all future calls // no systematics for now, proxy for later -CP::SystematicCode BTaggingEigenVectorRecompositionTool::applySystematicVariation( const CP::SystematicSet & systConfig ) +StatusCode BTaggingEigenVectorRecompositionTool::applySystematicVariation( const CP::SystematicSet & systConfig ) { for (auto syst : systConfig) { CP::SystematicSet myset; ATH_MSG_WARNING("applySystematicVariation was called for " << syst.name() << " but BTaggingEigenVectorRecompositionTool does not apply Systematic Variations"); //the truth tagging tool provides results for all possible systematic variations in its results objects, the user does not need to call each one seperatly. } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } // returns true if the argument systematic is supported by the diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx index d6fecd87342ec32d0d51455ab1b27efb3e77aafc..d0ddfc3901dfe2065991e779ec9bcead6ad5eade 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingSelectionTool.cxx @@ -24,7 +24,6 @@ using std::string; using CP::CorrectionCode; using CP::SystematicSet; using CP::SystematicVariation; -using CP::SystematicCode; using CP::SystematicRegistry; using Analysis::Uncertainty; diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx index 584461fa8c6955215701b52c4d8dc344e1fcd0fd..068dba84fae2799e01d573eb1bfabf89ad8ae497 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/Root/BTaggingTruthTaggingTool.cxx @@ -18,7 +18,6 @@ using std::string; using CP::CorrectionCode; using CP::SystematicSet; using CP::SystematicVariation; -using CP::SystematicCode; using CP::SystematicRegistry; using Analysis::Uncertainty; @@ -105,14 +104,14 @@ SystematicSet BTaggingTruthTaggingTool::affectingSystematics() const { return m_effTool->affectingSystematics(); } -SystematicCode BTaggingTruthTaggingTool::applySystematicVariation( const CP::SystematicSet & systConfig ) +StatusCode BTaggingTruthTaggingTool::applySystematicVariation( const CP::SystematicSet & systConfig ) { for (auto syst : systConfig) { CP::SystematicSet myset; ATH_MSG_WARNING("applySystematicVariation was called for " << syst.name() << " but BTaggingTruthTaggingTool does not apply Systematic Variations"); //the truth tagging tool provides results for all possible systematic variations in its results objects, the user does not need to call each one seperatly. } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } bool BTaggingTruthTaggingTool::isAffectedBySystematic( const CP::SystematicVariation & systematic ) const diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingEfficiencyToolTester.cxx b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingEfficiencyToolTester.cxx index 3aebe5cec7bde09e01bf4c156a542badd52fd4fb..f57680b7fe9557c2ca86c18a425525c2f7ef147f 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingEfficiencyToolTester.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/util/BTaggingEfficiencyToolTester.cxx @@ -14,7 +14,6 @@ #include <iomanip> using CP::CorrectionCode; -using CP::SystematicCode; int main() { bool retval = true; @@ -105,8 +104,8 @@ int main() { CP::SystematicVariation var = *iter; CP::SystematicSet set; set.insert(var); - SystematicCode sresult = tool->applySystematicVariation(set); - if( sresult !=SystematicCode::Ok) { + StatusCode sresult = tool->applySystematicVariation(set); + if( sresult !=StatusCode::SUCCESS) { std::cout << var.name() << " apply systematic variation FAILED " << std::endl; } result = tool->getScaleFactor(*jet,sf); @@ -118,8 +117,8 @@ int main() { } // don't forget to switch back off the systematics... CP::SystematicSet defaultSet; - SystematicCode dummyResult = tool->applySystematicVariation(defaultSet); - if (dummyResult != SystematicCode::Ok) + StatusCode dummyResult = tool->applySystematicVariation(defaultSet); + if (dummyResult != StatusCode::SUCCESS) std::cout << "problem disabling systematics setting!" << std::endl; diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEfficiencyTool.h b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEfficiencyTool.h index 08daa349783d8147662c9a5ec6f56d722397582f..796eddd47567a5df59e0b086e31cea3df316b5d0 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEfficiencyTool.h +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEfficiencyTool.h @@ -135,10 +135,10 @@ class BTaggingEfficiencyTool: public asg::AsgTool, /** Set the tool to return "shifted" values. Note that only single-parameter variations or empty sets (the latter are to revert to nominal results) - are supported at present; @c SystematicCode::Unsupported will be returned for variations of multiple parameters + are supported at present; @c StatusCode::FAILURE will be returned for variations of multiple parameters or variations that aren't recognised. */ - CP::SystematicCode applySystematicVariation(const CP::SystematicSet & set); + StatusCode applySystematicVariation(const CP::SystematicSet & set); /** Return a list of all systematic variations supported by this tool. Note that this list depends on the uncertainty model used, and on the (dynamic) diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEigenVectorRecompositionTool.h b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEigenVectorRecompositionTool.h index 2e8b1f2084343ab4685e17ae4d54d65d8ae85fe5..05845da0567f61acc1a88f92c170c1bffa550d00 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEigenVectorRecompositionTool.h +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingEigenVectorRecompositionTool.h @@ -24,7 +24,7 @@ which are using different tagger algorighthms. #include "FTagAnalysisInterfaces/IBTaggingEigenVectorRecompositionTool.h" #include "FTagAnalysisInterfaces/IBTaggingEfficiencyTool.h" #include "PATInterfaces/ISystematicsTool.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include <string> #include <vector> @@ -89,7 +89,7 @@ class BTaggingEigenVectorRecompositionTool: public asg::AsgTool, /** it indicates which systematic shifts are to be applied for all future calls * no systematics for now, proxy for later **/ - CP::SystematicCode applySystematicVariation( const CP::SystematicSet & systConfig); + StatusCode applySystematicVariation( const CP::SystematicSet & systConfig); /** * subset of systematics that are recommended by the diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingTruthTaggingTool.h b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingTruthTaggingTool.h index 0be22b4cb31a39bbd980d47ac0f7deff24a0009d..9e67c7bb68a5b1f54d87563a2fce075edb983a77 100644 --- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingTruthTaggingTool.h +++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/xAODBTaggingEfficiency/xAODBTaggingEfficiency/BTaggingTruthTaggingTool.h @@ -101,7 +101,7 @@ class BTaggingTruthTaggingTool: public asg::AsgTool, StatusCode initialize(); CP::SystematicSet affectingSystematics() const; - CP::SystematicCode applySystematicVariation( const CP::SystematicSet & systConfig); + StatusCode applySystematicVariation( const CP::SystematicSet & systConfig); CP::SystematicSet recommendedSystematics() const; bool isAffectedBySystematic( const CP::SystematicVariation & systematic ) const; diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonEfficiencyScaleFactors.h b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonEfficiencyScaleFactors.h index fef0330e8126a6c7ef18dc6e15f5eb693ec14cde..945f0ef39eb82c057cdea6d0e5b1160c5d4e71d0 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonEfficiencyScaleFactors.h +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonEfficiencyScaleFactors.h @@ -48,7 +48,7 @@ namespace CP { /// returns: the list of all systematics this tool recommends to use virtual SystematicSet recommendedSystematics() const; - virtual SystematicCode applySystematicVariation(const SystematicSet& systConfig); + virtual StatusCode applySystematicVariation(const SystematicSet& systConfig); /// Obtain the muon efficiency measured using the data virtual CorrectionCode getDataEfficiency(const xAOD::Muon& mu, float& eff, const xAOD::EventInfo* info = 0) const; diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonTriggerScaleFactors.h b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonTriggerScaleFactors.h index 0f73445af52e13fd56a03e72cdb6fcfa2f7fea7e..ff4988ff66ab93bb4decece9aed7c0c11021e7ce 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonTriggerScaleFactors.h +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/MuonEfficiencyCorrections/MuonTriggerScaleFactors.h @@ -51,7 +51,7 @@ namespace CP { virtual CP::SystematicSet recommendedSystematics() const; - virtual CP::SystematicCode applySystematicVariation(const CP::SystematicSet& systConfig); + virtual StatusCode applySystematicVariation(const CP::SystematicSet& systConfig); virtual int getBinNumber(const xAOD::Muon& muon, const std::string& trigger) const; @@ -75,7 +75,7 @@ namespace CP { return *m_appliedSystematics; } - CP::SystematicCode registerSystematics(); + StatusCode registerSystematics(); StatusCode LoadTriggerMap(unsigned int year); diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx index 42d441877c3deb7c80816d6197ee1070eb7e838c..7ba5778035ceff4b9699587a0cc612326a6db5c0 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx @@ -7,7 +7,7 @@ #include "MuonEfficiencyCorrections/EffiCollection.h" #include "AsgDataHandles/ReadHandle.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicVariation.h" #include "PathResolver/PathResolver.h" @@ -507,10 +507,10 @@ namespace CP { } return affectingSystematics(); } - SystematicCode MuonEfficiencyScaleFactors::applySystematicVariation(const SystematicSet& systConfig) { + StatusCode MuonEfficiencyScaleFactors::applySystematicVariation(const SystematicSet& systConfig) { if (!m_init) { ATH_MSG_ERROR("Initialize first the tool!"); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } //check if systematics is cached @@ -521,7 +521,7 @@ namespace CP { if (itr == m_filtered_sys_sets.end()) { if (!SystematicSet::filterForAffectingSystematics(systConfig, m_affectingSys, mySysConf)) { ATH_MSG_ERROR("Unsupported combination of systematics passed to the tool! "); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } itr = m_filtered_sys_sets.find(mySysConf); } @@ -531,7 +531,7 @@ namespace CP { std::vector<std::unique_ptr<EffiCollection>>::const_iterator coll_itr = std::find_if(m_sf_sets.begin(), m_sf_sets.end(),[&mySysConf](const std::unique_ptr<EffiCollection>& a){return a->isAffectedBySystematic(mySysConf);}); if (coll_itr == m_sf_sets.end()){ ATH_MSG_WARNING("Invalid systematic given."); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } m_filtered_sys_sets.insert(std::pair<SystematicSet, EffiCollection*>(systConfig, coll_itr->get())); itr = m_filtered_sys_sets.find(systConfig); @@ -547,13 +547,13 @@ namespace CP { std::pair<unsigned, float> pair = (*t).getToyVariation(); if (pair.first != 0 && !m_current_sf->SetSystematicBin(pair.first)){ ATH_MSG_WARNING("Could not apply systematic " << (*t).name() << " for bin " << pair.first); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } } } - return SystematicCode::Ok; + return StatusCode::SUCCESS; } std::string MuonEfficiencyScaleFactors::getUncorrelatedSysBinName(unsigned int Bin) const { if (!m_current_sf){ diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx index a27b3722164eb7a0defcdeeeaa85a8890ea176d7..f79401d6fe905d7c4ac3801ef6021c39bbe57d22 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonSFTestHelper.cxx @@ -69,7 +69,7 @@ namespace TestMuonSF { } CP::SystematicSet syst_set; syst_set.insert(syst); - if (m_handle->applySystematicVariation(syst_set) != CP::SystematicCode::Ok) { + if (m_handle->applySystematicVariation(syst_set) != StatusCode::SUCCESS) { return CP::CorrectionCode::Error; } return m_handle->getTriggerScaleFactor(*muons, Var, name()); @@ -132,7 +132,7 @@ namespace TestMuonSF { return CP::CorrectionCode::Ok; } CP::CorrectionCode MuonSFBranches::fill_systematic(const xAOD::Muon muon, std::pair<const CP::SystematicSet, MuonSFBranches::SFSet>& Syst_SF){ - if (m_handle->applySystematicVariation(Syst_SF.first) != CP::SystematicCode::Ok) { + if (m_handle->applySystematicVariation(Syst_SF.first) != StatusCode::SUCCESS) { Error("MuonSFBranches()", "Failed to apply variation %s for %s", Syst_SF.first.name().c_str(), name().c_str()); return CP::CorrectionCode::Error; } @@ -193,7 +193,7 @@ namespace TestMuonSF { } CP::CorrectionCode MuonReplicaBranches::fill(const xAOD::Muon& muon) { for (auto& Syst_SF : m_SFs) { - if (m_handle->applySystematicVariation(Syst_SF.first) != CP::SystematicCode::Ok) { + if (m_handle->applySystematicVariation(Syst_SF.first) != StatusCode::SUCCESS) { return CP::CorrectionCode::Error; } CP::CorrectionCode cc = m_handle->getEfficiencyScaleFactorReplicas(muon, Syst_SF.second); diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonTriggerScaleFactors.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonTriggerScaleFactors.cxx index 5a7cc7f8cab6d6dd889b947a68070c2ab8a2e1a5..8332329ea38db98142260e368aaf816e59afb41c 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonTriggerScaleFactors.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonTriggerScaleFactors.cxx @@ -15,7 +15,7 @@ #include "xAODTrigger/MuonRoIContainer.h" #include "MuonEfficiencyCorrections/MuonTriggerScaleFactors.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicVariation.h" #include "FourMomUtils/xAODP4Helpers.h" @@ -217,11 +217,11 @@ namespace CP { ATH_CHECK(m_eventInfo.initialize()); - if (registerSystematics() != CP::SystematicCode::Ok) { + if (registerSystematics() != StatusCode::SUCCESS) { return StatusCode::FAILURE; } - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) { + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Could not configure for nominal settings"); return StatusCode::FAILURE; } @@ -875,13 +875,13 @@ namespace CP { } // Register the systematics with the registry and add them to the recommended list - CP::SystematicCode MuonTriggerScaleFactors::registerSystematics() { + StatusCode MuonTriggerScaleFactors::registerSystematics() { CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); - if (registry.registerSystematics(*this) != CP::SystematicCode::Ok) { + if (registry.registerSystematics(*this) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Failed to add systematic to list of recommended systematics."); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } /// returns: the list of all systematics this tool recommends to use @@ -889,7 +889,7 @@ namespace CP { return affectingSystematics(); } - CP::SystematicCode MuonTriggerScaleFactors::applySystematicVariation(const CP::SystematicSet& systConfig){ + StatusCode MuonTriggerScaleFactors::applySystematicVariation(const CP::SystematicSet& systConfig){ // First, check if we already know this systematic configuration auto itr = m_systFilter.find(systConfig); @@ -901,7 +901,7 @@ namespace CP { CP::SystematicSet filteredSys; if (!CP::SystematicSet::filterForAffectingSystematics(systConfig, affectingSys, filteredSys)) { ATH_MSG_ERROR("Unsupported combination of systematics passed to the tool!"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // Insert filtered set into the map @@ -918,11 +918,11 @@ namespace CP { static const CP::SystematicVariation syst_down("MUON_EFF_TrigSystUncertainty", -1); if ((mySysConf.matchSystematic(stat_up) && mySysConf.matchSystematic(stat_down)) || (mySysConf.matchSystematic(syst_up) && mySysConf.matchSystematic(syst_down))) { - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } m_appliedSystematics = &mySysConf; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } } /* namespace CP */ diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/MuonEfficiencyCorrections_TestAlg.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/MuonEfficiencyCorrections_TestAlg.cxx index b5ea86ef55f26888b2f7daee292860cdd02b5208..6ff4c4397d345cbb80e6f8b75b09ae494c5ab0a3 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/MuonEfficiencyCorrections_TestAlg.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/MuonEfficiencyCorrections_TestAlg.cxx @@ -44,7 +44,7 @@ namespace CP { declareProperty("MinQuality", m_muon_quality); // force strict checking of return codes - CP::SystematicCode::enableFailure(); + StatusCode::enableChecking(); CP::CorrectionCode::enableFailure(); } diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/TestTrigSF.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/TestTrigSF.cxx index 74cec76aeac7a2366295fd08269a17fbef24d1db..00658366d851d2d373071b89b8adabffe0d827c7 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/TestTrigSF.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/src/TestTrigSF.cxx @@ -236,7 +236,7 @@ void TestTrigSF::CheckSyst(const xAOD::Muon *ptr, const std::string &syst_name, CP::SystematicSet syst_set; syst_set.insert(syst); - if (m_trigEff->applySystematicVariation(syst_set) != CP::SystematicCode::Ok) { + if (m_trigEff->applySystematicVariation(syst_set) != StatusCode::SUCCESS) { msg(MSG::WARNING) << "Failed to apply systematic: " << syst_name << endmsg; return; } @@ -255,7 +255,7 @@ void TestTrigSF::CheckSyst(const xAOD::Muon *ptr, const std::string &syst_name, msg(MSG::INFO) << "Systematic=" << syst_name << " step=" << step << " hist=" << h->GetName() << " SF value=" << triggerSF << endmsg; - if (m_trigEff->applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) { + if (m_trigEff->applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) { msg(MSG::WARNING) << "Failed to apply default after systematic: " << syst_name << endmsg; return; } diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx index 5511b133672d53305c401a1f3fbd58210617cdb1..e3d52bc8daa558f5433b5d127f7d03d12f04a2c2 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsSFFileTester.cxx @@ -67,7 +67,7 @@ EffiToolInstance createSFTool(const std::string& WP, const std::string& CustomIn int main(int argc, char* argv[]) { // force strict checking of return codes - CP::SystematicCode::enableFailure(); + StatusCode::enableFailure(); StatusCode::enableFailure(); // The application's name: diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx index a8876626059a8e26979d8f0e678aa3b7c48f25c3..781401a12ceee42370ffab662ffa0ec8a6a6c011 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyScaleFactorsTest.cxx @@ -49,7 +49,7 @@ return 1; \ } #define CHECK_CPSys(Arg) \ - if (Arg.code() == CP::SystematicCode::Unsupported){ \ + if (Arg.isFailure()){ \ Warning(#Arg,"Unsupported systematic (in line %i) ",__LINE__); \ } @@ -72,7 +72,7 @@ EffiToolInstance createSFTool(const std::string& WP, const std::string& CustomIn int main(int argc, char* argv[]) { // force strict checking of return codes - CP::SystematicCode::enableFailure(); + StatusCode::enableFailure(); StatusCode::enableFailure(); // The application's name: diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx index d349a3502000f96a34695e16952f3918eaa22611..f5153f0c70fe567032de9a769cd0a747806dad16 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonTriggerSFRootCoreTest.cxx @@ -36,7 +36,7 @@ #define CHECK_CPSys(Arg) \ - if (Arg.code() == CP::SystematicCode::Unsupported){ \ + if (Arg.isFailure()){ \ Warning(#Arg,"Unsupported systematic (in line %i) ",__LINE__); \ } diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationAndSmearingTool.h b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationAndSmearingTool.h index 100da749a74630a53c595efd5a1bce0bbccbd999..51ccf3d631c46760e0ca2afbe76eacb8d3ba62c1 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationAndSmearingTool.h +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationAndSmearingTool.h @@ -66,7 +66,7 @@ class MuonCalibrationAndSmearingTool : public virtual IMuonCalibrationAndSmearin // Interface - Systematics to be used for physics analysis virtual SystematicSet recommendedSystematics() const override; // Interface - Use specific systematic - virtual SystematicCode applySystematicVariation ( const SystematicSet& systConfig ) override; + virtual StatusCode applySystematicVariation ( const SystematicSet& systConfig ) override; // Interface - get the expected resolution of the muon virtual double expectedResolution( const std::string& DetType, const xAOD::Muon& mu, const bool mc ) const override; // Interface - get the expected resolution of the muon diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationPeriodTool.h b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationPeriodTool.h index 44ce5269e7356d867b6a3e2a34a2d239f09f61b8..e2c67318ea0c7ffafb6e0c0c18b552426e82a7af 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationPeriodTool.h +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/MuonMomentumCorrections/MuonCalibrationPeriodTool.h @@ -51,7 +51,7 @@ class MuonCalibrationPeriodTool : public virtual IMuonCalibrationAndSmearingTool // Interface - Systematics to be used for physics analysis virtual SystematicSet recommendedSystematics() const override; // Interface - Use specific systematic - virtual SystematicCode applySystematicVariation ( const SystematicSet& systConfig ) override; + virtual StatusCode applySystematicVariation ( const SystematicSet& systConfig ) override; // Constructor MuonCalibrationPeriodTool( const std::string& name ); diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationAndSmearingTool.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationAndSmearingTool.cxx index f6f0f959d8a31502379ddc4a8588c8b3cb7dd285..16d0cd69212407e2509a4e2400aeac3eb8c638ff 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationAndSmearingTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationAndSmearingTool.cxx @@ -274,7 +274,7 @@ namespace CP { return StatusCode::FAILURE; } SystematicRegistry& registry = SystematicRegistry::getInstance(); - if( registry.registerSystematics( *this ) != SystematicCode::Ok ) { + if( registry.registerSystematics( *this ) != StatusCode::SUCCESS ) { ATH_MSG_ERROR( "Unkown systematic list"); return StatusCode::FAILURE; } @@ -1345,13 +1345,13 @@ namespace CP { return affectingSystematics(); } - SystematicCode MuonCalibrationAndSmearingTool::applySystematicVariation( const SystematicSet& systConfig ) { + StatusCode MuonCalibrationAndSmearingTool::applySystematicVariation( const SystematicSet& systConfig ) { // First check if we already know this systematic configuration std::unordered_map< SystematicSet, ParameterSet >::iterator parIter = m_Parameters.find( systConfig ); if( parIter != m_Parameters.end() ) { m_currentParameters = &parIter->second; - return SystematicCode::Ok; + return StatusCode::SUCCESS; } // Then check if it is actually supported @@ -1359,7 +1359,7 @@ namespace CP { SystematicSet checkSysConf; if( !SystematicSet::filterForAffectingSystematics( systConfig, affSysts, checkSysConf ) ) { ATH_MSG_ERROR( "Passing unsupported systematic to the tool!" ); - return SystematicCode::Unsupported; + return StatusCode::FAILURE; } ParameterSet param; @@ -1386,7 +1386,7 @@ namespace CP { param.SagittaRho=MCAST::SystVariation::Default; param.SagittaBias=MCAST::SystVariation::Default; } - else if( !syst.empty() ) return SystematicCode::Unsupported; + else if( !syst.empty() ) return StatusCode::FAILURE; // MS systematics syst = systConfig.getSystematicByBaseName( "MUON_MS" ); @@ -1405,7 +1405,7 @@ namespace CP { param.SagittaRho=MCAST::SystVariation::Default; param.SagittaBias=MCAST::SystVariation::Default; } - else if( !syst.empty() ) return SystematicCode::Unsupported; + else if( !syst.empty() ) return StatusCode::FAILURE; // Scale systematics syst = systConfig.getSystematicByBaseName( "MUON_SCALE" ); @@ -1424,7 +1424,7 @@ namespace CP { param.SagittaRho=MCAST::SystVariation::Default; param.SagittaBias=MCAST::SystVariation::Default; } - else if( !syst.empty() ) return SystematicCode::Unsupported; + else if( !syst.empty() ) return StatusCode::FAILURE; // Sagitta Rho systematics @@ -1444,7 +1444,7 @@ namespace CP { param.SagittaRho=MCAST::SystVariation::Up; param.SagittaBias=MCAST::SystVariation::Default; } - else if( !syst.empty() ) return SystematicCode::Unsupported; + else if( !syst.empty() ) return StatusCode::FAILURE; // Sagitta Residual Bias systematics @@ -1464,7 +1464,7 @@ namespace CP { param.SagittaRho=MCAST::SystVariation::Default; param.SagittaBias=MCAST::SystVariation::Up; } - else if( !syst.empty() ) return SystematicCode::Unsupported; + else if( !syst.empty() ) return StatusCode::FAILURE; // @@ -1473,7 +1473,7 @@ namespace CP { ATH_MSG_DEBUG( "Systematic variation's parameters, Scale: " << param.Scale ); // store this calibration for future use, and make it current m_currentParameters = &m_Parameters.insert( std::make_pair( systConfig, param ) ).first->second; - return SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationPeriodTool.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationPeriodTool.cxx index b1a1e09d3c7163e2482bb0ccb405f6f1d86cfd21..3c67109578ef9529241531d981ee02996849baee 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationPeriodTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/Root/MuonCalibrationPeriodTool.cxx @@ -327,9 +327,9 @@ namespace CP { } // We need to parse the variations to all three instances because we do not know whether the file changes in the backgronud // during the variation loop - SystematicCode MuonCalibrationPeriodTool::applySystematicVariation ( const SystematicSet& systConfig ) { - if (m_calibTool_1516->applySystematicVariation(systConfig) == SystematicCode::Unsupported) {} - if (m_calibTool_17->applySystematicVariation(systConfig) == SystematicCode::Unsupported) {} + StatusCode MuonCalibrationPeriodTool::applySystematicVariation ( const SystematicSet& systConfig ) { + if (m_calibTool_1516->applySystematicVariation(systConfig) == StatusCode::FAILURE) {} + if (m_calibTool_17->applySystematicVariation(systConfig) == StatusCode::FAILURE) {} return m_calibTool_18->applySystematicVariation(systConfig); } diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/src/TestMCASTTool.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/src/TestMCASTTool.cxx index 4d5f72254221927122f8e64026b03517f5754c44..42807953fde5a1e9465679c527425f539f77308b 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/src/TestMCASTTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/src/TestMCASTTool.cxx @@ -110,7 +110,7 @@ StatusCode TestMCASTTool::execute() { //---\\---// Calibrating muon ATH_MSG_DEBUG( "Calibrating muon" ); for(std::vector<CP::SystematicSet>::iterator sysItr = m_sysList.begin() + 1; sysItr != m_sysList.end(); ++sysItr) { - if( m_MCaSTool->applySystematicVariation(*sysItr) != CP::SystematicCode::Ok) { + if( m_MCaSTool->applySystematicVariation(*sysItr) != StatusCode::SUCCESS) { continue; } xAOD::Muon* mu = 0; diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx index d57fba124b29d409f6aeb76dbf27175769065629..c2ca48de507a24a036ab39db1618a0c0e4ae0cd9 100644 --- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx +++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections/util/MCAST_Tester.cxx @@ -30,7 +30,7 @@ #include "xAODCore/tools/ReadStats.h" #include "AsgMessaging/Check.h" #include "AsgTools/AnaToolHandle.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "MuonAnalysisInterfaces/IMuonCalibrationAndSmearingTool.h" #include "MuonAnalysisInterfaces/IMuonSelectionTool.h" @@ -245,7 +245,7 @@ int main( int argc, char* argv[] ) { Info( APP_NAME, "Looking at %s systematic", ( sysListItr->name() ).c_str() ); //::: Check if systematic is applicable to the correction tool - if( corrTool->applySystematicVariation( *sysListItr ) != CP::SystematicCode::Ok ) { + if( corrTool->applySystematicVariation( *sysListItr ) != StatusCode::SUCCESS ) { Error( APP_NAME, "Cannot configure muon calibration tool for systematic" ); } diff --git a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceSelectionTool.h b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceSelectionTool.h index 5b94cc689249235742388466ed815738dcd9555b..67aa3f59b2fdfe07b821ccfa397ff7d9349f75ac 100644 --- a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceSelectionTool.h +++ b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceSelectionTool.h @@ -18,7 +18,7 @@ #include "TrigDecisionTool/TrigDecisionTool.h" #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" class IMuonResonanceSelectionTool : virtual public asg::IAsgTool { ASG_TOOL_INTERFACE(IMuonResonanceSelectionTool) diff --git a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceTool.h b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceTool.h index f6a9025d8563fc0c1ea5c789ce24e94a08d78ecd..f9762d058fc9c10f1198ff419fef298703d86cff 100644 --- a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceTool.h +++ b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/MuonResonanceTools/IMuonResonanceTool.h @@ -14,7 +14,7 @@ #include "MuonResonanceTools/MuonResonancePlots.h" #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" class IMuonResonanceTool : virtual public asg::IAsgTool { ASG_TOOL_INTERFACE(IMuonResonanceTool) diff --git a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonanceSelectionTool.cxx b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonanceSelectionTool.cxx index 605ec43afa9bea56f3fa1407b8058be5c94c0ad5..18c918cb879fb993f1183d5d4fb28432d8c1a10f 100644 --- a/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonanceSelectionTool.cxx +++ b/PhysicsAnalysis/MuonID/MuonPerformanceAnalysis/MuonResonanceTools/Root/MuonResonanceSelectionTool.cxx @@ -99,12 +99,12 @@ std::pair<std::vector<const xAOD::Muon*>,std::vector<const xAOD::Muon*> > MuonRe } if (m_doCalib) { - if( m_calibTool->applySystematicVariation( sys ) != CP::SystematicCode::Ok ) + if( m_calibTool->applySystematicVariation( sys ) != StatusCode::SUCCESS ) ATH_MSG_WARNING( "Cannot configure muon calibration tool for systematic " << sys.name() ); } if (m_doEff) { - if( m_sfTool->applySystematicVariation( sys ) != CP::SystematicCode::Ok ) + if( m_sfTool->applySystematicVariation( sys ) != StatusCode::SUCCESS ) ATH_MSG_WARNING( "Cannot configure muon efficiency corrections for systematic " << sys.name() ); } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx index 7c41d17a00f5c1d0ffcf6084390f2e9b98e6f0a1..5f760cd2e6fe515a575dbbcf37f705a39ce6d5a4 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Electrons.cxx @@ -486,58 +486,58 @@ double SUSYObjDef_xAOD::GetEleTriggerEfficiency(const xAOD::Electron& el, const float sf(1.); //Set the new systematic variation - CP::SystematicCode ret = m_elecEfficiencySFTool_reco->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_reco->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (reco) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_id->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (id) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_trig_singleLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_trig_diLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_trig_mixLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_trigEff_singleLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_trigEff_diLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_trigEff_mixLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_iso->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (iso) for systematic var. " << systConfig.name() ); } ret = m_elecEfficiencySFTool_chf->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (charge-flip) for systematic var. " << systConfig.name() ); } ret = m_elecChargeEffCorrTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure ElectronChargeEfficiencyCorrectionTool for systematic var. " << systConfig.name() ); } @@ -547,57 +547,57 @@ double SUSYObjDef_xAOD::GetEleTriggerEfficiency(const xAOD::Electron& el, const //Roll back to default ret = m_elecEfficiencySFTool_reco->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (reco) back to default."); } ret = m_elecEfficiencySFTool_id->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (id) back to default."); } ret = m_elecEfficiencySFTool_trig_singleLep->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) back to default."); } ret = m_elecEfficiencySFTool_trig_diLep->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) back to default."); } ret = m_elecEfficiencySFTool_trig_mixLep->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) back to default."); } ret = m_elecEfficiencySFTool_trigEff_singleLep->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) back to default."); } ret = m_elecEfficiencySFTool_trigEff_diLep->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) back to default."); } ret = m_elecEfficiencySFTool_trigEff_mixLep->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) back to default."); } ret = m_elecEfficiencySFTool_iso->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (iso) back to default."); } ret = m_elecEfficiencySFTool_chf->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (charge-flip) back to default."); } ret = m_elecChargeEffCorrTool->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure ElectronChargeEfficiencyCorrectionTool back to default."); } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx index c77cbabb5707a644863f963100a954eeb01937d7..d76c62382e79c3d1378da289f487e3b6debec489 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Jets.cxx @@ -529,15 +529,15 @@ namespace ST { float totalSF = 1.; //Set the new systematic variation - CP::SystematicCode ret = m_btagEffTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_btagEffTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure BTaggingEfficiencyTool for systematic var. " << systConfig.name() ); } totalSF = BtagSF( jets ); ret = m_btagEffTool->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure BTaggingEfficiencyTool for systematic var. " << systConfig.name() ); } @@ -581,8 +581,8 @@ namespace ST { if (!m_applyJVTCut) return totalSF; //Set the new systematic variation - CP::SystematicCode ret = m_jetJvtEfficiencyTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_jetJvtEfficiencyTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure JVTEfficiencyTool for systematic var. " << systConfig.name() ); } @@ -591,7 +591,7 @@ namespace ST { if (m_applyJVTCut) { ret = m_jetJvtEfficiencyTool->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure JVTEfficiencyTool for systematic var. " << systConfig.name() ); } } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx index 6da339e9d6f89a478ad301cf4a69f7680b911447..95258ca4948117d9d23e9177105499596038ede2 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Muons.cxx @@ -546,32 +546,32 @@ double SUSYObjDef_xAOD::GetTotalMuonTriggerSF(const xAOD::MuonContainer& sfmuons double sf(1.); //Set the new systematic variation - CP::SystematicCode ret = m_muonEfficiencySFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonEfficiencySFTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors for systematic var. " << systConfig.name() ); } ret = m_muonEfficiencyBMHighPtSFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors for systematic var. " << systConfig.name() ); } ret = m_muonTTVAEfficiencySFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors for systematic var. " << systConfig.name() ); } ret = m_muonIsolationSFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors for systematic var. " << systConfig.name() ); } ret = m_muonTriggerSFTool2015->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors (2015) for systematic var. " << systConfig.name() ); } ret = m_muonTriggerSFTool2016->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors (2016) for systematic var. " << systConfig.name() ); } @@ -579,31 +579,31 @@ double SUSYObjDef_xAOD::GetTotalMuonTriggerSF(const xAOD::MuonContainer& sfmuons //Roll back to default ret = m_muonEfficiencySFTool->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors back to default."); } ret = m_muonEfficiencyBMHighPtSFTool->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors back to default."); } ret = m_muonTTVAEfficiencySFTool->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors back to default."); } ret = m_muonIsolationSFTool->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors back to default."); } ret = m_muonTriggerSFTool2015->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors (2015) back to default."); } ret = m_muonTriggerSFTool2016->applySystematicVariation(m_currentSyst); - if ( ret != CP::SystematicCode::Ok) { + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors (2016) back to default."); } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Photons.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Photons.cxx index 1c3d6e6dd90cb9b3f053838d601e2a887947b101..40e2d3ea9c0cc5cbe34270ba0723d61ee5187908 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Photons.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Photons.cxx @@ -225,13 +225,13 @@ double SUSYObjDef_xAOD::GetSignalPhotonSFsys(const xAOD::Photon& ph, const CP::S double sf(1.); //Set the new systematic variation - CP::SystematicCode ret = m_photonEfficiencySFTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_photonEfficiencySFTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool for systematic var. " << systConfig.name() ); } ret = m_photonIsolationSFTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool for systematic var. " << systConfig.name() ); } @@ -257,12 +257,12 @@ double SUSYObjDef_xAOD::GetSignalPhotonSFsys(const xAOD::Photon& ph, const CP::S //Roll back to current sys ret = m_photonEfficiencySFTool->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool back to default."); } ret = m_photonIsolationSFTool->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool for systematic var. " << systConfig.name() ); } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx index 388e531a2877913c6b9acd4ca30258f25b609216..d064fd3f5f512642193901da0120c7ef0f26469c 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYObjDef_xAOD.cxx @@ -1309,7 +1309,7 @@ std::string SUSYObjDef_xAOD::TrigSingleLep() const { return m_electronTriggerSFS std::string SUSYObjDef_xAOD::TrigDiLep() const { return m_electronTriggerSFStringDiLepton; } std::string SUSYObjDef_xAOD::TrigMixLep() const { return m_electronTriggerSFStringMixedLepton; } -CP::SystematicCode SUSYObjDef_xAOD::resetSystematics() { +StatusCode SUSYObjDef_xAOD::resetSystematics() { return this->applySystematicVariation(m_defaultSyst); } @@ -1355,11 +1355,11 @@ bool SUSYObjDef_xAOD::currentSystematicIsWeight() const { -CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::SystematicSet& systConfig ) +StatusCode SUSYObjDef_xAOD::applySystematicVariation( const CP::SystematicSet& systConfig ) { if (!m_tool_init) { ATH_MSG_ERROR("SUSYTools was not initialized!!"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } ATH_MSG_DEBUG(" in SUSYObjDef_xAOD::applySystematicVariation \"" << systConfig.name() << "\" size " << systConfig.size()); @@ -1368,40 +1368,40 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat // NB: SystematicSet typically has only one component (see SUSYToolsTester macro) if (!m_jetUncertaintiesTool.empty()) { - CP::SystematicCode ret = m_jetUncertaintiesTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_jetUncertaintiesTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_VERBOSE("Cannot configure JetUncertaintiesTool for systematic var. " << systConfig.name() ); } else { ATH_MSG_VERBOSE("Configured JetUncertaintiesTool for systematic var. " << systConfig.name() ); } } if (!m_fatjetUncertaintiesTool.empty()) { - CP::SystematicCode ret = m_fatjetUncertaintiesTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_fatjetUncertaintiesTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_VERBOSE("Cannot configure (Fat)JetUncertaintiesTool for systematic var. " << systConfig.name() ); } else { ATH_MSG_VERBOSE("Configured (Fat)JetUncertaintiesTool for systematic var. " << systConfig.name() ); } } if (!m_jetJvtEfficiencyTool.empty()) { - CP::SystematicCode ret = m_jetJvtEfficiencyTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_jetJvtEfficiencyTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_VERBOSE("Cannot configure JVTEfficiency for systematic var. " << systConfig.name() ); } else { ATH_MSG_VERBOSE("Configured JVTEfficiency for systematic var. " << systConfig.name() ); } } if (!m_jerSmearingTool.empty()) { - CP::SystematicCode ret = m_jerSmearingTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_jerSmearingTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure JERSmearingTool for systematic var. " << systConfig.name()); } else { ATH_MSG_VERBOSE("Configured JERSmearing for systematic var. " << systConfig.name() ); } } if (!m_muonCalibrationAndSmearingTool.empty()) { - CP::SystematicCode ret = m_muonCalibrationAndSmearingTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonCalibrationAndSmearingTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonCalibrationAndSmearingTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1409,8 +1409,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_muonEfficiencySFTool.empty()) { - CP::SystematicCode ret = m_muonEfficiencySFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonEfficiencySFTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors for systematic var. " << systConfig.name() ); return ret; } else { @@ -1418,8 +1418,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_muonEfficiencyBMHighPtSFTool.empty()) { - CP::SystematicCode ret = m_muonEfficiencyBMHighPtSFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonEfficiencyBMHighPtSFTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors for systematic var. " << systConfig.name() ); return ret; } else { @@ -1427,8 +1427,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_muonTTVAEfficiencySFTool.empty()) { - CP::SystematicCode ret = m_muonTTVAEfficiencySFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonTTVAEfficiencySFTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors for systematic var. " << systConfig.name() ); return ret; } else { @@ -1436,8 +1436,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_muonIsolationSFTool.empty()) { - CP::SystematicCode ret = m_muonIsolationSFTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonIsolationSFTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors for systematic var. " << systConfig.name() ); return ret; } else { @@ -1445,8 +1445,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_muonTriggerSFTool2015.empty()) { - CP::SystematicCode ret = m_muonTriggerSFTool2015->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonTriggerSFTool2015->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors (2015) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1454,8 +1454,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_muonTriggerSFTool2016.empty()) { - CP::SystematicCode ret = m_muonTriggerSFTool2016->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_muonTriggerSFTool2016->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors (2016) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1463,8 +1463,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_reco.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_reco->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_reco->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (reco) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1472,8 +1472,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_id.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_id->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_id->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (id) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1481,8 +1481,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_trig_singleLep.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_trig_singleLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_trig_singleLep->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1490,8 +1490,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_trig_diLep.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_trig_diLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_trig_diLep->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1499,8 +1499,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_trig_mixLep.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_trig_mixLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_trig_mixLep->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1508,8 +1508,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_trigEff_singleLep.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_trigEff_singleLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_trigEff_singleLep->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1517,8 +1517,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_trigEff_diLep.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_trigEff_diLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_trigEff_diLep->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1526,8 +1526,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_trigEff_mixLep.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_trigEff_mixLep->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_trigEff_mixLep->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1535,8 +1535,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_iso.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_iso->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_iso->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (iso) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1544,8 +1544,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecEfficiencySFTool_chf.empty()) { - CP::SystematicCode ret = m_elecEfficiencySFTool_chf->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecEfficiencySFTool_chf->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (chf) for systematic var. " << systConfig.name() ); return ret; } else { @@ -1553,8 +1553,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_elecChargeEffCorrTool.empty()) { - CP::SystematicCode ret = m_elecChargeEffCorrTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_elecChargeEffCorrTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure ElectronChargeEffCorrectionTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1562,8 +1562,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!isData() && !m_photonEfficiencySFTool.empty()) { - CP::SystematicCode ret = m_photonEfficiencySFTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_photonEfficiencySFTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1571,8 +1571,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!isData() && !m_photonIsolationSFTool.empty()) { - CP::SystematicCode ret = m_photonIsolationSFTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_photonIsolationSFTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1580,8 +1580,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_egammaCalibTool.empty()) { - CP::SystematicCode ret = m_egammaCalibTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_egammaCalibTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure EgammaCalibrationAndSmearingTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1589,8 +1589,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_isoCorrTool.empty()) { - CP::SystematicCode ret = m_isoCorrTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_isoCorrTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure IsolationCorrectionTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1599,8 +1599,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } if (!m_btagEffTool.empty()) { //if ( systConfig.size() > 0 && m_btagEffTool->isAffectedBySystematic(*systConfig.begin()) ) { - CP::SystematicCode ret = m_btagEffTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_btagEffTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure xAODBTaggingEfficiency for systematic var. " << systConfig.name() ); return ret; } else { @@ -1609,8 +1609,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat //} } if (!m_tauSmearingTool.empty()) { - CP::SystematicCode ret = m_tauSmearingTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauSmearingTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauSmearingTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1618,8 +1618,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_tauEffTool.empty()) { - CP::SystematicCode ret = m_tauEffTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauEffTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1627,16 +1627,16 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_tauTrigEffTool0.empty()) { - CP::SystematicCode ret = m_tauTrigEffTool0->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauTrigEffTool0->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool0 for systematic var. " << systConfig.name() ); return ret; } else { ATH_MSG_VERBOSE("Configured TauEfficiencyCorrectionsTool0 for systematic var. " << systConfig.name() ); } } if (!m_tauTrigEffTool1.empty()) { - CP::SystematicCode ret = m_tauTrigEffTool1->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauTrigEffTool1->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool1 for systematic var. " << systConfig.name() ); return ret; } else { @@ -1644,8 +1644,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_tauTrigEffTool2.empty()) { - CP::SystematicCode ret = m_tauTrigEffTool2->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauTrigEffTool2->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool2 for systematic var. " << systConfig.name() ); return ret; } else { @@ -1653,8 +1653,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_tauTrigEffTool3.empty()) { - CP::SystematicCode ret = m_tauTrigEffTool3->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauTrigEffTool3->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool3 for systematic var. " << systConfig.name() ); return ret; } else { @@ -1662,8 +1662,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_tauTrigEffTool4.empty()) { - CP::SystematicCode ret = m_tauTrigEffTool4->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_tauTrigEffTool4->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool4 for systematic var. " << systConfig.name() ); return ret; } else { @@ -1671,8 +1671,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_metSystTool.empty()) { - CP::SystematicCode ret = m_metSystTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_metSystTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure METSystematicsTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1680,8 +1680,8 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } if (!m_prwTool.empty()) { - CP::SystematicCode ret = m_prwTool->applySystematicVariation(systConfig); - if ( ret != CP::SystematicCode::Ok) { + StatusCode ret = m_prwTool->applySystematicVariation(systConfig); + if ( ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure PileupReweightingTool for systematic var. " << systConfig.name() ); return ret; } else { @@ -1689,7 +1689,7 @@ CP::SystematicCode SUSYObjDef_xAOD::applySystematicVariation( const CP::Systemat } } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } std::vector<ST::SystInfo> SUSYObjDef_xAOD::getSystInfoList() const { diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx index d9863b790c512c999e830ad50c740acbec58f3f7..1856b552590f5780aba248320bb5415a242344bd 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/SUSYToolsInit.cxx @@ -328,8 +328,8 @@ StatusCode SUSYObjDef_xAOD::SUSYToolsInit() ATH_CHECK( m_jetUncertaintiesTool.retrieve() ); CP::SystematicSet defaultSet; - CP::SystematicCode ret = m_jetUncertaintiesTool->applySystematicVariation(defaultSet); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_jetUncertaintiesTool->applySystematicVariation(defaultSet); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure JetUncertaintiesTool for default systematic setting."); return StatusCode::FAILURE; } @@ -368,8 +368,8 @@ StatusCode SUSYObjDef_xAOD::SUSYToolsInit() ATH_CHECK( m_fatjetUncertaintiesTool.retrieve() ); CP::SystematicSet defaultSet; - CP::SystematicCode ret = m_fatjetUncertaintiesTool->applySystematicVariation(defaultSet); - if (ret != CP::SystematicCode::Ok) { + StatusCode ret = m_fatjetUncertaintiesTool->applySystematicVariation(defaultSet); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure (Fat)JetUncertaintiesTool for default systematic setting."); return StatusCode::FAILURE; } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Taus.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Taus.cxx index 17f98a3ba6c224c9785dd5986c9022cdae7222d5..0fe07aed73d730dfcca2b970c4bd0e359d547787 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Taus.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/Root/Taus.cxx @@ -165,23 +165,23 @@ double SUSYObjDef_xAOD::GetSignalTauSFsys(const xAOD::TauJet& tau, double sf(1.); //Set the new systematic variation - CP::SystematicCode ret = m_tauEffTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() ); } + StatusCode ret = m_tauEffTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool0->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool1->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool2->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool3->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool4->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 for systematic var. " << systConfig.name() ); } sf *= GetSignalTauSF(tau, idSF, triggerSF, trigExpr); @@ -189,22 +189,22 @@ double SUSYObjDef_xAOD::GetSignalTauSFsys(const xAOD::TauJet& tau, //Roll back to default ret = m_tauEffTool->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool back to default"); } ret = m_tauTrigEffTool0->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 back to default"); } ret = m_tauTrigEffTool1->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 back to default"); } ret = m_tauTrigEffTool2->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 back to default"); } ret = m_tauTrigEffTool3->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 back to default"); } ret = m_tauTrigEffTool4->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 back to default"); } dec_effscalefact(tau) = sf; @@ -268,23 +268,23 @@ double SUSYObjDef_xAOD::GetTotalTauSFsys(const xAOD::TauJetContainer& taus, cons double sf(1.); //Set the new systematic variation - CP::SystematicCode ret = m_tauEffTool->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() ); } + StatusCode ret = m_tauEffTool->applySystematicVariation(systConfig); + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool0->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool1->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool2->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool3->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 for systematic var. " << systConfig.name() ); } ret = m_tauTrigEffTool4->applySystematicVariation(systConfig); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 for systematic var. " << systConfig.name() ); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 for systematic var. " << systConfig.name() ); } sf = GetTotalTauSF(taus, idSF, triggerSF, trigExpr); @@ -292,22 +292,22 @@ double SUSYObjDef_xAOD::GetTotalTauSFsys(const xAOD::TauJetContainer& taus, cons //Roll back to default ret = m_tauEffTool->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool back to default"); } ret = m_tauTrigEffTool0->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool0 back to default"); } ret = m_tauTrigEffTool1->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool1 back to default"); } ret = m_tauTrigEffTool2->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool2 back to default"); } ret = m_tauTrigEffTool3->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool3 back to default"); } ret = m_tauTrigEffTool4->applySystematicVariation(m_currentSyst); - if (ret != CP::SystematicCode::Ok) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 back to default"); } + if (ret != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure TauTrigEfficiencyCorrectionsTool4 back to default"); } return sf; } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/ISUSYObjDef_xAODTool.h b/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/ISUSYObjDef_xAODTool.h index 46fdf89aa9ccac373f5b881d754866b05bf9ccbf..33ff532c62690d73e94c3a871d5e104ef9e2f568 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/ISUSYObjDef_xAODTool.h +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/ISUSYObjDef_xAODTool.h @@ -324,9 +324,9 @@ namespace ST { virtual StatusCode OverlapRemoval(const xAOD::ElectronContainer *electrons, const xAOD::MuonContainer *muons, const xAOD::JetContainer *jets, const xAOD::PhotonContainer* gamma = 0, const xAOD::TauJetContainer* taujet = 0, const xAOD::JetContainer *fatjets = 0) = 0; - virtual CP::SystematicCode resetSystematics() = 0; + virtual StatusCode resetSystematics() = 0; - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ) = 0; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ) = 0; virtual bool isPrompt(const xAOD::IParticle* part) const = 0; diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h b/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h index 20a3d2a0956bef229290071b8269090570d44e8d..0fa9676887891befd45fb653be222fd1ec4ee022 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/SUSYTools/SUSYObjDef_xAOD.h @@ -21,7 +21,7 @@ #include "SUSYTools/ISUSYObjDef_xAODTool.h" ///////////////////////// -*- C++ -*- ///////////////////////////// -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicVariation.h" @@ -313,11 +313,11 @@ namespace ST { // ZM - not implemented? // StatusCode IsoOverlapRemoval(const xAOD::IParticleContainer *parts); - CP::SystematicCode resetSystematics() override final; + StatusCode resetSystematics() override final; const CP::SystematicSet& currentSystematic() const; - CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ) override final; + StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ) override final; //truth helpers diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx index 3ecabbb3ea2f51427d719e7ed3f6254f8355d4fa..e9a7fd6987458ffb33b32e318919455ce9213489 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/src/ApplySUSYTools.cxx @@ -44,7 +44,7 @@ #include "xAODCutFlow/CutBookkeeperAuxContainer.h" // Needed for systematics -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" //#include "PATInterfaces/SystematicList.h" #include "PATInterfaces/SystematicRegistry.h" @@ -314,7 +314,7 @@ StatusCode ApplySUSYTools::execute() if( doPrint ) ATH_MSG_INFO("Begin ApplySUSYTools for event " <<m_evtCount); // Reset systematics - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); //////////////////////////// @@ -413,7 +413,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("Applying jet systematic " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); // This largely replicates GetJets // setShallowIO writes output as shallow copy @@ -467,7 +467,7 @@ StatusCode ApplySUSYTools::execute() // Fat Jets (nominal only!) /////// if(m_doFatJets){ - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); std::string sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("Applying jet systematic " <<sysname); @@ -493,7 +493,7 @@ StatusCode ApplySUSYTools::execute() // Muons //////// - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); // Initialize mask to false; true if any variation passes "baseline". // Pass m_muPtCut to FillMuon @@ -513,7 +513,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("Applying muon systematic " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); // This largely replicates GetMuons // setShallowIO writes output as shallow copy @@ -572,7 +572,7 @@ StatusCode ApplySUSYTools::execute() // Electrons //////////// - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); // Initialize mask to false; true if any variation passes "baseline". // Pass m_elPtCut to FillElectron @@ -584,7 +584,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("Applying electron systematic " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); // This largely replicates GetJets // setShallowIO writes output as shallow copy @@ -655,14 +655,14 @@ StatusCode ApplySUSYTools::execute() if( !m_doTST ) METsName = m_METsName + "Clus"; // Jet systematics - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); for(auto si : m_systInfoJET){ const CP::SystematicSet& sys = si->systset; std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("MET sysname " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); const xAOD::JetContainer* p_JetsSys = 0; if( doPrint ) ATH_MSG_DEBUG("Using jet name " <<m_JetsName+sysname); @@ -696,7 +696,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("MET sysname " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); xAOD::MissingETContainer* met = new xAOD::MissingETContainer; xAOD::MissingETAuxContainer* metaux = new xAOD::MissingETAuxContainer; met->setStore( metaux); @@ -718,7 +718,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("MET sysname " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); xAOD::MissingETContainer* met = new xAOD::MissingETContainer; xAOD::MissingETAuxContainer* metaux = new xAOD::MissingETAuxContainer; met->setStore( metaux); @@ -740,7 +740,7 @@ StatusCode ApplySUSYTools::execute() // TauJets ////////// - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); // Selection defined by SUSYTools TauID = Loose/Medium/Tight. // Initialize mask to false; true if any variation passes "baseline" @@ -777,7 +777,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("Applying tau systematic " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); // This largely replicates GetTaus // setShallowIO writes output as shallow copy @@ -840,7 +840,7 @@ StatusCode ApplySUSYTools::execute() // Photons ////////// - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); // Selection defined by SUSYTools PhotonID = Loose/Medium/Tight. // Initialize mask to false; true if any variation passes "baseline" @@ -852,7 +852,7 @@ StatusCode ApplySUSYTools::execute() std::string sysname = sys.name(); if( sysname == "" ) sysname = "Nominal"; if( doPrint ) ATH_MSG_DEBUG("Applying photon systematic " <<sysname); - CHECK(m_objTool->applySystematicVariation(sys) == CP::SystematicCode::Ok); + CHECK(m_objTool->applySystematicVariation(sys) == StatusCode::SUCCESS); // This largely replicates GetPhotons // setShallowIO writes output as shallow copy @@ -1103,7 +1103,7 @@ StatusCode ApplySUSYTools::execute() // DerivationFramework trigger thinning is complicated. Just support // TrigDecisionTool and flag matched Electrons and Muons. - CHECK( m_objTool->resetSystematics() == CP::SystematicCode::Ok ); + CHECK( m_objTool->resetSystematics() == StatusCode::SUCCESS ); if( doPrint ) ATH_MSG_DEBUG("Start trigger"); for( const auto& key : m_ElectronTrigs ){ diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/src/SUSYToolsAlg.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/src/SUSYToolsAlg.cxx index c9444781dca2989478109f495d9277329b45ee18..0bdfe226069a69964d8ae82201df17e6ef39ee3d 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/src/SUSYToolsAlg.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/src/SUSYToolsAlg.cxx @@ -17,7 +17,7 @@ #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "TH1F.h" #include "TFile.h" @@ -307,7 +307,7 @@ StatusCode SUSYToolsAlg::execute() { m_clock2.Start(false); } - if (m_SUSYTools->resetSystematics() != CP::SystematicCode::Ok) { + if (m_SUSYTools->resetSystematics() != StatusCode::SUCCESS) { ATH_MSG_ERROR( "Cannot reset SUSYTools systematics" ); } @@ -566,7 +566,7 @@ StatusCode SUSYToolsAlg::execute() { bool isNominal(true); for (const auto& sysInfo : sysInfoList) { CP::SystematicSet sys = sysInfo.systset; - if (m_SUSYTools->applySystematicVariation(sys) != CP::SystematicCode::Ok) { + if (m_SUSYTools->applySystematicVariation(sys) != StatusCode::SUCCESS) { ATH_MSG_ERROR( "Cannot configure SUSYTools for systematic var. %s" << sys.name() ); } else { ATH_MSG_VERBOSE( "Variation \"" << sys.name() << "\" configured..." ); diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx index 714dbc897b90d208889f69b62905403b585d5203..1b8a0c6838022a669f14fbe5bd2c297f5515edad 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/SUSYToolsTester.cxx @@ -65,7 +65,7 @@ // Other includes #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PathResolver/PathResolver.h" #include "METUtilities/METSystematicsTool.h" @@ -120,7 +120,7 @@ int main( int argc, char* argv[] ) { ANA_CHECK_SET_TYPE (int); //StatusCode::enableFailure(); - CP::SystematicCode::enableFailure(); + StatusCode::enableFailure(); CP::CorrectionCode::enableFailure(); // The application's name: @@ -382,7 +382,7 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx); mucuts.push_back(elcutsCurrentSyst); } - if (objTool.resetSystematics() != CP::SystematicCode::Ok) { + if (objTool.resetSystematics() != StatusCode::SUCCESS) { Error(APP_NAME, "Cannot reset SUSYTools systematics" ); exit(-2); } @@ -701,7 +701,7 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx); //ANA_CHECK( store.record(goodJets, "MySelJets" + sys.name()) ); //NOT WORKING? //MT,WB // Tell the SUSYObjDef_xAOD which variation to apply - if (objTool.applySystematicVariation(sys) != CP::SystematicCode::Ok) { + if (objTool.applySystematicVariation(sys) != StatusCode::SUCCESS) { Error(APP_NAME, "Cannot configure SUSYTools for systematic var. %s", (sys.name()).c_str() ); } else { if (debug) Info(APP_NAME, "Variation \"%s\" configured...", (sys.name()).c_str() ); @@ -1040,7 +1040,7 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx); // CP::SystematicSet testSet("TAUS_TRUEHADTAU_EFF_TRIGGER_SYST2015__1up"); // testSet.insert( CP::SystematicVariation("TAUS_TRUEHADTAU_EFF_TRIGGER_SYST2015", 1) ); - // if(objTool.applySystematicVariation(testSet) != CP::SystematicCode::Ok){ + // if(objTool.applySystematicVariation(testSet) != StatusCode::SUCCESS){ // Error( APP_NAME, "Problems with tau trig eff systematic settings!"); // } @@ -1052,7 +1052,7 @@ est.pool.root",relN,(isData?"Data":"MC"),SUSYx); objTool.GetSignalTauSF(*tau,true,true,"tau25_medium1_tracktwo")); } Info( APP_NAME, " Total Event Tau SF = %.4f", objTool.GetTotalTauSF(*taus, true, true, "tau25_medium1_tracktwo")); - // if(objTool.resetSystematics() != CP::SystematicCode::Ok){ + // if(objTool.resetSystematics() != StatusCode::SUCCESS){ // Error( APP_NAME, "Problems going back to default systematic set!"); // } } diff --git a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/check_syst.cxx b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/check_syst.cxx index 4f366bafd3d372cdbe87e1f25d2c63ba52eb7bff..7f19077d823774448effc2edf74dcac77f5e149f 100644 --- a/PhysicsAnalysis/SUSYPhys/SUSYTools/util/check_syst.cxx +++ b/PhysicsAnalysis/SUSYPhys/SUSYTools/util/check_syst.cxx @@ -25,7 +25,7 @@ // Other includes #include "PATInterfaces/SystematicVariation.h" #include "PATInterfaces/SystematicRegistry.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" std::string getFW(std::string in, unsigned int width=30){ for(unsigned int i=in.size() ; i < width; i++) @@ -39,7 +39,6 @@ int main( int argc, char* argv[] ) { ANA_CHECK_SET_TYPE (int); StatusCode::enableFailure(); - CP::SystematicCode::enableFailure(); CP::CorrectionCode::enableFailure(); // The application's name: diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx index fb10f4cc8aa46e414e408582b87568171390f23c..085dd63493c4e7cfb1c6c3c583ef7f6b2c0aadce 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx @@ -139,7 +139,7 @@ StatusCode CommonEfficiencyTool::initialize() m_sSFHistName = "sf_"+m_sWP; // load empty systematic variation by default - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok ) + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS ) return StatusCode::FAILURE; return StatusCode::SUCCESS; @@ -332,7 +332,7 @@ CP::SystematicSet CommonEfficiencyTool::recommendedSystematics() const e.g. TOTAL=(SYST^2 + STAT^2)^0.5 */ //______________________________________________________________________________ -CP::SystematicCode CommonEfficiencyTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode CommonEfficiencyTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { // first check if we already know this systematic configuration @@ -340,7 +340,7 @@ CP::SystematicCode CommonEfficiencyTool::applySystematicVariation ( const CP::Sy if (itSystematicSet != m_mSystematicSets.end()) { m_sSystematicSet = &itSystematicSet->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } // sanity checks if systematic set is supported @@ -361,7 +361,7 @@ CP::SystematicCode CommonEfficiencyTool::applySystematicVariation ( const CP::Sy { ATH_MSG_ERROR("unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!"); ATH_MSG_ERROR("systematic set will not be applied"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } dDirection = sSyst.parameter(); @@ -369,7 +369,7 @@ CP::SystematicCode CommonEfficiencyTool::applySystematicVariation ( const CP::Sy { ATH_MSG_ERROR("unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_EFF_*_TOTAL\" with other systematic variations!"); ATH_MSG_ERROR("systematic set will not be applied"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // finally add the systematic to the set of systematics to process @@ -379,7 +379,7 @@ CP::SystematicCode CommonEfficiencyTool::applySystematicVariation ( const CP::Sy // store this calibration for future use, and make it current m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSetAvailable, sSystematicSet.name())).first->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //=================================PRIVATE-PART================================= diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx index 87ee1dd935587dbe6402c67d4958d2c7a07bf9cf..31444f17d5c0b6fc87d98548320a24ead9c8834a 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx @@ -138,7 +138,7 @@ StatusCode CommonSmearingTool::initialize() generateSystematicSets(); // load empty systematic variation by default - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok ) + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS ) return StatusCode::FAILURE; #ifndef XAODTAU_VERSIONS_TAUJET_V3_H @@ -383,14 +383,14 @@ CP::SystematicSet CommonSmearingTool::recommendedSystematics() const e.g. TOTAL=(SYST^2 + STAT^2)^0.5 */ //______________________________________________________________________________ -CP::SystematicCode CommonSmearingTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode CommonSmearingTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { // first check if we already know this systematic configuration auto itSystematicSet = m_mSystematicSets.find(sSystematicSet); if (itSystematicSet != m_mSystematicSets.end()) { m_sSystematicSet = &itSystematicSet->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } // sanity checks if systematic set is supported @@ -411,7 +411,7 @@ CP::SystematicCode CommonSmearingTool::applySystematicVariation ( const CP::Syst { ATH_MSG_ERROR("unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!"); ATH_MSG_ERROR("systematic set will not be applied"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } dDirection = sSyst.parameter(); @@ -419,7 +419,7 @@ CP::SystematicCode CommonSmearingTool::applySystematicVariation ( const CP::Syst { ATH_MSG_ERROR("unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_SME_TOTAL\" with other systematic variations!"); ATH_MSG_ERROR("systematic set will not be applied"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // finally add the systematic to the set of systematics to process @@ -429,7 +429,7 @@ CP::SystematicCode CommonSmearingTool::applySystematicVariation ( const CP::Syst // store this calibration for future use, and make it current m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSetAvailable, sSystematicSet.name())).first->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //=================================PRIVATE-PART================================= diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx index 8c7b91dca577c4af3ba638a57ef12400fdf2cd67..a337304e48a83960b4f0e2f6548cfd373dd1a8d4 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx @@ -198,14 +198,14 @@ CP::SystematicSet DiTauEfficiencyCorrectionsTool::recommendedSystematics() const } //______________________________________________________________________________ -CP::SystematicCode DiTauEfficiencyCorrectionsTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode DiTauEfficiencyCorrectionsTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++) - if ((**it)->applySystematicVariation(sSystematicSet) == CP::SystematicCode::Unsupported) + if ((**it)->applySystematicVariation(sSystematicSet) == StatusCode::FAILURE) { - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //=================================PRIVATE-PART================================= diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx index 785493d3acdb9a4faf6557b13c581109ee99fdc7..9e18e4edf24a7c753c4e19417209350135ec6d05 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyContJetIDTool.cxx @@ -81,18 +81,18 @@ CP::SystematicSet TauEfficiencyContJetIDTool::recommendedSystematics() const return sSystematicSet; } -CP::SystematicCode TauEfficiencyContJetIDTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode TauEfficiencyContJetIDTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { // first check if we already know this systematic configuration auto itSystematicSet = m_mSystematicSets.find(sSystematicSet); if (itSystematicSet != m_mSystematicSets.end()) { m_sSystematicSet = &itSystematicSet->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } // store this calibration for future use, and make it current m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSet, sSystematicSet.name())).first->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //=================================PRIVATE-PART================================= diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx index a3dffb162b5d486a12070ba38d69f8d3874d8db5..64f808dc846fc3fde4368b2866d6354064f2ffd2 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx @@ -453,15 +453,15 @@ CP::SystematicSet TauEfficiencyCorrectionsTool::recommendedSystematics() const } //______________________________________________________________________________ -CP::SystematicCode TauEfficiencyCorrectionsTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode TauEfficiencyCorrectionsTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++) - if ((**it)->applySystematicVariation(sSystematicSet) == CP::SystematicCode::Unsupported) - return CP::SystematicCode::Unsupported; + if ((**it)->applySystematicVariation(sSystematicSet) == StatusCode::FAILURE) + return StatusCode::FAILURE; for (auto it = m_vTriggerEfficiencyTools.begin(); it != m_vTriggerEfficiencyTools.end(); it++) - if ((**it)->applySystematicVariation(sSystematicSet) == CP::SystematicCode::Unsupported) - return CP::SystematicCode::Unsupported; - return CP::SystematicCode::Ok; + if ((**it)->applySystematicVariation(sSystematicSet) == StatusCode::FAILURE) + return StatusCode::FAILURE; + return StatusCode::SUCCESS; } //=================================PRIVATE-PART================================= diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx index cd3e68f2433d82e110c8fc1cccdfde71b1f2b468..436fe3e44259c362c39dd15838c81a7a90f2d7c8 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyTriggerTool.cxx @@ -55,7 +55,7 @@ StatusCode TauEfficiencyTriggerTool::initialize() generateSystematicSets(); // load empty systematic variation by default - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok ) + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS ) return StatusCode::FAILURE; return StatusCode::SUCCESS; @@ -136,14 +136,14 @@ CP::CorrectionCode TauEfficiencyTriggerTool::getEfficiencyScaleFactor(const xAOD } //______________________________________________________________________________ -CP::SystematicCode TauEfficiencyTriggerTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode TauEfficiencyTriggerTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { // first check if we already know this systematic configuration auto itSystematicSet = m_mSystematicSets.find(sSystematicSet); if (itSystematicSet != m_mSystematicSets.end()) { m_sSystematicSet = &itSystematicSet->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } // sanity checks if systematic set is supported @@ -163,7 +163,7 @@ CP::SystematicCode TauEfficiencyTriggerTool::applySystematicVariation ( const CP // { // ATH_MSG_ERROR("unsupported set of systematic variations, you should either use only \"UP\" or only \"DOWN\" systematics in one set!"); // ATH_MSG_ERROR("systematic set will not be applied"); - // return CP::SystematicCode::Unsupported; + // return StatusCode::FAILURE; // } // dDirection = sSyst.parameter(); @@ -171,7 +171,7 @@ CP::SystematicCode TauEfficiencyTriggerTool::applySystematicVariation ( const CP { ATH_MSG_ERROR("unsupported set of systematic variations, you should not combine \"TAUS_{TRUE|FAKE}_EFF_*_TOTAL\" with other systematic variations!"); ATH_MSG_ERROR("systematic set will not be applied"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // finally add the systematic to the set of systematics to process @@ -181,7 +181,7 @@ CP::SystematicCode TauEfficiencyTriggerTool::applySystematicVariation ( const CP // store this calibration for future use, and make it current m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSetAvailable, sSystematicSet.name())).first->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //______________________________________________________________________________ diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingRun1Tool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingRun1Tool.cxx index 4f9776744128fbacde9aa3e23a3cb1c9dd9692eb..58ca9cdfb177233ead4250b34545bf445731989d 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingRun1Tool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingRun1Tool.cxx @@ -149,18 +149,18 @@ CP::SystematicSet TauSmearingRun1Tool::recommendedSystematics() const return result; } -CP::SystematicCode TauSmearingRun1Tool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode TauSmearingRun1Tool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { // first check if we already know this systematic configuration auto itSystematicSet = m_mSystematicSets.find(sSystematicSet); if (itSystematicSet != m_mSystematicSets.end()) { m_sSystematicSet = &itSystematicSet->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } // store this calibration for future use, and make it current m_sSystematicSet = &m_mSystematicSets.insert(std::pair<CP::SystematicSet,std::string>(sSystematicSet, sSystematicSet.name())).first->first; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } //=================================PRIVATE-PART================================= diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingTool.cxx index ae31b398bb58c39c3ef1af2eb848d8c10ebe21c6..500275a6bf4697fa25fd353f47703801fe5cf120 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingTool.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauSmearingTool.cxx @@ -159,7 +159,7 @@ CP::SystematicSet TauSmearingTool::recommendedSystematics() const return m_tCommonSmearingTool->recommendedSystematics(); } -CP::SystematicCode TauSmearingTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) +StatusCode TauSmearingTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet) { return m_tCommonSmearingTool->applySystematicVariation( sSystematicSet ); } diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h index 07b50b0d7dbab3207768be61f5ae3c923a708b24..341f82d531442dd15b357fa961794bfff49529ee 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonEfficiencyTool.h @@ -75,7 +75,7 @@ public: /// configure this tool for the given list of systematic variations. any /// requested systematics that are not affecting this tool will be silently /// ignored (unless they - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); virtual bool isSupportedRunNumber( int iRunNumber ) { diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h index 49972953448661d6c5af512ed68c697a20f59f13..2e36e758fa6ee275c65ed8917ab6a87d4ad5c6ed 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonSmearingTool.h @@ -81,7 +81,7 @@ public: /// configure this tool for the given list of systematic variations. any /// requested systematics that are not affecting this tool will be silently /// ignored (unless they - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); protected: diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h index de37c5b7a6ebbe52a966cf8d3cec2b4417b7611a..6a8db99221653cb24055757d14f5e48997f19f09 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h @@ -62,7 +62,7 @@ public: /// returns: the list of all systematics this tool recommends to use virtual CP::SystematicSet recommendedSystematics() const; - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ); + virtual StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ); virtual bool isSupportedRunNumber( int iRunNumber ) { diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h index c92096c3468341373cdf907d58c9d57010fd7f6a..14946382c3dceeefd6dce621076205bf4c4cd2d1 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h @@ -43,7 +43,7 @@ public: bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const; CP::SystematicSet affectingSystematics() const; CP::SystematicSet recommendedSystematics() const; - CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); + StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); private: diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h index 1250cc652ad10fc6b99292244173c55af1608a9f..2bdc46addaf5abc0c3fed4c7a29dcc67cc9c3671 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h @@ -76,7 +76,7 @@ public: /// returns: the list of all systematics this tool recommends to use virtual CP::SystematicSet recommendedSystematics() const; - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ); + virtual StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ); virtual bool isSupportedRunNumber( int iRunNumber ) { diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h index a0bad5ac78462dde60324e14b9bd918a133a76af..9cc30a857ed582b8629cd2bff13a3ab4e609d0bc 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyTriggerTool.h @@ -57,7 +57,7 @@ public: virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::TauJet& tau, double& dEfficiencyScaleFactor); - virtual CP::SystematicCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); + virtual StatusCode applySystematicVariation ( const CP::SystematicSet& sSystematicSet); virtual StatusCode setRunNumber(int iRunNumber); diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h index 93f01d6b5fe87c2609035562ef7eeaa5982a7de9..6954fafae6f199f35ad07c452ef94010dc5e34d0 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h @@ -54,7 +54,7 @@ public: /// returns: the list of all systematics this tool recommends to use virtual CP::SystematicSet recommendedSystematics() const; - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ); + virtual StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ); enum TESComponent { diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h index d3d79702bfcc14b29f02cfcd58f48ed5d393c539..e2fb28d03ef1f8f45e23997b3814e98f2c12516b 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h @@ -60,7 +60,7 @@ public: /// returns: the list of all systematics this tool recommends to use virtual CP::SystematicSet recommendedSystematics() const; - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig ); + virtual StatusCode applySystematicVariation( const CP::SystematicSet& systConfig ); private: asg::AnaToolHandle<ITauSmearingTool> m_tCommonSmearingTool; diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx index 6c825220f8bea646b047b51f10addb8bcc37412d..25b9e7725d47c772c05215d5e84b5bfe270718dc 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx @@ -63,8 +63,6 @@ using namespace TauAnalysisTools; int main( int argc, char* argv[] ) { - CP::SystematicCode::enableFailure(); - StatusCode::enableFailure(); // Check if we received a file name: diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/Tools.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/Tools.cxx index abea04fd497b8806c27c61cc367e0462477368ab..3574e189429fc769e2cf43efee6407d913880229 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/Tools.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/Root/Tools.cxx @@ -28,7 +28,7 @@ #include "xAODRootAccess/Init.h" //#include "xAODRootAccess/LoadDictionaries.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/CorrectionCode.h" #include "AsgTools/AsgMetadataTool.h" @@ -55,9 +55,7 @@ namespace top { //fail on unchecked error codes if (failOnUnchecked) { StatusCode::enableFailure(); - CP::SystematicCode::enableFailure(); CP::CorrectionCode::enableFailure(); - //StatusCode::enableFailure(); } } diff --git a/PhysicsAnalysis/TopPhys/xAOD/TopCorrections/Root/BTagScaleFactorCalculator.cxx b/PhysicsAnalysis/TopPhys/xAOD/TopCorrections/Root/BTagScaleFactorCalculator.cxx index 718da6e4754b11f011fd92a7a2f4121146937194..b44f986510508fe60cb1751ee55e17292074ff47 100644 --- a/PhysicsAnalysis/TopPhys/xAOD/TopCorrections/Root/BTagScaleFactorCalculator.cxx +++ b/PhysicsAnalysis/TopPhys/xAOD/TopCorrections/Root/BTagScaleFactorCalculator.cxx @@ -14,7 +14,7 @@ #include <functional> // For debug function -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicSet.h" #include "PATInterfaces/SystematicVariation.h" #include "CalibrationDataInterface/CalibrationDataInterfaceROOT.h" diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h index cc54d41d6564b81cd56a72ac4d1b4b7cab30538f..7b2f8d05c030cc57402cbe29922e82d5a7cd5f22 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackBiasingTool.h @@ -43,7 +43,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const = 0; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) = 0; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) = 0; }; // class IInDetTrackBiasingTool diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackSmearingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackSmearingTool.h index 446e8dcc24bc7da66f866fc3252739f59c50ff10..3773f699effcb4fcafdccc3daff33ce62847d743 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackSmearingTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackSmearingTool.h @@ -53,7 +53,7 @@ namespace InDet { virtual CP::SystematicSet recommendedSystematics() const = 0; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) = 0; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) = 0; };/// class IInDetTrackSmearingTool diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h index bd847e4e304dbde006bea9fbc3b50cf0fa4cef10..eb2b236ff4eac12970a413a79b2ae7476f576974 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IInDetTrackTruthFilterTool.h @@ -42,7 +42,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const = 0; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) = 0; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) = 0; }; // class IInDetTrackTruthFilterTool diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h index 2028e34e11ade33d5f2c1aceea52b8f52cfd4074..e8eeaa2d23d7cd812b7d9e982425b4d75f305e95 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/IJetTrackFilterTool.h @@ -41,7 +41,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const = 0; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) = 0; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) = 0; }; // class IJetTrackFilterTool diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h index 8713b983a5bbd2dbaa9d99169f40eb36935d5262..8da2ee259b07c6cc40f477914fee24593b54b7d5 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackBiasingTool.h @@ -60,7 +60,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const override; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override; protected: diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h index 947589f02bd697cd8331639ef03c49931ba9ac52..e36abd687d34a5782a7efb157ef7e2480cbd9968 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSmearingTool.h @@ -59,7 +59,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const override; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override; /// Get smearing widths to add to IPs float GetSmearD0Sigma(const xAOD::TrackParticle&); diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h index 084afdd973eaf86fa4ada44b03759149a27a9e77..73049359c88f0b6c311b287e637c2dca25d26f8a 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackSystematicsTool.h @@ -36,7 +36,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const override; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override; protected: diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h index fc51c89298e87b5b03f47c2fd443984aff4c215c..07e41823776f5063d55e87b448f45aee3f189495 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/InDetTrackTruthFilterTool.h @@ -58,7 +58,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const override; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override; private: diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h index 2566aafdd193ab9734bceaef327e7b63cc907a98..f4dd828cb18bfd740c13981e7d13ebb48ecef946 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/InDetTrackSystematicsTools/JetTrackFilterTool.h @@ -58,7 +58,7 @@ namespace InDet { /// returns: list of recommended systematics to use with this tool virtual CP::SystematicSet recommendedSystematics() const override; /// configure the tool to apply a given list of systematic variations - virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& ) override; + virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override; private: diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx index d94f207dc13a99375959baea6ad1b9acd49ec677..15e1ceb4c736b659f5eb0cca34eafab7e628d5b8 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackBiasingTool.cxx @@ -283,7 +283,7 @@ namespace InDet { return InDetTrackSystematicsTool::recommendedSystematics(); } - CP::SystematicCode InDetTrackBiasingTool::applySystematicVariation( const CP::SystematicSet& systs ) + StatusCode InDetTrackBiasingTool::applySystematicVariation( const CP::SystematicSet& systs ) { return InDetTrackSystematicsTool::applySystematicVariation(systs); } diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx index c932652448f855f69b4ef6bc13feb707f8c2f432..dfd834ac92eaa319eae98f58b5d65c495c746f26 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSmearingTool.cxx @@ -215,9 +215,9 @@ namespace InDet { return RecommendedSystematics; } - CP::SystematicCode InDetTrackSmearingTool::applySystematicVariation( const CP::SystematicSet& systs ) + StatusCode InDetTrackSmearingTool::applySystematicVariation( const CP::SystematicSet& systs ) { - // should do check in here and return CP::SystematicCode::Unsupported if LOOSE and TIGHT versions are set simultaneously + // should do check in here and return StatusCode::FAILURE if LOOSE and TIGHT versions are set simultaneously return InDetTrackSystematicsTool::applySystematicVariation(systs); } diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSystematicsTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSystematicsTool.cxx index 8bc69d92bf4a2c1ef8e4e6b3792ded5996594360..2ab6aabdfdfc47461df88299ca265976807c5fea 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSystematicsTool.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackSystematicsTool.cxx @@ -22,7 +22,7 @@ namespace InDet { // add the affecting systematics to the registry auto& registry = CP::SystematicRegistry::getInstance(); - if (registry.registerSystematics(*this) != CP::SystematicCode::Ok) { + if (registry.registerSystematics(*this) != StatusCode::SUCCESS) { ATH_MSG_ERROR( "Unable to register systematics" ); return StatusCode::FAILURE; } @@ -42,7 +42,7 @@ namespace InDet { return affectingSystematics(); } - CP::SystematicCode InDetTrackSystematicsTool::applySystematicVariation( const CP::SystematicSet& systematics ) + StatusCode InDetTrackSystematicsTool::applySystematicVariation( const CP::SystematicSet& systematics ) { // first check if we already know this systematic configuration @@ -55,9 +55,9 @@ namespace InDet { const CP::SystematicSet affectingSysts = affectingSystematics(); CP::SystematicSet filteredSysts; if ( CP::SystematicSet::filterForAffectingSystematics - (systematics, affectingSysts, filteredSysts) != CP::SystematicCode::Ok ) { + (systematics, affectingSysts, filteredSysts) != StatusCode::SUCCESS ) { ATH_MSG_ERROR( "Recieved unsupported systematics: " << systematics.name() ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // check in here for incompatible systematics @@ -68,11 +68,11 @@ namespace InDet { if ( isIn( TRK_RES_D0_MEAS) + isIn( TRK_RES_D0_MEAS_UP ) + isIn( TRK_RES_D0_MEAS_DOWN ) > 1 ) { // should only have 1 of these options simultantously ATH_MSG_ERROR( "You must pick only one choice for the d0 resolution systematic" ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } if ( isIn(TRK_RES_Z0_MEAS) + isIn( TRK_RES_Z0_MEAS_UP ) + isIn( TRK_RES_Z0_MEAS_DOWN ) > 1 ) { ATH_MSG_ERROR( "You must pick only one choice for the z0 resolution systematic" ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } bool isSetTrkLoose = isIn( TRK_FAKE_RATE_LOOSE ) || isIn( TRK_EFF_LOOSE_GLOBAL ) @@ -86,7 +86,7 @@ namespace InDet { || isIn( TRK_EFF_TIGHT_PHYSMODEL ); if ( isSetTrkLoose && isSetTrkTight) { ATH_MSG_ERROR( "Both Loose and TightPrimary versions of systematics are simultaneously active." ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // if the systematics set looks supported, then insert it into the map for future use @@ -95,7 +95,7 @@ namespace InDet { m_activeSysts = &sysMapItr->second; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } bool InDetTrackSystematicsTool::isActive( TrackSystematic syst ) const diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx index 494bc7c773ed0de365c8007b03f78cab9a677a8c..bd2010008927f2e0f7100d14297be355fdbd5fc1 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/InDetTrackTruthFilterTool.cxx @@ -265,7 +265,7 @@ namespace InDet { return InDetTrackSystematicsTool::recommendedSystematics(); } - CP::SystematicCode InDetTrackTruthFilterTool::applySystematicVariation( const CP::SystematicSet& systs ) + StatusCode InDetTrackTruthFilterTool::applySystematicVariation( const CP::SystematicSet& systs ) { return InDetTrackSystematicsTool::applySystematicVariation(systs); } diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx index 1bb818c1cfb5698148dcd0a6f11cf17701887f0b..9ba0eb990ce0e9808b61741ba371128d1f7500a4 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/Root/JetTrackFilterTool.cxx @@ -167,7 +167,7 @@ namespace InDet { return InDetTrackSystematicsTool::recommendedSystematics(); } - CP::SystematicCode JetTrackFilterTool::applySystematicVariation( const CP::SystematicSet& systs ) + StatusCode JetTrackFilterTool::applySystematicVariation( const CP::SystematicSet& systs ) { return InDetTrackSystematicsTool::applySystematicVariation(systs); } diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/src/InDetTrackSmearingToolTester.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/src/InDetTrackSmearingToolTester.cxx index 26acdb74afa3c7ba8061e8d26779a1a404876fd6..63a1b62b180abf63056b3be90f7f2ab1cd9db2fa 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/src/InDetTrackSmearingToolTester.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/src/InDetTrackSmearingToolTester.cxx @@ -41,7 +41,7 @@ namespace InDet { } } auto systCode = m_smearTool->applySystematicVariation( m_systActive ); - if (systCode != CP::SystematicCode::Ok) { + if (systCode != StatusCode::SUCCESS) { ATH_MSG_ERROR( "Failure to apply systematic variation." ); return StatusCode::FAILURE; } diff --git a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/util/InDetTrackSystsToolTester.cxx b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/util/InDetTrackSystsToolTester.cxx index 59d4107207e717820ff9f34739c068cee9f1dbad..d86688eac1cf4d06e001cb6f42ae616416b82b7d 100644 --- a/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/util/InDetTrackSystsToolTester.cxx +++ b/PhysicsAnalysis/TrackingID/InDetTrackSystematicsTools/util/InDetTrackSystsToolTester.cxx @@ -67,7 +67,7 @@ int main( int argc, char* argv[] ) { StatusCode::enableFailure(); CP::CorrectionCode::enableFailure(); - CP::SystematicCode::enableFailure(); + StatusCode::enableFailure(); // Initialise the application: CHECK( xAOD::Init( APP_NAME ) ); @@ -148,7 +148,7 @@ int main( int argc, char* argv[] ) { tool->msg().setLevel( MSG::DEBUG ); CHECK( tool->initialize() ); auto systCode = tool->applySystematicVariation(systSet); - if (systCode != CP::SystematicCode::Ok) { + if (systCode != StatusCode::SUCCESS) { Error( APP_NAME, "Failed to apply systematic variation on tool %s", tool->name().data() ); return 2; } diff --git a/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/JetTileCorrection/JetTileCorrectionTool.h b/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/JetTileCorrection/JetTileCorrectionTool.h index 8a9bfcb7191b53970728a7e1696fce5f1cb45d05..aa23c1574ed8e781be90db66b6574a3f6459f25b 100644 --- a/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/JetTileCorrection/JetTileCorrectionTool.h +++ b/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/JetTileCorrection/JetTileCorrectionTool.h @@ -81,10 +81,10 @@ namespace CP { return *m_appliedSystematics; } - virtual SystematicCode applySystematicVariation + virtual StatusCode applySystematicVariation ( const SystematicSet& systConfig ); - CP::SystematicCode registerSystematics(); + StatusCode registerSystematics(); //status helpers diff --git a/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/Root/JetTileCorrectionTool.cxx b/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/Root/JetTileCorrectionTool.cxx index 14fdd9ae8750ce83370c3a9f62dd52a068850226..0ea47344dc153bbf1a24a68def2107d97fe53595 100644 --- a/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/Root/JetTileCorrectionTool.cxx +++ b/Reconstruction/Jet/JetAnalysisTools/JetTileCorrection/Root/JetTileCorrectionTool.cxx @@ -15,7 +15,7 @@ #endif #include "PATInterfaces/CorrectionTool.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicVariation.h" #include "PathResolver/PathResolver.h" @@ -135,7 +135,7 @@ namespace CP { } // Add the affecting systematics to the global registry SystematicRegistry& registry = SystematicRegistry::getInstance(); - if (registry.registerSystematics(*this) != SystematicCode::Ok){ + if (registry.registerSystematics(*this) != StatusCode::SUCCESS){ ATH_MSG_ERROR("Unable to register the systematics"); return StatusCode::FAILURE; } @@ -242,7 +242,7 @@ namespace CP { } - SystematicCode JetTileCorrectionTool :: applySystematicVariation ( const SystematicSet& systConfig ) { + StatusCode JetTileCorrectionTool :: applySystematicVariation ( const SystematicSet& systConfig ) { // First, check if we already know this systematic configuration auto itr = m_systFilter.find(systConfig); @@ -255,7 +255,7 @@ namespace CP { CP::SystematicSet filteredSys; if (!CP::SystematicSet::filterForAffectingSystematics(systConfig, affectingSys, filteredSys)){ ATH_MSG_ERROR("Unsupported combination of systematics passed to the tool!"); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // Insert filtered set into the map @@ -264,7 +264,7 @@ namespace CP { CP::SystematicSet& mySysConf = itr->second; m_appliedSystematics = &mySysConf; - return SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h b/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h index 23239ec6ab16bf7038b97bf5de0a0ed2fc8a6eff..dc2e3460a68b6af07ceea8f8c7e408a68c0473ef 100644 --- a/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h +++ b/Reconstruction/Jet/JetJvtEfficiency/JetJvtEfficiency/JetJvtEfficiency.h @@ -48,8 +48,8 @@ public: bool isAffectedBySystematic(const CP::SystematicVariation& var) const override {return CP::SystematicsTool::isAffectedBySystematic(var);} CP::SystematicSet affectingSystematics() const override {return CP::SystematicsTool::affectingSystematics();} CP::SystematicSet recommendedSystematics() const override {return CP::SystematicsTool::recommendedSystematics();} - CP::SystematicCode applySystematicVariation(const CP::SystematicSet& set) override {return CP::SystematicsTool::applySystematicVariation(set);} - CP::SystematicCode sysApplySystematicVariation(const CP::SystematicSet&) override; + StatusCode applySystematicVariation(const CP::SystematicSet& set) override {return CP::SystematicsTool::applySystematicVariation(set);} + StatusCode sysApplySystematicVariation(const CP::SystematicSet&) override; float getJvtThresh() const override {return m_jvtCut;} float getUserPtMax() const override {return m_maxPtForJvt;} diff --git a/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx b/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx index 9909746ba03b1155196e2ed93b31a448f46de1cd..3fc7e1690f981022532706abbfba2c837852deee 100644 --- a/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx +++ b/Reconstruction/Jet/JetJvtEfficiency/Root/JetJvtEfficiency.cxx @@ -3,7 +3,7 @@ */ #include "JetJvtEfficiency/JetJvtEfficiency.h" -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicVariation.h" #include "PathResolver/PathResolver.h" @@ -147,7 +147,7 @@ StatusCode JetJvtEfficiency::initialize(){ } // Configure for nominal systematics - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) { + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Could not configure for nominal settings"); return StatusCode::FAILURE; } @@ -328,14 +328,14 @@ bool JetJvtEfficiency::isInRange(const xAOD::Jet& jet) const { return true; } -SystematicCode JetJvtEfficiency::sysApplySystematicVariation(const CP::SystematicSet& systSet){ +StatusCode JetJvtEfficiency::sysApplySystematicVariation(const CP::SystematicSet& systSet){ m_appliedSystEnum = NONE; if (systSet.size()==0) { ATH_MSG_DEBUG("No affecting systematics received."); - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } else if (systSet.size()>1) { ATH_MSG_WARNING("Tool does not support multiple systematics, returning unsupported" ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } SystematicVariation systVar = *systSet.begin(); if (systVar == SystematicVariation("")) m_appliedSystEnum = NONE; @@ -348,7 +348,7 @@ SystematicCode JetJvtEfficiency::sysApplySystematicVariation(const CP::Systemati else m_appliedSystEnum = NONE; ATH_MSG_DEBUG("applied systematic is " << m_appliedSystEnum); - return SystematicCode::Ok; + return StatusCode::SUCCESS; } StatusCode JetJvtEfficiency::tagTruth(const xAOD::IParticleContainer *jets,const xAOD::IParticleContainer *truthJets) { diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/FFJetSmearingTool.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/FFJetSmearingTool.h index 642ca83bc9b99b3da7f8d32bb55c90322b843214..cb081082f2de555546fdb792292f55567fb918eb 100644 --- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/FFJetSmearingTool.h +++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/FFJetSmearingTool.h @@ -16,7 +16,7 @@ //includes for systematics ATLAS structure #include "PATInterfaces/SystematicsTool.h"//To set the systematics as it is done in JetJvtEfficiency -#include "PATInterfaces/SystematicCode.h" +#include "AsgMessaging/StatusCode.h" #include "PATInterfaces/SystematicRegistry.h" #include "PATInterfaces/SystematicVariation.h" @@ -120,7 +120,7 @@ namespace CP { virtual CP::SystematicSet recommendedSystematics() const override; /// Configure tool to apply systematic variation - virtual CP::SystematicCode applySystematicVariation + virtual StatusCode applySystematicVariation (const CP::SystematicSet& systematics) override; /// @} diff --git a/Reconstruction/Jet/JetUncertainties/JetUncertainties/JetUncertaintiesTool.h b/Reconstruction/Jet/JetUncertainties/JetUncertainties/JetUncertaintiesTool.h index b7c43bc424bc80719284a9b5c3e8f614ad44c9d4..1cddfa30adf4c6d044e87ce1cb9ca638551d7f11 100644 --- a/Reconstruction/Jet/JetUncertainties/JetUncertainties/JetUncertaintiesTool.h +++ b/Reconstruction/Jet/JetUncertainties/JetUncertainties/JetUncertaintiesTool.h @@ -148,7 +148,7 @@ class JetUncertaintiesTool : virtual public ICPJetUncertaintiesTool, virtual CP::SystematicSet affectingSystematics() const; virtual CP::SystematicSet recommendedSystematics() const; virtual CP::SystematicSet appliedSystematics() const; - virtual CP::SystematicCode applySystematicVariation(const CP::SystematicSet& systConfig); + virtual StatusCode applySystematicVariation(const CP::SystematicSet& systConfig); // Retrieve the correlation matrix for the loaded configuration @@ -257,9 +257,9 @@ class JetUncertaintiesTool : virtual public ICPJetUncertaintiesTool, // Helper methods for CP::ISystematicsTool functions bool checkIfRecommendedSystematic(const jet::UncertaintyGroup& systematic) const; - virtual CP::SystematicCode addAffectingSystematic(const CP::SystematicVariation& systematic, bool recommended); - virtual CP::SystematicCode getFilteredSystematicSet(const CP::SystematicSet& systConfig, CP::SystematicSet& filteredSet); - virtual CP::SystematicCode getUncertaintySet(const CP::SystematicSet& filteredSet, jet::UncertaintySet*& uncSet); + virtual StatusCode addAffectingSystematic(const CP::SystematicVariation& systematic, bool recommended); + virtual StatusCode getFilteredSystematicSet(const CP::SystematicSet& systConfig, CP::SystematicSet& filteredSet); + virtual StatusCode getUncertaintySet(const CP::SystematicSet& filteredSet, jet::UncertaintySet*& uncSet); // accessor to taggign efficiency SF SG::AuxElement::Accessor<float> m_accTagScaleFactor; diff --git a/Reconstruction/Jet/JetUncertainties/Root/FFJetSmearingTool.cxx b/Reconstruction/Jet/JetUncertainties/Root/FFJetSmearingTool.cxx index 413b08641256612d8eaa8f40b487bd0027839fd3..9c91ee7231831ee6e308d9751042066fae14f706 100644 --- a/Reconstruction/Jet/JetUncertainties/Root/FFJetSmearingTool.cxx +++ b/Reconstruction/Jet/JetUncertainties/Root/FFJetSmearingTool.cxx @@ -151,7 +151,7 @@ StatusCode FFJetSmearingTool::initialize() // Add the affecting systematics to the global registry CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); - if(registry.registerSystematics(*this) != CP::SystematicCode::Ok){ + if(registry.registerSystematics(*this) != StatusCode::SUCCESS){ ATH_MSG_ERROR("Unable to register systematics!"); return StatusCode::FAILURE; } @@ -195,7 +195,7 @@ CP::SystematicSet FFJetSmearingTool::recommendedSystematics() const // Apply systematic configuration //----------------------------------------------------------------------------- -CP::SystematicCode FFJetSmearingTool::applySystematicVariation +StatusCode FFJetSmearingTool::applySystematicVariation (const CP::SystematicSet& systematics) { // First check if we already know this systematic configuration. @@ -211,10 +211,10 @@ CP::SystematicCode FFJetSmearingTool::applySystematicVariation CP::SystematicSet filteredSysts; if( CP::SystematicSet:: filterForAffectingSystematics(systematics, affectingSysts, filteredSysts) != - CP::SystematicCode::Ok ) + StatusCode::SUCCESS ) { ATH_MSG_ERROR("Received unsupported systematics: " << systematics.name()); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } // At this point, we can do some additional checks for consistency @@ -224,7 +224,7 @@ CP::SystematicCode FFJetSmearingTool::applySystematicVariation if(filteredSysts.size() > 1){ ATH_MSG_ERROR("No support for more than one JMS/JMR sys at a time: " << filteredSysts.name()); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } @@ -243,7 +243,7 @@ CP::SystematicCode FFJetSmearingTool::applySystematicVariation // Apply the filtered systematics m_currentSysData = &iter->second; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/Reconstruction/Jet/JetUncertainties/Root/JetUncertaintiesTool.cxx b/Reconstruction/Jet/JetUncertainties/Root/JetUncertaintiesTool.cxx index cf76479c404848af1cec035dacfa5683406db89f..872693bc71384d90bdd4c4f6cb6cc131a5fd8b1d 100644 --- a/Reconstruction/Jet/JetUncertainties/Root/JetUncertaintiesTool.cxx +++ b/Reconstruction/Jet/JetUncertainties/Root/JetUncertaintiesTool.cxx @@ -117,7 +117,7 @@ JetUncertaintiesTool::JetUncertaintiesTool(const std::string& name) // Set dummy default systematic (do nothing) // Prevents NULL access if user tries to apply correction without first calling function - if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok) + if (applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) ATH_MSG_ERROR(Form("Failed to pre-set applySystematicVariation to no variation")); } @@ -167,7 +167,7 @@ JetUncertaintiesTool::JetUncertaintiesTool(const JetUncertaintiesTool& toCopy) for (size_t iGroup = 0; iGroup < toCopy.m_groups.size(); ++iGroup) m_groups.push_back(new UncertaintyGroup(*toCopy.m_groups.at(iGroup))); - if (applySystematicVariation(m_currentSystSet) != CP::SystematicCode::Ok) + if (applySystematicVariation(m_currentSystSet) != StatusCode::SUCCESS) ATH_MSG_ERROR(Form("Failed to re-set applySystematicVariation in new tool copy")); } @@ -695,7 +695,7 @@ StatusCode JetUncertaintiesTool::initialize() // If unspecified, all variables are systematically shifted by default const bool isRecommended = checkIfRecommendedSystematic(*m_groups.at(iGroup)); CP::SystematicVariation systVar(m_groups.at(iGroup)->getName().Data(),CP::SystematicVariation::CONTINUOUS); - if (addAffectingSystematic(systVar,isRecommended) != CP::SystematicCode::Ok) + if (addAffectingSystematic(systVar,isRecommended) != StatusCode::SUCCESS) return StatusCode::FAILURE; } @@ -1265,7 +1265,7 @@ bool JetUncertaintiesTool::checkIfRecommendedSystematic(const jet::UncertaintyGr return true; } -CP::SystematicCode JetUncertaintiesTool::addAffectingSystematic(const CP::SystematicVariation& systematic, bool recommended) +StatusCode JetUncertaintiesTool::addAffectingSystematic(const CP::SystematicVariation& systematic, bool recommended) { CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance(); registry.registerSystematic(systematic); @@ -1273,40 +1273,40 @@ CP::SystematicCode JetUncertaintiesTool::addAffectingSystematic(const CP::System if (recommended) { m_recommendedSystematics.insert(systematic); - if (registry.addSystematicToRecommended(systematic) != CP::SystematicCode::Ok) + if (registry.addSystematicToRecommended(systematic) != StatusCode::SUCCESS) { ATH_MSG_ERROR("Failed to add systematic to list of recommended systematics: " << systematic.name()); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } -CP::SystematicCode JetUncertaintiesTool::applySystematicVariation(const CP::SystematicSet& systConfig) +StatusCode JetUncertaintiesTool::applySystematicVariation(const CP::SystematicSet& systConfig) { //if (!m_isInit) //{ // ATH_MSG_FATAL("Tool must be initialized before calling applySystematicVariation"); - // return CP::SystematicCode::Unsupported; + // return StatusCode::FAILURE; //} // Filter the full set of systematics to the set we care about CP::SystematicSet filteredSet; - if (getFilteredSystematicSet(systConfig,filteredSet) != CP::SystematicCode::Ok) - return CP::SystematicCode::Unsupported; + if (getFilteredSystematicSet(systConfig,filteredSet) != StatusCode::SUCCESS) + return StatusCode::FAILURE; // Get the uncertainty set associated to the filtered systematics set jet::UncertaintySet* uncSet = NULL; - if (getUncertaintySet(filteredSet,uncSet) != CP::SystematicCode::Ok) - return CP::SystematicCode::Unsupported; + if (getUncertaintySet(filteredSet,uncSet) != StatusCode::SUCCESS) + return StatusCode::FAILURE; // Change the current state m_currentSystSet.swap(filteredSet); m_currentUncSet = uncSet; - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } -CP::SystematicCode JetUncertaintiesTool::getFilteredSystematicSet(const CP::SystematicSet& systConfig, CP::SystematicSet& filteredSet) +StatusCode JetUncertaintiesTool::getFilteredSystematicSet(const CP::SystematicSet& systConfig, CP::SystematicSet& filteredSet) { // Check if we have already encountered this set std::unordered_map<CP::SystematicSet,CP::SystematicSet>::iterator iter = m_systFilterMap.find(systConfig); @@ -1315,15 +1315,15 @@ CP::SystematicCode JetUncertaintiesTool::getFilteredSystematicSet(const CP::Syst // Make the filtered set and store it else { - if (CP::SystematicSet::filterForAffectingSystematics(systConfig,m_recognizedSystematics,filteredSet) != CP::SystematicCode::Ok) - return CP::SystematicCode::Unsupported; + if (CP::SystematicSet::filterForAffectingSystematics(systConfig,m_recognizedSystematics,filteredSet) != StatusCode::SUCCESS) + return StatusCode::FAILURE; m_systFilterMap.insert(std::make_pair(systConfig,filteredSet)); } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } -CP::SystematicCode JetUncertaintiesTool::getUncertaintySet(const CP::SystematicSet& filteredSet, jet::UncertaintySet*& uncSet) +StatusCode JetUncertaintiesTool::getUncertaintySet(const CP::SystematicSet& filteredSet, jet::UncertaintySet*& uncSet) { // Check if we have already encountered this set std::unordered_map<CP::SystematicSet,UncertaintySet*>::iterator iter = m_systSetMap.find(filteredSet); @@ -1341,12 +1341,12 @@ CP::SystematicCode JetUncertaintiesTool::getUncertaintySet(const CP::SystematicS { ATH_MSG_ERROR("Failed to create UncertaintySet for filtered CP::SystematicSet: " << filteredSet.name()); JESUNC_SAFE_DELETE(uncSet); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } m_systSetMap.insert(std::make_pair(filteredSet,uncSet)); } - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } diff --git a/Reconstruction/Jet/JetUncertainties/util/FFJetSmearingTool_MyExample.cxx b/Reconstruction/Jet/JetUncertainties/util/FFJetSmearingTool_MyExample.cxx index 3031cb61b335a91d327cf74d197199b6886491d9..76d5f182678bdcdd3ac25d2385d6785d4008fb4e 100644 --- a/Reconstruction/Jet/JetUncertainties/util/FFJetSmearingTool_MyExample.cxx +++ b/Reconstruction/Jet/JetUncertainties/util/FFJetSmearingTool_MyExample.cxx @@ -293,7 +293,7 @@ config.makeTool (ffjetsmearingtool, cleanup); printf("\n=============SYSTEMATICS CHECK NOW \n"); for (auto sys : sysList) { // Tell the calibration tool which variation to apply - if (ffjetsmearingtool.applySystematicVariation(sys) != CP::SystematicCode::Ok) { + if (ffjetsmearingtool.applySystematicVariation(sys) != StatusCode::SUCCESS) { printf("Error, Cannot configure calibration tool for systematics \n"); } diff --git a/Reconstruction/Jet/JetUncertainties/util/testResolution.cxx b/Reconstruction/Jet/JetUncertainties/util/testResolution.cxx index 6c580b0fe35365893ad8ea19049f2db4e99e1cf2..1f57ec83865c4792b8afd7a35affb27a75ed4a31 100644 --- a/Reconstruction/Jet/JetUncertainties/util/testResolution.cxx +++ b/Reconstruction/Jet/JetUncertainties/util/testResolution.cxx @@ -144,7 +144,7 @@ int main (int argc, char* argv[]) } CP::SystematicSet syst; syst.insert(variation); - if (tool->applySystematicVariation(syst) != CP::SystematicCode::Ok) + if (tool->applySystematicVariation(syst) != StatusCode::SUCCESS) { printf("Failed to apply systematic variation\n"); exit(1); diff --git a/Reconstruction/Jet/JetUncertainties/util/testTool.cxx b/Reconstruction/Jet/JetUncertainties/util/testTool.cxx index 85cf069d26f7d8ea9c941c8359b44624a8f1ccc1..5f3fa8f10726b4e9a4296401ef387f2026f12f2d 100644 --- a/Reconstruction/Jet/JetUncertainties/util/testTool.cxx +++ b/Reconstruction/Jet/JetUncertainties/util/testTool.cxx @@ -132,7 +132,7 @@ int main (int argc, char* argv[]) CP::SystematicSet* syst = new CP::SystematicSet(); syst->insert(CP::SystematicVariation("JET_Flavor_Response",-1.5)); syst->insert(CP::SystematicVariation("JET_PunchThrough_MC15",+1.5)); - if (tool->applySystematicVariation(*syst) != CP::SystematicCode::Ok) + if (tool->applySystematicVariation(*syst) != StatusCode::SUCCESS) exit(2); // Try below eta boundary of flavour @@ -147,7 +147,7 @@ int main (int argc, char* argv[]) syst = new CP::SystematicSet(); syst->insert(CP::SystematicVariation("JET_Flavor_Response",+1.5)); syst->insert(CP::SystematicVariation("JET_PunchThrough_MC15",+1.5)); - if (tool->applySystematicVariation(*syst) != CP::SystematicCode::Ok) + if (tool->applySystematicVariation(*syst) != StatusCode::SUCCESS) exit(2); // Re-try below eta boundary of flavour @@ -194,7 +194,7 @@ int main (int argc, char* argv[]) CP::SystematicSet* syst = new CP::SystematicSet(); syst->insert(CP::SystematicVariation("JET_Rtrk_Baseline",-1.5)); syst->insert(CP::SystematicVariation("JET_Rtrk_Modelling",+1.5)); - if (tool->applySystematicVariation(*syst) != CP::SystematicCode::Ok) + if (tool->applySystematicVariation(*syst) != StatusCode::SUCCESS) exit(2); // Add D2 information diff --git a/Reconstruction/MET/METInterface/METInterface/IMETSystematicsTool.h b/Reconstruction/MET/METInterface/METInterface/IMETSystematicsTool.h index 7617eb55dee7da1353fd20c12b04f3a316bb9bdf..003716de2c6581472b4dbceb1730bb3f8f04ccc3 100644 --- a/Reconstruction/MET/METInterface/METInterface/IMETSystematicsTool.h +++ b/Reconstruction/MET/METInterface/METInterface/IMETSystematicsTool.h @@ -85,7 +85,7 @@ class IMETSystematicsTool : virtual public asg::IAsgTool, const xAOD::MissingETAssociationHelper * helper=nullptr ) const = 0; - // virtual CP::SystematicCode applySystematicVariation(const CP::SystematicSet & set) = 0; + // virtual StatusCode applySystematicVariation(const CP::SystematicSet & set) = 0; // virtual CP::SystematicSet affectingSystematics() const = 0; // virtual CP::SystematicSet recommendedSystematics() const = 0; // virtual bool isAffectedBySystematic(const CP::SystematicVariation & systematic) const = 0; diff --git a/Reconstruction/MET/METReconstruction/test/ut_METAssociator.cxx b/Reconstruction/MET/METReconstruction/test/ut_METAssociator.cxx index 86959dad63838863a26fe9ac81fa311404dc2aed..e7f1a095fbf6ca9d155a7eb3f819d1c90949f833 100644 --- a/Reconstruction/MET/METReconstruction/test/ut_METAssociator.cxx +++ b/Reconstruction/MET/METReconstruction/test/ut_METAssociator.cxx @@ -34,7 +34,6 @@ struct globalxAODSetup xAOD::Init() ; // CP::CorrectionCode::enableFailure(); // StatusCode::enableFailure(); - // CP::SystematicCode::enableFailure(); TString const fileName = "/afs/cern.ch/work/m/maklein/public/mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD.e2928_s1982_s2008_r6114_r6104_tid04859512_00/AOD.04859512._000001.pool.root"; diff --git a/Reconstruction/MET/METReconstruction/test/ut_METElectronAssociator.cxx b/Reconstruction/MET/METReconstruction/test/ut_METElectronAssociator.cxx index e44d02136480032d8e44bc100cafa93ae411f03c..7c289ae5837e1a9c04a5326566d4904a6b67fbd1 100644 --- a/Reconstruction/MET/METReconstruction/test/ut_METElectronAssociator.cxx +++ b/Reconstruction/MET/METReconstruction/test/ut_METElectronAssociator.cxx @@ -42,7 +42,6 @@ struct globalxAODSetup xAOD::Init() ; // CP::CorrectionCode::enableFailure(); // StatusCode::enableFailure(); - // CP::SystematicCode::enableFailure(); TString const fileName = "/afs/cern.ch/work/m/maklein/public/mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD.e2928_s1982_s2008_r6114_r6104_tid04859512_00/AOD.04859512._000001.pool.root"; //"/afs/cern.ch/work/r/rsmith/public/METUtilities_testfiles/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.AOD.e3099_s1982_s1964_r6006_tid04628718_00/AOD.04628718._000158.pool.root.1"; diff --git a/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h b/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h index 6f46c200b59f7ee20d24132d7239ba7d4ce0aa5f..7b267e1763d8bb4df9b23b95d48ebc64e56d3d40 100644 --- a/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h +++ b/Reconstruction/MET/METUtilities/METUtilities/METSystematicsTool.h @@ -122,8 +122,8 @@ namespace met { bool isAffectedBySystematic (const CP::SystematicVariation& var) const{return CP::SystematicsTool::isAffectedBySystematic(var) ;} CP::SystematicSet affectingSystematics () const{ return CP::SystematicsTool::affectingSystematics () ;} CP::SystematicSet recommendedSystematics () const{ return CP::SystematicsTool::recommendedSystematics() ;} - CP::SystematicCode applySystematicVariation(const CP::SystematicSet& set){ return CP::SystematicsTool::applySystematicVariation(set) ;} - CP::SystematicCode sysApplySystematicVariation(const CP::SystematicSet&); //when inheriting from SystematicsTool, we should only have to implement this one + StatusCode applySystematicVariation(const CP::SystematicSet& set){ return CP::SystematicsTool::applySystematicVariation(set) ;} + StatusCode sysApplySystematicVariation(const CP::SystematicSet&); //when inheriting from SystematicsTool, we should only have to implement this one void setRandomSeed(int seed) const; diff --git a/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx b/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx index ae9010d1a523972c459b38562d2ad96006e3f5cd..a8bc467270749c5d5a3b565572acef0557a827fa 100644 --- a/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx +++ b/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx @@ -245,7 +245,7 @@ namespace met { return StatusCode::SUCCESS; } - CP::SystematicCode METSystematicsTool::sysApplySystematicVariation(const CP::SystematicSet& systSet){//this should already be filtered for MET systematics + StatusCode METSystematicsTool::sysApplySystematicVariation(const CP::SystematicSet& systSet){//this should already be filtered for MET systematics ATH_MSG_VERBOSE (__PRETTY_FUNCTION__ ); // Only a single systematic can be applied at a time: // If at some point we can deal with multiple systematics, we will check here that the combination we are given will work @@ -253,10 +253,10 @@ namespace met { m_appliedSystEnum = NONE; if( systSet.size()==0 ) { ATH_MSG_DEBUG("No affecting systematics received."); - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } else if( systSet.size() > 1 ) { ATH_MSG_WARNING("Tool does not support multiple systematics, returning unsupported" ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } CP::SystematicVariation systVar = *systSet.begin(); if ( systVar == CP::SystematicVariation("") ) m_appliedSystEnum = NONE ; @@ -272,12 +272,12 @@ namespace met { else if( systVar == jetTrkAffSyst::MET_JetTrk_ScaleDown) m_appliedSystEnum = MET_JETTRK_SCALEDOWN ; else{ ATH_MSG_WARNING("unsupported systematic applied " ); - return CP::SystematicCode::Unsupported; + return StatusCode::FAILURE; } ATH_MSG_DEBUG("applied systematic is " << m_appliedSystEnum ); - return CP::SystematicCode::Ok; + return StatusCode::SUCCESS; } CP::CorrectionCode METSystematicsTool::applyCorrection(xAOD::MissingET& inputMet, diff --git a/Reconstruction/MET/METUtilities/test/gt_metMaker.cxx b/Reconstruction/MET/METUtilities/test/gt_metMaker.cxx index 2d8c3db24a581fbfcb2013e21c628ea442d66deb..2faea5477ae37fe6c093b3d48009aaa4313c0124 100644 --- a/Reconstruction/MET/METUtilities/test/gt_metMaker.cxx +++ b/Reconstruction/MET/METUtilities/test/gt_metMaker.cxx @@ -126,7 +126,6 @@ namespace met { // xAOD::Init() ; // //enable status code failures // CP::CorrectionCode::enableFailure(); -// CP::SystematicCode::enableFailure(); // StatusCode::enableFailure(); // #else // app = POOL::Init(); //important to do this first! diff --git a/Reconstruction/MET/METUtilities/test/gt_metSystematicsTool.cxx b/Reconstruction/MET/METUtilities/test/gt_metSystematicsTool.cxx index 928ddf3952c09488a42805e90cbbf050289cef18..e09d2d59949f53b4b4cbdf18e4da3a8fc17737bb 100644 --- a/Reconstruction/MET/METUtilities/test/gt_metSystematicsTool.cxx +++ b/Reconstruction/MET/METUtilities/test/gt_metSystematicsTool.cxx @@ -434,7 +434,6 @@ namespace met { // xAOD::Init() ; // //enable status code failures // CP::CorrectionCode::enableFailure(); -// CP::SystematicCode::enableFailure(); // StatusCode::enableFailure(); // #else // app = POOL::Init(); //important to do this first! diff --git a/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx b/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx index 67f2cf00043250b24726870c8b9fe78f79c19b23..0c7e5cc71cf3a9295ca64cff1af1a501e62662fe 100644 --- a/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx +++ b/Reconstruction/MET/METUtilities/util/example_METMaker_METSystematicsTool.cxx @@ -65,7 +65,6 @@ int main( int argc, char* argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl xAOD::Init() ; //enable status code failures CP::CorrectionCode::enableFailure(); - CP::SystematicCode::enableFailure(); StatusCode::enableFailure(); #else IAppMgrUI* app = POOL::Init(); //important to do this first! diff --git a/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx b/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx index a8894f91094d1c7f7f2eea156d57d793a6cb5a92..a99c244c57af64e0b88b2b5d89591277514fec70 100644 --- a/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx +++ b/Reconstruction/MET/METUtilities/util/example_METMaker_advanced.cxx @@ -59,7 +59,6 @@ int main( int argc, char* argv[] ){std::cout << __PRETTY_FUNCTION__ << std::endl #ifdef XAOD_STANDALONE //enable status code failures // CP::CorrectionCode::enableFailure(); - // CP::SystematicCode::enableFailure(); StatusCode::enableFailure(); xAOD::Init() ; #else diff --git a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx index f07353acff7c90fb23647fe6b24eedab554418f4..df8b54eacc983f3a0bd64aa532854eac14a41dc0 100644 --- a/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx +++ b/Reconstruction/MET/METUtilities/util/example_rebuildTrackMET.cxx @@ -66,7 +66,6 @@ int main( int argc, char* argv[]) {std::cout << __PRETTY_FUNCTION__ << std::endl ANA_CHECK (xAOD::Init()) ; //enable status code failures CP::CorrectionCode::enableFailure(); - CP::SystematicCode::enableFailure(); StatusCode::enableFailure(); #else IAppMgrUI* app = POOL::Init(); //important to do this first!