Hi, I've encountered a problem with the GetCharge method of the G4StepPoint class. It is returning very strange values for the charge of GenericIons (eg. 2.1 for Oxygen-16??). These ions are produced in fragmentation reactions using the G4LightIonBinaryCascade model. I am using geant4.6.1 linux redhat 9.0 gcc 3.2. Regards, Iwan
It is not a bug. The GetCharge method of the G4StepPoint gives "dynamic" charge of the particle. For the ions produced by hadronic processes, PDGCharge in G4ParticleDefinition is the charge of the nucleus (i.e. equal to atomic number * eplus). On the other hand, the dynamic charge is the effective charge of the ion (see G4EffectiveCharge class under processes/hadronic/util). In Geant4, eplus is set to 1 (see CLHEP/Units/SystemOfUnits.h). So, the value of 2.1 is OK.