Hi everyone. I once again come to you for guidance. I’m trying to create a cosmic beam with a lot of different particles and ions as the primary particlegun. I’ve managed to find out that everytime any ion/nuclei is produced my simulation crashes.
And the error I get is from G4ParticleGun.cc file line 102 :
if(!aParticleDefinition) { [G4Exception](“G4ParticleGun::SetParticleDefinition()”,“Event0101”, [FatalException],“Null pointer is given.”)
So i’m wondering if i may be defining them wrong or what i did wrong because I can’t seem to find my mistakes.
Thanks a lot, feel free to ask if you need more information.
PS : PrimaryGeneratorAction file is linked
GCR1PrimaryGeneratorAction.cc (22.6 KB)