Hi
I am trying to get geant to run a list of particles and associated energy from a Text file.
So far I was using macros and aliases for specific particles and energies.
I was thinking of having a generic macro where the particle is defined by getting a shell variable using /control/getenv. This allows me to have the reading of the text file outside of Geant. However, I am not sure how this command works.
I tried:
/control/getEnv PARTICLE /control/echo PARTICLE /mycmd/gun/setparticle {PARTICLE}
But I get <PARTICLE> is not defined as a shell variable. Command ignored.
while if I “echo $PARTICLE” in my shell I get it s value printed (in this case it was “proton”).
I would be glad to receive some help on this and I am open to any more practical suggestions for the implementation of it.
Cheers!
Florian