1. Scope

This note describes the minimum Breit-Wheeler physics model needed for the next OPALX benchmark.

Breit-Wheeler scattering

We follow closely the CAIN ansatz i.e. manual and source code.

The goal is not yet a full tracking implementation. The immediate target is a host-side Monte Carlo and deterministic benchmark path that reproduces CAIN for the process

\[\gamma + \gamma \rightarrow e^- + e^+ .\]

The first benchmark will follow the same strategy as the linear ICS work:

  • start from a fixed-geometry, unpolarized, linear process;

  • implement the core event kernel in;

  • validate deterministic and sampled spectra against CAIN;

  • delay bunch population and tracker integration until the kernel is trusted.

2. Linear Breit-Wheeler Kinematics in CAIN

CAIN’s linear generator LNBWGN uses two incoming photons:

  • a laser photon with energy \(W_1\) and direction \(\mathbf{n}_1\),

  • a high-energy photon with energy \(W_2\) and direction \(\mathbf{n}_2\).

Note: in a collider setup the laser photon is also a high-energy photon.

The opening-angle dependence enters through

\[Z_0 = \mathbf{n}_1 \cdot \mathbf{n}_2 .\]

The two-photon invariant used in CAIN is

\[S_0 = 2 W_1 W_2 (1 - Z_0) . \label{eq:bw-cain-s0}\]

Pair creation is kinematically allowed only if

\[S_0 \ge 4 m_e^2 . \label{eq:bw-threshold}\]

This threshold appears directly in LNBWGN:

S0=2*W1*W2*(1-Z0)
IF (4*M**2.GT.S0) GOTO 900

In a head-on geometry, \(Z_0 = -1\), so the threshold reduces to

\[W_1 W_2 \ge m_e^2 . \label{eq:bw-headon-threshold}\]

This is the cleanest geometry for the first benchmark.

CAIN constructs the center-of-momentum boost velocity from the two incoming photon momenta and then samples the final-state scattering variables in that frame.

The code introduces a transformed photon energy \(W\) and several auxiliary variables:

\[W = \gamma W_1 V_R, \qquad X = \frac{\sqrt{W^2 - m_e^2}}{W}, \qquad X_1 = \frac{m_e^2}{W^2 + W\sqrt{W^2 - m_e^2}} . \label{eq:bw-cain-aux}\]

The random variable \(Y\) is used to generate the CM scattering angle through

\[\cos\theta = 1 - 2Y . \label{eq:bw-cain-costh}\]

The resulting Mandelstam-like combinations in the CAIN implementation are

\[s_m = \frac{2m_e^2}{(1+X)X_1}\left[X(1-2Y)-1\right], \qquad u_m = -\frac{2m_e^2}{(1+X)X_1}\left[X(1-2Y)+1\right] . \label{eq:bw-cain-sm-um}\]

CAIN then builds the angular kernel from

\[\cos\theta_1 = 1 + 2m_e^2\left(\frac{1}{u_m} + \frac{1}{s_m}\right) \label{eq:bw-cain-costh1}\]

and

\[D = -\left(\frac{s_m}{u_m} + \frac{u_m}{s_m}\right) . \label{eq:bw-cain-d}\]

For unpolarized incoming photons, the acceptance weight reduces to the unpolarized part of the full CAIN expression.

3. OPALX Validation Path

Deterministic physics helper
  • ✓ add Physics::LinearBreitWheeler

  • ✓ implement threshold and invariant helpers

  • ✓ implement deterministic spectra from the linear kernel

Host-only sampled event generator
  • ✓ fixed seed through Options::seed

  • ✓ return one sampled electron-positron pair per accepted event

  • no tracker, no photon bunch population, no GPU path yet

CAIN comparison
  • ✓ generate a CAIN reference deck in the same style as the linear-Compton notes

  • ✓ compare OPALX and CAIN histograms first in 1D, later in 2D

4. Implemented OPALX Benchmark

The current OPALX implementation lives on the laser-element-1 branch. The relevant files are:

The benchmark remains deliberately narrow:

  • no tracker integration,

  • no bunch population,

  • no GPU path.

