EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH

BEAM: Set Beam Parameters

Many commands in MAD-X require the setting of various quantities related to the beam in the machine. Therefore, MAD-X will stop with a fatal error if an attempt is made to expand (USE) a sequence for which no BEAM command has been issued before.

The quantities are entered by a BEAM command:

BEAM, PARTICLE=name,MASS=real,CHARGE=real,
      ENERGY=real,PC=real,GAMMA=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=name;
Warning: BEAM updates, i. e. it replaces attributes explicitely mentioned, but does not return to default values for others! To reset to beam value defaults, use RESBEAM. The particle restmass and charge are defined by: Therefore neither restmass nor charge can be modified for these predefined particles. On the other hand, for ions and all other user defined particles the name, restmass, and charge can be entered independently.

By default the total particle energy is 1 GeV. A different value can be defined by one of the following:

Certain commands compute the synchrotron tune Qs from the RF cavities. If Qs is non-zero, the relative energy spread and the bunch length are

sigma(E) / p0 c = (2 pi Qs Et / ETA C)1/2,

c sigma(t) = (ETA C Et / 2 pi Qs)1/2.

C is the machine circumference, and

ETA = GAMMA-2 - GAMMA(transition)-2.

The order of precedence in the parameter evaluation is given below:

    particle->(mass+charge)
    energy->pc->gamma->beta
    ex->exn
    ey->eyn
    current->npart
    et->sigt->sige
where any item to the left takes precendence over the others.

Finally, the BEAM command accepts

The BEAM command changes only the parameters entered. The command RESBEAM resets all beam data to their beam value defaults.

Examples:

BEAM,   PARTICLE=ELECTRON,ENERGY=50,EX=1.E-6,EY=1.E-8,SIGE=1.E-3;
 ...
BEAM,   RADIATE;
 ...
RESBEAM;
BEAM,   EX=2.E-5,EY=3.E-7,SIGE=4.E-3;
The first command selects electrons, and sets energy and emittances. The second one turns on synchrotron radiation. The last two select positrons (by default), set the energy to 1 GeV (default), clear the synchrotron radiation flag, and set the emittances to the values entered.

Some program modules of MAD-X may also store data into a beam data block. Expressions may refer to data in this beam data block using the notation

BEAM->attribute-name
or
BEAM%sequence->attribute-name.
This notation refers to the value of attribute-name found in the default BEAM resp. the beam belonging to the sequence given. This can be used for receiving or using values, e.g.
value,beam%lhcb2->bv;
or for storing values in the beam (this does NOT trigger an update of dependent variables !), e.g.
beam->charge=-1;
The current values in the BEAM bank can be obtained by the command
show,beam;
resp.
show,beam%sequence;

hansg 11.9.2000