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, BETA=real, BRHO=real,
EX=real, EXN=real, EY=real, EYN=real,
ET=real, SIGT=real, SIGE=real,
FREQ0=real, CIRC=real,
KBUNCH=integer, NPART=real, BCURRENT=real,
BUNCHED=logical, RADIATE=logical, BV=integer, SEQUENCE=name;
The attributes of the BEAM command are:
- PARTICLE:
The name of particles in the beam. (Default= POSITRON)
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).
- MASS: the restmass of the particles in the beam in GeV.
(Default=me = 0.511 E-3 GeV).
Note that a zero mass particle is not allowed in MAD-X.
- CHARGE: the electrical charge of the
particles in the beam in units of the proton charge [qp].
(Default=1, one proton charge)
Note that a zero charge particle is not allowed in MAD-X.
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 by MAD-X, and the MASS and CHARGE arguments are
simply ignored. For other particles, and in particular for ions, any
combination of name, mass and charge can be entered independently.
- ENERGY:
Total energy per particle in GeV. (Default = 1GeV).
ENERGY must be greater than the particle restmass.
- PC:
Momentum per particle in GeV/c. PC must be greater than zero.
- GAMMA:
Relativistic factor, ie the ratio between total energy and rest energy of the particles:
GAMMA = ENERGY/RESTMASS = E / m0 c2.
GAMMA must be greater than one.
- BETA:
Ratio between the speed of the particles and the speed of light:
BETA = v / c.
BETA must be strictly less than one.
- BRHO:
Magnetic rigidity of the particles:
BRHO = P / abs(q) = PC [GeV] / ( abs(CHARGE) [q_p] * 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.
- EX:
The horizontal emittance Ex (default: 1 m).
- EY:
The vertical emittance Ey (default: 1 m).
- ET:
The longitudinal emittance Et (default: 1 m).
- 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].
The order of precedence for arguments is: ex->exn, ey->eyn
and et->sigt->sige.
Certain commands compute the synchrotron tune Qs
taking into account the settings of RF cavities.
If Qs is non-zero,
the relative energy spread and the bunch length are calculated with
sigma(E) / p0 c =
(2 pi Qs Et / ETA C)1/2,
c sigma(t) =
(ETA C Et / 2 pi Qs)1/2.
where C is the machine circumference, and
ETA = GAMMA-2 - GAMMA(transition)-2.
- 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.
Order and Precedence:
Internally the BEAM command processes the parameters in the following
order and with the following precedence (left to right):
particle -> (mass+charge)
energy -> pc -> gamma -> beta -> brho
ex -> exn
ey -> eyn
current -> npart
et -> sigt -> sige
Warning: BEAM updates, i.e. it replaces attributes explicitely
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 MAD-X modules 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:
- CIRC: total length or circumference of the machine [m]
- FREQ0: revolution frequency [Hz]
- DTBYDS: ???
- DELTAP: momentumn deviation
- ALFA: momentum compaction factor
- U0: radiation loss per turn [GeV]
- QS: synchrotron tune [1]
- ARAD: classical particle radius [m]
- PDAMP={real,real,real}: damping partion numbers. Default is {1,1,2}
- N1MIN: minimum available aperture. Set by the APERTURE module.
Referring to BEAM data attributes
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, respectively the beam belonging to the sequence
given.
This can be used for receiving or using values, e.g.
value,beam%lhcb2->bv;
but also for storing values in the beam baknk:
beam->charge=-1;
Note however that this does NOT trigger an update of dependent variables
and you are strongly advised against setting BEAM parameters with this method.
The current values in the BEAM bank can be obtained by the command
show,beam;
or to obtain the data for a beam linked to a named sequence:
resp. show,beam%sequence;
Examples:
! select electrons, set energy and emittances
BEAM, PARTICLE = ELECTRON, ENERGY = 50, EX = 1.E-6, EY = 1.E-8, SIGE = 1.E-3;
...
! turn on synchrotron radiation
BEAM, RADIATE;
...
! reset all values to their defaults,
! ie positrons, energy = 1GeV, default emittances, no radiation...
RESBEAM;
...
! select new emittances
BEAM, EX = 2.E-5, EY = 3.E-7, SIGE = 4.E-3;
hansg
11.9.2000
Ghislain Roy - 09 May 2014