Particle emission direction issues in GPS

_Geant4 Version:_geant4-11-03
_Operating System:_ubuntu
_Compiler/Version:_clang10.0.0
_CMake Version:_3.31
I have configured the particle emission source as follows in the .mac file.But no matter how I modify the values of rot1 and rot2, the particle’s emission direction has not changed. How should I set it to change the particle’s emission direction? Currently, the particle’s emission direction is exactly opposite to what I expect

/gps/particle gamma

/gps/ene/type Mono
/gps/ene/mono 6.0 MeV

/gps/pos/type Plane
/gps/pos/shape Rectangle
/gps/pos/halfx 2.31 cm
/gps/pos/halfy 1.5 cm
/gps/pos/centre 0 0 -600 mm

/gps/ang/type planar

/gps/ang/rot1 1 0 0
/gps/ang/rot2 0 -1 0

Maybe you’re setting the direction in your primary generator action, which would override that set by gps. Please check.

Hello,

Try changing /gps/ang/type planar to:

/gps/ang/type beam1d

But if all you need is to set the direction to be positive Z this can be more easily set by:

/gps/direction 0 0 1

Thank you for your reply. I did not set it in the primary generator action. Now I have solved this problem, and I did not use rot, but used /gps/direction to successfully change the direction of particle emission.

Thank you for your reply. I did not change to beam1d, but directly used /gps/direction, and have successfully changed the direction of the particle emission