The validated observables are now:

  • ✓ electron energy spectrum,

  • ✓ positron energy spectrum,

  • ✓ electron angle spectrum,

  • ✓ positron angle spectrum,

  • ✓ joint \(E\) vs. \(\theta\) spectrum for the electron,

  • ✓ joint \(E\) vs. \(\theta\) spectrum for the positron.

Finite incoming-photon-beam benchmark:

  • ✓ electron energy spectrum with Gaussian photon-beam divergence,

  • ✓ positron energy spectrum with Gaussian photon-beam divergence,

  • ✓ electron angle spectrum with Gaussian photon-beam divergence,

  • ✓ positron angle spectrum with Gaussian photon-beam divergence.

The finite-photon-beam extension is still intentionally narrow:

  • the high-energy photon beam is sampled only in momentum space,

  • the reference beam axis is the head-on direction,

  • the angular spread is Gaussian with \(\sigma_{\theta x} = \sigma_{\theta y} = 1\,\mathrm{mrad}\),

  • the current published benchmark keeps the photon-beam relative energy spread at zero,

  • there is still no transverse position spread or laser-overlap weighting in the OPALX benchmark path.

4.1. Local Kernel Tests

The current OPALX implementation now exposes the same proposal-coordinate view used by the CAIN rejection sampler. Two helper functions are validated directly in the unit tests:

  • the map from the proposal variable \(z \in [-1,1\)] to the center-of-momentum scattering cosine \(\cos\theta\),

  • the corresponding unpolarized local angular weight in the same proposal coordinate.

This gives a direct check of the differential kernel itself, not only of its integrated or sampled consequences. The pointwise tests use an independent reference implementation of the CAIN-aligned auxiliary variables \(Y(z)\), \(s_m\), \(u_m\), and the local acceptance weight.

4.2. Finite-Photon-Beam Folding Algorithm

For the finite incoming-photon-beam benchmark, OPALX keeps the laser photon fixed and samples only the high-energy photon beam. For each event:

  1. a high-energy photon direction is drawn from a Gaussian angular spread around the head-on reference axis,

  2. the photon energy is either kept fixed or, in the extended code path, drawn from a Gaussian relative energy spread,

  3. a per-event linear Breit-Wheeler sampling kernel is built from that sampled incoming photon state and the fixed laser photon,

  4. the electron-positron event is generated with the same host-side rejection sampler used in the fixed-geometry benchmark,

  5. the requested observable is histogrammed and compared to the matching CAIN reference.

The present published finite-photon-beam result validates only the divergence broadening. The next benchmark extensions are:

  • joint \(E\)--\(\theta\) maps for the finite incoming photon beam,

  • finite-photon-beam benchmarks with nonzero photon-beam relative energy spread.

5. Results of Code Comparison

The current CAIN-backed OPALX benchmark compares the linear unpolarized process LASERQED BREITWHEELER, NPH=0 for a weak-field setup with \(\xi = 0.25\). The benchmark observables are:

  • electron energy spectrum,

  • positron energy spectrum,

  • electron angle spectrum,

  • positron angle spectrum,

  • joint \(E\) vs. \(\theta\) maps for electron and positron,

  • and, in the extended benchmark, the same 1D observables for a finite incoming photon beam.

The first fixed-geometry comparison point uses:

  • head-on geometry,

  • \(E_\gamma = 0.5\,\mathrm{GeV}\),

  • \(\lambda_L = 1\,\mathrm{nm}\),

  • unpolarized photons.

With the current OPALX Monte Carlo benchmark and the stored CAIN references, the agreement is already tight.

Electron:

  • ✓ energy spectrum: mean-energy difference about 0.09%, \(L_1\) about 0.0179

  • ✓ angle spectrum: mean-angle difference about 0.02%, \(L_1\) about 0.0176

  • ✓ joint \(E\)--\(\theta\) map: mean-energy difference about 0.10%, mean-angle difference about 0.02%, \(L_1\) about 0.0281

Positron:

  • ✓ energy spectrum: mean-energy difference about 0.10%, \(L_1\) about 0.0160

  • ✓ angle spectrum: mean-angle difference about 0.08%, \(L_1\) about 0.0173

  • ✓ joint \(E\)--\(\theta\) map: mean-energy difference about 0.10%, mean-angle difference about 0.08%, \(L_1\) about 0.0266

