RHUL Physics Department TWiki> PP/JAI Web>Simulation>PythonTracker>PhysicsNotes (01 May 2015, LaurieNevay)

Definitions and derivations of each of the Hamiltonians can be found at this link.

- All magnetic fields are defined as follows,

(1) |

where *L* is the length of the magnet (i.e. it's the integrated field), and *n* is the 'order' of the field (i.e., *n = 0* for dipole, *n = 1* for quad, etc.).

- The signs of all magnetic fields are given as if the lattice has been designed for an electron beam. Thus, a positive B value for a quadrupole indicates that it will horizontally focus an electron beam.
- One impact of this is that the R-matrices calculated at instantiation time will be those for an electron lattice. Use for other species will require the use of conversion functions.

- First and second order transport matrices are defined as follows:

(2) |

(Note that this uses a different definition from the beam definition, in that the momentum is defined above as the fractional error, while the beam uses the actual particle momentum.)

- The following describes the beam representation (where
*beamvar*is the name of the beam object),- beamvar.Q[i] = The absolute charge, in Coulombs, of particle number
*i* - beamvar.chargesign = The sign of the charge (i.e. electron or positron).
- beamvar.BunchInt = The interval, in seconds, of the bunches in the train.
- beamvar.x[:,i] = The 6D location of particle number
*i*.- beamvar.x[0,i] = The horizontal position in metres.
- beamvar.x[1,i] = The horizontal momentum dx/ds (in the small angle approximation, this is equal to the angle of the trajectory).
- beamvar.x[2,i] = The vertical position in metres.
- beamvar.x[3,i] = The vertical momentum dy/ds (in the small angle approximation, this is equal to the angle of the trajectory).
- beamvar.x[4,i] = The longitudinal distance, in metres, from the synchronous particle.
- beamvar.x[5,i] = The momentum of the particle in GeV/c

- Note that this definition of the beam means that, due to the definition of the 6th parameter (beamvar.x[5,i]) as the total momentum instead of the fractional momentum error, multiplication of beamvar.x by an R-matrix will not result in the correct output matrix. Multiplying any subset of the matrix and beam phase-space that does not include the momentum term will, however, be correct.

- beamvar.Q[i] = The absolute charge, in Coulombs, of particle number

- The R-matrices are defined, as mentioned above, so that they match the beam definition for all but the momentum term. This term, when dealing with R-matrices, is correct for the fractional momentum error.

- The Twiss parameter dictionary is built as follows,
- Twiss['S'] (the S location of the element for which the Twiss parameters apply)
- Twiss['betax']
- Twiss['betay']
- Twiss['alphax']
- Twiss['alphay']
- Twiss['etax'] (dispersion in the x plane)
- Twiss['etay'] (dispersion in the y plane)
- Twiss['etaxp'] (first derivative of the dispersion in the x plane)
- Twiss['etayp'] (first derivative of the dispersion in the y plane)
- Twiss['Nemitx'] (x emittance normalised by the relativistic gamma parameter)
- Twiss['Nemity'] (y emittance normalised by the relativistic gamma parameter)
- Twiss['phix'] (x phase advance)
- Twiss['phiy'] (y phase advance)
- Twiss['sigz'] (bunch length in metres)
- Twiss['siqP'] (energy spread in GeV)
- Twiss['PZcor'] (longitudinal correlation -- i.e. correlation between longitudinal position (in metres) and energy error (in GeV))

- beamline.Track(Beam) -- This function first makes a deepcopy of the input beam, and then loops around the elements in beamline, calling their TrackThruEle method with the deepcopied beam. Before each TrackThruEle call the momentum term of the input beam is adjusted to be the fractional momentum error (by subtracting and then dividing by the design energy for that component) in order that it is in the correct form for multiplication by the transfer matrices. Once TrackThruEle returns, the momentum is readjusted back to the full momentum.

- K.L.Brown, "A First- and Second-Order Matrix Theory for the Design of Beam Transport Systems and Charged Particle Spectrometers", June 1982
- 1st and 2nd order matrix elements for quads and sexts

- A.W.Chao, and M.Tigner, "Handbook of Accelerator Physics and Engineering"
- Matrix elements for most elements (except higher order than n=1).
- Twiss propagation with R-matrices.
- The 6D beam representation (with the exception of the 6th component, which is the total momentum of the particle, not its fractional error).

Latex rendering error!! dvi file was not created.

Physics Webpages
•
RHUL Webpages
•
Campus Connect
•
Royal Holloway, University of London, Egham, Surrey TW20 0EX; Tel/Fax +44 (0)1784 434455/437520

Topic revision: r16 - 01 May 2015 - LaurieNevay

Copyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback

Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback