***** COMMAND NOT FOUND </gun/particle ion> *****


I am trying to simulate a pointlike Na22 source as primary particle (this is not the first time i do that) and I get

***** COMMAND NOT FOUND </gun/particle ion> *****

I just added this two lines in my macro file

/gun/particle ion
/gun/ion 11 22

while in the primary generator I have included G4IonTable.hh and I set the position and the energy. No compilation errors. The PrimaryGeneratorAction is loaded by the ActionInitialization. With other particles I have no problem.

Am I missing something special for ion?
thanks a lot


try to use these commands after “/run/initialise”



thanks but it was already there.

I think you might use GPS rather than a G4ParticleGun.
You should make your ParticleGun to use /gun/ command.
You can find how to use ParticleGun in exampl/B1

Further to Jiho’s posting, you’ll need to modify your source code. Drop me a line and I can send you my code.