Sextupole
This module describes the PASS sextupole element Sextupole, used to simulate the motion of charged particles in a sextupole magnet. The sextupole is the most fundamental nonlinear element in accelerators, providing nonlinear focusing force through a quadratic magnetic field, primarily used for chromaticity correction and resonance driving.
The PASS sextupole supports both thick element (length > 0) and thin lens (length = 0) modes. The thick element uses the exact drift-kick-drift (DKD-exact) symplectic integration scheme, supporting both uniform (2nd-order) and yoshida4 (4th-order) symplectic integrators.
Registration name:
sextupoleKey features:
Supports thin lens mode (
length = 0, applies only a sextupole kick)Supports thick lens mode (
length > 0, DKD-exact symplectic integration)Supports uniform (2nd-order leapfrog) and yoshida4 (4th-order Yoshida composition) integrators
Supports normal sextupole (
k2l) and skew sextupole (k2sl) and their combinationsZero field (
k2l = k2sl = 0) automatically degenerates to a pure driftChromaticity correction, nonlinear dispersion, and other higher-order effects naturally introduced through exact drift
Supports aperture check
The fields below configure PASS.para.schema.elements.SextupoleItem.
The key in Sequence.add(name, item) supplies the element name; it is not a configuration-model field.
Interface Parameters
Python configuration field |
JSON key |
Type |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
|
|
m |
|
Longitudinal position of the element exit or zero-length action point. |
|
|
|
m |
|
Element length (must be \(\ge 0\); \(= 0\) for thin lens) |
|
|
|
\(\text{m}^{-2}\) |
|
Normal sextupole integrated strength \(K_{2L}\), default 0 |
|
|
|
\(\text{m}^{-2}\) |
|
Skew sextupole integrated strength \(K_{2sL}\), default 0 |
|
|
|
— |
|
MAD-X bit selector; 2 enables intrinsic multipole end maps and 4 enables quadrupole F1/F2. |
|
|
|
— |
|
Maximum included pole order: 2 = quadrupole, 3 = sextupole, 4 = octupole. |
|
|
|
— |
|
Disable all enabled fringe maps at the physical entrance. |
|
|
|
— |
|
Disable all enabled fringe maps at the physical exit. |
|
|
|
1 |
|
Number of slices, default 1 (effective only for thick lens) |
|
|
|
|
Integrator, options: |
|
|
|
|
— |
|
Aperture type, default |
|
|
|
m / rad |
|
Aperture parameter values, default |
For time-dependent normal and skew strengths, set is_ramping=True and
ramping_file="magnet_ramp.tfs" (JSON: Is ramping and Ramping file).
See Magnet ramping for the TFS columns, units and entrance sampling.
Each nonempty bunch samples once at entry; its strengths remain fixed over
the entire element. Runtime nominal strengths retain the last executed
bunch entrance values, with field errors kept separate. The same page
documents update_strengths.
Fringe maps are applied once at each physical end, using the enabled total normal/skew strengths. See Physical entrance and exit fringe maps for the selector, order cutoff, zero-length restrictions and MAD-X/PTC comparison conventions.
Usage Examples
Thick Lens Normal Sextupole
{
"SF1": {
"S (m)": 10.0,
"Command": "Sextupole",
"Length (m)": 0.5,
"K2L": 5.0,
"Num slices": 5,
"Integrator": "yoshida4",
"Aperture type": "off"
}
}
Normal sextupole (\(K_{2L} > 0\)), length 0.5 m, 5 slices, 4th-order symplectic integration. Used for chromaticity correction.
Thin Lens Sextupole
{
"SF2": {
"S (m)": 20.0,
"Command": "Sextupole",
"Length (m)": 0.0,
"K2L": 10.0,
"Aperture type": "off"
}
}
Zero-length sextupole, applying only the \(K_{2L}\) thin lens kick, no body tracking.
Negative Sextupole
{
"SD1": {
"S (m)": 30.0,
"Command": "Sextupole",
"Length (m)": 0.4,
"K2L": -5.0,
"Num slices": 1,
"Integrator": "uniform",
"Aperture type": "off"
}
}
Negative sextupole (\(K_{2L} < 0\)), providing chromaticity correction in the opposite direction to a positive sextupole.
Skew Sextupole
{
"SS1": {
"S (m)": 40.0,
"Command": "Sextupole",
"Length (m)": 0.3,
"K2L": 0.0,
"K2SL": 3.0,
"Num slices": 1,
"Integrator": "uniform",
"Aperture type": "off"
}
}
Pure skew sextupole (\(K_{2L} = 0\), \(K_{2sL} \neq 0\)), producing a coupling effect equivalent to rotating the normal sextupole by \(\pi / 6\).
Normal + Skew Sextupole Combination
{
"SFS1": {
"S (m)": 50.0,
"Command": "Sextupole",
"Length (m)": 0.5,
"K2L": 5.0,
"K2SL": 1.0,
"Num slices": 3,
"Integrator": "yoshida4",
"Aperture type": "circle",
"Aperture value": [0.04]
}
}
Combined sextupole with both normal and skew components (simulating installation rotation error), with a circular aperture check.
Coordinate Convention
Use the continuous longitudinal coordinate in Longitudinal coordinate and reference time. \(T_b\) is the ideal reference particle passage time at this position, not a measured bunch-centroid time. The local-map symbols \(\beta_0\) and \(P_0\) refer to the current bunch reference. \(p_x=P_x/P_0\) is normalized momentum, not a trajectory slope.
PASS uses normalized curvilinear coordinates. The six-dimensional phase-space variables are \((x, p_x, y, p_y, z, \delta)\):
Variable |
Symbol |
Definition |
|---|---|---|
|
\(x\) |
Horizontal offset (relative to the reference orbit) |
|
\(p_x\) |
Normalized horizontal momentum, \(p_x = P_x / P_0\) |
|
\(y\) |
Vertical offset |
|
\(p_y\) |
Normalized vertical momentum, \(p_y = P_y / P_0\) |
|
\(\zeta\) |
Longitudinal coordinate, \(z=\zeta=\beta_b c(T_b-t_i)\) |
|
\(\delta\) |
Relative momentum deviation, \(\delta = P / P_0 - 1\) |
where \(P_0\) is the reference particle momentum, \(\beta_0 = v_0 / c\) is the reference particle normalized velocity, \(s\) is the arc length along the reference orbit, and \(t\) is time.
The longitudinal momentum component is defined as:
Charge-to-mass ratio factor:
For a beam of identical particle species, \(\chi = 1\).
Sextupole Field and Normalized Strength
The magnetic field of a sextupole magnet has a quadratic distribution in the transverse plane. In complex notation:
where \(B''\) is the normal sextupole field second derivative and \(B''_s\) is the skew sextupole field second derivative. Expanding:
The normalized sextupole strength is defined as:
The integrated strength is:
where \(L\) is the magnet length. In PASS, the user directly specifies \(K_{2L}\) (k2l) and \(K_{2sL}\) (k2sl); for thick lenses, \(K_2 = K_{2L} / L\) and \(K_{2s} = K_{2sL} / L\) are solved internally.
Overall Tracking Flow
Depending on the magnet length, the sextupole has two tracking modes:
Thin lens mode (\(L = 0\))
====== Thin lens (length = 0) ======
Single sextupole kick Kick(K2L, K2sL)
[Position unchanged, momentum jump only]
Thick lens mode (\(L > 0\))
====== Thick lens (length > 0) ======
Slice 1 → Slice 2 → ... → Slice N
(Each slice: Drift(ds/2) → Kick(ds) → Drift(ds/2))
where ds = L / N
If K2L = 0 and K2sL = 0: degenerates to a single exact drift Drift(L)
The complete map is:
Thin lens:
Thick lens (N slices):
where the DKD map for each slice is:
Note
Thin lens mode does not change the particle position coordinates \((x, y, z)\), only applies momentum kicks
Chromaticity effects in thick lens mode are naturally introduced through the \(p_z\) expression in exact drift (see chromaticity correction section)
When \(K_{2L} = 0\) and \(K_{2sL} = 0\), the thick lens degenerates to a pure drift, avoiding meaningless empty kick loops
Physical Derivation
Hamiltonian
In the Cartesian coordinate system (sextupole has no curvature, \(h = 0\)), the sextupole Hamiltonian is:
Splitting it into the propagation part (exact drift \(H_D\)) and the kick part (\(H_K\)):
where \(H_D\) is the exact drift Hamiltonian (preserving the \(p_z\) square root without small-momentum expansion), and \(H_K\) is the sextupole kick. This is the standard split-operator method: the Hamiltonian is split into analytically solvable parts, maps are applied separately, and then combined into a symplectic integrator.
Exact Drift Map D
The Hamilton’s equations of the propagation part give the exact drift:
where \(L_D\) is the drift length, and \(\beta\) is the particle’s actual normalized velocity:
Note
The meaning of “exact”: the drift part preserves the exact square root \(p_z = \sqrt{(1+\delta)^2 - p_x^2 - p_y^2}\) without small-momentum expansion \(p_x \ll 1\). The approximation lies only in separating the propagation part from the kick part (split-operator method). This formula is identical to the exact drift in the Drift element and the Quadrupole element.
Sextupole Kick Map K
The kick part is a thin lens map (position unchanged, momentum jump only). From Hamilton’s equations \(\dot{p}_x = -\partial H / \partial x\), \(\dot{p}_y = -\partial H / \partial y\):
where \(L_K\) is the kick effective length.
Physical meaning of each term:
Term |
Source |
Physical Meaning |
|---|---|---|
\(-\frac{\chi}{2} K_{2L} (x^2 - y^2)\) |
\(\frac{\chi K_2}{6} x^3\) |
Horizontal nonlinear focusing (proportional to \(x^2\)) |
\(+\chi K_{2L} \, xy\) |
\(-\frac{\chi K_2}{2} x y^2\) |
Horizontal-vertical coupling kick |
\(+\chi K_{2sL} \, xy\) |
\(\frac{\chi K_{2s}}{2} x^2 y\) |
Skew sextupole horizontal coupling kick |
\(+\frac{\chi}{2} K_{2sL} (x^2 - y^2)\) |
\(-\frac{\chi K_{2s}}{6} y^3\) |
Skew sextupole vertical nonlinear focusing |
For thin lens mode, \(L_K = 1\), using the integrated strengths \(K_{2L}\) and \(K_{2sL}\) directly. For DKD mode, \(L_K = \Delta s\), using \(K_2 \Delta s\) and \(K_{2s} \Delta s\).
Note
A normal sextupole (\(K_2 > 0\)) provides a restoring force proportional to \(x^2\) for particles with positive offset in the horizontal direction, and the opposite in the vertical direction. The sextupole focusing force is proportional to the square of the position, making it a nonlinear element—particles farther from the axis experience stronger deflection.
A skew sextupole (\(K_{2s} \neq 0\)) rotates the sextupole action by \(\pi / 6\), producing a different \(x\)-\(y\) coupling pattern. In practice, it is often used to simulate installation rotation errors or drive specific resonances.
Comparison with the quadrupole: the quadrupole kick depends linearly on \(x\) (\(\Delta p_x \propto x\)), while the sextupole kick depends quadratically on \(x\) (\(\Delta p_x \propto x^2\)). This means the sextupole does not affect particles on the reference orbit (kick is zero when \(x = y = 0\)), but produces nonlinear deflection for particles deviating from the axis.
Uniform Integrator (2nd-order symplectic)
Each slice uses the drift-kick-drift (DKD) structure, i.e., 2nd-order leapfrog:
The per-slice error is \(O(\Delta s^3)\), and the global error is \(O(\Delta s^2)\). A 2nd-order symplectic integrator where every step is a canonical transformation.
yoshida4 Integrator (4th-order symplectic)
A 4th-order symplectic map is constructed by composing three 2nd-order DKD steps [Yoshida 1990]:
where the Yoshida coefficients are:
Note
\(z_0 < 0\) means the middle step is a backward tracking (the drift and kick “lengths” are negative). This is a mathematical requirement of the Yoshida composition method and is fully self-consistent in the symplectic map group. The per-slice error is \(O(\Delta s^5)\), and the global error is \(O(\Delta s^4)\).
Chromaticity Correction
Chromaticity describes the dependence of the particle tune on the momentum deviation \(\delta\). The sextupole is the core element for chromaticity correction.
Physical Mechanism
The transverse position of a particle at the sextupole includes a dispersive component:
Here \(x_\beta\) is the betatron component and \(\eta_x\) is horizontal dispersion. Set \(y=0\) to display horizontal feed-down and substitute into the momentum update:
Expanding:
The second term \(-\chi K_{2L} \eta_x \delta \, x_\beta\) is an equivalent quadrupole kick (linearly dependent on \(x_\beta\) with a coefficient proportional to \(\delta\)), which changes the tune dependence on \(\delta\), thereby achieving chromaticity correction. At a sextupole with dispersion, the equivalent quadrupole strength is:
For identical particle species (\(\chi=1\)), uncoupled optics and first-order perturbation theory, the chromaticity contribution is:
Note
The sextupole can only correct chromaticity at locations with dispersion (\(\eta_x \neq 0\))
Chromaticity correction arises automatically in the kick—the kick acts on the true coordinate \(x\) (including dispersion), without any expansion
Even a thin lens (no drift) has a chromaticity correction effect
The third term \(-\frac{\chi}{2} K_{2L} \eta_x^2 \delta^2\) is a second-order dispersion driving term, also naturally included
At dispersion-free locations (\(\eta_x = 0\)), the sextupole does not correct first-order chromaticity but still retains nonlinear effects (3rd-order resonance driving, nonlinear coupling, dynamic aperture limitation, etc.)
Using Sextupoles in Twiss Linear Transport
PASS’s Twiss transport (twiss.py) operates in \((x, p_x)\) normalized momentum coordinates, with dispersion handled as “subtract → linear transport → add back”. Natural chromaticity is introduced through the DQx / DQy parameters (\(\delta\) terms in the phase advance). When inserting a sextupole kick in this framework, the following should be noted.
Coordinate Consistency
When Twiss transport reaches the sextupole position, the particle’s \(x\) already includes dispersion (\(x = x_\beta + \eta_x \delta\)). The sextupole kick acts directly on this true coordinate, and the chromaticity correction term \(-K_{2L}\eta_x\delta\cdot x_\beta\) appears automatically. The kick should not be divided by \(1+\delta\)—that is the notation for the \((x, x')\) angular coordinate system, which is incompatible with PASS’s \((x, p_x)\) system. Mixing them introduces an additional, unphysical momentum dependence.
Avoiding Chromaticity Double-Counting
Scenario |
Correct Approach |
|---|---|
|
Do not apply an additional sextupole kick, otherwise first-order chromaticity is double-counted |
|
Apply the sextupole kick to supplement chromaticity correction and nonlinear effects, no conflict |
|
Subtract the sextupole chromaticity contribution from |
Differences Between Thin Lens and Thick Lens
Effect |
Thin Lens |
Thick Lens DKD-exact |
|---|---|---|
Chromaticity correction (via dispersive location) |
Yes |
Yes |
In-element drift dispersion |
No |
Yes |
Thick-lens distribution effects |
No |
Yes |
Path-length effects (\(R_{56}\), etc.) |
No |
Yes |
The effects missing from the thin lens arise from “internal drift within the magnet”—a zero-length magnet physically has no internal drift, which is a correct physical approximation, not an omission. If these effects are needed, use thick lens mode.
Note
In element-by-element tracking mode, there is no
DQxdouble-counting issue—all effects are naturally produced by the DKD-exact physics simulationTwiss linear transport is a first-order model; dividing by \(1+\delta\) in the sextupole kick would introduce second-order nonlinear dispersion effects inconsistent with the model’s precision, and should be avoided
If the sextupole strength is large or precise nonlinear effect simulation is needed, it is recommended to switch to full element-by-element DKD-exact tracking rather than locally introducing nonlinear kicks in the Twiss linear framework
Naturally Included Higher-Order Effects
The stated ideal sextupole-field and exact-drift model includes the contributions below. They do not represent all fringe fields, field errors or radiation effects of a real magnet:
Effect |
Source |
|---|---|
Chromaticity correction |
Kick acts on the true coordinate \(x\) containing dispersion; expansion automatically produces the equivalent quadrupole term |
Natural chromaticity |
Exact \(p_z\) in drift makes the equivalent focusing strength contain \(1/(1+\delta)\) dependence |
Higher-order dispersion |
Exact \(p_z\) in drift preserves the full square root; dispersion evolution contains all orders of \(\delta\) dependence |
Path-length effects (\(R_{56}\), etc.) |
\(\zeta\) update in drift contains the complete \(R_{56}\), \(T_{566}\), and higher-order terms |
Thick-lens distribution effects |
In DKD multi-slice, drift changes \(x\), and subsequent kicks act on updated coordinates |
\(x\)-\(y\) coupling |
\(xy\) cross terms in the kick |
Note
Within the stated field model, the split integrator has second- or fourth-order global truncation error. More slices allow a convergence check, but cannot restore omitted physical effects or eliminate floating-point roundoff.
Absolute normal/skew field errors and static DX/DY/DPSI alignment use the common Element errors interface. Alignment moves only the magnetic field; apertures and SC boundaries remain in the design frame.
Application Scenarios
Chromaticity correction: Place sextupoles at locations with dispersion to compensate for the natural chromaticity of quadrupoles, making the particle tune insensitive to momentum deviation
Resonance driving: Drive 3rd-order resonances (\(3Q_x\), \(2Q_x \pm Q_y\), etc.) for resonance extraction or beam scraping
Dynamic aperture control: The nonlinear field of the sextupole limits the stable phase-space region, affecting beam lifetime
Nonlinear coupling correction: Using skew sextupoles (
k2sl) to control higher-order \(x\)-\(y\) couplingHarmonic sextupole: Place sextupoles at specific phases to drive or suppress specific resonance terms
LHC chromaticity scheme: Distribute sextupole families (SF/SD) in the arc region to achieve chromaticity control over a wide energy range
References
Xsuite Physics Guide, Sec 1.10.3 (exact drift), Sec 1.10.5 (sextupole)
Xsuite source code:
xtrack/beam_elements/elements_src/sextupole.h,track_magnet.h,track_magnet_kick.h,track_magnet_drift.hYoshida, H., “Construction of higher order symplectic integrators”, Phys. Lett. A 150 (1990)
MAD-X Physics Manual: sextupole field and nonlinear transport
Wiedemann, H., “Particle Accelerator Physics”, Ch. 4 (nonlinear beam dynamics)
Internal Space Charge
A positive-length element may set space_charge (JSON Space charge)
to an ElementSpaceCharge object. Num slices controls external transport,
while Space charge.Num kicks controls SC integration. See Element Slicing and Internal Space Charge
for scheduling, shared resources, supported backends and examples.