|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Classes | |
| struct | SampledEvent |
| One sampled linear Breit-Wheeler event. More... | |
| struct | SamplingKernel |
| Host-only cached data for repeated linear Breit-Wheeler event sampling. More... | |
Functions | |
| double | photonEnergyFromWavelengthGeV (double wavelength_m) |
| Convert a laser wavelength to a single-photon energy. | |
| double | invariantSGeV2 (double photon1EnergyGeV, double photon2EnergyGeV, const Vector_t< double, 3 > &photon1Direction, const Vector_t< double, 3 > &photon2Direction) |
| Two-photon invariant \(s\) for Breit-Wheeler pair production. | |
| double | thresholdInvariantSGeV2 () |
| Threshold invariant for \(\gamma + \gamma \to e^- + e^+\). | |
| bool | isAboveThreshold (double invariantSGeV2) |
| Check whether pair creation is kinematically allowed. | |
| double | pairBetaCM (double invariantSGeV2) |
| Outgoing lepton speed in the pair center-of-momentum frame. | |
| double | totalCrossSection (double invariantSGeV2) |
| Total unpolarized linear Breit-Wheeler cross section. | |
| double | proposalZToScatteringCosineCM (double invariantSGeV2, double proposalZ) |
| Map CAIN's proposal parameter \(z \in [-1,1]\) to the CM scattering cosine. | |
| double | unpolarizedAngularWeight (double invariantSGeV2, double proposalZ) |
| Evaluate the unpolarized CAIN-aligned angular kernel in proposal coordinates. | |
| SamplingKernel | makeSamplingKernel (double highEnergyPhotonEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &highEnergyDirection, const Vector_t< double, 3 > &laserDirection) |
| Build a cached sampling kernel for repeated sampled events. | |
| std::mt19937_64 | makeHostRandomEngine (std::uint64_t streamIndex=0) |
Build a deterministic host RNG from Options::seed. | |
| SampledEvent | sampleEvent (const SamplingKernel &kernel, std::mt19937_64 &engine) |
| Sample one unpolarized linear Breit-Wheeler event. | |
| struct Physics::LinearBreitWheeler::SampledEvent |
One sampled linear Breit-Wheeler event.
The first benchmark path keeps only the unpolarized kinematics. The event is represented by the center-of-momentum scattering variables and by the final laboratory-frame electron and positron four-momenta.
Definition at line 59 of file LinearBreitWheeler.h.

| Class Members | ||
|---|---|---|
| double | azimuthCM = 0.0 | Center-of-momentum azimuth \(\phi\) in rad. |
| double | electronEnergyLabGeV | Outgoing electron energy in the lab frame [GeV]. |
| Vector_t< double, 3 > | electronMomentumLabGeV | Outgoing electron three-momentum in the lab frame [GeV/c]. |
| double | positronEnergyLabGeV | Outgoing positron energy in the lab frame [GeV]. |
| Vector_t< double, 3 > | positronMomentumLabGeV | Outgoing positron three-momentum in the lab frame [GeV/c]. |
| double | scatteringCosineCM | Center-of-momentum scattering cosine \(\cos\theta\). |
| struct Physics::LinearBreitWheeler::SamplingKernel |
Host-only cached data for repeated linear Breit-Wheeler event sampling.
This structure stores the fixed two-photon geometry used in the first OPALX Breit-Wheeler validation path. It is intentionally scalar and host-side, matching the staged approach already used for linear Compton benchmarking.
The incoming state consists of two photons:
The corresponding two-photon invariant is
\[ s = 2 E_\gamma \omega_L (1 - \hat n_\gamma \cdot \hat n_L). \]
Pair creation is kinematically allowed only for \(s \ge 4 m_e^2\).
Definition at line 32 of file LinearBreitWheeler.h.

| Class Members | ||
|---|---|---|
| double | cmLorentzGamma | Lorentz factor of the CM frame relative to the laboratory frame. |
| Vector_t< double, 3 > | cmVelocity | Dimensionless CM boost velocity. |
| Vector_t< double, 3 > | highEnergyDirection | Normalized incoming high-energy photon direction. |
| double | highEnergyPhotonEnergyGeV | Incoming high-energy photon energy in the lab frame [GeV]. |
| double | invariantSGeV2 = 0.0 | Two-photon invariant \(s\) in GeV^2. |
| Vector_t< double, 3 > | laserDirection | Normalized incoming laser-photon direction. |
| double | laserPhotonEnergyGeV | Incoming laser-photon energy in the lab frame [GeV]. |
| double | pairBetaCM = 0.0 |
Outgoing lepton speed \(\beta = \sqrt{1 - 4m_e^2/s}\) in the pair CM frame. |
| double | rejectionUpperBound = 0.0 |
Conservative rejection-sampling envelope for the unpolarized CAIN-aligned angular kernel. |
| double Physics::LinearBreitWheeler::invariantSGeV2 | ( | double | photon1EnergyGeV, |
| double | photon2EnergyGeV, | ||
| const Vector_t< double, 3 > & | photon1Direction, | ||
| const Vector_t< double, 3 > & | photon2Direction | ||
| ) |
Two-photon invariant \(s\) for Breit-Wheeler pair production.
For two incoming photons with energies \(E_1\) and \(E_2\) and unit directions \(\hat n_1\) and \(\hat n_2\),
\[ s = 2 E_1 E_2 (1 - \hat n_1 \cdot \hat n_2). \]
| photon1EnergyGeV | First photon energy in GeV. |
| photon2EnergyGeV | Second photon energy in GeV. |
| photon1Direction | First photon direction. |
| photon2Direction | Second photon direction. |
Definition at line 152 of file LinearBreitWheeler.cpp.
References dot().
Referenced by makeSamplingKernel(), and TEST().

