10#ifndef IMPACTX_SHORTRF_H
11#define IMPACTX_SHORTRF_H
39 static constexpr auto type =
"ShortRF";
76 using BeamOptic::operator();
90 Alignment::compute_constants(refpart);
102 m_bgf = std::sqrt(powi<2>(ptf_ref) - 1.0_prt);
103 m_bgi = std::sqrt(powi<2>(pti_ref) - 1.0_prt);
120 template<
typename T_Real=amrex::ParticleReal,
typename T_IdCpu=u
int64_t>
175 using Thin::operator();
205 refpart.pt = pt -
m_V * std::cos(phi);
218 refpart.px = px*bgf/bgi;
219 refpart.py = py*bgf/bgi;
220 refpart.pz = pz*bgf/bgi;
225 using LinearTransport::operator();
258 R(6,5) = k*
m_V*std::sin(phi)/bgf;
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
#define IMPACTX_PUSH_EXTERN_TEMPLATE(ElementType)
Definition PushAll.H:78
T_ParticleType ParticleType
amrex_particle_real ParticleReal
constexpr T powi(T x) noexcept
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > Map6x6
Definition CovarianceMatrix.H:20
static constexpr __host__ __device__ SmallMatrix< T, NRows, NCols, ORDER, StartIndex > Identity() noexcept
Definition ReferenceParticle.H:33
amrex::ParticleReal pt
energy, normalized by rest energy
Definition ReferenceParticle.H:42
void compute_constants(RefPart const &refpart)
Definition ShortRF.H:85
amrex::ParticleReal m_V_cos_phi
Definition ShortRF.H:272
amrex::ParticleReal m_V
Definition ShortRF.H:265
ShortRF(amrex::ParticleReal V, amrex::ParticleReal freq, amrex::ParticleReal phase=DEFAULT_phase, amrex::ParticleReal dx=DEFAULT_dx, amrex::ParticleReal dy=DEFAULT_dy, amrex::ParticleReal rotation_degree=DEFAULT_rotation_degree, std::optional< std::string > name=DEFAULT_name)
Definition ShortRF.H:57
static constexpr auto type
Definition ShortRF.H:39
ImpactXParticleContainer::ParticleType PType
Definition ShortRF.H:40
amrex::ParticleReal m_freq
normalized (max) RF voltage drop.
Definition ShortRF.H:266
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(T_Real const &AMREX_RESTRICT x, T_Real const &AMREX_RESTRICT y, T_Real const &AMREX_RESTRICT t, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py, T_Real &AMREX_RESTRICT pt, T_IdCpu const &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition ShortRF.H:122
void reverse()
Definition ShortRF.H:73
amrex::ParticleReal m_phase
RF frequency in Hz.
Definition ShortRF.H:267
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition ShortRF.H:234
amrex::ParticleReal m_bgf
Definition ShortRF.H:272
static constexpr amrex::ParticleReal DEFAULT_phase
Definition ShortRF.H:42
amrex::ParticleReal m_phi
Definition ShortRF.H:272
amrex::ParticleReal m_k
reference RF phase in degrees.
Definition ShortRF.H:272
amrex::ParticleReal m_bgi
Definition ShortRF.H:272
Definition alignment.H:29
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dy() const
Definition alignment.H:193
static constexpr amrex::ParticleReal DEFAULT_dy
Definition alignment.H:34
static constexpr amrex::ParticleReal DEFAULT_dx
Definition alignment.H:33
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dx() const
Definition alignment.H:183
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 rotate_aligned_map(Map6x6 const &R) const
Definition alignment.H:267
Alignment(amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree)
Definition alignment.H:43
static constexpr amrex::ParticleReal DEFAULT_rotation_degree
Definition alignment.H:35
Definition beamoptic.H:567
Definition lineartransport.H:50
static constexpr std::nullopt_t DEFAULT_name
Definition named.H:30
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition named.H:59
AMREX_FORCE_INLINE std::string name() const
Definition named.H:124
Definition nofinalize.H:22