From 57a2ac2e49bc0e4fb5591bee5a1d6728e19b51ff Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 5 May 2021 20:26:48 +0200 Subject: QED module: use PICSAR function to calculate gamma for photons (#1928) --- .../QEDInternals/BreitWheelerEngineWrapper.H | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H b/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H index 0101a32dd..0a38e37f0 100644 --- a/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H +++ b/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -145,13 +146,19 @@ public: const auto u_norm = std::sqrt(ux*ux + uy*uy + uz*uz); const auto energy = u_norm*m_e*PhysConst::c; + const auto px = m_e*ux; + const auto py = m_e*uy; + const auto pz = m_e*uz; + const auto chi_phot = QedUtils::chi_photon( - m_e*ux, m_e*uy, m_e*uz, ex, ey, ez, bx, by, bz); + px, py, pz, ex, ey, ez, bx, by, bz); //Optical depth is not evolved for photons having less energy than what is //required to generate a pair or a quantum parameter smaller than //m_bw_minimum_chi_phot - const auto gamma_photon = u_norm/PhysConst::c; + const auto gamma_photon = pxr_p::compute_gamma_photon< + amrex::ParticleReal, pxr_p::unit_system::SI>( + px, py, pz); if (gamma_photon < pxr_m::two || chi_phot < m_bw_minimum_chi_phot) return 0; -- cgit v1.2.3