OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Physics::LinearCompton Namespace Reference

Classes

struct  SampledEvent
 Sampled single-photon Compton event. More...
 
struct  SamplingKernel
 Host-only cached data for repeated linear-Compton event sampling. More...
 

Functions

double photonEnergyFromWavelengthGeV (double wavelength_m)
 Convert a laser wavelength to a single-photon energy.
 
double electronGamma (double electronTotalEnergyGeV)
 Compute the electron Lorentz factor from total energy.
 
double electronBeta (double electronTotalEnergyGeV)
 Compute the electron speed in units of c from total energy.
 
double restFrameIncomingPhotonEnergyGeV (double electronTotalEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
 Compute the incoming photon energy in the electron rest frame.
 
Vector_t< double, 3 > restFrameIncomingPhotonDirection (double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
 Incoming laser-photon direction in the electron rest frame.
 
Vector_t< double, 3 > labPhotonDirection (double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection, double scatteringCosineERF, double azimuthERF)
 Laboratory-frame photon direction from electron-rest-frame scattering angles.
 
std::mt19937_64 makeHostRandomEngine (std::uint64_t streamIndex=0)
 Create a deterministic host-side random engine for Monte Carlo validation.
 
SamplingKernel makeSamplingKernel (double electronTotalEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
 Build a cached sampling kernel for repeated event generation.
 
SampledEvent sampleEvent (const SamplingKernel &kernel, std::mt19937_64 &engine)
 Sample one unpolarized linear-Compton event on the host.
 
double invariantKappa (double incomingPhotonEnergyERFGeV)
 Compute the dimensionless Klein-Nishina parameter \(\\kappa = \\omega_1/m_e\).
 
double invariantX (double incomingPhotonEnergyERFGeV)
 Compute CAIN's linear-Compton invariant \(x = 2 \\omega_1 / m_e\).
 
double invariantX (double electronTotalEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
 Compute CAIN's linear-Compton invariant directly from laboratory quantities.
 
double scatteredPhotonEnergyMinERFGeV (double incomingPhotonEnergyERFGeV)
 Minimum scattered photon energy in the electron rest frame.
 
double scatteredPhotonEnergyMaxERFGeV (double incomingPhotonEnergyERFGeV)
 Maximum scattered photon energy in the electron rest frame.
 
double scatteredPhotonEnergyERFGeV (double incomingPhotonEnergyERFGeV, double scatteringCosineERF)
 Compute the scattered photon energy in the electron rest frame.
 
double differentialCrossSectionSolidAngleERF (double incomingPhotonEnergyERFGeV, double scatteringCosineERF)
 Unpolarized Klein-Nishina differential cross section in solid angle.
 
double differentialCrossSectionOmegaERF (double incomingPhotonEnergyERFGeV, double scatteredPhotonEnergyERFGeV)
 Unpolarized Klein-Nishina differential cross section in the scattered-photon energy.
 
double totalCrossSection (double incomingPhotonEnergyERFGeV)
 Total unpolarized Klein-Nishina cross section.
 
double thomsonCrossSection ()
 Thomson limit cross section.
 
double restFrameScatteringCosineForLabForwardPhoton (double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
 Rest-frame scattering cosine corresponding to a lab-forward photon.
 
double labPhotonEnergyGeV (double electronTotalEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection, double scatteringCosineERF, double azimuthERF)
 Laboratory-frame photon energy from electron-rest-frame scattering angles.
 
double labForwardPhotonEnergyGeV (double electronTotalEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
 Forward scattered photon energy in the laboratory frame.
 

Class Documentation

◆ Physics::LinearCompton::SampledEvent

struct Physics::LinearCompton::SampledEvent

Sampled single-photon Compton event.

The event is parameterized by the electron-rest-frame scattering variables \((\cos\Theta^*, \phi^*)\) and the corresponding scattered photon energy and direction after boosting back to the laboratory frame.

Definition at line 49 of file LinearCompton.h.

Collaboration diagram for Physics::LinearCompton::SampledEvent:
Collaboration graph
Class Members
double azimuthERF = 0.0

Rest-frame azimuth \(\phi^*\) around the incoming-photon axis [rad].

Vector_t< double, 3 > scatteredPhotonDirectionLab Normalized outgoing photon direction in the laboratory frame.
double scatteredPhotonEnergyERFGeV Outgoing photon energy in the electron rest frame [GeV].
double scatteredPhotonEnergyLabGeV Outgoing photon energy in the laboratory frame [GeV].
double scatteringCosineERF Rest-frame polar scattering cosine \(\cos\Theta^*\).

◆ Physics::LinearCompton::SamplingKernel

struct Physics::LinearCompton::SamplingKernel

Host-only cached data for repeated linear-Compton event sampling.

The first Monte Carlo validation path in OPALX is intentionally scalar and host-side. This structure caches the fixed beam / laser geometry, the incoming photon energy in the electron rest frame, and the rejection-sampler envelope used to sample \(\cos\Theta^*\) from the unpolarized Klein-Nishina kernel.

The kernel is designed for deterministic testing and validation: create it once for a fixed benchmark geometry, seed a host RNG from Options::seed, and then draw sampled events via sampleEvent.

Definition at line 25 of file LinearCompton.h.

Collaboration diagram for Physics::LinearCompton::SamplingKernel:
Collaboration graph
Class Members
Vector_t< double, 3 > beamDirection Normalized incoming electron direction in the lab frame.
double electronTotalEnergyGeV Incoming electron total energy in the lab frame [GeV].
double incomingPhotonEnergyERFGeV

Laser-photon energy after Lorentz transforming into the electron rest frame [GeV].

Vector_t< double, 3 > laserDirection Normalized incoming laser direction in the lab frame.
double laserPhotonEnergyGeV Incoming laser-photon energy in the lab frame [GeV].
double rejectionUpperBoundSolidAngleERF

Conservative upper envelope for \(d\sigma/d\Omega^*\) used by the rejection sampler.

Function Documentation

◆ differentialCrossSectionOmegaERF()

double Physics::LinearCompton::differentialCrossSectionOmegaERF ( double  incomingPhotonEnergyERFGeV,
double  scatteredPhotonEnergyERFGeV 
)

Unpolarized Klein-Nishina differential cross section in the scattered-photon energy.

The underlying angular kernel is

\[ \\frac{d\\sigma}{d\\Omega^*} = \\frac{r_e^2}{2} \\left(\\frac{\\omega_2}{\\omega_1}\\right)^2 \\left( \\frac{\\omega_1}{\\omega_2} + \\frac{\\omega_2}{\\omega_1} - \\sin^2\\Theta^* \\right), \]

and the one-dimensional energy spectrum integrated over azimuth is

\[ \\frac{d\\sigma}{d\\omega_2} = 2\\pi \\frac{d\\sigma}{d\\Omega^*} \\frac{m_e}{\\omega_2^2}. \]

The valid support is \(\\omega_2 \\in [\\omega_{2,\\min}, \\omega_{2,\\max}]\).

Parameters
incomingPhotonEnergyERFGeVIncoming photon energy in the electron rest frame in GeV.
scatteredPhotonEnergyERFGeVScattered photon energy in the electron rest frame in GeV.
Returns
Differential cross section in units of m^2 / GeV.
Exceptions
OpalExceptionIf the input energy is outside the physical support.

Definition at line 316 of file LinearCompton.cpp.

References differentialCrossSectionSolidAngleERF(), Physics::m_e, scatteredPhotonEnergyERFGeV(), scatteredPhotonEnergyMaxERFGeV(), scatteredPhotonEnergyMinERFGeV(), and Physics::two_pi.

Here is the call graph for this function:

◆ differentialCrossSectionSolidAngleERF()

double Physics::LinearCompton::differentialCrossSectionSolidAngleERF ( double  incomingPhotonEnergyERFGeV,
double  scatteringCosineERF 
)

Unpolarized Klein-Nishina differential cross section in solid angle.

The exact electron-rest-frame kernel is

\[ \frac{d\sigma}{d\Omega^*} = \frac{r_e^2}{2} \left(\frac{\omega_2}{\omega_1}\right)^2 \left( \frac{\omega_1}{\omega_2} + \frac{\omega_2}{\omega_1} - \sin^2\Theta^* \right), \]

where \(\omega_2\) is the Compton-recoiled photon energy at the same scattering cosine.

Parameters
incomingPhotonEnergyERFGeVIncoming photon energy in the electron rest frame in GeV.
scatteringCosineERFRest-frame scattering cosine \(\cos\Theta^*\).
Returns
Differential cross section in units of m^2 / sr.

Definition at line 301 of file LinearCompton.cpp.

References invariantKappa(), Physics::r_e, and scatteredPhotonEnergyERFGeV().

Referenced by differentialCrossSectionOmegaERF(), LinearComptonBenchmark::integrateLabAngularSpectrum(), LinearComptonBenchmark::integrateLabJointSpectrum(), LinearComptonBenchmark::integrateLabSpectrum(), and sampleEvent().

Here is the call graph for this function:

◆ electronBeta()

double Physics::LinearCompton::electronBeta ( double  electronTotalEnergyGeV)

Compute the electron speed in units of c from total energy.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
Returns
Dimensionless speed \(\\beta = \\sqrt{1 - 1/\\gamma^2}\).
Exceptions
OpalExceptionIf the energy is below the electron rest energy.

Definition at line 131 of file LinearCompton.cpp.

References electronGamma().

Referenced by labPhotonDirection(), labPhotonEnergyGeV(), restFrameIncomingPhotonDirection(), restFrameIncomingPhotonEnergyGeV(), and restFrameScatteringCosineForLabForwardPhoton().

Here is the call graph for this function:

◆ electronGamma()

double Physics::LinearCompton::electronGamma ( double  electronTotalEnergyGeV)

Compute the electron Lorentz factor from total energy.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
Returns
Dimensionless Lorentz factor \(\\gamma = E_e / m_e\).
Exceptions
OpalExceptionIf the energy is below the electron rest energy.

Definition at line 120 of file LinearCompton.cpp.

References Physics::m_e.

Referenced by electronBeta(), labPhotonDirection(), labPhotonEnergyGeV(), restFrameIncomingPhotonDirection(), and restFrameIncomingPhotonEnergyGeV().

◆ invariantKappa()

double Physics::LinearCompton::invariantKappa ( double  incomingPhotonEnergyERFGeV)

Compute the dimensionless Klein-Nishina parameter \(\\kappa = \\omega_1/m_e\).

Parameters
incomingPhotonEnergyERFGeVIncoming photon energy in the electron rest frame in GeV.
Returns
Dimensionless rest-frame photon energy parameter.
Exceptions
OpalExceptionIf the energy is not strictly positive.

Definition at line 264 of file LinearCompton.cpp.

References Physics::m_e.

Referenced by differentialCrossSectionSolidAngleERF(), invariantX(), scatteredPhotonEnergyERFGeV(), scatteredPhotonEnergyMaxERFGeV(), scatteredPhotonEnergyMinERFGeV(), and totalCrossSection().

◆ invariantX() [1/2]

double Physics::LinearCompton::invariantX ( double  electronTotalEnergyGeV,
double  laserPhotonEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection 
)

Compute CAIN's linear-Compton invariant directly from laboratory quantities.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
laserPhotonEnergyGeVLaser photon energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
Returns
Dimensionless invariant \(x = 2 \\omega_1 / m_e\).

Definition at line 274 of file LinearCompton.cpp.

References invariantX(), and restFrameIncomingPhotonEnergyGeV().

Here is the call graph for this function:

◆ invariantX() [2/2]

double Physics::LinearCompton::invariantX ( double  incomingPhotonEnergyERFGeV)

Compute CAIN's linear-Compton invariant \(x = 2 \\omega_1 / m_e\).

Parameters
incomingPhotonEnergyERFGeVIncoming photon energy in the electron rest frame in GeV.
Returns
Dimensionless invariant \(x\).
Exceptions
OpalExceptionIf the energy is not strictly positive.

Definition at line 270 of file LinearCompton.cpp.

References invariantKappa().

Referenced by Laser::getLinearComptonInvariantX(), invariantX(), and TEST().

Here is the call graph for this function:

◆ labForwardPhotonEnergyGeV()

double Physics::LinearCompton::labForwardPhotonEnergyGeV ( double  electronTotalEnergyGeV,
double  laserPhotonEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection 
)

Forward scattered photon energy in the laboratory frame.

This helper reproduces the first OPALX benchmark path: compute the incoming rest-frame photon energy, apply the Compton recoil at the scattering cosine corresponding to a lab-forward photon, and boost the result back to the lab.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
laserPhotonEnergyGeVLaser photon energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
Returns
Forward scattered photon energy in GeV.

Definition at line 403 of file LinearCompton.cpp.

References labPhotonEnergyGeV(), and restFrameScatteringCosineForLabForwardPhoton().

Referenced by Laser::getLinearComptonForwardPhotonEnergyGeV(), TEST(), and TEST().

Here is the call graph for this function:

◆ labPhotonDirection()

Vector_t< double, 3 > Physics::LinearCompton::labPhotonDirection ( double  electronTotalEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection,
double  scatteringCosineERF,
double  azimuthERF 
)

Laboratory-frame photon direction from electron-rest-frame scattering angles.

The outgoing photon direction is defined in the electron rest frame by \(\cos\Theta^*\) and \(\phi^*\) around the incoming photon axis. The corresponding direction is then Lorentz boosted back to the laboratory frame along the incoming electron beam direction.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
scatteringCosineERFRest-frame scattering cosine \(\cos\Theta^*\).
azimuthERFRest-frame azimuth angle \(\phi^*\) in rad.
Returns
Unit vector for the scattered photon direction in the laboratory frame.

Definition at line 178 of file LinearCompton.cpp.

References dot(), electronBeta(), electronGamma(), and restFrameIncomingPhotonDirection().

Referenced by LinearComptonBenchmark::integrateLabAngularSpectrum(), LinearComptonBenchmark::integrateLabJointSpectrum(), and sampleEvent().

Here is the call graph for this function:

◆ labPhotonEnergyGeV()

double Physics::LinearCompton::labPhotonEnergyGeV ( double  electronTotalEnergyGeV,
double  laserPhotonEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection,
double  scatteringCosineERF,
double  azimuthERF 
)

Laboratory-frame photon energy from electron-rest-frame scattering angles.

The outgoing photon is defined by a rest-frame scattering cosine \(\cos\Theta^*\) relative to the incoming photon direction and an azimuth angle \(\phi^*\) around that axis. The photon is then boosted back to the laboratory frame along the electron beam direction.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
laserPhotonEnergyGeVLaser photon energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
scatteringCosineERFRest-frame scattering cosine \(\cos\Theta^*\).
azimuthERFRest-frame azimuth angle \(\phi^*\) in rad.
Returns
Scattered photon energy in the laboratory frame in GeV.

Definition at line 378 of file LinearCompton.cpp.

References dot(), electronBeta(), electronGamma(), restFrameIncomingPhotonDirection(), restFrameIncomingPhotonEnergyGeV(), and scatteredPhotonEnergyERFGeV().

Referenced by LinearComptonBenchmark::integrateLabJointSpectrum(), LinearComptonBenchmark::integrateLabSpectrum(), labForwardPhotonEnergyGeV(), sampleEvent(), and TEST().

Here is the call graph for this function:

◆ makeHostRandomEngine()

std::mt19937_64 Physics::LinearCompton::makeHostRandomEngine ( std::uint64_t  streamIndex = 0)

Create a deterministic host-side random engine for Monte Carlo validation.

The engine is seeded from Options::seed. For the validation path, a negative seed falls back to a fixed constant instead of a time-dependent seed so that unit tests remain reproducible.

Parameters
streamIndexOptional stream offset for independent deterministic streams.
Returns
Host-side Mersenne-Twister engine.

Definition at line 200 of file LinearCompton.cpp.

Referenced by LinearComptonBenchmark::sampleLabAngularSpectrum(), LinearComptonBenchmark::sampleLabJointSpectrum(), LinearComptonBenchmark::sampleLabSpectrum(), TEST(), and TEST().

◆ makeSamplingKernel()

SamplingKernel Physics::LinearCompton::makeSamplingKernel ( double  electronTotalEnergyGeV,
double  laserPhotonEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection 
)

Build a cached sampling kernel for repeated event generation.

This precomputes the incoming photon energy in the electron rest frame and a safe rejection-sampling envelope for the unpolarized \(d\sigma/d\Omega^*\) kernel.

The intended usage is:

  1. fix one benchmark geometry or one electron state,
  2. call makeSamplingKernel once,
  3. reuse the returned kernel for many calls to sampleEvent.

If the incoming electron energy or direction varies from particle to particle, as in the finite-beam benchmark, a separate kernel must be built for each sampled electron state before drawing the event.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
laserPhotonEnergyGeVLaser photon energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
Returns
Cached host-side sampling kernel.

Definition at line 204 of file LinearCompton.cpp.

References Physics::LinearCompton::SamplingKernel::beamDirection, Physics::LinearCompton::SamplingKernel::electronTotalEnergyGeV, Physics::LinearCompton::SamplingKernel::incomingPhotonEnergyERFGeV, Physics::LinearCompton::SamplingKernel::laserDirection, Physics::LinearCompton::SamplingKernel::laserPhotonEnergyGeV, Physics::LinearCompton::SamplingKernel::rejectionUpperBoundSolidAngleERF, and restFrameIncomingPhotonEnergyGeV().

Referenced by LinearComptonBenchmark::sampleLabAngularSpectrum(), LinearComptonBenchmark::sampleLabJointSpectrum(), LinearComptonBenchmark::sampleLabSpectrum(), TEST(), and TEST().

Here is the call graph for this function:

◆ photonEnergyFromWavelengthGeV()

double Physics::LinearCompton::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}. \]

Parameters
wavelength_mLaser wavelength in m.
Returns
Laser photon energy in GeV.
Exceptions
OpalExceptionIf wavelength_m is not strictly positive.

Definition at line 114 of file LinearCompton.cpp.

References Physics::c, Physics::h_bar, and Physics::two_pi.

Referenced by Laser::getPhotonEnergyGeV(), LinearComptonBenchmark::integrateLabAngularSpectrum(), LinearComptonBenchmark::integrateLabJointSpectrum(), LinearComptonBenchmark::integrateLabSpectrum(), LinearComptonBenchmark::sampleLabAngularSpectrum(), LinearComptonBenchmark::sampleLabJointSpectrum(), LinearComptonBenchmark::sampleLabSpectrum(), TEST(), TEST(), TEST(), and TEST().

◆ restFrameIncomingPhotonDirection()

Vector_t< double, 3 > Physics::LinearCompton::restFrameIncomingPhotonDirection ( double  electronTotalEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection 
)

Incoming laser-photon direction in the electron rest frame.

The laboratory-frame photon direction is Lorentz transformed into the rest frame of an electron moving along beamDirection. The returned direction is normalized and can be used as the axis of the Klein-Nishina scattering cone.

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
Returns
Unit vector for the incoming photon in the electron rest frame.

Definition at line 156 of file LinearCompton.cpp.

References dot(), electronBeta(), and electronGamma().

Referenced by labPhotonDirection(), and labPhotonEnergyGeV().

Here is the call graph for this function:

◆ restFrameIncomingPhotonEnergyGeV()

double Physics::LinearCompton::restFrameIncomingPhotonEnergyGeV ( double  electronTotalEnergyGeV,
double  laserPhotonEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection 
)

Compute the incoming photon energy in the electron rest frame.

For a laboratory-frame beam direction \(\\hat n_e\) and laser direction \(\\hat n_L\), the electron-rest-frame incoming photon energy is

\[ \\omega_1 = \\gamma \\omega_L (1 - \\beta \\cos \\alpha), \\qquad \\cos \\alpha = \\hat n_e \\cdot \\hat n_L. \]

Parameters
electronTotalEnergyGeVElectron total energy in GeV.
laserPhotonEnergyGeVLaser photon energy in GeV.
beamDirectionLaboratory-frame incoming electron direction.
laserDirectionLaboratory-frame incoming laser direction.
Returns
Incoming photon energy in the electron rest frame in GeV.
Exceptions
OpalExceptionIf the energy is unphysical or either direction is zero.

Definition at line 136 of file LinearCompton.cpp.

References dot(), electronBeta(), and electronGamma().

Referenced by LinearComptonBenchmark::integrateLabAngularSpectrum(), LinearComptonBenchmark::integrateLabJointSpectrum(), LinearComptonBenchmark::integrateLabSpectrum(), invariantX(), labPhotonEnergyGeV(), and makeSamplingKernel().

Here is the call graph for this function:

◆ restFrameScatteringCosineForLabForwardPhoton()

double Physics::LinearCompton::restFrameScatteringCosineForLabForwardPhoton ( double  electronTotalEnergyGeV,
const Vector_t< double, 3 > &  beamDirection,
const Vector_t< double, 3 > &  laserDirection 
)

Rest-frame scattering cosine corresponding to a lab-forward photon.

For a photon emitted parallel to the laboratory beam direction, the scattered photon points along the boost axis in the electron rest frame. The scattering cosine is therefore the aberrated incoming-photon cosine,

\[ \\cos\\Theta^*_{\\mathrm{lab\\,fwd}} = \\frac{\\cos\\alpha - \\beta}{1 - \\beta \\cos\\alpha}. \]

Definition at line 363 of file LinearCompton.cpp.

References dot(), and electronBeta().

Referenced by labForwardPhotonEnergyGeV(), and TEST().

Here is the call graph for this function:

◆ sampleEvent()

SampledEvent Physics::LinearCompton::sampleEvent ( const SamplingKernel kernel,
std::mt19937_64 &  engine 
)

Sample one unpolarized linear-Compton event on the host.

The sampler draws \(\cos\Theta^*\) by rejection from the exact Klein-Nishina angular kernel and samples \(\phi^*\) uniformly on \([0, 2\pi)\). The returned event contains both rest-frame and laboratory-frame observables.

This is a validation-oriented Monte Carlo path: it is scalar, host-only, and deterministic when the engine is created from makeHostRandomEngine with a fixed Options::seed. It is not yet intended to define production photon creation semantics for tracking.

Parameters
kernelCached sampling kernel created by makeSamplingKernel.
engineHost-side random engine, typically created by makeHostRandomEngine.
Returns
Sampled linear-Compton event.

Definition at line 224 of file LinearCompton.cpp.

References Physics::LinearCompton::SampledEvent::azimuthERF, Physics::LinearCompton::SamplingKernel::beamDirection, differentialCrossSectionSolidAngleERF(), Physics::LinearCompton::SamplingKernel::electronTotalEnergyGeV, Physics::LinearCompton::SamplingKernel::incomingPhotonEnergyERFGeV, labPhotonDirection(), labPhotonEnergyGeV(), Physics::LinearCompton::SamplingKernel::laserDirection, Physics::LinearCompton::SamplingKernel::laserPhotonEnergyGeV, Physics::LinearCompton::SamplingKernel::rejectionUpperBoundSolidAngleERF, scatteredPhotonEnergyERFGeV(), Physics::LinearCompton::SampledEvent::scatteringCosineERF, and Physics::two_pi.

Referenced by LinearComptonBenchmark::sampleLabAngularSpectrum(), LinearComptonBenchmark::sampleLabJointSpectrum(), LinearComptonBenchmark::sampleLabSpectrum(), TEST(), and TEST().

Here is the call graph for this function:

◆ scatteredPhotonEnergyERFGeV()

double Physics::LinearCompton::scatteredPhotonEnergyERFGeV ( double  incomingPhotonEnergyERFGeV,
double  scatteringCosineERF 
)

Compute the scattered photon energy in the electron rest frame.

The Compton recoil formula is

\[ \\omega_2(\\Theta^*) = \\frac{\\omega_1}{1 + (\\omega_1/m_e)(1 - \\cos\\Theta^*)}. \]

Parameters
incomingPhotonEnergyERFGeVIncoming photon energy in the electron rest frame in GeV.
scatteringCosineERFRest-frame scattering cosine \(\\cos\\Theta^*\).
Returns
Scattered photon energy in GeV.
Exceptions
OpalExceptionIf the energy is unphysical or the cosine is out of range.

Definition at line 292 of file LinearCompton.cpp.

References invariantKappa().

Referenced by differentialCrossSectionOmegaERF(), differentialCrossSectionSolidAngleERF(), labPhotonEnergyGeV(), sampleEvent(), and TEST().

Here is the call graph for this function:

◆ scatteredPhotonEnergyMaxERFGeV()

double Physics::LinearCompton::scatteredPhotonEnergyMaxERFGeV ( double  incomingPhotonEnergyERFGeV)

Maximum scattered photon energy in the electron rest frame.

This is the forward-scattered endpoint at \(\\cos\\Theta^* = 1\):

\[ \\omega_{2,\\max} = \\omega_1. \]

Definition at line 287 of file LinearCompton.cpp.

References invariantKappa().

Referenced by differentialCrossSectionOmegaERF(), TEST(), TEST(), and TEST().

Here is the call graph for this function:

◆ scatteredPhotonEnergyMinERFGeV()

double Physics::LinearCompton::scatteredPhotonEnergyMinERFGeV ( double  incomingPhotonEnergyERFGeV)

Minimum scattered photon energy in the electron rest frame.

This is the back-scattered endpoint at \(\\cos\\Theta^* = -1\):

\[ \\omega_{2,\\min} = \\frac{\\omega_1}{1 + 2 \\omega_1/m_e}. \]

Definition at line 282 of file LinearCompton.cpp.

References invariantKappa().

Referenced by differentialCrossSectionOmegaERF(), TEST(), TEST(), and TEST().

Here is the call graph for this function:

◆ thomsonCrossSection()

double Physics::LinearCompton::thomsonCrossSection ( )

Thomson limit cross section.

Returns
The classical Thomson cross section \(8\\pi r_e^2 / 3\) in m^2.

Definition at line 359 of file LinearCompton.cpp.

References Physics::pi, and Physics::r_e.

Referenced by TEST(), and totalCrossSection().

◆ totalCrossSection()

double Physics::LinearCompton::totalCrossSection ( double  incomingPhotonEnergyERFGeV)

Total unpolarized Klein-Nishina cross section.

With \(\\kappa = \\omega_1/m_e\), the exact total cross section is

\[ \\sigma_{\\mathrm{KN}} = 2\\pi r_e^2 \\left[ \\frac{1+\\kappa}{\\kappa^3} \\left( \\frac{2\\kappa(1+\\kappa)}{1+2\\kappa} - \\ln(1+2\\kappa) \\right) + \\frac{\\ln(1+2\\kappa)}{2\\kappa} - \\frac{1+3\\kappa}{(1+2\\kappa)^2} \\right]. \]

Parameters
incomingPhotonEnergyERFGeVIncoming photon energy in the electron rest frame in GeV.
Returns
Total cross section in m^2.
Exceptions
OpalExceptionIf the energy is not strictly positive.

Definition at line 340 of file LinearCompton.cpp.

References invariantKappa(), Physics::pi, Physics::r_e, and thomsonCrossSection().

Referenced by TEST(), and TEST().

Here is the call graph for this function: