diff --git a/Reconstruction/egamma/egammaTools/src/EMFourMomBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMFourMomBuilder.cxx index ca663f033d5fe87205164df0dbf30b8f71499d34..886097c5264f44e38ab7d607619d7db342143540 100644 --- a/Reconstruction/egamma/egammaTools/src/EMFourMomBuilder.cxx +++ b/Reconstruction/egamma/egammaTools/src/EMFourMomBuilder.cxx @@ -50,7 +50,6 @@ EMFourMomBuilder::initialize() ATH_MSG_DEBUG(" Initializing EMFourMomBuilder"); m_eg_resol = std::make_unique<eg_resolution>(m_ResolutionConfiguration); - m_eg_resol->msg().setLevel(this->msg().level()); return StatusCode::SUCCESS; } diff --git a/Reconstruction/egamma/egammaUtils/CMakeLists.txt b/Reconstruction/egamma/egammaUtils/CMakeLists.txt index 3f3b58224f7600d437008a8083f91f7016ebbe52..a62403a29994d6d05685c3232652d0f63988e7eb 100644 --- a/Reconstruction/egamma/egammaUtils/CMakeLists.txt +++ b/Reconstruction/egamma/egammaUtils/CMakeLists.txt @@ -5,18 +5,6 @@ # Declare the package name: atlas_subdir( egammaUtils ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthToolSupport/AsgTools - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODTracking - Event/xAOD/xAODEgamma - DetectorDescription/GeoPrimitives - PRIVATE - Event/FourMomUtils - PhysicsAnalysis/AnalysisCommon/AnalysisUtils - Tools/PathResolver) - # External dependencies: find_package( ROOT COMPONENTS Tree Core Hist) @@ -26,8 +14,8 @@ atlas_add_library( egammaUtils PUBLIC_HEADERS egammaUtils INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS - LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODTracking xAODEgamma GeoPrimitives - PRIVATE_LINK_LIBRARIES FourMomUtils PathResolver AnalysisUtilsLib) + LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCaloEvent xAODTracking xAODEgamma GeoPrimitives + PRIVATE_LINK_LIBRARIES FourMomUtils PathResolver AnalysisUtilsLib) atlas_add_dictionary( egammaUtilsDict egammaUtils/egammaUtilsDict.h diff --git a/Reconstruction/egamma/egammaUtils/Root/eg_resolution.cxx b/Reconstruction/egamma/egammaUtils/Root/eg_resolution.cxx index 112aab8bf0fdf66d201868645604b8e20f93630e..5332c3e0299c222b9bd877fec7c503a4091a9522 100644 --- a/Reconstruction/egamma/egammaUtils/Root/eg_resolution.cxx +++ b/Reconstruction/egamma/egammaUtils/Root/eg_resolution.cxx @@ -18,14 +18,11 @@ T* get_object(TFile& file, const std::string& name){ } eg_resolution::eg_resolution(const std::string& configuration) - : asg::AsgMessaging("eg_resolution"), - m_file0(), - m_file1(), - m_file2(), - m_file3() + : m_file0() + , m_file1() + , m_file2() + , m_file3() { - ATH_MSG_INFO("Initialize eg_resolution"); - if (configuration == "run1") { m_file0 = std::make_unique<TFile> (PathResolverFindCalibFile("ElectronPhotonFourMomentumCorrection/v5/resolutionFit_electron_run1.root").c_str() ); m_file1 = std::make_unique<TFile> (PathResolverFindCalibFile("ElectronPhotonFourMomentumCorrection/v5/resolutionFit_recoUnconv_run1.root").c_str() ); @@ -40,10 +37,8 @@ eg_resolution::eg_resolution(const std::string& configuration) } if (!m_file0 or !m_file1 or !m_file2 or !m_file3) { - ATH_MSG_ERROR("cannot find input file for resolutions"); throw std::runtime_error("cannot find input file for resolutions"); } - m_hSampling[0][0] = get_object<TH1>(*m_file0, "hsamplingG"); m_hSampling[0][1] = get_object<TH1>(*m_file0, "hsampling80"); m_hSampling[0][2] = get_object<TH1>(*m_file0, "hsampling90"); @@ -87,12 +82,10 @@ eg_resolution::eg_resolution(const std::string& configuration) m_etaBins = aa->GetXbins(); } -//========================================================================= -eg_resolution::~eg_resolution(){ -} +eg_resolution::~eg_resolution(){} /* - * inputs are + * inputs are * particle_type (0=elec, 1=reco unconv photon, 2=reco conv photon, 3=true unconv photon) * energy in MeV * eta @@ -103,12 +96,10 @@ double eg_resolution::getResolution(int particle_type, double energy, double eta { if (particle_type<0 || particle_type>3) { - ATH_MSG_ERROR("particle type must be 0, 1, 2 or 3"); throw std::runtime_error("particle type must be 1, 2 or 3"); } if (resolution_type<0 || resolution_type>2) { - ATH_MSG_ERROR("resolution type must be 0, 1, 2"); throw std::runtime_error("resolution type must be 0, 1, 2"); } @@ -122,7 +113,6 @@ double eg_resolution::getResolution(int particle_type, double energy, double eta } if (ibinEta<0 || ibinEta>= m_etaBins->GetSize()) { - ATH_MSG_ERROR("eta outside range"); throw std::runtime_error("eta outside range"); } @@ -154,7 +144,6 @@ double eg_resolution::getResolution(const xAOD::Egamma& particle, int resolution } assert (particle_type != 1); - // TODO: check definitions const double eta = particle.caloCluster()->eta(); const double energy = particle.e(); return getResolution(particle_type, energy, eta, resolution_type); diff --git a/Reconstruction/egamma/egammaUtils/egammaUtils/eg_resolution.h b/Reconstruction/egamma/egammaUtils/egammaUtils/eg_resolution.h index 18ee8178e817430ea91ae8cf2524871d91564816..d214c49d9147ebed2fc140c3bb3ffa443663cfbd 100644 --- a/Reconstruction/egamma/egammaUtils/egammaUtils/eg_resolution.h +++ b/Reconstruction/egamma/egammaUtils/egammaUtils/eg_resolution.h @@ -1,15 +1,12 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef EG_RESOLUTION_H #define EG_RESOLUTION_H -#include <stdlib.h> -#include <math.h> - -#include "AsgTools/AsgMessaging.h" - +#include <cstdlib> +#include <cmath> #include "xAODEgamma/Egamma.h" #include "TH1.h" #include "TFile.h" @@ -26,7 +23,7 @@ */ -class eg_resolution : public asg::AsgMessaging{ +class eg_resolution { public: /** @brief constructor (initialization done there reading root files with resolution fit parameters */