OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
LinearCompton.h File Reference
#include "OPALTypes.h"
#include <cstdint>
#include <random>
Include dependency graph for LinearCompton.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

namespace  Physics
 
namespace  Physics::LinearCompton
 

Functions

double Physics::LinearCompton::photonEnergyFromWavelengthGeV (double wavelength_m)
 Convert a laser wavelength to a single-photon energy.
 
double Physics::LinearCompton::electronGamma (double electronTotalEnergyGeV)
 Compute the electron Lorentz factor from total energy.
 
double Physics::LinearCompton::electronBeta (double electronTotalEnergyGeV)
 Compute the electron speed in units of c from total energy.
 
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.
 
double Physics::LinearCompton::invariantKappa (double incomingPhotonEnergyERFGeV)
 Compute the dimensionless Klein-Nishina parameter \(\\kappa = \\omega_1/m_e\).
 
double Physics::LinearCompton::invariantX (double incomingPhotonEnergyERFGeV)
 Compute CAIN's linear-Compton invariant \(x = 2 \\omega_1 / m_e\).
 
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.
 
double Physics::LinearCompton::scatteredPhotonEnergyMinERFGeV (double incomingPhotonEnergyERFGeV)
 Minimum scattered photon energy in the electron rest frame.
 
double Physics::LinearCompton::scatteredPhotonEnergyMaxERFGeV (double incomingPhotonEnergyERFGeV)
 Maximum scattered photon energy in the electron rest frame.
 
double Physics::LinearCompton::scatteredPhotonEnergyERFGeV (double incomingPhotonEnergyERFGeV, double scatteringCosineERF)
 Compute the scattered photon energy in the electron rest frame.
 
double Physics::LinearCompton::differentialCrossSectionSolidAngleERF (double incomingPhotonEnergyERFGeV, double scatteringCosineERF)
 Unpolarized Klein-Nishina differential cross section in solid angle.
 
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.
 
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.
 
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.
 
double Physics::LinearCompton::differentialCrossSectionOmegaERF (double incomingPhotonEnergyERFGeV, double scatteredPhotonEnergyERFGeV)
 Unpolarized Klein-Nishina differential cross section in the scattered-photon energy.
 
double Physics::LinearCompton::totalCrossSection (double incomingPhotonEnergyERFGeV)
 Total unpolarized Klein-Nishina cross section.
 
double Physics::LinearCompton::thomsonCrossSection ()
 Thomson limit cross section.
 
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.
 
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.
 
std::mt19937_64 Physics::LinearCompton::makeHostRandomEngine (std::uint64_t streamIndex=0)
 Create a deterministic host-side random engine for Monte Carlo validation.
 
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.
 
SampledEvent Physics::LinearCompton::sampleEvent (const SamplingKernel &kernel, std::mt19937_64 &engine)
 Sample one unpolarized linear-Compton event on the host.
 

Class Documentation

◆ 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.

◆ 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^*\).