Uniform beam flux-not gaussian

Hello all,

I would like to have a uniform beam.
I tried many ways but nothing seems to represent what I want.
I do not want a gaussian beam profile, so I changed it to flat beam profile, with radius of the beam the corresponding area I would like to have my flux (i.e. radius 75 mm).
I also saw the topic “Uniform beam illumination of a single pixel” and I tried the square source type with a specific number of particles. In the chase of square beam is the gaussian beam profile or not. Ideally I would like a uniform square beam.
Thank you a lot in advance and sorry for the big text!
Kind regards

1 Like

Hi @Peni123,

I just simulated a simple situation with a square beam profile of squared_side 5mm and square_angle of 0deg. When I plotted the initial positions of the generated particles by Geant4, I got the graph below:

which seems to be the expected distribution, i.e. a uniform square beam with a side of 5mm. Does that answer you question?

Kind Regards,


Just some further checks, if I increase the number of events to 100,000, I get the plots below,

where you can see (in the latter image) that the distribution is flat with a height of 1/5, which is the expected value.

Hi @Peni123

if the solution provided by @Andrew doesn’t work for you, you can use a Geant4 macro file to define exactly the beam source you would like and load it in the DepositionGeant4 module.


Dear Andrew and Simon,

Thank you a lot for your reply! It helped a lot.

Thank you