environment: geant4 4.7.0.p01 OS Scientific Linux 4 problem: change the particle "geantino" to other particle(ex. proton) ----------- ExN01PrimaryGeneratorAction.cc: line 43 particleGun->SetParticleDefinition(particleTable->FindParticle(particleName="proton")); ExN01PhysicsList.cc: line 46 G4Proton::ProtonDefinition(); ----------- after recompile, the new executable will lead to segementation fault after first-time core dump, program recompiled with the original source(geantino) will always lead to segmentation fault. the problem is found on the same environment on different machines. but there is no problem doing such modification on FreeBSD system.
The physics list of exampleN01 has only geantino and its transportation process. You cannot shoot other particle unless you modify the physics list.
ExN01PrimaryGeneratorAction.cc: line 43 particleGun->SetParticleDefinition(particleTable->FindParticle(particleName="proton")); ExN01PhysicsList.cc: line 46 G4Proton::ProtonDefinition(); in fact i have changed the particle in physicslist and particle gun this modification will lead segmentation fault under SL4.