Hi,
I have a detector volume set up as shown in the image below. The envelope material is water and the world material is concrete.
I use the G4ParticleGun to shoot 1 mu- from outside the right side of the water towards the left. I want to change the starting Z position of the gun, e.g. for the gun to be 1m, 10m and 100m away from the water/concrete boundary. I want to do it after my simulation has been compiled and built, hence in the macro files. I tried /gun/position command in the visual mode but based on the graphics it seemed like it didn’t work. I also tried to define a customised command through PrimaryGeneratorMessenger class to set the initial Z value, but the root output file I got after using my own command is empty.
I’m wondering if I’m doing something wrong?
Many thanks,
Joanna