Exercise 7: Finite beam spot

Object: Randomly generate initial starting points.

Similar to Exercise 6 using the cylinder, randomly place the starting point for gammas on a 2.5 cm diameter circular spot, with a uniform distribution. This is a typical spot size for gamma ray beams.  The sampling should be done in GUKINE, as this is the subroutine that initializes each event. There are routines available to generate random numbers.

Note, if you are using polar coordinates (r,phi) for the random sampling variables, you need to sample r2, not r. See the discussion on Sampling in non-cartesian coordinate systems .

It would be a good idea to histogram the initial positions (on a 2D plot) to verify the shape and distribution of your beam spot.

Then change to sampling a Gaussian distribution, with sigma=1.25cm. See the Sampling strategies page for suggested techniques to accomplish this. You can use a 2D fit or a fit to a BANX/BANY to verify you have the right shape.

Look for differences with Exercise 4 and Exercise 6 with the cylinder in count rate and especially in energy resolution.



  [Home] [Next] [Hints & Tips]