Element Type Q: Quadrupole

Parameter Description Argument Order Argument Name Units Default Value
Length 1 L cm 0.0
Gradient 2 G[kG/cm] kG/cm 0.0
Tilt 3 T degrees 0.0
Horizontal Offset 4 OfsX[cm] cm 0.0
Vertical Offset 5 OfsY[cm] cm 0.0

Rotations (e.g Tilt) are performed in the beam frame about an axis tangent to the beam trajectory.

Examples: 
Qfs     	L[cm]=45  	G[kG/cm]=0.277565 	Tilt[deg]=45
Qd     	        L[cm]=45  	G[kG/cm]=-0.445846 	

A quadrupole can have offsets in the horizontal and vertical planes. Such offsets, when present, cause beam kicks proportional to quad displacements in the corresponding planes (for tilt=0). Similarly to correctors, quadrupole displacements cause excitation of the beam trajectory. They are accounted for in all trajectory related calculations, including optics calculations on a reference orbit.

Example: 
QQf   L[cm]=45   G[kG/cm]=0.277    Tilt[deg]=0   OfsX[cm]=0.1   OfsY[cm]=0.01

In tracking mode, the quadrupole map includes edge aberrations due to the fringe field. The transfer map is computed in the hard-edge approximation. For the upstream edge, the edge map in the horizontal and vertical planes are respectively $$ \Delta x = \frac{k_1}{12(1+\delta)} \left[ x^3 + 3xy^2 \right] $$ $$ \Delta x' = \frac{k_1}{4(1+\delta)} \left[ 2 xyy' - (x^2 + y^2) x' \right] $$ $$ \Delta y = -\frac{k_1}{12(1+\delta)} \left[ y^3 + 3x^2y \right] $$ $$ \Delta y' = -\frac{k_1}{4(1+\delta)} \left[ 2 yxx' - (x^2 + y^2) y' \right] $$

Here, $k_1 = eG/p = G/B\rho$ is the optical quadrupole strength and $\delta = \Delta p/p$ is the relative momentum deviation. The signs of the edge aberrations are reversed at the downstream end. A switch is provided under the preferences menu to optionally turn the edge effects off.

References:
  1. G.E. Lee-Whiting, "Third Order Aberrations of a Magnetic Quadrupole Lens", NIM-83, pp.232-244 (1970).
  2. E. Forest, "Beam Dynamics, A New Attitude and Framework", Harwood Academic Publishers (1998), pp. 389-390.