diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx index d301435b2cca9da97edba25e80965c22c83cec14..fd00eb65aef92663d79a68146b68ff5dba031542 100644 --- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx +++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauOverlappingElectronLLHDecorator.cxx @@ -102,15 +102,8 @@ StatusCode TauOverlappingElectronLLHDecorator::setEleOlrLhScoreDecorationName(co //______________________________________________________________________________ StatusCode TauOverlappingElectronLLHDecorator::decorate(const xAOD::TauJet& xTau) const { - SG::ReadHandle<xAOD::ElectronContainer> h_ElectronContainer; - if (m_bNewEvent) { - h_ElectronContainer = SG::makeHandle(m_sElectronContainerName); - if (!h_ElectronContainer.isValid()) { - ATH_MSG_FATAL("Electron container with name " << m_sElectronContainerName << " was not found in event store, but is needed for electron OLR. Ensure that it is there with the correct name"); - return StatusCode::FAILURE; - } m_bNewEvent = false; m_bEleOLRMatchAvailable = (xTau.isAvailable<char>(m_sEleOlrPassDecorationName) || xTau.isAvailable<float>(m_sEleOlrLhScoreDecorationName)); @@ -122,6 +115,11 @@ StatusCode TauOverlappingElectronLLHDecorator::decorate(const xAOD::TauJet& xTau if (m_bEleOLRMatchAvailable) return StatusCode::SUCCESS; + SG::ReadHandle<xAOD::ElectronContainer> h_ElectronContainer(m_sElectronContainerName); + if (!h_ElectronContainer.isValid()) { + ATH_MSG_FATAL("Electron container with name " << m_sElectronContainerName << " was not found in event store, but is needed for electron OLR. Ensure that it is there with the correct name"); + return StatusCode::FAILURE; + } const xAOD::Electron * xEleMatch = 0; float fLHScore = -4.; // default if no match was found diff --git a/Reconstruction/MET/METUtilities/src/METMakerAlg.cxx b/Reconstruction/MET/METUtilities/src/METMakerAlg.cxx index 909d89033195d63ba5fec77de67cff03060b1b58..20a8e9f554566e1621339b6a03dc5ecd56404a67 100644 --- a/Reconstruction/MET/METUtilities/src/METMakerAlg.cxx +++ b/Reconstruction/MET/METUtilities/src/METMakerAlg.cxx @@ -162,7 +162,7 @@ namespace met { SG::ReadHandle<xAOD::ElectronContainer> Electrons(m_ElectronContainerKey); if (!Electrons.isValid()) { ATH_MSG_WARNING("Unable to retrieve ElectronContainer: " << Electrons.key()); - return StatusCode::SUCCESS; + return StatusCode::FAILURE; } /// Photons