The BEAM command makes it possible to define a beam in terms of the conventional Twiss parameters. A beam is defined by many parameters described in Sec.3.3. Here, we will give formulas how to generate a beam using these parameters. An important point is that the beam is defined on a plane s=constant rather than t=constant. Thus, the longitudinal structure of the beam appears as the time structure. Note that t is larger at the bunch tail.
The parameters are
First, generate particle variables in usual accelerator coordinate:
where (
) is a Gaussian random number of zero mean and unit
standard deviation cut at
(
),
(j=1,2) is
a random number of exponential distribution (
)
cut at
and
a uniform random number
in
.
These variables are then transformed to
Finally, the energy-momentum is given by
where is + for right-going beam and - for left-going
(note that right/left appears only here)
and m is the relevant particle mass in units of eV/c
.