Hemispherical shape in the .mac file

Geant4 Version: 11.06
Operating System: Lunix/Ubuntu


Hi, is it possible to set up a geometry to strike particles in a hemispherical shape in the .mac file using GPS?

Into or out of the “sphere” i.e. are the particles heading towards or away from the center of the hemisphere, respectively? “Out” is fairly straightforward:

/gps/ang/type iso
/gps/ang/mintheta 0 deg
/gps/ang/maxtheta 90 deg
/gps/ang/minphi 0 deg
/gps/ang/maxphi 360 deg

This will constrict particles to the +z hemisphere. You can use rotation operators if you want to change the axis described here and listed here.

There are some wonky ways to maybe handle the inward case but you are generally better off writing your own particle gun class at that point.