|
ImpactX
|
#include <alignment.H>
Public Attributes | |
| amrex::ParticleReal | m_dx = 0 |
| amrex::ParticleReal | m_dy = 0 |
| horizontal translation error [m] | |
| amrex::ParticleReal | m_rotation = 0 |
| vertical translation error [m] | |
Static Public Attributes | |
| static constexpr amrex::ParticleReal | degree2rad |
Private Attributes | |
| amrex::ParticleReal | m_sin_rotation |
| rotation error in the transverse plane [rad] | |
| amrex::ParticleReal | m_cos_rotation |
| std::sin(m_rotation) | |
This is a helper class for lattice elements with horizontal/vertical alignment errors
|
inline |
A finite-length element
| dx | horizontal translation error in m |
| dy | vertical translation error in m |
| rotation_degree | rotation error in the transverse plane [degrees] |
|
default |
|
default |
|
default |
|
default |
|
inline |
Compute and cache the constants for the push.
In particular, used to pre-compute and cache variables that are independent of the individually tracked particle.
| refpart | reference particle |
|
inline |
Horizontal translation error
|
inline |
Vertical translation error
|
inline |
Whether the element has any (nonzero) translation or rotation error.
Used to unswitch the alignment shift/rotate out of the per-particle push: a perfectly aligned element skips the (otherwise identity) transforms. Cheap to evaluate and called once per push launch (not per particle), so it reads the current alignment errors directly instead of caching.
|
inline |
Apply the transverse rotation (roll) alignment error to an element's intrinsic linear transport map.
Elements call this on their own transport_map result just before returning, so that linear-optics consumers (transfer_map, map_trace, envelope tracking) see the same roll that the particle push applies via
| R | the element's intrinsic (zero-rotation) 6x6 transport map |
A * R * A^T (see
|
inline |
Rotate a transverse vector into the alignment error frame
The
| [in,out] | sx | horizontal spin/vector component |
| [in,out] | sy | vertical spin/vector component |
|
inline |
Rotate a transverse vector out of the alignment error frame
The
| [in,out] | sx | horizontal spin/vector component |
| [in,out] | sy | vertical spin/vector component |
|
inline |
rotation error in the transverse plane
|
inline |
6x6 linear map of the transverse rotation (roll) alignment error.
Returns the lab-from-element rotation A = Rot(theta) acting on the (x, y) and (px, py) sub-blocks and the identity on (t, pt). It is the linear-map analogue of
sin/cos are evaluated from m_rotation directly rather than the
|
inline |
Shift the particle into the alignment error frame
The
| [in,out] | x | horizontal position relative to reference particle |
| [in,out] | y | vertical position relative to reference particle |
| [in,out] | px | horizontal momentum relative to reference particle |
| [in,out] | py | vertical momentum relative to reference particle |
|
inline |
Shift the particle out of the alignment error frame
The
| [in,out] | x | horizontal position relative to reference particle |
| [in,out] | y | vertical position relative to reference particle |
| [in,out] | px | horizontal momentum relative to reference particle |
| [in,out] | py | vertical momentum relative to reference particle |
|
staticconstexpr |
|
private |
std::sin(m_rotation)
| amrex::ParticleReal impactx::elements::mixin::Alignment::m_dx = 0 |
| amrex::ParticleReal impactx::elements::mixin::Alignment::m_dy = 0 |
horizontal translation error [m]
| amrex::ParticleReal impactx::elements::mixin::Alignment::m_rotation = 0 |
vertical translation error [m]
|
private |
rotation error in the transverse plane [rad]