Illegal ion/mass number in binary cascade model "G4IonPhysicsPHP"

Dear experts,
I’m using the following modules in my modular physics list to run space radiation simulations for proton/HeavyIons detectors :

  // Hadron Elastic scattering
  RegisterPhysics( new G4HadronElasticPhysicsPHP(verb) );
  // Hadron Inelastic Physics
  ///RegisterPhysics( new G4HadronPhysicsFTFP_BERT_HP(verb));
  ////RegisterPhysics( new G4HadronPhysicsQGSP_BIC_AllHP(verb));
  RegisterPhysics( new G4HadronInelasticQBBC(verb));        
  ////RegisterPhysics( new G4HadronPhysicsINCLXX(verb));
  // Ion Physics
  RegisterPhysics( new G4IonPhysicsPHP(verb));
  ////RegisterPhysics( new G4IonINCLXXPhysics(verb));
  // stopping Particles
  RegisterPhysics( new G4StoppingPhysics(verb));

  // EM physics
  RegisterPhysics(new G4EmStandardPhysics_option4(verb));
  G4EmProcessOptions emOptions;
  RegisterPhysics(new G4EmExtraPhysics(verb));
  // Decay
  RegisterPhysics(new G4DecayPhysics());

The simulations run smoothly for protons and electrons as incident particles at all energies with the exception of the following warning every 500K events or so :
G4WT0 > More than one neutron is required for the balance of baryon number!
but when I run the simulation using alphas as my primary particle, the simulation crashes with a segmentation fault and core dump because the following error occurs every 650K events or so at energies above 200MeV :
G4IonTable::GetIon() : illegal atomic number/mass Z =0 A = 5 E = 0
accompanied with lots of warnings like the previous one but this time it occurs much more frequently, on in 50K Events.
I know that G4IonPhysicsPHP switches from TENDL data to binary cascade model at energies higher than 200 MeV. So I think the error is related. but I have always thought of binary cascade model as the trusty model to follow when in doubt. What could be a fix or an alternative to this issue ?

Thanks in advance…


I cannot fully understand your problem but a general advice would be:

  1. use Geant4 10.5p01 - in this version number of PHP problems were fixed
  2. never use G4EmProcessOptions - this helper class is obsolete now. use instead UI commands for atomic de-excitation.
  3. register EM physics before any other


What is your environmental variables for compiling and running?

I would suggests using DO_NOT_SET_PHP_AS_HP=1 when compiling, and DO_NOT_SET_PHP_AS_HP=1, G4PHP_DO_NOT_ADJUST_FINAL_STATE=1, G4PHP_DO_NOT_CHECK_DIFF_COEFF_REPR=1 when running.