| bool Physics::LinearBreitWheeler::isAboveThreshold | ( | double | invariantSGeV2 | ) |
Check whether pair creation is kinematically allowed.
| invariantSGeV2 | Two-photon invariant \(s\) in GeV^2. |
Definition at line 166 of file LinearBreitWheeler.cpp.
References thresholdInvariantSGeV2().
Referenced by makeSamplingKernel(), pairBetaCM(), proposalZToScatteringCosineCM(), sampleEvent(), TEST(), totalCrossSection(), and unpolarizedAngularWeight().

| std::mt19937_64 Physics::LinearBreitWheeler::makeHostRandomEngine | ( | std::uint64_t | streamIndex = 0 | ) |
Build a deterministic host RNG from Options::seed.
| streamIndex | Optional stream index for reproducible stream splitting. |
Definition at line 248 of file LinearBreitWheeler.cpp.
Referenced by main(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamHistogram(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamJointHistogram(), LinearBreitWheelerBenchmark::sampleHistogram(), LinearBreitWheelerBenchmark::sampleJointHistogram(), TEST(), and TEST().
| SamplingKernel Physics::LinearBreitWheeler::makeSamplingKernel | ( | double | highEnergyPhotonEnergyGeV, |
| double | laserPhotonEnergyGeV, | ||
| const Vector_t< double, 3 > & | highEnergyDirection, | ||
| const Vector_t< double, 3 > & | laserDirection | ||
| ) |
Build a cached sampling kernel for repeated sampled events.
The initial OPALX sampled-event path mirrors the linear CAIN event generator: it keeps the fixed two-photon geometry, computes the corresponding CM boost, and precomputes a rejection-sampling envelope for the unpolarized CAIN-style angular weight.
Definition at line 213 of file LinearBreitWheeler.cpp.
References Physics::LinearBreitWheeler::SamplingKernel::cmLorentzGamma, Physics::LinearBreitWheeler::SamplingKernel::cmVelocity, dot(), Physics::LinearBreitWheeler::SamplingKernel::highEnergyDirection, Physics::LinearBreitWheeler::SamplingKernel::highEnergyPhotonEnergyGeV, invariantSGeV2(), Physics::LinearBreitWheeler::SamplingKernel::invariantSGeV2, isAboveThreshold(), Physics::LinearBreitWheeler::SamplingKernel::laserDirection, Physics::LinearBreitWheeler::SamplingKernel::laserPhotonEnergyGeV, pairBetaCM(), Physics::LinearBreitWheeler::SamplingKernel::pairBetaCM, and Physics::LinearBreitWheeler::SamplingKernel::rejectionUpperBound.
Referenced by main(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamHistogram(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamJointHistogram(), LinearBreitWheelerBenchmark::sampleHistogram(), LinearBreitWheelerBenchmark::sampleJointHistogram(), TEST(), and TEST().

| double Physics::LinearBreitWheeler::pairBetaCM | ( | double | invariantSGeV2 | ) |
Outgoing lepton speed in the pair center-of-momentum frame.
Above threshold,
\[ \beta = \sqrt{1 - \frac{4m_e^2}{s}}. \]
| invariantSGeV2 | Two-photon invariant \(s\) in GeV^2. |
Definition at line 168 of file LinearBreitWheeler.cpp.
References isAboveThreshold(), and thresholdInvariantSGeV2().
Referenced by makeSamplingKernel(), and totalCrossSection().

| double Physics::LinearBreitWheeler::photonEnergyFromWavelengthGeV | ( | double | wavelength_m | ) |
Convert a laser wavelength to a single-photon energy.
The conversion uses
\[ \omega_L = \frac{2 \pi \hbar c}{\lambda_L}. \]
| wavelength_m | Laser wavelength in m. |
Definition at line 145 of file LinearBreitWheeler.cpp.
References Physics::c, Physics::h_bar, and Physics::two_pi.
Referenced by main(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamHistogram(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamJointHistogram(), LinearBreitWheelerBenchmark::sampleHistogram(), LinearBreitWheelerBenchmark::sampleJointHistogram(), TEST(), TEST(), and TEST().
| double Physics::LinearBreitWheeler::proposalZToScatteringCosineCM | ( | double | invariantSGeV2, |
| double | proposalZ | ||
| ) |
Map CAIN's proposal parameter \(z \in [-1,1]\) to the CM scattering cosine.
The linear CAIN generator samples a proposal variable \(z\), transforms it to an auxiliary variable \(Y(z)\), and then sets
\[ \cos\theta = 1 - 2Y. \]
This helper exposes that mapping directly so the local angular kernel can be tested pointwise in the same parameterization used by the rejection sampler.
| invariantSGeV2 | Two-photon invariant \(s\) in GeV^2. |
| proposalZ | CAIN proposal variable \(z\) in [-1,1]. |
proposalZ. Definition at line 191 of file LinearBreitWheeler.cpp.
References isAboveThreshold().
Referenced by TEST().

| SampledEvent Physics::LinearBreitWheeler::sampleEvent | ( | const SamplingKernel & | kernel, |
| std::mt19937_64 & | engine | ||
| ) |
Sample one unpolarized linear Breit-Wheeler event.
The angular proposal and acceptance rule are aligned with the linear CAIN event generator LNBWGN, but restricted here to the unpolarized case. The sampled outgoing electron and positron momenta are returned in the lab frame.
| kernel | Cached sampling kernel created by makeSamplingKernel. |
| engine | Host-side random engine. |
Definition at line 252 of file LinearBreitWheeler.cpp.
References Physics::LinearBreitWheeler::SamplingKernel::cmLorentzGamma, Physics::LinearBreitWheeler::SamplingKernel::cmVelocity, dot(), Physics::LinearBreitWheeler::SamplingKernel::highEnergyDirection, Physics::LinearBreitWheeler::SamplingKernel::invariantSGeV2, isAboveThreshold(), Physics::m_e, Physics::LinearBreitWheeler::SamplingKernel::rejectionUpperBound, Physics::LinearBreitWheeler::SampledEvent::scatteringCosineCM, and Physics::two_pi.
Referenced by main(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamHistogram(), LinearBreitWheelerBenchmark::sampleFinitePhotonBeamJointHistogram(), LinearBreitWheelerBenchmark::sampleHistogram(), LinearBreitWheelerBenchmark::sampleJointHistogram(), TEST(), and TEST().

| double Physics::LinearBreitWheeler::thresholdInvariantSGeV2 | ( | ) |
Threshold invariant for \(\gamma + \gamma \to e^- + e^+\).
The exact kinematic threshold is
\[ s_\text{thr} = 4 m_e^2. \]
Definition at line 164 of file LinearBreitWheeler.cpp.
References Physics::m_e.
Referenced by isAboveThreshold(), pairBetaCM(), TEST(), TEST(), TEST(), and TEST().
| double Physics::LinearBreitWheeler::totalCrossSection | ( | double | invariantSGeV2 | ) |
Total unpolarized linear Breit-Wheeler cross section.
The first OPALX implementation uses the standard unpolarized Breit-Wheeler total cross section in terms of the center-of-momentum lepton speed \(\beta = \sqrt{1 - 4m_e^2/s}\):
\[ \sigma_{\gamma\gamma\to e^+e^-} = \frac{\pi r_e^2}{2}(1-\beta^2) \left[ (3-\beta^4) \ln\!\left(\frac{1+\beta}{1-\beta}\right) - 2\beta(2-\beta^2) \right]. \]
| invariantSGeV2 | Two-photon invariant \(s\) in GeV^2. |
Definition at line 177 of file LinearBreitWheeler.cpp.
References isAboveThreshold(), pairBetaCM(), Physics::pi, and Physics::r_e.
Referenced by TEST(), and TEST().

| double Physics::LinearBreitWheeler::unpolarizedAngularWeight | ( | double | invariantSGeV2, |
| double | proposalZ | ||
| ) |
Evaluate the unpolarized CAIN-aligned angular kernel in proposal coordinates.
This is the dimensionless angular weight used by the current OPALX rejection sampler after the CAIN change of variables from the proposal parameter \(z\) to the center-of-momentum scattering angle. It is not the physical cross section in SI units; it is the local kernel shape that controls accepted event sampling.
| invariantSGeV2 | Two-photon invariant \(s\) in GeV^2. |
| proposalZ | CAIN proposal variable \(z\) in [-1,1]. |
Definition at line 203 of file LinearBreitWheeler.cpp.
References isAboveThreshold().
Referenced by TEST().
