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