Skip to content

[WIP] Linear Transport: Centroid Tracking#1409

Draft
ax3l wants to merge 2 commits into
BLAST-ImpactX:developmentfrom
ax3l:linmap-multipole
Draft

[WIP] Linear Transport: Centroid Tracking#1409
ax3l wants to merge 2 commits into
BLAST-ImpactX:developmentfrom
ax3l:linmap-multipole

Conversation

@ax3l
Copy link
Copy Markdown
Member

@ax3l ax3l commented Apr 19, 2026

Add a centroid 6D phase vector to our envelope tracking logic.

The goal is to support off-axis envelope propagation and feed-down effects in linear optics from misalignment (translation & rotation) and off-axis reference particle.

This lets transfer maps, and currently developed map traces and Twiss optics see the same feed-down effects that particles experience through the element.

Reusable helper methods are added to the mixin::Alignment class that we can use in other elements as well.

Multipole (Illustrative Example)

Higher-order thin multipoles contribute the correct linear focusing when the reference orbit is off axis or the element is misaligned, including the normal/skew mixing from transverse roll.

Adds regression coverage for sextupole feed-down (e.g. Quads kicks) and periodic lattice optics.

@ax3l ax3l requested review from cemitch99 and egstern April 19, 2026 05:02
@ax3l ax3l added component: elements Elements/maps/external fields tracking: envelope labels Apr 19, 2026
Comment thread src/elements/Multipole.H
@ax3l ax3l force-pushed the linmap-multipole branch from c1d6bb6 to de1c983 Compare April 19, 2026 06:15
Comment thread src/python/impactx/twiss_lattice.py Fixed
@ax3l ax3l force-pushed the linmap-multipole branch from de1c983 to d1d5d03 Compare April 19, 2026 06:29
@ax3l
Copy link
Copy Markdown
Member Author

ax3l commented Apr 19, 2026

While implementing the feed-down logic, I think I stumbled on a convention-caused issue that we might want to check in ImpactX. Correct me if I got something wrong in my assumptions.

  1. We want to use one (ideal?) reference particle update implementation for all three tracking modes, otherwise this gets very confusing.
  2. By convention so far, we model all element alignment/rotation errors on the beam/map, not modifying the reference particle.

For the current implementation in this PR regarding feed-down effects in the linear maps from misalignment (something that MAD-X and Xsuite and others can model), we thus lack the capability to model ideal dipole kicks from an off-axis higher-order multipoles (or anything that depends on propagating the constant orbit offset): The current 6x6 map only carries linear transport maps (Jacobians), not orbit offsets.

  • we do capture the linear focusing/coupling effect around the current reference orbit
  • we do not propagate the orbit offset caused by the constant kick to later elements

With this PR we can model:

  • Local feed-down at the current reference orbit.
  • Normal/skew mixing from roll.
  • Misalignment/rotation effects in the element’s own linearized map.
  • Composition of those local linear maps through the lattice.

There are probably a few ways forward, but we need to discuss them:

a) accept & document the limitations of what feed-down effects we can model
b) flip the alignment & rotation generally in the reference particle: possible but not always what people want when they search for an ideal reference orbit -- also the most intrusive change
c) evolve the reference particle (using the ideal kicks) for envelope tracking

Add the linear transport map for the thin multipole. The implementation
supports feed-down in linear optics from misalignment and off-axis
reference particle.

Higher-order thin multipoles contribute the correct linear focusing
when the reference orbit is off axis or the element is misaligned,
including the normal/skew mixing from transverse roll.

This lets transfer maps, and currently developed map traces and Twiss
optics see the same feed-down effects that particles experience through
the element, with regression coverage for sextupole feed-down and
periodic lattice optics.

Two reusable helper methods are added to the `mixin::Alignment` class
that we can use in other elements as well.
@ax3l ax3l force-pushed the linmap-multipole branch from 1a98838 to 7ac6b9c Compare April 19, 2026 08:38
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 19, 2026

Merging this PR will not alter performance

✅ 37 untouched benchmarks


Comparing ax3l:linmap-multipole (7ac6b9c) with development (de02c77)

Open in CodSpeed

@ax3l ax3l changed the title Linear Transport: Multipole [WIP] Linear Transport: Feed-Down from Misalignments Apr 19, 2026
@ax3l ax3l force-pushed the development branch 2 times, most recently from 9a1e4af to fa61eba Compare April 20, 2026 04:08
@ax3l ax3l removed request for cemitch99 and egstern April 21, 2026 21:52
@ax3l ax3l marked this pull request as draft April 21, 2026 21:52
@ax3l ax3l changed the title [WIP] Linear Transport: Feed-Down from Misalignments [WIP] Linear Transport: Centroid Tracking Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: elements Elements/maps/external fields tracking: envelope

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants