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:
- PARTICLE:
The name of particles in the machine.
MAD knows the restmass and the charge for the following particles:
- POSITRON:
The particles are positrons (MASS=me, CHARGE=1),
- ELECTRON:
The particles are electrons (MASS=me, CHARGE=-1),
- PROTON:
The particles are protons (MASS=mp, CHARGE=1),
- ANTIPROTON:
The particles are anti-protons (MASS=mp, CHARGE=-1).
- POSMUON:
The particles are positive muons (MASS=mmu, CHARGE=1),
- NEGMUON:
The particles are negative muons (MASS=mmu, CHARGE=-1).
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:
- ENERGY:
The total energy per particle in GeV.
If given, it must be greater then the particle restmass.
- PC:
The momentum per particle in GeV/c.
If given, it must be greater than zero.
- GAMMA:
The ratio between total energy and rest energy of the particles:
GAMMA = E / m0.
If given, it must be greater than one.
If the restmass is changed a new value for the energy should be entered.
Otherwise the energy remains unchanged,
and the momentum PC and the quantity GAMMA are recalculated.
The emittances are defined by:
- EX:
The horizontal emittance Ex (default: 1 m).
- EY:
The vertical emittance Ey (default: 1 m).
- ET:
The longitudinal emittance Et (default: 1 m).
The emittances can be replaced
by the normalised emittances and the energy spread:
- EXN:
The normalised horizontal emittance [m]:
Exn =
4 (GAMMA2 - 1)1/2 Ex
(ignored if Ex is given).
- EYN:
The normalised vertical emittance [m]:
Eyn =
4 (GAMMA2 - 1)1/2 Ey
(ignored if Ex is given).
- SIGT:
The bunch length c sigma(t) in [m].
- SIGE:
The relative energy spread sigma(E)/E in [1].
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
- KBUNCH:
The number of particle bunches in the machine (default: 1).
- NPART:
The number of particles per bunch (default: 0).
- BCURRENT:
The bunch current (default: 0 A).
- BUNCHED:
A logical flag.
If set, the beam is treated as bunched whenever this makes sense.
- RADIATE:
A logical flag.
If set, synchrotron radiation is considered in all bipolar magnets.
- BV: an integer specifying the direction of the
particle movement in a beam line; either +1 (default), or -1. For
a detailed explanation see under bv flag.
- SEQUENCE: this attaches the beam command to a
specific sequence; if the name is omitted, the BEAM command refers to
the default beam always present. Sequences without attached beam use this
default beam. When updating a beam, the corresponding sequence name,
if any, must always be mentioned.
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