Add differential cross-section in linear Breit Wheeler process - #6141
Merged
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
removed double ERROR print Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com>
for more information, see https://pre-commit.ci
…o photon_photon_collisions
for more information, see https://pre-commit.ci
E_coll is an amrex::ParticleReal, so E_coll/2 triggers the usual arithmetic conversions: the int literal 2 is converted to ParticleReal and it results in ParticleReal division. There's no integer division hazard (that would require both operands to be integral), and no double promotion either (that would happen with E_coll/2.0, where the double literal would widen a float ParticleReal). Since the literal is an int, the existing code was already precision-correct.
EZoni
added a commit
that referenced
this pull request
Aug 25, 2026
## Summary Small refactor of the linear Breit-Wheeler cross-section and utility headers split from #6141, to keep that PR as focused as possible. Replaces the local `pow2`/`pow4` lambdas with `amrex::Math::powi<N>`, and the auxiliary `one_half_pr`/`one_pr` constants with the `0.5_prt`/`1._prt` literals. There should be no change in behavior and no benchmark updates.
EZoni
reviewed
Aug 25, 2026
EZoni
reviewed
Aug 25, 2026
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Member
|
Here's a list of further comments that I propose we review and address, if necessary, in follow-up PRs: review_6141.md. |
EZoni
approved these changes
Sep 3, 2026
Member
Now tracked in #7241. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Until now, electron-positron pairs produced by the linear Breit-Wheeler module were emitted isotropically in the center-of-momentum (CM) frame. This PR samples the polar angle of the products from the Breit-Wheeler differential cross section, keeping the azimuthal angle uniform. The total cross section, and hence the pair
production rate, is unchanged.
Kinematics
For two colliding macrophotons with lab momenta$\boldsymbol{p}_1$ , $\boldsymbol{p}_2$ colliding at an angle $\psi$ , the energy of each photon in the CM frame follows from the Lorentz invariance of the total four-momentum norm,
By symmetry, each produced lepton carries energy$E^*$ in the CM frame, so its Lorentz factor, velocity and momentum are
Differential cross section
Define$x = \cos\theta$ the polar angle of the outgoing leptons with respect to the collision axis in the CM frame. The differential cross-section is (Berestetskii, Lifshitz & Pitaevskii, Quantum Electrodynamics, paragraph 86; see also Ribeyre et al., Plasma Phys. Control. Fusion 60, 104001, 2018):
This is integrated analytically,
and satisfies
which is the total cross section already implemented in$\int_{-1}^{1} (d\sigma/dx), dx = \sigma_{\rm tot}$ (see the corresponding code). This consistency is asserted in the new test.
LinearBreitWheelerCrossSection, i.e.Sampling
The polar angle is drawn by inverse-transform sampling of the exact cumulative distribution. To resolve the strong forward/backward peaking at high energy, the sampling is performed in the transformed variable
in which$1 - \beta^2 x^2 = \mathrm{sech}^2 y$ and the (unnormalized) density and its integral read
Since$g$ is even, $\tilde F$ is odd and the CDF is simply
For$u \sim \mathcal{U}[0,1)$ , the equation $\mathrm{CDF}(y) - u = 0$ is solved with a safeguarded Newton-Raphson iteration (analytic derivative $g/(2\tilde F(y_{\max}))$ , bisection fallback whenever the Newton step leaves the min-max range, at most 20 iterations, tolerance $32 \ \epsilon$ ). Finally
Numerical robustness at high energy
For$\gamma^\star \gg 1$ the distribution collapses towards $|\cos\theta| \to 1$ and a naive evaluation loses all precision. This is avoided by computing $1-\beta^2 = (\gamma^\star)^{-2}$ directly (no subtractive cancellation), $\beta = \tanh(\mathrm{arccosh} \ \gamma^\star)$ , and by sampling in $y$ rather than in $\cos\theta$ .
Reconstruction of the momenta
The polar angle is measured from the collision axis, defined as the direction of the first photon in the CM frame. With the CM velocity$\boldsymbol{v}_c = c \ (\boldsymbol{p}_1+\boldsymbol{p}_2)/(|\boldsymbol{p}_1|+|\boldsymbol{p}_2|)$ and $\gamma_c = (1-v_c^2/c^2)^{-1/2}$ ,
An orthonormal triad$(\boldsymbol{e}_1, \boldsymbol{e}_2, \hat{\boldsymbol{n}})$ is built around $\hat{\boldsymbol{n}}$ and the momentum of the first product in the CM frame is
which is then boosted back to the lab frame with the inverse transformation (Eq. 13 of F. Perez et al., Phys. Plasmas 19, 083104, 2012). The momentum of the second product follows from total momentum conservation, as before. Note that$d\sigma/d\cos\theta$ is even in $\cos\theta$ , so the result is independent of which of the two photons defines the collision axis.
Tests
Two new tests,$x$ with $u_x = \pm 2.8$ and $u_x = \pm 10^6$ (in units of
$m_e c$ ), so that the CM frame coincides with the lab frame.
test_3d_linear_breit_wheeler_angularandtest_3d_linear_breit_wheeler_angular_relativistic, collide two monoenergetic photon populations head-on alonganalysis_angular.pychecks: