Skip to content

Commit

Permalink
Geant4InputHandling: give the same 'normalized' ion pdg code to geant4
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed Aug 26, 2022
1 parent d3a0278 commit 55b8294
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DDG4/src/Geant4InputHandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ int dd4hep::sim::smearInteraction(const Geant4Action* caller,
static G4PrimaryParticle* createG4Primary(const Geant4ParticleHandle p) {
G4PrimaryParticle* g4 = 0;
if ( 0 != p->pdgID ) {
g4 = new G4PrimaryParticle(p->pdgID, p->psx, p->psy, p->psz, p.energy());
const int pdgID = p->pdgID < 1000000000 ? p->pdgID : (p->pdgID / 10) * 10;
g4 = new G4PrimaryParticle(pdgID, p->psx, p->psy, p->psz, p.energy());
}
else {
const G4ParticleDefinition* def = p.definition();
Expand Down

0 comments on commit 55b8294

Please sign in to comment.