diff --git a/Reconstruction/Jet/JetRecTools/Root/JetInputElRemovalTool.cxx b/Reconstruction/Jet/JetRecTools/Root/JetInputElRemovalTool.cxx index 92d299c4d6f89a25c7b117cbdd2e9db35440a48f..a9c567a60f0a0a8771f5f4a09d1c3db37ffbef34 100644 --- a/Reconstruction/Jet/JetRecTools/Root/JetInputElRemovalTool.cxx +++ b/Reconstruction/Jet/JetRecTools/Root/JetInputElRemovalTool.cxx @@ -1,7 +1,7 @@ //-*- C++ -*- /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ /////////////////////////////////////////////////////////////////////// @@ -13,6 +13,7 @@ #include "xAODJet/JetContainer.h" #include "xAODTracking/TrackParticleContainer.h" #include "AsgDataHandles/WriteHandle.h" +#include "AthContainers/Decorator.h" @@ -138,13 +139,14 @@ std::vector<const xAOD::Electron*> JetInputElRemovalTool::selectElectron()const{ selected_electrons_v.clear(); bool isTight=false; - + + SG::Decorator< char > idflagDec( m_elIDname ); for (const auto *electron_itr : *electrons){ isTight=false; //Select only el with given quality - if (electron_itr->auxdecor< char >(m_elIDname)==1){ + if (idflagDec (*electron_itr)==1){ isTight=true; } diff --git a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx index 78f8907c32d26058777c173ad40dc054cb250d0b..2720204ba396766e4f470b3916e1c4164fb42e3f 100644 --- a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx +++ b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ ////////////////////////////////////////////////////////////////////////////// @@ -34,6 +34,7 @@ #include "xAODEgamma/EgammaxAODHelpers.h" #include "FourMomUtils/xAODP4Helpers.h" #include "xAODPFlow/FEHelpers.h" +#include "AthContainers/ConstAccessor.h" #include <cmath> @@ -1443,8 +1444,9 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result, // initialize varialbes double ecore = 0.; auto muI = derefMap.find(&tp); - if(muI!=derefMap.end() && muI->second->isAvailable<float>("ET_Core")){ - ecore = muI->second->auxdataConst<float>("ET_Core"); + static const SG::ConstAccessor<float> ET_CoreAcc ("ET_Core"); + if(muI!=derefMap.end()){ + ecore = ET_CoreAcc.withDefault (*muI->second, 0); }else{ ATH_MSG_WARNING("ET_Core of muon not found! coreMuon isolation correction will not be applied!!!"); return false;