diff --git a/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx b/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx index 37fcc59da28c40cd23da6562fefd4a4bb25a4554..3286742b93db4c96a3cf87ef718210e9f2617f73 100644 --- a/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.cxx +++ b/Generators/GeneratorFilters/src/XtoVVDecayFilterExtended.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 */ #include "GeneratorFilters/XtoVVDecayFilterExtended.h" @@ -103,7 +103,8 @@ bool XtoVVDecayFilterExtended::RunHistory(const HepMC::ConstGenParticlePtr& inpu if(std::abs(pitr->pdg_id()) != m_PDGGrandParent && std::abs(pitr->pdg_id()) != m_PDGParent) return false; if (result == m_PDGGrandParent) return true; - auto pitr_current = pitr->production_vertex()->particles_in().at(0); + // set pitr_current to grand parent pointer + auto pitr_current = pitr; while ( result >= 0 ) { pitr_current = CheckGrandparent(pitr_current, result); ATH_MSG_DEBUG("Pointer PDG ID: " << pitr->pdg_id()); diff --git a/Generators/GeneratorFilters/src/xAODXtoVVDecayFilterExtended.cxx b/Generators/GeneratorFilters/src/xAODXtoVVDecayFilterExtended.cxx index e6eb153e2aeed6a1d56bf9445030af04d545ac37..1044619502542800f85568d73d45cd791b2b5e07 100644 --- a/Generators/GeneratorFilters/src/xAODXtoVVDecayFilterExtended.cxx +++ b/Generators/GeneratorFilters/src/xAODXtoVVDecayFilterExtended.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #include "GeneratorFilters/xAODXtoVVDecayFilterExtended.h" @@ -122,7 +122,8 @@ bool xAODXtoVVDecayFilterExtended::RunHistory(const xAOD::TruthParticle *pitr) if (result == m_PDGGrandParent) return true; - auto pitr_current = pitr->prodVtx()->incomingParticle(0); + //set pitr_current to pitr of grand parent + auto pitr_current = pitr; while (result >= 0) { pitr_current = CheckGrandparent(pitr_current, result);