diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h b/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h index e2517af01afdce44f1f637a184edaaa9eff46aa1..b45a5a8f09143c9e62592d99f215658d621cd78d 100644 --- a/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h +++ b/Reconstruction/Jet/JetRecTools/JetRecTools/JetConstituentModSequence.h @@ -20,6 +20,7 @@ #include "AsgTools/ToolHandleArray.h" #include "xAODCore/ShallowCopy.h" +#include "xAODBase/IParticleHelpers.h" #include "xAODBase/IParticleContainer.h" #include "xAODCaloEvent/CaloClusterContainer.h" #include "xAODPFlow/TrackCaloClusterContainer.h" @@ -118,13 +119,15 @@ JetConstituentModSequence::copyModRecord(const SG::ReadHandleKey<T>& inKey, std::pair< T*, xAOD::ShallowAuxContainer* > newconstit = xAOD::shallowCopyContainer(*inHandle); newconstit.second->setShallowIO(m_saveAsShallow); - + for (auto t : m_modifiers) {ATH_CHECK(t->process(newconstit.first));} auto handle = makeHandle(outKey); ATH_CHECK(handle.record(std::unique_ptr<T>(newconstit.first), std::unique_ptr<xAOD::ShallowAuxContainer>(newconstit.second))); + xAOD::setOriginalObjectLink(*inHandle, *handle); + return StatusCode::SUCCESS; }