From 8369d10e50d7d6d6410b55b73158ca5fa8b8fc6c Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Wed, 26 Jun 2024 17:38:26 +0200 Subject: [PATCH] DDG4.inputHandling: do not simulate rejectPDG particles even if they are called stable --- DDG4/src/Geant4InputHandling.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DDG4/src/Geant4InputHandling.cpp b/DDG4/src/Geant4InputHandling.cpp index d62a5d710..8cff4216e 100644 --- a/DDG4/src/Geant4InputHandling.cpp +++ b/DDG4/src/Geant4InputHandling.cpp @@ -392,7 +392,15 @@ getRelevant(std::set& visited, visited.insert(p->id); PropertyMask status(p->status); if ( status.isSet(G4PARTICLE_GEN_STABLE) ) { - if ( prim.find(p->id) == prim.end() ) { + bool rejectParticle = false + or (primaryConfig.m_rejectPDGs.count(abs(p->pdgID)) != 0) // quarks, gluon, "strings", W, Z etc. + ; + printout(dd4hep::DEBUG, "Input", + "Checking rejection of stable: PDG(%-10d), Definition(%s), reject(%s)", + p->pdgID, + p.definition() ? "true" : "false", + rejectParticle ? "true" : "false"); + if (not rejectParticle and prim.find(p->id) == prim.end() ) { G4PrimaryParticle* p4 = createG4Primary(p); prim[p->id] = p4; res.emplace_back(p,p4);