10#ifndef IMPACTX_DISTRIBUTION_KVDIST
11#define IMPACTX_DISTRIBUTION_KVDIST
42 amrex::ParticleReal lambdax,
43 amrex::ParticleReal lambday,
44 amrex::ParticleReal lambdat,
45 amrex::ParticleReal lambdapx,
46 amrex::ParticleReal lambdapy,
47 amrex::ParticleReal lambdapt,
48 amrex::ParticleReal muxpx=0.0,
49 amrex::ParticleReal muypy=0.0,
50 amrex::ParticleReal mutpt=0.0,
51 amrex::ParticleReal meanx=0.0,
52 amrex::ParticleReal meany=0.0,
53 amrex::ParticleReal meant=0.0,
54 amrex::ParticleReal meanpx=0.0,
55 amrex::ParticleReal meanpy=0.0,
56 amrex::ParticleReal meanpt=0.0,
57 amrex::ParticleReal dispx=0.0,
58 amrex::ParticleReal disppx=0.0,
59 amrex::ParticleReal dispy=0.0,
60 amrex::ParticleReal disppy=0.0
76 void initialize ([[maybe_unused]] amrex::ParticleReal bunch_charge, [[maybe_unused]]
RefPart const & ref)
110 using namespace amrex::literals;
114 amrex::ParticleReal
v,phi,r,beta,p,u1,u2,ln1;
115 amrex::ParticleReal root,a1,a2;
122 x = r * std::cos(phi);
123 y = r * std::sin(phi);
127 beta = 2_prt*pi*beta;
128 p = std::sqrt(1_prt-powi<2>(r));
129 px = p * std::cos(beta);
130 py = p * std::sin(beta);
134 t = 2.0_prt*(
t-0.5_prt);
137 ln1 = std::sqrt(-2_prt*std::log(u1));
138 pt = ln1 * std::cos(2_prt*pi*u2);
141 amrex::ParticleReal
const c = std::sqrt(3.0_prt);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
static constexpr amrex::Real pi
constexpr T powi(T x) noexcept
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
Definition ReferenceParticle.H:31
void initialize(amrex::ParticleReal bunch_charge, RefPart const &ref)
Definition KVdist.H:76
amrex::ParticleReal m_disppx
Definition KVdist.H:186
amrex::ParticleReal m_meant
Definition KVdist.H:184
amrex::ParticleReal m_lambdaPt
Definition KVdist.H:182
amrex::ParticleReal m_dispx
momentum coordinates of centroid offset
Definition KVdist.H:186
amrex::ParticleReal m_lambdaY
Definition KVdist.H:181
amrex::ParticleReal m_lambdaT
Definition KVdist.H:181
amrex::ParticleReal m_mutpt
Definition KVdist.H:183
amrex::ParticleReal m_lambdaX
Definition KVdist.H:181
void finalize()
Definition KVdist.H:85
amrex::ParticleReal m_meanpt
Definition KVdist.H:185
amrex::ParticleReal m_disppy
Definition KVdist.H:186
amrex::ParticleReal m_meany
Definition KVdist.H:184
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT t, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py, amrex::ParticleReal &AMREX_RESTRICT pt, amrex::RandomEngine const &engine) const
Definition KVdist.H:100
amrex::ParticleReal m_muxpx
related momentum axis intercepts of the phase space ellipse
Definition KVdist.H:183
amrex::ParticleReal m_meanpx
spatial coordinates of centroid offset
Definition KVdist.H:185
KVdist(amrex::ParticleReal lambdax, amrex::ParticleReal lambday, amrex::ParticleReal lambdat, amrex::ParticleReal lambdapx, amrex::ParticleReal lambdapy, amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0, amrex::ParticleReal meanx=0.0, amrex::ParticleReal meany=0.0, amrex::ParticleReal meant=0.0, amrex::ParticleReal meanpx=0.0, amrex::ParticleReal meanpy=0.0, amrex::ParticleReal meanpt=0.0, amrex::ParticleReal dispx=0.0, amrex::ParticleReal disppx=0.0, amrex::ParticleReal dispy=0.0, amrex::ParticleReal disppy=0.0)
Definition KVdist.H:41
amrex::ParticleReal m_lambdaPx
related position axis intercepts (length) of the phase space ellipse
Definition KVdist.H:182
amrex::ParticleReal m_muypy
Definition KVdist.H:183
amrex::ParticleReal m_lambdaPy
Definition KVdist.H:182
amrex::ParticleReal m_dispy
Definition KVdist.H:186
amrex::ParticleReal m_meanpy
Definition KVdist.H:185
amrex::ParticleReal m_meanx
correlation length-momentum
Definition KVdist.H:184