10#ifndef IMPACTX_DISTRIBUTION_SEMIGAUSSIAN
11#define IMPACTX_DISTRIBUTION_SEMIGAUSSIAN
41 amrex::ParticleReal lambdax,
42 amrex::ParticleReal lambday,
43 amrex::ParticleReal lambdat,
44 amrex::ParticleReal lambdapx,
45 amrex::ParticleReal lambdapy,
46 amrex::ParticleReal lambdapt,
47 amrex::ParticleReal muxpx=0.0,
48 amrex::ParticleReal muypy=0.0,
49 amrex::ParticleReal mutpt=0.0,
50 amrex::ParticleReal meanx=0.0,
51 amrex::ParticleReal meany=0.0,
52 amrex::ParticleReal meant=0.0,
53 amrex::ParticleReal meanpx=0.0,
54 amrex::ParticleReal meanpy=0.0,
55 amrex::ParticleReal meanpt=0.0,
56 amrex::ParticleReal dispx=0.0,
57 amrex::ParticleReal disppx=0.0,
58 amrex::ParticleReal dispy=0.0,
59 amrex::ParticleReal disppy=0.0
75 void initialize ([[maybe_unused]] amrex::ParticleReal bunch_charge, [[maybe_unused]]
RefPart const & ref)
109 using namespace amrex::literals;
112 amrex::ParticleReal ln1,u1,u2;
113 amrex::ParticleReal root,a1,a2;
114 amrex::ParticleReal phi,
v,r;
122 x = r * std::cos(phi);
123 y = r * std::sin(phi);
125 t = 2_prt*(
t-0.5_prt);
128 amrex::ParticleReal
const c = std::sqrt(3.0_prt);
137 ln1 = std::sqrt(-2_prt*std::log(u1));
138 px = ln1 * std::cos(2_prt*pi*u2);
139 py = ln1 * std::sin(2_prt*pi*u2);
143 ln1 = std::sqrt(-2_prt*std::log(u1));
144 pt = ln1 * std::cos(2_prt*pi*u2);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
static constexpr amrex::Real pi
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
Definition ReferenceParticle.H:31
amrex::ParticleReal m_lambdaPx
related position axis intercepts (length) of the phase space ellipse
Definition Semigaussian.H:179
amrex::ParticleReal m_mutpt
Definition Semigaussian.H:180
amrex::ParticleReal m_meanpt
Definition Semigaussian.H:182
amrex::ParticleReal m_meany
Definition Semigaussian.H:181
amrex::ParticleReal m_meant
Definition Semigaussian.H:181
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 Semigaussian.H:99
void finalize()
Definition Semigaussian.H:84
amrex::ParticleReal m_lambdaT
Definition Semigaussian.H:178
amrex::ParticleReal m_dispy
Definition Semigaussian.H:183
Semigaussian(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 Semigaussian.H:40
amrex::ParticleReal m_muypy
Definition Semigaussian.H:180
amrex::ParticleReal m_meanpy
Definition Semigaussian.H:182
amrex::ParticleReal m_lambdaPt
Definition Semigaussian.H:179
amrex::ParticleReal m_meanpx
spatial coordinates of centroid offset
Definition Semigaussian.H:182
amrex::ParticleReal m_lambdaPy
Definition Semigaussian.H:179
amrex::ParticleReal m_disppx
Definition Semigaussian.H:183
void initialize(amrex::ParticleReal bunch_charge, RefPart const &ref)
Definition Semigaussian.H:75
amrex::ParticleReal m_disppy
Definition Semigaussian.H:183
amrex::ParticleReal m_meanx
correlation length-momentum
Definition Semigaussian.H:181
amrex::ParticleReal m_lambdaY
Definition Semigaussian.H:178
amrex::ParticleReal m_lambdaX
Definition Semigaussian.H:178
amrex::ParticleReal m_muxpx
related momentum axis intercepts of the phase space ellipse
Definition Semigaussian.H:180
amrex::ParticleReal m_dispx
momentum coordinates of centroid offset
Definition Semigaussian.H:183