“Exact” passmethods#
The “Exact” passmethods are based on E. Forest’s book[1]. They are similar to the tracking in PTC and are not restricted by the small angle approximation. They use the full expansion of the longitudinal momentum:
Resulting in:
“Exact” passmethods are more computationally intensive and much slower than the default methods. They are mainly useful for small rings (small bending radius, large angles).
ExactDriftPass
#
Exact integration in a free space region.
- Length
Drift length.
ExactMultipolePass
#
Exact integration in a straight magnet.
- Length, PolynomB, PolynomA, MaxOrder, NumIntSteps
Bending magnet passmethods
For bending magnet passmethods, the term “rectangular” refers to the layout of the magnetic field, not to the shape of the magnet or to the angle of the pole faces.
In a “sector” magnet, the magnetic axis is an arc of a circle following the design trajectory,
In a “rectangular” magnet, the magnetic axis is a straight line (ex.: off-axis quadrupole).
In case of a pure dipole (uniform magnetic field), both are equivalent, so one can use any of the available methods. They give identical results.
ExactSectorBendPass
#
Exact integration in a curved magnet.
This method uses the bend-kick split of the Hamiltonian. The “bend” step integrates the order 0 of the field expansion (dipole field) while the kick includes the effects of the higher orders of the field expansion and of the synchrotron radiation. Following the notations in [1], the map corresponds to \(\mathcal{Y}(\varepsilon_1) \mathcal{F}_1 \mathcal{U}(-\varepsilon_1) \: \mathcal{W} \: \mathcal{U}(-\varepsilon_2) \mathcal{F}_2 \mathcal{Y}(\varepsilon_2)\) with:
\(\mathcal{Y}(\varepsilon_1)\): y-axis rotation (Eq. 10.26)
\(\mathcal{F}_1\): dipole fringe field in the hard-edge limit (Eq. 13.13), [2]
\(\mathcal{U}(-\varepsilon_1)\): entrance wedge (Eq. 12.41)
\(\mathcal{W}\): bend-kick sequence in cylindrical geometry(Eq. 12.18)
\(\mathcal{U}(-\varepsilon_2)\): exit wedge
\(\mathcal{F}_2\): dipole fringe field in the hard-edge limit
\(\mathcal{Y}(\varepsilon_2)\): y-axis rotation
Tip
For a pure dipole field, without synchrotron radiation, it is possible to
integrate the whole magnet in one step, resulting in a much faster transfer. For
this, use NumIntSteps=0
.
- PolynomB, PolynomA, MaxOrder, NumIntSteps
- Length, BendingAngle, EntranceAngle, ExitAngle
Caution
ExactSectorBendPass
show a small discontinuity around origin. Therefore it is
not recommended to use it for computations based on transfer matrices (linear
optics). This can be mitigated by increasing the differentiation steps XYStep
and DPStep
with respect to their default values.
ExactRectangularBendPass
#
Exact integration in a bending magnet with Cartesian layout.
This method uses the drift-kick split of the Hamiltonian in the Cartesian coordinates of the magnet. Following the notations in [1], the map corresponds to \(\mathcal{Y}(\varepsilon_1) \mathcal{F}_1 \mathcal{U}(\theta/2-\varepsilon_1) \: \mathcal{D} \: \mathcal{U}(\theta/2-\varepsilon_2) \mathcal{F}_2 \mathcal{Y}(\varepsilon_2)\) with:
\(\mathcal{Y}(\varepsilon_1)\): y-axis rotation (Eq. 10.26)
\(\mathcal{F}_1\): dipole fringe field in the hard-edge limit (Eq. 13.13), [2]
\(\mathcal{U}(\theta/2-\varepsilon_1)\): entrance wedge (Eq. 12.41)
\(\mathcal{D}\): drift-kick sequence
\(\mathcal{U}(\theta/2-\varepsilon_2)\): exit wedge
\(\mathcal{F}_2\): dipole fringe field in the hard-edge limit
\(\mathcal{Y}(\varepsilon_2)\): y-axis rotation
For consistency with other passmethods, the Length
attribute is the length \(L\)
of the arc within the magnet, and not the Cartesian length \(L_c\) of the
magnet. \(L=L_c\frac{\theta/2}{sin(\theta/2)}\)
If the magnet field includes quadrupole or higher components, the reference trajectory
in the magnet is no more an arc of a circle. A tuning of the X0ref
attribute is
necessary to get the correct output angle from the magnet. This can be seen as a
horizontal translation of the magnet until the correct deviation angle is obtained.
Similarly, the path lengthening must be adjusted through the RefDZ
attribute to
take into account the length of the non-circular trajectory.
This tuning is performed using a dedicated function/method:
python:
Dipole.rbendtune()
# Identify the rectangular bends (for example...) rbends = ring.get_bool_index(checkattr("PassMethod", "ExactRectangularBendPass") # Set their correct attributes for dip in ring.select(rbends): dip.rbendtune()
Matlab:
atrbendtune()
% Identify the rectangular bends (for example...) rbends=atgetcells(ring,'PassMethod', 'ExactRectangularBendPass'); % Set their correct attributes ring(rbends)=cellfun(@atrbendtune,ring(rbends),'UniformOutput',false);
- PolynomB, PolynomA, MaxOrder, NumIntSteps
- Length, BendingAngle, EntranceAngle, ExitAngle
ExactRectBendPass
#
Exact integration in a bending magnet with Cartesian layout.
Similar to ExactRectangularBendPass, but using a different formalism. The map is expressed by \(\mathcal{Y}(\varepsilon_1) \mathcal{F}_1 \mathcal{U}(\theta/2-\varepsilon_1) \: \mathcal{V} \: \mathcal{U}(\theta/2-\varepsilon_2) \mathcal{F}_2 \mathcal{Y}(\varepsilon_2)\):
\(\mathcal{Y}(\varepsilon_1)\): y-axis rotation (Eq. 10.26)
\(\mathcal{F}_1\): dipole fringe field in the hard-edge limit (Eq. 13.13), [2]
\(\mathcal{U}(\theta/2-\varepsilon_1)\): entrance wedge (Eq. 12.41)
\(\mathcal{V}\): bend-kick sequence in cartesian geometry(Eq. 12.39)
\(\mathcal{U}(\theta/2-\varepsilon_2)\): exit wedge
\(\mathcal{F}_2\): dipole fringe field in the hard-edge limit
\(\mathcal{Y}(\varepsilon_2)\): y-axis rotation
ExactRectBendPass
needs more computations per step than
ExactRectangularBendPass
and suffers from the same discontinuities as
ExactSectorBendPass
. However, in the case of a pure dipole field, one can set
NumIntSteps
to zero.
This method is available for tests but it is recommended
to use ExactRectangularBendPass
orExactSectorBendPass
.
See ExactRectangularBendPass for usage and tuning.
- PolynomB, PolynomA, MaxOrder, NumIntSteps
- Length, BendingAngle, EntranceAngle, ExitAngle