diff --git a/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/CMakeLists.txt b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/CMakeLists.txt index b1a0b9bf3a210ef158bd7c33db2dbf00f75784ae..bd94845e43cbb765acea7f0fa673862a2a2be3b7 100644 --- a/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/CMakeLists.txt +++ b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # The name of the package: atlas_subdir( EgammaAnalysisInterfaces ) @@ -8,7 +8,8 @@ atlas_add_library( EgammaAnalysisInterfacesLib EgammaAnalysisInterfaces/*.h INTERFACE PUBLIC_HEADERS EgammaAnalysisInterfaces - LINK_LIBRARIES AsgTools xAODCaloEvent xAODEgamma xAODTracking PATInterfaces PATCoreLib ) + LINK_LIBRARIES AsgTools AsgServicesLib xAODCaloEvent + xAODEgamma xAODTracking AsgMessagingLib PATInterfaces PATCoreLib ) atlas_add_dictionary( EgammaAnalysisInterfacesDict EgammaAnalysisInterfaces/EgammaAnalysisInterfacesDict.h diff --git a/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfacesDict.h b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfacesDict.h index 7b91c9c6b9b1486306199e53b680f680d2f22bb0..e5a07762ede73f473f4fa028324b4359e678fdb0 100644 --- a/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfacesDict.h +++ b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfacesDict.h @@ -15,6 +15,8 @@ #include "EgammaAnalysisInterfaces/IAsgElectronEfficiencyCorrectionTool.h" +#include "EgammaAnalysisInterfaces/IegammaMVACalibTool.h" +#include "EgammaAnalysisInterfaces/IegammaMVASvc.h" #include "EgammaAnalysisInterfaces/IEgammaCalibrationAndSmearingTool.h" #include "EgammaAnalysisInterfaces/IAsgPhotonEfficiencyCorrectionTool.h" diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IegammaMVACalibTool.h similarity index 60% rename from Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h rename to PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IegammaMVACalibTool.h index d6540b79374e1e914808a391db610cbc16ff2f73..8936f44499824d5d99e2b090f1e6e4d612bfdedb 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVACalibTool.h +++ b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IegammaMVACalibTool.h @@ -1,10 +1,10 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#ifndef EGAMMAINTERFACES_iEGAMMAMVACALIBTOOL_H -#define EGAMMAINTERFACES_iEGAMMAMVACALIBTOOL_H +#ifndef EGAMMAANALYSISINTERFACES_IEGAMMAMVACALIBTOOL_H +#define EGAMMAANALYSISINTERFACES_IEGAMMAMVACALIBTOOL_H -#include "GaudiKernel/IAlgTool.h" +#include "AsgTools/IAsgTool.h" // EDM includes #include "xAODEgamma/EgammaFwd.h" @@ -14,16 +14,15 @@ * @class IegammaMVACalibTool * @brief A tool used by the egammaMVASvc to help manage the MVAs. **/ -class IegammaMVACalibTool : virtual public IAlgTool { +class IegammaMVACalibTool : virtual public asg::IAsgTool{ + ASG_TOOL_INTERFACE(IegammaMVACalibTool) public: - DeclareInterfaceID(IegammaMVACalibTool, 1, 0); - virtual ~IegammaMVACalibTool() override {}; ///Return MVA energy for the given cluster, an eg object is optional virtual float getEnergy(const xAOD::CaloCluster& clus, const xAOD::Egamma* eg) const = 0; -}; +}; #endif diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IegammaMVASvc.h similarity index 67% rename from Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h rename to PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IegammaMVASvc.h index 97497f096a4b317d0e3d61091ba48ff875136ee8..a414a7190476d598862ba1439d986cd03827e1f4 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IegammaMVASvc.h +++ b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/IegammaMVASvc.h @@ -1,24 +1,24 @@ // Dear Emacs, this is -*- C++ -*- /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#ifndef EGAMMAINTERFACES_IEGAMMAMVASVC_H -#define EGAMMAINTERFACES_IEGAMMAMVASVC_H - -#include "GaudiKernel/IService.h" +#ifndef EGAMMAANALYSISINTERFACES_IEGAMMAMVASVC_H +#define EGAMMAANALYSISINTERFACES_IEGAMMAMVASVC_H +#include "AsgServices/IAsgService.h" +#include "AsgMessaging/StatusCode.h" // EDM includes #include "xAODEgamma/EgammaFwd.h" #include "xAODEgamma/EgammaEnums.h" #include "xAODCaloEvent/CaloClusterFwd.h" -class IegammaMVASvc : virtual public IService { +class IegammaMVASvc : virtual public asg::IAsgService { + ASG_SERVICE_INTERFACE(IegammaMVASvc) public: - DeclareInterfaceID(IegammaMVASvc, 1, 0); virtual ~IegammaMVASvc() override {}; diff --git a/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/selection.xml b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/selection.xml index 042c1d9ed007d15fb82972e70be0fa8b860c2bfb..4197162871d82982b220b1b0676a1b29b320eff2 100644 --- a/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/selection.xml +++ b/PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces/EgammaAnalysisInterfaces/selection.xml @@ -9,13 +9,15 @@ <class name="IAsgDeadHVCellRemovalTool" /> <class name="IAsgElectronEfficiencyCorrectionTool" /> + + <class name="IegammaMVACalibTool" /> + <class name="IegammaMVASvc" /> <class name="IEgammaCalibrationAndSmearingTool" /> <variable pattern="EgammaCalibPeriodRunNumbersExample::*"/> <class name="EgammaCalibPeriodRunNumbersExample::ROOT6_NamespaceAutoloadHook" /> <class name="IAsgPhotonEfficiencyCorrectionTool" /> - <class name="IElectronPhotonShowerShapeFudgeTool" /> <lcgdict> diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h index 2d463c313b769f550ffbdec6745d785ce7ceb8e5..c99e8801281c336800b2fc9d7108c45faecde9a7 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h @@ -15,7 +15,7 @@ #include "CaloDetDescr/CaloDetDescrManager.h" #include "CaloUtils/CaloCellDetPos.h" #include "egammaInterfaces/IegammaCheckEnergyDepositTool.h" -#include "egammaInterfaces/IegammaMVASvc.h" +#include "EgammaAnalysisInterfaces/IegammaMVASvc.h" #include "egammaInterfaces/IegammaSwTool.h" #include "egammaRecEvent/egammaRecContainer.h" #include "xAODCaloEvent/CaloClusterFwd.h" diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h index 5edb3297dbc582b82ea737bdd10a7715b6d27e29..e3897bbfd04fa84298dc2a63c9bfa82697a01635 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/egammaInterfacesDict.h @@ -29,7 +29,6 @@ #include "egammaInterfaces/IegammaShowerShape.h" #include "egammaInterfaces/IegammaStripsShape.h" #include "egammaInterfaces/IegammaSwTool.h" -#include "egammaInterfaces/IegammaMVASvc.h" #include "egammaInterfaces/IegammaOQFlagsBuilder.h" #ifndef XAOD_ANALYSIS # include "egammaInterfaces/IEMExtrapolationTools.h" diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml index 1969394b3f9918c86191b6bd27d781c177b9c00b..e52f5e1ad698ee21e214aa04fb2cab9d8deafcdc 100644 --- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml +++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/selection.xml @@ -16,7 +16,6 @@ <class name="IegammaStripsShape" /> <class name="IegammaSwTool" /> <class name="IegammaTrkRefitterTool" /> - <class name="IegammaMVASvc" /> <class name="IegammaOQFlagsBuilder" /> </lcgdict> diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt index 4897240610632899c0dce3e77319f8e229c6f2a4..8155feb9d49601602f4915bfe112f86690cba922 100644 --- a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt +++ b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt @@ -17,14 +17,20 @@ atlas_add_library( egammaMVACalibLib egammaMVACalib/*.h Root/*.cxx PUBLIC_HEADERS egammaMVACalib INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib xAODCaloEvent xAODEgamma + LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AsgServicesLib AsgMessagingLib + xAODCaloEvent xAODEgamma xAODTracking MVAUtils PathResolver EgammaAnalysisInterfacesLib ${extra_libs} ) +atlas_add_dictionary( egammaMVACalibDict + egammaMVACalib/egammaMVACalibDict.h + egammaMVACalib/selection.xml + LINK_LIBRARIES egammaMVACalibLib ) + if( NOT XAOD_STANDALONE ) atlas_add_component( egammaMVACalib src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MVAUtils PathResolver egammaInterfacesLib egammaMVACalibLib xAODCaloEvent xAODEgamma xAODTracking ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel egammaMVACalibLib) endif() # Install files from the package: diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVACalibTool.cxx similarity index 97% rename from Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx rename to Reconstruction/egamma/egammaMVACalib/Root/egammaMVACalibTool.cxx index 0de9e373dec21feff4a2a78125e36a6f05050e7a..d9d09f4f9908983bcca982daafaab4b6093c985c 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVACalibTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "egammaMVACalibTool.h" +#include "egammaMVACalib/egammaMVACalibTool.h" #include "xAODEgamma/Egamma.h" #include "xAODCaloEvent/CaloCluster.h" @@ -23,8 +23,8 @@ using Gaudi::Units::GeV; #define GeV 1000 #endif -egammaMVACalibTool::egammaMVACalibTool(const std::string& type, const std::string& name, const IInterface* parent) : - base_class(type, name, parent) +egammaMVACalibTool::egammaMVACalibTool(const std::string& name) : + asg::AsgTool(name) { } @@ -81,11 +81,6 @@ StatusCode egammaMVACalibTool::initialize() return StatusCode::SUCCESS; } -StatusCode egammaMVACalibTool::finalize() -{ - return StatusCode::SUCCESS; -} - StatusCode egammaMVACalibTool::setupBDT(const egammaMVAFunctions::funcMap_t& funcLibrary, const std::string& fileName) { diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVASvc.cxx similarity index 88% rename from Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx rename to Reconstruction/egamma/egammaMVACalib/Root/egammaMVASvc.cxx index af640151cf0651cb6ec88b8ce23723ecb8e22499..136ee2d1220a50e57f2c5cac7e586822188c04b8 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.cxx +++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVASvc.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "egammaMVASvc.h" +#include "egammaMVACalib/egammaMVASvc.h" #include "xAODEgamma/Egamma.h" #include "xAODCaloEvent/CaloCluster.h" #include "xAODEgamma/EgammaDefs.h" @@ -12,7 +12,7 @@ egammaMVASvc::egammaMVASvc(const std::string& name, ISvcLocator* svc) : - base_class( name, svc ) + asg::AsgService( name, svc ) { } @@ -20,7 +20,7 @@ StatusCode egammaMVASvc::initialize() { ATH_MSG_DEBUG("In initialize of " << name() << "..." ); - if (m_mvaElectron.isEnabled()) { + if (!m_mvaElectron.empty()) { ATH_MSG_DEBUG("Retrieving mvaElectron"); ATH_CHECK(m_mvaElectron.retrieve()); } else { @@ -28,7 +28,7 @@ StatusCode egammaMVASvc::initialize() m_mvaElectron.disable(); } - if (m_mvaUnconvertedPhoton.isEnabled()) { + if (!m_mvaUnconvertedPhoton.empty()) { ATH_MSG_DEBUG("Retrieving mvaUnconvertedPhoton"); ATH_CHECK(m_mvaUnconvertedPhoton.retrieve()); } else { @@ -36,7 +36,7 @@ StatusCode egammaMVASvc::initialize() m_mvaUnconvertedPhoton.disable(); } - if (m_mvaConvertedPhoton.isEnabled()) { + if (!m_mvaConvertedPhoton.empty()) { ATH_MSG_DEBUG("Retrieving mvaConvertedPhoton"); ATH_CHECK(m_mvaConvertedPhoton.retrieve()); } else { @@ -47,12 +47,6 @@ StatusCode egammaMVASvc::initialize() return StatusCode::SUCCESS; } - -StatusCode egammaMVASvc::finalize(){ - ATH_MSG_DEBUG( "in finalize" ); - return StatusCode::SUCCESS; -} - StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, const xAOD::Egamma& eg) const { @@ -62,7 +56,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, float mvaE = 0.0; if (xAOD::EgammaHelpers::isElectron(&eg)) { - if (m_mvaElectron.isEnabled()) { + if (!m_mvaElectron.empty()) { mvaE = m_mvaElectron->getEnergy(cluster, &eg); } else { ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); @@ -70,14 +64,14 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, } } else if (xAOD::EgammaHelpers::isConvertedPhoton(&eg) && xAOD::EgammaHelpers::conversionRadius(static_cast<const xAOD::Photon*>(&eg)) < m_maxConvR) { - if (m_mvaConvertedPhoton.isEnabled()) { + if (!m_mvaConvertedPhoton.empty()) { mvaE = m_mvaConvertedPhoton->getEnergy(cluster, &eg); } else { ATH_MSG_FATAL("Trying to calibrate a converted photon, but disabled"); return StatusCode::FAILURE; } } else if (xAOD::EgammaHelpers::isPhoton(&eg)) { - if (m_mvaUnconvertedPhoton.isEnabled()) { + if (!m_mvaUnconvertedPhoton.empty()) { mvaE = m_mvaUnconvertedPhoton->getEnergy(cluster, &eg); } else { ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled"); @@ -109,7 +103,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, float mvaE = 0.0; switch (egType) { case xAOD::EgammaParameters::electron: - if (m_mvaElectron.isEnabled()) { + if (!m_mvaElectron.empty()) { mvaE = m_mvaElectron->getEnergy(cluster,nullptr); } else { ATH_MSG_FATAL("Trying to calibrate an electron, but disabled"); @@ -119,7 +113,7 @@ StatusCode egammaMVASvc::execute(xAOD::CaloCluster& cluster, case xAOD::EgammaParameters::convertedPhoton: case xAOD::EgammaParameters::unconvertedPhoton: // treat converted photons like unconverted photons since don't have access to vertex - if (m_mvaUnconvertedPhoton.isEnabled()) { + if (!m_mvaUnconvertedPhoton.empty()) { mvaE = m_mvaUnconvertedPhoton->getEnergy(cluster,nullptr); } else { ATH_MSG_FATAL("Trying to calibrate an unconverted photon, but disabled"); diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalibDict.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalibDict.h new file mode 100644 index 0000000000000000000000000000000000000000..53ac086d84630dba236af0b753c02b38fd8a57a1 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalibDict.h @@ -0,0 +1,10 @@ +/* + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + */ + + #ifndef EGAMMAMVACALIB_EGAMMAMVACALIBDICT_H + #define EGAMMAMVACALIB_EGAMMAMVACALIBDICT_H + #include "egammaMVACalib/egammaMVACalibTool.h" + #include "egammaMVACalib/egammaMVASvc.h" + + #endif // EGAMMAMVACALIB_EGAMMAMVACALIBDICT_H diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalibTool.h similarity index 93% rename from Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h rename to Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalibTool.h index d1bd04a1ad67c49a22acf87b60573a03402cd321..89d5ced20c62126478924859e31611029a94d1d8 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.h +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalibTool.h @@ -6,13 +6,16 @@ #define EGAMMAMVACALIB_EGAMMAMVACALIBTOOL_H // Package includes -#include "egammaInterfaces/IegammaMVACalibTool.h" +#include "EgammaAnalysisInterfaces/IegammaMVACalibTool.h" #include "xAODEgamma/EgammaEnums.h" #include "MVAUtils/BDT.h" #include "egammaMVACalib/egammaMVAFunctions.h" // Framework includes -#include "AthenaBaseComps/AthAlgTool.h" +#include "AsgTools/AsgTool.h" +#include "AsgTools/PropertyWrapper.h" + +//Root includes #include "TH2Poly.h" #include "TObject.h" #include "TString.h" @@ -52,21 +55,21 @@ * Each TObjString is a string which represent the formula to compute the shift * (used to construct a TFormula). The variables is the Et in GeV after the calibration. * The value of the shift is divided by the energy calibrated by the BDT. - * - * + * + * * On data the property use_layer_corrected should be set to true. In reconstruction * this flag is always false. In PhysicsAnalysis it should be set appropriately. * When set to true when using the layer energies as input the data-driver-corrected * version are used. **/ -class egammaMVACalibTool : public extends<AthAlgTool, IegammaMVACalibTool> { +class egammaMVACalibTool : public asg::AsgTool, virtual public IegammaMVACalibTool{ + ASG_TOOL_CLASS(egammaMVACalibTool, IegammaMVACalibTool) public: - egammaMVACalibTool(const std::string& type, const std::string& name, const IInterface* parent); + egammaMVACalibTool(const std::string& type); virtual ~egammaMVACalibTool() override; virtual StatusCode initialize() override; - virtual StatusCode finalize() override; /** how the output of the BDT is used * correctEaccordion: energy = raw energy * BDT diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVASvc.h similarity index 82% rename from Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h rename to Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVASvc.h index e7d8941f8ac31524430a1676737e56bb7b2918ab..b9e6f2b13fb5b2d0ccac72f0d161f3b46ff94b2a 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVASvc.h +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVASvc.h @@ -8,29 +8,27 @@ #define EGAMMAMVACALIB_EGAMMAMVASVC_H #include "xAODEgamma/EgammaEnums.h" -#include "egammaInterfaces/IegammaMVASvc.h" -#include "egammaInterfaces/IegammaMVACalibTool.h" -#include "AthenaBaseComps/AthService.h" +#include "EgammaAnalysisInterfaces/IegammaMVASvc.h" +#include "EgammaAnalysisInterfaces/IegammaMVACalibTool.h" +// Framework includes +#include "AsgServices/AsgService.h" +#include "AsgTools/PropertyWrapper.h" #include <string> -class egammaMVASvc : public extends1<AthService, IegammaMVASvc> +class egammaMVASvc : public asg::AsgService, virtual public IegammaMVASvc { public: egammaMVASvc( const std::string& name, ISvcLocator* svc ); - + ASG_SERVICE_CLASS1(egammaMVASvc, IegammaMVASvc) virtual ~egammaMVASvc() override {}; - virtual StatusCode initialize() override; - virtual StatusCode finalize() override; - /** Main execute. We need to calibrate the cluster. Use full egamma object instead of Type As we employ further variables than the ones present in the cluster This method needs to be valid also for reconstruction */ - StatusCode execute(xAOD::CaloCluster& cluster, const xAOD::Egamma& eg) const override final; diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/selection.xml b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..4947f6e051f02ba42057219942957dd3049dbb88 --- /dev/null +++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/selection.xml @@ -0,0 +1,4 @@ + <lcgdict> + <class name="egammaMVACalibTool" /> + <class name="egammaMVASvc" /> + </lcgdict> diff --git a/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx b/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx index f0c0dad2190c3a4ebe4b950611290c01ddb164b4..2d5bd19872d02c1f7a9bcd98b962516e207790ed 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/components/egammaMVACalib_entries.cxx @@ -1,5 +1,5 @@ -#include "../egammaMVASvc.h" -#include "../egammaMVACalibTool.h" +#include "egammaMVACalib/egammaMVASvc.h" +#include "egammaMVACalib/egammaMVACalibTool.h" DECLARE_COMPONENT( egammaMVASvc ) DECLARE_COMPONENT( egammaMVACalibTool ) diff --git a/Reconstruction/egamma/egammaTools/src/EMClusterTool.h b/Reconstruction/egamma/egammaTools/src/EMClusterTool.h index 0e67e6dc1941c4ac42fc81946372bc86b7d95d1b..787aad9030dc831a2f13ee3a83c24493bf6bcdc7 100644 --- a/Reconstruction/egamma/egammaTools/src/EMClusterTool.h +++ b/Reconstruction/egamma/egammaTools/src/EMClusterTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef EGAMMATOOLS_EMCLUSTERTOOL_H @@ -11,7 +11,7 @@ #include "egammaBaseTool.h" #include "egammaInterfaces/IEMClusterTool.h" -#include "egammaInterfaces/IegammaMVASvc.h" +#include "EgammaAnalysisInterfaces/IegammaMVASvc.h" #include "egammaInterfaces/IegammaSwTool.h" #include "StoreGate/WriteHandleKey.h"