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.pyClass name:
Drift(inherits fromCommand)Registration name:
driftCore 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:
The longitudinal momentum component (accounting for the projection of transverse momentum) is:
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\):
Coordinate Update
The particle coordinates in the drift are updated as:
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 |
|---|---|---|---|---|
|
|
float |
m |
Longitudinal position of the element in the beamline |
|
|
float |
m |
Element length (must be \(\ge 0\)) |
|
|
str |
Element name (automatically filled from the key name of the sequence JSON) |
|
|
|
str |
Aperture type (default |
|
|
|
list |
Aperture parameter values (default |
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