As far as I know I have to specify the directions the particle source can emit particles on my own.
I’m doing this via
SetParticleMomentumDirection(x, y, z)
and to provide an isotropic emission behaviour I’m using
G4UniformRand()-0.5
for all parameters. I’d say this works but I don’t understand why. For example, when I use only
G4UniformRand()
for the z-direction, then the source emits particles only in one half of 4*Pi. But with -0.5 it emits in all directions. According to What is the range of numbers generated by G4UniformRand()? the function G4UniformRand selects numbers between {0, 1} so when I subtract 0.5 I’d expect that I’d change only the angle of emission and not the angle range itself.
Could someone please shed some light on me? Thank you!