Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in input handling #389

Merged
merged 1 commit into from May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion DDG4/src/Geant4InputHandling.cpp
Expand Up @@ -384,10 +384,12 @@ getRelevant(set<int>& visited,
double proper_time_Precision = pow(10.,-DBL_DIG)*me*fmax(fabs(p->time),fabs(dp->time));
bool isProperTimeZero = (proper_time <= proper_time_Precision);

const std::set<int> leptonPDGs{11,13,15,17};
// -- remove original if ---
bool rejectParticle = not p.definition() // completely unknown to geant4
or (rejectPDGs.count(abs(p->pdgID)) != 0) // quarks, gluon, "strings", W, Z etc.
or (isProperTimeZero and p.definition()->GetPDGStable()); // initial state electrons, etc.
or (isProperTimeZero and p.definition()->GetPDGStable() ) // initial state electrons, etc.
or (isProperTimeZero and leptonPDGs.count(abs(p->pdgID)) != 0 ) ; // charged 'documentation' leptons, e.g. in lepton pairs w/ FSR
if (not rejectParticle) {
map<int,G4PrimaryParticle*>::iterator ip4 = prim.find(p->id);
G4PrimaryParticle* p4 = (ip4 == prim.end()) ? 0 : (*ip4).second;
Expand Down
6 changes: 6 additions & 0 deletions doc/ReleaseNotes.md
@@ -1,3 +1,9 @@
# v01-07-01

* 2018-05-17 Frank Gaede
- fix bug in input handling, for details see discussion [#387](https://github.com/AIDASoft/DD4hep/issues/387)
- exclude leptons with zero lifetime from Geant4

# v01-07

* 2018-03-26 Javier Cervantes Villanueva ([PR#343](https://github.com/AIDASoft/DD4hep/pull/343))
Expand Down