Skip to content

Commit

Permalink
DDG4.inputHandling: do not simulate rejectPDG particles even if they …
Browse files Browse the repository at this point in the history
…are called stable
  • Loading branch information
andresailer committed Jun 26, 2024
1 parent 865ec80 commit 3ccf907
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion DDG4/src/Geant4InputHandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,15 @@ getRelevant(std::set<int>& 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);
Expand Down

0 comments on commit 3ccf907

Please sign in to comment.