Drift

This module introduces the drift element Drift in PASS, used to simulate particle transport in field-free free space. The drift is the most basic beamline element; particles experience no electromagnetic forces within it and move in straight lines solely by their initial momentum.

Code Location

  • Source file: PASS/commands/element/drift.py

  • Class name: Drift (inherits from Command)

  • Registration name: drift

  • Core features:

    • Thick element (length > 0), changes the particle’s position and longitudinal coordinate;

    • Uses exact geometric transport formulae, accounting for the projection of transverse momentum onto longitudinal velocity;

    • Supports aperture checking, consistent with other elements.

Physical Derivation

Particles experience no force in the drift and move in a straight line with constant momentum. Let the drift length be \(L\), the particle’s normalized transverse momenta be \(p_x\) and \(p_y\), and the momentum deviation be \(\delta\).

Total Particle Momentum

The normalized total momentum (in units of the reference particle momentum \(P_0\)) is:

\[P_{\text{tot}} = 1 + \delta\]

The longitudinal momentum component (accounting for the projection of transverse momentum) is:

\[p_z = \sqrt{(1 + \delta)^2 - p_x^2 - p_y^2}\]

If \(p_z^2 \le 0\), the particle is physically impossible (transverse momentum exceeds total momentum) and is marked as lost.

Particle Velocity

The particle’s \(\beta\) value is computed from the reference particle’s \(\beta_0\), \(\gamma_0\), and the momentum deviation \(\delta\):

\[\beta = \frac{(1 + \delta) \, \gamma_0 \, \beta_0}{\sqrt{1 + \left[(1 + \delta) \, \gamma_0 \, \beta_0\right]^2}}\]

Coordinate Update

The particle coordinates in the drift are updated as:

\[x \leftarrow x + L \cdot \frac{p_x}{p_z}\]
\[y \leftarrow y + L \cdot \frac{p_y}{p_z}\]
\[z \leftarrow z + L \cdot \left(1 - \frac{\beta_0}{\beta} \cdot \frac{1 + \delta}{p_z}\right)\]

where the \(z\) update includes the path length difference effect: particles with momentum deviations have different velocities, causing a change in longitudinal position.

Longitudinal Coordinate Continuity

Drift does not fold the updated \(z_{\mathrm{rel}}\) around the ring. Keeping the coordinate continuous preserves accumulated multi-turn phase slip. Use \(z_{\mathrm{lab}}=z_{\mathrm{rel}}+z_{\mathrm{center}}\) when a laboratory coordinate is needed.

Interface Parameters

Property

JSON key

Type

Unit

Description

s

S (m)

float

m

Longitudinal position of the element in the beamline

length

Length (m)

float

m

Element length (must be \(\ge 0\))

name

name

str

Element name (automatically filled from the key name of the sequence JSON)

aperture_type

Aperture Type

str

Aperture type (default off, available values in the Aperture chapter)

aperture_value

Aperture Value

list

Aperture parameter values (default [], meaning varies by type, see the Aperture chapter)

Usage Examples

The following JSON snippet demonstrates the configuration of a drift:

Basic usage:

"Drift1": {
    "S (m)": 10.0,
    "Command": "Drift",
    "Length (m)": 0.5,
    "Aperture Type": "off"
}

With circular aperture checking:

"Drift2": {
    "S (m)": 10.5,
    "Command": "Drift",
    "Length (m)": 0.3,
    "Aperture Type": "circle",
    "Aperture Value": [0.05]
}

With rectangular aperture checking:

"Drift3": {
    "S (m)": 11.0,
    "Command": "Drift",
    "Length (m)": 0.2,
    "Aperture Type": "rectangle",
    "Aperture Value": [0.06, 0.04]
}

Application Scenarios

  • Beamline connection: Provides free drift space between magnet elements, the most commonly used beamline element

  • Dispersion measurement: Sets up a drift section after a dipole magnet to measure beam momentum spread using the dispersion effect

  • Beam transport: Transports the beam in injection and extraction lines without applying any field

  • Aperture checking: Sets up drifts with aperture checking at key positions to monitor beam loss