Skip to content
Snippets Groups Projects
Commit dd812c59 authored by Tadej Novak's avatar Tadej Novak
Browse files

Merge branch 'main-ext' into 'main'

GeneratorFilters: fix logic of the (xAOD)XtoVVDecayFilterExtended.cxx

See merge request atlas/athena!69387
parents c7d42b7a d2c71e3f
No related branches found
No related tags found
No related merge requests found
/*
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());
......
/*
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment