source: PSPA/madxPSPA/doc/usrguide/Introduction/beam.html @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 6.7 KB
Line 
1<head>
2<title>BEAM</title>
3<!-- Changed by: Hans Grote, 30-Sep-2002 -->
4</head>
5
6<body bgcolor="#ffffff">
7
8<center>
9EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH
10<IMG SRC="http://cern.ch/madx/icons/mx7_25.gif" align=right>
11<h2>BEAM: Set Beam Parameters</h2>
12</center>
13
14Many commands in MAD-X require the setting of various quantities related
15to the beam in the machine. Therefore, MAD-X will stop with a fatal error
16if an attempt is made to expand (USE) a sequence for which no BEAM
17command has been issued before.
18<p>
19The quantities are entered by a BEAM command:
20<pre>
21BEAM, PARTICLE=name,MASS=real,CHARGE=real,
22      ENERGY=real,PC=real,GAMMA=real,
23      EX=real,EXN=real,EY=real,EYN=real,
24      ET=real,SIGT=real,SIGE=real,
25      KBUNCH=integer,NPART=real,BCURRENT=real,
26      BUNCHED=logical,RADIATE=logical,BV=integer,SEQUENCE=name;
27</pre>
28Warning: BEAM updates, i. e. it replaces attributes explicitely
29mentioned, but does not return to default values for others!
30To reset to <a href="resbeam.html#defaults">beam value defaults</a>,
31use <a href="resbeam.html">RESBEAM</a>.
32The particle restmass and <a name=charge>charge</a> are defined by:
33<ul>
34<li><a name=particle>PARTICLE</a>:
35The name of particles in the machine.
36MAD knows the restmass and the charge for the following particles:
37<ul><li>POSITRON:
38The particles are positrons (MASS=<i>m<sub>e</sub></i>, CHARGE=1),
39<li>ELECTRON:
40The particles are electrons (MASS=<i>m<sub>e</sub></i>, CHARGE=-1),
41<li>PROTON:
42The particles are protons (MASS=<i>m<sub>p</sub></i>, CHARGE=1),
43<li>ANTIPROTON:
44The particles are anti-protons (MASS=<i>m<sub>p</sub></i>, CHARGE=-1).
45<li>POSMUON:
46The particles are positive muons (MASS=<i>m<sub>mu</sub></i>, CHARGE=1),
47<li>NEGMUON:
48The particles are negative muons (MASS=<i>m<sub>mu</sub></i>, CHARGE=-1).
49</ul>
50</ul>
51Therefore neither restmass nor charge can be modified for these predefined
52particles. On the other hand, for ions and all other user defined
53particles the name, restmass, and charge can be entered independently.
54<p>
55By default the total particle energy is 1 GeV.
56A different value can be defined by one of the following:
57<ul>
58<li><a name=energy>ENERGY</a>:
59The total energy per particle in GeV.
60If given, it must be greater then the particle restmass.
61<li><a name=pc>PC</a>:
62The momentum per particle in GeV/c.
63If given, it must be greater than zero.
64<li><a name=gamma>GAMMA</a>:
65The ratio between total energy and rest energy of the particles:
66GAMMA = <i>E / m<sub>0</sub></i>.
67If given, it must be greater than one.
68If the restmass is changed a new value for the energy should be entered.
69Otherwise the energy remains unchanged,
70and the momentum PC and the quantity GAMMA are recalculated.
71</ul>
72
73The emittances are defined by:
74<ul>
75<li><a name=ex>EX</a>:
76The horizontal emittance <i>E<sub>x</sub></i> (default: 1 m).
77<li><a name=ey>EY</a>:
78The vertical emittance <i>E<sub>y</sub></i> (default: 1 m).
79<li><a name=et>ET</a>:
80The longitudinal emittance <i>E<sub>t</sub></i> (default: 1 m).
81</ul>
82
83The emittances can be replaced
84by the normalised emittances and the energy spread:
85<ul>
86<li><a name=exn>EXN</a>:
87The normalised horizontal emittance [m]:
88<i>E<sub>xn</sub></i> =
894 (GAMMA<sup>2</sup> - 1)<sup>1/2</sup> <i>E<sub>x</sub></i>
90(ignored if <i>E<sub>x</sub></i> is given).
91<li><a name=eyn>EYN</a>:
92The normalised vertical emittance [m]:
93<i>E<sub>yn</sub></i> =
944 (GAMMA<sup>2</sup> - 1)<sup>1/2</sup> <i>E<sub>y</sub></i>
95(ignored if <i>E<sub>x</sub></i> is given).
96<li><a name=sigt>SIGT</a>:
97The bunch length <i>c</i> sigma(<i>t</i>) in [m].
98<li><a name=sige>SIGE</a>:
99The <em>relative</em> energy spread sigma(<i>E</i>)/<i>E</i> in [1].
100</ul>
101Certain commands compute the synchrotron tune <i>Q<sub>s</sub></i>
102from the RF cavities.
103If <i>Q<sub>s</sub></i> is non-zero,
104the relative energy spread and the bunch length are
105<p>
106sigma(<i>E</i>) / <i>p<sub>0</sub> c =
107(2 pi Q<sub>s</sub> E<sub>t</sub> / ETA C)<sup>1/2</sup></i>,
108<p>
109<i>c</i> sigma(<i>t</i>) =
110</i>(ETA C E<sub>t</sub> / 2 pi Q<sub>s</sub>)<sup>1/2</sup></i>.
111<p>
112<i>C</i> is the machine circumference, and
113<p>
114<i>ETA</i> = GAMMA<sup>-2</sup> - GAMMA(transition)<sup>-2</sup>.
115<p>
116The order of precedence in the parameter evaluation is given below:
117<pre>
118    particle->(mass+charge)
119    energy->pc->gamma->beta
120    ex->exn
121    ey->eyn
122    current->npart
123    et->sigt->sige
124</pre>
125where any item to the left takes precendence over the others.
126<p>
127Finally, the BEAM command accepts
128<ul>
129<li><a name=kbunch>KBUNCH</a>:
130The number of particle bunches in the machine (default: 1).
131<li><a name=npart>NPART</a>:
132The number of particles per bunch (default: 0).
133<li><a name=bcurrent>BCURRENT</a>:
134The bunch current (default: 0 A).
135<li><a name=bunched>BUNCHED</a>:
136A logical flag.
137If set, the beam is treated as bunched whenever this makes sense.
138<li><a name=radiate>RADIATE</a>:
139A logical flag.
140If set, synchrotron radiation is considered in all bipolar magnets.
141<li><a name=bv>BV</a>: an integer specifying the direction of the
142particle movement in a beam line; either +1 (default), or -1. For
143a detailed explanation see under <a href=bv_flag.html>bv flag</a>.
144<li><a name=sequence>SEQUENCE</a>: this attaches the beam command to a
145specific sequence; if the name is omitted, the BEAM command refers to
146the default beam always present. Sequences without attached beam use this
147default beam. When updating a beam, the corresponding sequence name,
148if any, must always be mentioned.
149</ul>
150The BEAM command changes only the parameters entered.
151The command
152<a href=resbeam.html>RESBEAM</a>
153resets all beam data to their
154<a href = "resbeam.html#defaults">beam value defaults</a>.
155<p>
156Examples:
157<pre>
158BEAM,   PARTICLE=ELECTRON,ENERGY=50,EX=1.E-6,EY=1.E-8,SIGE=1.E-3;
159 ...
160BEAM,   RADIATE;
161 ...
162RESBEAM;
163BEAM,   EX=2.E-5,EY=3.E-7,SIGE=4.E-3;
164</pre>
165The first command selects electrons, and sets energy and emittances.
166The second one turns on synchrotron radiation.
167The last two select positrons (by default),
168set the energy to 1 GeV (default),
169clear the synchrotron radiation flag,
170and set the emittances to the values entered.
171<p>
172Some program modules of MAD-X may also store data into a beam data block.
173Expressions may refer to data in this beam data block
174using the notation
175<pre>BEAM->attribute-name</pre> or <pre>BEAM%sequence->attribute-name.</pre>
176This notation refers to the value of attribute-name
177found in the default BEAM resp. the beam belonging to the sequence
178given.
179This can be used for receiving or using values, e.g.
180<pre>
181value,beam%lhcb2->bv;
182</pre>
183or for storing values in the beam (this does NOT trigger an update
184of dependent variables !), e.g.
185<pre>
186beam->charge=-1;
187</pre>
188The current values in the BEAM bank can be obtained by the command
189<pre>show,beam;</pre> resp. <pre>show,beam%sequence;</pre>
190<p>
191<address>
192<a href="http://www.cern.ch/Hans.Grote/hansg_sign.html">hansg</a>
19311.9.2000
194</address>
195
196</body>
Note: See TracBrowser for help on using the repository browser.