So the present benchmark already supports both 1D and 2D CAIN-backed regression coverage for the linear unpolarized kernel.

Finite incoming-photon-beam point:

  • head-on reference geometry,

  • \(E_\gamma = 0.5\,\mathrm{GeV}\),

  • \(\lambda_L = 1\,\mathrm{nm}\),

  • Gaussian photon-beam divergence with \(\sigma_{\theta x} = \sigma_{\theta y} = 1\,\mathrm{mrad}\),

  • zero photon-beam energy spread.

Finite-photon-beam agreement:

Electron:

  • ✓ energy spectrum: mean-energy difference about 0.12%, \(L_1\) about 0.0536

  • ✓ angle spectrum: mean-angle difference about 2.49%, \(L_1\) about 0.0784

  • ✓ joint \(E\)--\(\theta\) map: mean-energy difference about 0.11%, mean-angle difference about 2.77%, \(L_1\) about 0.4416

Positron:

  • ✓ energy spectrum: mean-energy difference about 0.13%, \(L_1\) about 0.0535

  • ✓ angle spectrum: mean-angle difference about 2.89%, \(L_1\) about 0.0696

  • ✓ joint \(E\)--\(\theta\) map: mean-energy difference about 0.07%, mean-angle difference about 2.58%, \(L_1\) about 0.4230

Finite-photon-beam plus energy-spread agreement:

Electron:

  • ✓ energy spectrum with photon-beam relative energy spread 1.0e-3: mean-energy difference about 0.55%, \(L_1\) about 0.0573

  • ✓ angle spectrum with photon-beam relative energy spread 1.0e-3: mean-angle difference about 2.36%, \(L_1\) about 0.0822

Positron:

  • ✓ energy spectrum with photon-beam relative energy spread 1.0e-3: mean-energy difference about 0.55%, \(L_1\) about 0.0601

  • ✓ angle spectrum with photon-beam relative energy spread 1.0e-3: mean-angle difference about 2.59%, \(L_1\) about 0.0721

The finite-photon-beam angle benchmarks are intentionally windowed to \(0 \le \theta \le 6\,\mathrm{mrad}\), so the stored CAIN angular histograms do not integrate to exactly one inside that clipped range.

linear breit wheeler head on electron energy comparison
Figure 1. Fixed-geometry head-on outgoing electron energy spectrum.
linear breit wheeler head on electron theta comparison
Figure 2. Fixed-geometry head-on outgoing electron polar-angle spectrum.
linear breit wheeler head on electron joint comparison
Figure 3. Fixed-geometry head-on outgoing electron joint Ee---θe- spectrum.
linear breit wheeler finite photon beam electron energy comparison
Figure 4. Finite-photon-beam outgoing electron energy spectrum.
linear breit wheeler finite photon beam electron theta comparison
Figure 5. Finite-photon-beam outgoing electron polar-angle spectrum.
linear breit wheeler finite photon beam electron joint comparison
Figure 6. Finite-photon-beam outgoing electron joint Ee---θe- spectrum.
linear breit wheeler finite photon beam energy spread electron energy comparison
Figure 7. Finite-photon-beam plus energy-spread outgoing electron energy spectrum.
linear breit wheeler finite photon beam energy spread electron theta comparison
Figure 8. Finite-photon-beam plus energy-spread outgoing electron polar-angle spectrum.
linear breit wheeler finite photon beam energy spread electron joint comparison
Figure 9. Finite-photon-beam plus energy-spread outgoing electron joint Ee---θe- spectrum.
linear breit wheeler overlap electron energy comparison
Figure 10. Overlap-restricted outgoing electron energy spectrum.
linear breit wheeler overlap electron theta comparison
Figure 11. Overlap-restricted outgoing electron polar-angle spectrum.
linear breit wheeler head on positron energy comparison
Figure 12. Fixed-geometry head-on outgoing positron energy spectrum.
linear breit wheeler head on positron theta comparison
Figure 13. Fixed-geometry head-on outgoing positron polar-angle spectrum.
linear breit wheeler head on positron joint comparison
Figure 14. Fixed-geometry head-on outgoing positron joint Ee+--θe+ spectrum.
linear breit wheeler finite photon beam positron energy comparison
Figure 15. Finite-photon-beam outgoing positron energy spectrum.
linear breit wheeler finite photon beam positron theta comparison
Figure 16. Finite-photon-beam outgoing positron polar-angle spectrum.
linear breit wheeler finite photon beam positron joint comparison
Figure 17. Finite-photon-beam outgoing positron joint Ee+--θe+ spectrum.
linear breit wheeler finite photon beam energy spread positron energy comparison
Figure 18. Finite-photon-beam plus energy-spread outgoing positron energy spectrum.
linear breit wheeler finite photon beam energy spread positron theta comparison
Figure 19. Finite-photon-beam plus energy-spread outgoing positron polar-angle spectrum.
linear breit wheeler finite photon beam energy spread positron joint comparison
Figure 20. Finite-photon-beam plus energy-spread outgoing positron joint Ee+--θe+ spectrum.
linear breit wheeler overlap positron energy comparison
Figure 21. Overlap-restricted outgoing positron energy spectrum.
linear breit wheeler overlap positron theta comparison
Figure 22. Overlap-restricted outgoing positron polar-angle spectrum.

