OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
TestLinearCompton.cpp File Reference

Unit tests for the unpolarized linear Compton helper. More...

#include "Physics/LinearCompton.h"
#include "Physics/Physics.h"
#include "Utilities/Options.h"
#include "gtest/gtest.h"
#include <cmath>
Include dependency graph for TestLinearCompton.cpp:

Go to the source code of this file.

Functions

 TEST (TestLinearCompton, ThomsonLimitRecoveredAtLowEnergy)
 
 TEST (TestLinearCompton, EnergySupportMatchesComptonEndpoints)
 
 TEST (TestLinearCompton, DifferentialSpectrumIntegratesToTotalCrossSection)
 
 TEST (TestLinearCompton, NinetyDegreeLabForwardBenchmarkMatchesExactFormula)
 
 TEST (TestLinearCompton, ExplicitLabPhotonEnergyMatchesForwardHelper)
 
 TEST (TestLinearCompton, SampledEventsRespectKinematicBounds)
 
 TEST (TestLinearCompton, FixedSeedProducesDeterministicSampleSequence)
 

Detailed Description

Unit tests for the unpolarized linear Compton helper.

The implemented helper is intentionally limited to single-electron, unpolarized Klein-Nishina physics. The tests below validate four things:

Test:
TestLinearCompton::ThomsonLimitRecoveredAtLowEnergy Verifies that the exact Klein-Nishina total cross section approaches the Thomson limit for \(\omega_1 \ll m_e\).
Test:
TestLinearCompton::EnergySupportMatchesComptonEndpoints Verifies the exact electron-rest-frame energy support \(\omega_2 \in [\omega_1/(1+2\omega_1/m_e), \omega_1]\) and checks the recoil formula at the forward and backward endpoints.
Test:
TestLinearCompton::DifferentialSpectrumIntegratesToTotalCrossSection Numerically integrates \(d\sigma/d\omega_2\) over the exact support and compares it against the analytic Klein-Nishina total cross section.
Test:
TestLinearCompton::NinetyDegreeLabForwardBenchmarkMatchesExactFormula Reproduces the same 90 degree crossing benchmark used by the laser element: a 1 GeV electron moving along \(+\hat z\) and a 1030 nm laser propagating along \(+\hat x\). The forward scattered photon energy is compared against the exact stable laboratory-frame formula

\[ \omega_\gamma' = \frac{E_e \omega_L}{\omega_L + m_e^2 / (E_e + p_e)}. \]

Definition in file TestLinearCompton.cpp.

Function Documentation

◆ TEST() [1/7]

TEST ( TestLinearCompton  ,
DifferentialSpectrumIntegratesToTotalCrossSection   
)

◆ TEST() [2/7]

TEST ( TestLinearCompton  ,
EnergySupportMatchesComptonEndpoints   
)

◆ TEST() [3/7]

TEST ( TestLinearCompton  ,
ExplicitLabPhotonEnergyMatchesForwardHelper   
)

◆ TEST() [4/7]

TEST ( TestLinearCompton  ,
FixedSeedProducesDeterministicSampleSequence   
)

◆ TEST() [5/7]

TEST ( TestLinearCompton  ,
NinetyDegreeLabForwardBenchmarkMatchesExactFormula   
)

◆ TEST() [6/7]

◆ TEST() [7/7]

TEST ( TestLinearCompton  ,
ThomsonLimitRecoveredAtLowEnergy   
)

Definition at line 60 of file TestLinearCompton.cpp.

References Physics::LinearCompton::thomsonCrossSection(), and Physics::LinearCompton::totalCrossSection().

Here is the call graph for this function: