#include <ComptonPhaseFunction.hpp>
Public Member Functions | |
void | initialize (Random *random, bool includePolarization=false) |
void | peeloffScattering (double &I, double &Q, double &U, double &V, double &lambda, Direction bfk, Direction bfkobs, Direction bfky, const StokesVector *sv) const |
Direction | performScattering (double &lambda, Direction bfk, StokesVector *sv) const |
double | sectionSca (double lambda) const |
Private Member Functions | |
void | applyMueller (double x, double costheta, StokesVector *sv) const |
double | generateAzimuthFromPhaseFunction (double x, const StokesVector *sv, double costheta) const |
double | generateCosineFromPhaseFunction (double x) const |
double | phaseFunctionValue (double x, double costheta, double phi, const StokesVector *sv) const |
double | phaseFunctionValueForCosine (double x, double costheta) const |
Private Attributes | |
bool | _includePolarization |
Array | _phi1v |
Array | _phicv |
Array | _phisv |
Array | _phiv |
Random * | _random |
The ComptonPhaseFunction helper class represents Compton scattering of photons by free electrons, with optional support for polarization by scattering.
Compton scattering forms the extension of Thomson scattering into the high-photon-energy domain. The scattering event is elastic (i.e. the photon wavelength is changed by the interaction) and its cross section and phase function depend on the wavelength of the incoming photon. Compared to Thomson scattering, the total cross section is reduced at higher energies. With
For an interaction with incoming photon energy
Unpolarized Compton scattering
The normalized phase function for an interaction with incoming photon energy
where
To draw a random scattering angle from the phase function, we use the algorithm described by Hua et al. 1997 (Computers in Physics 11, 660), which is a variation of the technique first suggested by Pei 1979 and often referred to as Khan's technique. A combination of composition and rejection methods, the algorithm avoids expensive operations and has a rejection rate of about 1/3 depending on the energy.
Using our notation for the scaled energy
Polarized Compton scattering
The Müller matrix describing Compton scattering can be expressed as a function of the scattering angle
with
Following the procedure of Peest et al. 2017 Sect 3.3 starting from the above Müller matrix, we obtain the following expression for the normalized phase function:
with
The marginal distribution for
Once a random
This expression has the same form as the formula derived for Thomson scattering by Peest et al. 2017, but with different matrix elements
which must be inverted for
|
private |
This function applies the Mueller matrix transformation for the specified incoming photon energy and the specified scattering angle cosine
|
private |
This function generates a random azimuthal scattering angle
|
private |
This function generates a random scattering angle cosine sampled from the phase function
void ComptonPhaseFunction::initialize | ( | Random * | random, |
bool | includePolarization = false |
||
) |
This function caches a pointer to the simulation's random number generator and, if polarization is included, pre-calculates some data used for sampling from the relevant phase function. The function must be called during setup (i.e. in single-thread mode). If includePolarization is omitted or set to false, calling the functions implementing the polarized phase function will cause undefined behavior.
void ComptonPhaseFunction::peeloffScattering | ( | double & | I, |
double & | Q, | ||
double & | U, | ||
double & | V, | ||
double & | lambda, | ||
Direction | bfk, | ||
Direction | bfkobs, | ||
Direction | bfky, | ||
const StokesVector * | sv | ||
) | const |
This function calculates the contribution of a Compton scattering event to the peel-off photon luminosity and polarization state and determines the adjusted wavelength of the outgoing photon packet for the given geometry and incoming wavelength and polarization state. The contributions to the Stokes vector components are stored in the I, Q, U, V arguments, which are guaranteed to be initialized to zero by the caller. The adjusted wavelength value replaces the incoming value of the lambda argument.
Direction ComptonPhaseFunction::performScattering | ( | double & | lambda, |
Direction | bfk, | ||
StokesVector * | sv | ||
) | const |
Given the incoming photon packet wavelength, direction and polarization state, this function calculates a randomly sampled new propagation direction for a Compton scattering event, and determines the adjusted wavelength of the outgoing photon packet. The adjusted wavelength is stored in the lambda argument, and the direction is returned.
|
private |
This function returns the value of the scattering phase function
|
private |
This function returns the value of the scattering phase function
double ComptonPhaseFunction::sectionSca | ( | double | lambda | ) | const |
This function calculates and returns the Compton scattering cross section for the given wavelength, normalized to the (constant) Thomson cross section.