diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx index 93ed52f4e4bae3ea62bfb916c9157cb6319046cd..82397858f7f3491adba774df87a9d38c0e54558b 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/Root/EgammaCalibrationAndSmearingTool.cxx @@ -702,7 +702,7 @@ CP::CorrectionCode EgammaCalibrationAndSmearingTool::correctedCopy(const xAOD::P double EgammaCalibrationAndSmearingTool::getEnergy(const xAOD::Photon& input) { xAOD::Photon* new_particle = nullptr; - correctedCopy(input, new_particle); + ANA_CHECK_THROW (correctedCopy(input, new_particle)); const double e = new_particle->e(); delete new_particle; return e; @@ -711,7 +711,7 @@ double EgammaCalibrationAndSmearingTool::getEnergy(const xAOD::Photon& input) double EgammaCalibrationAndSmearingTool::getEnergy(const xAOD::Electron& input) { xAOD::Electron* new_particle = nullptr; - correctedCopy(input, new_particle); + ANA_CHECK_THROW (correctedCopy(input, new_particle)); const double e = new_particle->e(); delete new_particle; return e; @@ -854,7 +854,7 @@ CP::CorrectionCode EgammaCalibrationAndSmearingTool::applyCorrection(xAOD::Egamm double EgammaCalibrationAndSmearingTool::getEnergy(xAOD::Egamma* p, const xAOD::EventInfo* event_info) { - applyCorrection(*p, *event_info); + ANA_CHECK_THROW (applyCorrection(*p, *event_info)); ATH_MSG_DEBUG("returning " << p->e()); return p->e(); } diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx index 95f7e6ea9cb64ab96e62837616cd72f58321387e..905ebc3c195ebd914ea8d3c0f0c3c5ae468008ac 100644 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection/util/testEgammaCalibTool.cxx @@ -96,8 +96,8 @@ int main( int argc, char* argv[] ) { // Create the tool std::unique_ptr<CP::IEgammaCalibrationAndSmearingTool> tool(new CP::EgammaCalibrationAndSmearingTool("EgammaCalibrationAndSmearingTool")); - asg::setProperty(tool.get(), "ESModel", "es2017_R21_PRE"); - asg::setProperty(tool.get(), "randomRunNumber", 123456); + RETURN_CHECK(APP_NAME, asg::setProperty(tool.get(), "ESModel", "es2017_R21_PRE")); + RETURN_CHECK(APP_NAME, asg::setProperty(tool.get(), "randomRunNumber", 123456)); RETURN_CHECK(APP_NAME, tool->initialize());