BEAM

\label{sec:beam}

The quantities are entered by a BEAM command: \madbox BEAM, PĖ„ARTICLE=string, MASS=real, CHARGE=real,
ENERGY=real, PC=real, GAMMA=real, BETA=real, BRHO=real,
EX=real, EXN=real, EY=real, EYN=real,
ET=real, SIGT=real, SIGE=real,
KBUNCH=integer, NPART=real, BCURRENT=real,
BUNCHED=logical, RADIATE=logical, BV=integer, SEQUENCE=string;

The attributes of the BEAM command are:

{madlist}\ttitem

\label{beam_charge}PARTICLE The name of particles in the beam. Default= POSITRON
\mad
knows the restmass and the charge for the following particles: {madlist} \ttitemPOSITRON The particles are positrons (MASS=\(m_{e}\), CHARGE=1) \ttitemELECTRON The particles are electrons (MASS=\(m_{e}\), CHARGE=-1) \ttitemPROTON The particles are protons (MASS=\(m_{p}\), CHARGE=1) \ttitemANTIPROTON The particles are anti-protons (MASS=\(m_{p}\), CHARGE=-1) \ttitemPOSMUON The particles are positive muons (MASS=\(m_{\mu}\), CHARGE=1) \ttitemNEGMUON The particles are negative muons (MASS=\(m_{\mu}\), CHARGE=-1) \ttitemION The particles are simple generic ions (MASS=\(m_{n}\), CHARGE=1) \ttitemMASS the restmass of the particles in the beam in GeV.
(Default=\(m_{e}\approx 0.511\ 10^{-3}\) GeV).
Note that a zero mass particle is not allowed in \mad. \ttitemCHARGE the electrical charge of the particles in the beam in units of \(q_{p}\), the proton charge. (Default=1)
Note that a zero charge particle is not allowed in \mad. The order of precedence for arguments is: particle->(mass+charge)
If the particle name given is recognized in the list above, the restmass and charge are set directly by \madx, and the MASS and CHARGE arguments provided in the BEAM command are simply ignored. For other particles, and in particular for ions, any combination of name, mass and charge can be entered independently.

{madlist}\ttitem

\label{beam_energy}ENERGY Total energy per particle in GeV.
If given, it must be greater than the particle restmass. (Default=1 GeV) \ttitemPC Particle momentum times the speed of light, in GeV.
If given, it must be greater than zero. \ttitemGAMMA Relativistic factor, ie ratio between total energy and rest energy of the particles: GAMMA = ENERGY/MASS = \(E/m_{0}c^{2}\).
GAMMA must be greater than one. \ttitemBETA Ratio between the speed of the particle and the speed of light: \({\tt BETA}=v/c\).
BETA must be strictly less than one. \ttitemBRHO Magnetic rigidity of the particles in T.m.
BRHO = \(P/abs(q)\) = PC / ( abs(CHARGE) * c * 1.e-9). The order of precedence for arguments is: energy->pc->gamma->beta->brho

Note that if the restmass is changed after the energy has been set, ie in separate BEAM commands, the energy is left unchanged and the momentum PC and relativistic factor GAMMA are recalculated.

{madlist}\ttitem

EX The horizontal emittance \(\epsilon_{x}\) (default: 1 m). \ttitemEY The vertical emittance \(\epsilon_{y}\) (default: 1 m). \ttitemET The longitudinal emittance \(\epsilon_{t}\) (default: 1 m). \ttitemEXN The normalised horizontal emittance [m]: \(\epsilon_{xn}=\sqrt{\gamma^{2}-1}\ \epsilon_{x}=\beta\gamma\ \epsilon_{x}\) \ttitemEYN The normalised vertical emittance [m]: \(\epsilon_{yn}=\sqrt{\gamma^{2}-1}\ \epsilon_{y}=\beta\gamma\ \epsilon_{y}\) \ttitemSIGT The bunch length \(c\ \sigma_{t}\) in [m]. \ttitemSIGE The relative energy spread \(\sigma_{E}/E\) in [1].

Note that up to version 5.02.04 the definition of normalised emittance used in \madxwasreferring to the so-called 2-sigma geometric emittance: \(\epsilon_{n}=4\sqrt{\gamma^{2}-1}\ \epsilon=4\beta\gamma\ \epsilon\) This definition was different from the definition usually found in literature and used for example in the APERTURE module.
The standard one sigma definition is now used across all \madxmodules.

Certain commands compute the synchrotron tune \(Q_{s}\) taking into account the settings of RF cavities. If \(Q_{s}\) is non-zero, the relative energy spread and the bunch length are calculated with

\begin{align} \sigma_{E}/p_{0}c & =\sqrt{\epsilon_{t}\ \frac{2\pi Q_{s}}{\eta\ C}} \\ c\ \sigma_{t} & =\sqrt{\epsilon_{t}\ \frac{\eta\ C}{2\pi Q_{s}}}\\ \end{align}

where \(C\) is the machine circumference, and

\begin{equation} \eta=1/\gamma^{2}-1/\gamma_{t}^{2}\\ \end{equation}
{madlist}\ttitem

\label{beam_radiate}KBUNCH The number of particle bunches in the machine (default: 1). \ttitemNPART The number of particles per bunch (default: 0). \ttitemBCURRENT The bunch current (default: 0 A). \ttitemBUNCHED A logical flag. If set, the beam is treated as bunched whenever this makes sense. \ttitemRADIATE A logical flag. If set, synchrotron radiation is considered in all dipole magnets. \ttitemBV an integer specifying the direction of the particle movement in a beam line; either +1 (default), or -1. For a detailed explanation see the section below on bv flag. \ttitemSEQUENCE attaches the defined beam to the named sequence; if the name is omitted, the BEAM command refers to the default beam which is always present. Sequences without attached beam use this default beam. When updating a beam with a corresponding sequence name, tye sequence name must always be mentioned.

Order and Precedence:
Internally the BEAM command processes the parameters in the following order and with the following precedence (left to right):

Warning: BEAM updates, i.e. it replaces attributes explicitly mentioned, may calculate other attributes according to the precedence rules given, but does NOT return attributes not specified to default values! In order to reset to reset BEAM attributes to their default values, use the RESBEAM command.

Additional variables:
Some \madmodules may also compute and store data into a beam data block. These attributes may NOT be set directly through the BEAM command. The corresponding variables are:

{madlist}\ttitem

CIRC total length or circumference of the machine [m] \ttitemFREQ0 revolution frequency [Hz] \ttitemDTBYDS ??? \ttitemDELTAP momentum deviation \ttitemALFA momentum compaction factor \ttitemU0 radiation loss per turn [GeV] \ttitemQS synchrotron tune [1] \ttitemARAD classical particle radius [m] \ttitemPDAMP damping partition numbers; Default is 1,1,2 \ttitemN1MIN minimum available aperture, set by the APERTURE module