Problem 2109 - crash with message G4IonTable:GetIon(): illegal atomic number mass Z=0 A=4 E=0
Summary: crash with message G4IonTable:GetIon(): illegal atomic number mass Z=0 A=4 E=0
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/neutron_hp (show other problems)
Version: 10.5
Hardware: PC Windows
: P4 normal
Assignee: Emilio
URL:
Depends on:
Blocks:
 
Reported: 2018-12-12 10:01 CET by porosev
Modified: 2019-06-14 10:12 CEST (History)
0 users

See Also:


Attachments
print screen (535.33 KB, image/jpeg)
2018-12-14 09:36 CET, porosev
Details

Note You need to log in before you can comment on or make changes to this problem.
Description porosev 2018-12-12 10:01:37 CET
Hello all!

I just installed G4_10_05 and I tested my old application.

I use primary particle: CARBON ION
G4int    fAtomicNumber         = 6;
G4int    fAtomicMass           = 12;
G4double fIonExciteEnergy      = 0.0;
G4int    fIonCharge            = 6;

with initial energy: 200MeV * 12 that hits Ti foils and stops in the water phantom. I use factory generated physics "QGSP_BIC_AllHP".

Sometimes G4 crash with a message: 
G4IonTable:GetIon(): illegal atomic number mass Z=0 A=4 E=0

at line 278 in a file G4ParticleHPFinalState.cc

additionally, I see a lot of messages:
More that one neutron is required for the balance of baryon number!
Comment 1 porosev 2018-12-14 09:36:22 CET
Created attachment 527 [details]
print screen
Comment 2 dennis.herbert.wright 2019-04-12 19:03:30 CEST
Looks like a ParticleHP problem.
Comment 3 Emilio 2019-06-14 10:12:20 CEST
Dear Porosev,

Thank you for reporting this issue. I have been checking the code and reproducing more or less your problem, and I found a bug there. The point was that G4ParticleHPFinalState sometimes try to "adjust the final state", which means that tries to conserve energy, momentum ... event-by-event. In some situations this is quite complex since the databases used in this model do not conserve these quantities event-by-event, and this caused the crash and the "lots of messages".


I fixed the problem and the fix will be available with the next geant4 public release.

Regards,

Emilio