Problem 604 - Crash in G4LowEIonFragmentation
Summary: Crash in G4LowEIonFragmentation
Status: RESOLVED WONTFIX
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models (show other problems)
Version: 6.0
Hardware: PC Linux
: P2 critical
Assignee: Hans-Peter.Wellisch
URL:
Depends on:
Blocks:
 
Reported: 2004-03-16 06:42 CET by h.szymanowski
Modified: 2004-04-20 07:13 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description h.szymanowski 2004-03-16 06:42:18 CET
Hello,
the simulation of 300 MeV/u C12 ions in water using G4LowEIonFragmentation
in Geant4.6.0 leads to an immediate crash:

In
/usr/local/sw/cern/geant4.6.0/source/processes/hadronic/models/util/include/G4Fr
agment.hh, line 261:
===> G4Fragment::SetNumberOfCharged: Number of charged particles can't be
greater than number of particles
 G4HadronicProcess failed in ApplyYourself call for
 - Particle energy[GeV] = 1.28623
 - Material = Water
 - Particle type = C12[0.0]

*** G4Exception : 007
      issued by : G4HadronicProcess
GeneralPostStepDoIt failed.
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution ***
Aborted

The simulation seems to work better if one includes the following correction in
G4Fragment.hh:
inline void G4Fragment::SetNumberOfCharged(const G4int value)
{
  if (value <= (numberOfParticles + numberOfHoles)) numberOfCharged = value;
  else
  {
  G4String text = "G4Fragment::SetNumberOfCharged: Number of charged particles
can't be greater than number of particles";
	  throw G4HadronicException(__FILE__, __LINE__, text);
  }
}
instead of
inline void G4Fragment::SetNumberOfCharged(const G4int value)
{
  if (value <= numberOfParticles) numberOfCharged = value;
  else
  {
  G4String text = "G4Fragment::SetNumberOfCharged: Number of charged particles
can't be greater than number of particles";
	  throw G4HadronicException(__FILE__, __LINE__, text);
  }
}

Unfortunately one gets negative excitation energies, e.g.:
G4Fragment::G4Fragment Excitation Energy =-11.6027 for A = 9 and Z= 4

and the program crashes after several thousand events with the error message:
G4NuclearLevelStore::GetManager: Wrong values Z = 0 A = 3

Thanks a lot for your help.
Cheers,

Hanitra Szymanowski
Comment 1 Hans-Peter.Wellisch 2004-04-20 07:13:59 CEST
Hi,

  please do not use G4LowEIonFragmentation (it is deprecated), but use
G4BinaryLightIonReaction in stead.

Many greetings,

Hans-Peter.