Problem 736 - Segmentation Fault with low mass user particle
Summary: Segmentation Fault with low mass user particle
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic (show other problems)
Version: 7.0
Hardware: PC Linux
: P2 normal
Assignee: kurasige
URL:
Depends on:
Blocks:
 
Reported: 2005-03-31 23:33 CEST by gar44
Modified: 2005-05-04 23:07 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 gar44 2005-03-31 23:33:34 CEST
I am trying to simulate electron-like particles with different masses, charges
and so on.  Using ExampleN03 as a base, I added in new source and header files
which are just the electron files with the name changed.  Everything works fine
when the mass is large (eg 1 GeV) but if I use the normal electron mass then I
get the following error on running:

phot:  Total cross sections from Sandia parametrisation.
G4ProcessManager::GetAttribute(): particle[m-]
  index out of range
  #processes[2]  index [-1]
G4ProcessManager::GetAttribute(): particle[m-]
  index out of range
  #processes[2]  index [-1]

Segmentation fault

(m- is the name of my new particle).  The error occurs only when the mass drops
below about 10 MeV.  If the mass is larger than this then the charge can be
changed without any problems.

The PhysicsList file I am using is exactly the same as the N03 example, but with
my new header included and the line

G4MyParticle::MyParticleDefinition();

in ConstructParticle() above the ConstructBosons() etc.

I am using Geant4 7.0.p01 on Mandrake Linux 10.1 with g++ 3.4.1.

Thank You,
Giles Reid
Comment 1 kurasige 2005-05-04 23:07:59 CEST
Error message of "index out of range" suggests that G4hIonisation is attached to
the new particle m-. But, G4hIonisation can not be attached to particles if its
mass is less than 10 MeV. (i.e. G4hIonisation::IsApplicable returns false).