6. Build and Run

The preferred one-shot workflow is run from the docs tree:

cd ~/git/OPALX-project.github.io/gamma-gamma
./generate-gamma-gamma-results.sh \
  --opalx-build ~/git/opalx-laser/build_openmp

This top-level driver:

  • builds the OPALX gamma-gamma benchmark targets,

  • runs the inverse-Compton and Breit-Wheeler unit/regression suites,

  • regenerates the CAIN and OPALX benchmark data for both notes,

  • republishes the comparison figures, and

  • renders the gamma-gamma note pages.

If only the Breit-Wheeler assets need to be refreshed, use:

cd ~/git/cain
./generate-linear-breit-wheeler-results.sh \
  --opalx-build ~/git/opalx-laser/build_openmp

This script:

  • runs the CAIN decks ~/git/cain/linear-breit-wheeler-head-on.i, ~/git/cain/linear-breit-wheeler-finite-photon-beam.i, ~/git/cain/linear-breit-wheeler-finite-photon-beam-energy-spread.i, and ~/git/cain/linear-breit-wheeler-overlap.i,

  • regenerates the stored CAIN histogram references in ~/git/opalx-laser/unit_tests/Physics/data,

  • runs the OPALX benchmark executable LinearBreitWheelerBenchmark for fixed-geometry, finite-photon-beam, finite-photon-beam-plus-energy-spread, and overlap cases,

  • regenerates the 1D and 2D comparison plots in ~/git/cain/reference-data.

The script expects:

  • a built OPALX benchmark executable in the supplied build directory,

  • a CAIN executable at ~/git/cain/CAIN-build/cain, unless overridden by --cain-bin.

The relevant unit-test targets are:

cmake --build ~/git/opalx-laser/build_openmp \
  --target TestLinearBreitWheeler TestLinearBreitWheelerSpectrum LinearBreitWheelerBenchmark -j4

~/git/opalx-laser/build_openmp/unit_tests/Physics/TestLinearBreitWheeler
~/git/opalx-laser/build_openmp/unit_tests/Physics/TestLinearBreitWheelerSpectrum

7. References

Appendix A: CAIN Structure

CAIN separates Breit-Wheeler physics into three layers.

Input and model selection
  • LASERQED BREITWHEELER is parsed in src/rdlqed.f.

  • NPH = 0 selects the linear Breit-Wheeler model.

  • NPH >= 1 selects the nonlinear model.

Runtime driver
  • The laser-particle loop is handled by src/lsrqedbw.f.

  • Local laser geometry and power density are obtained from LSRGEO.

  • The linear event generator is LNBWGN.

  • The nonlinear event generator is NLBWGN.

  • If an event happens, the produced electron and positron are inserted by LBWEVENT.

Event generation

For the first OPALX benchmark only the linear event kernel is needed.