From f31ed898e51461f554d7086325644c989d034abb Mon Sep 17 00:00:00 2001 From: Andrea Perrotta Date: Wed, 21 Sep 2022 15:44:24 +0200 Subject: [PATCH] Revert "Revert "[124X] Fix double counting in HepMC to G4 handoff"" --- SimG4Core/Generators/src/Generator.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SimG4Core/Generators/src/Generator.cc b/SimG4Core/Generators/src/Generator.cc index 0dcda499b35ea..8a447abd8e586 100644 --- a/SimG4Core/Generators/src/Generator.cc +++ b/SimG4Core/Generators/src/Generator.cc @@ -473,8 +473,7 @@ void Generator::particleAssignDaughters(G4PrimaryParticle *g4p, HepMC::GenPartic if (verbose > 2) LogDebug("SimG4CoreGenerator") << "Assigning a " << (*vpdec)->pdg_id() << " as daughter of a " << vp->pdg_id(); - if (((*vpdec)->status() == 2 || ((*vpdec)->status() == 23 && std::abs(vp->pdg_id()) == 1000015)) && - (*vpdec)->end_vertex() != nullptr) { + if (((*vpdec)->status() == 2 || (*vpdec)->status() > 3) && (*vpdec)->end_vertex() != nullptr) { double x2 = (*vpdec)->end_vertex()->position().x(); double y2 = (*vpdec)->end_vertex()->position().y(); double z2 = (*vpdec)->end_vertex()->position().z();