Message: charge of ions isn't changed Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question charge of ions isn't changed 

Forum: Particles
Date: 01 Nov, 2018
From: Aleksei <Aleksei>

Hello everyone! I'm trying to change a charge of ions in beam. Here is my code below:

if (fParticleGun->GetParticleDefinition() == G4Geantino::Geantino()) {  
   G4int Z = 6, A = 12;
   G4double ionCharge   = 2;
   G4double excitEnergy = 0.*keV;

   G4ParticleDefinition* ion = G4IonTable::GetIonTable()->GetIon(Z,A,excitEnergy);

When I use this line(G4int a = track->GetDynamicParticle()->GetCharge();) in sensitive detector I get 5 instead of 2 all the time. The situation will be the same if one use other particles (any). And as the result changing of charge isn't worked. How could I fix this? Physics list is FTFP_BERT, but also one my own is used (the same situation). Thank you in advance!

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: charge of ions isn't changed   (Aleksei - 02 Nov, 2018)
(_ Question: Re: charge of ions isn't changed   (Vladimir Ivanchenko - 02 Nov, 2018)
(_ None: Re: charge of ions isn't changed   (Aleksei - 02 Nov, 2018)
 Add Message Add Message
to: "charge of ions isn't changed"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]