#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 \(x = (h\nu)/(m_e c^2)\) the incoming photon energy scaled to the electron rest energy, the ratio of the total Compton scattering cross section \(\sigma_\mathrm{C}(x)\) over the (constant) total Thomson cross section \(\sigma_\mathrm{T}\) is given by:
\[ \frac{\sigma_\mathrm{C}(x)}{\sigma_\mathrm{T}} = \frac{3}{4} \bigg( \frac{1+x}{(1+2x)^2} + \frac{2}{x^2} + \Big(\frac{1}{2x}-\frac{1+x}{x^3}\Big) \cdot \ln(1+2x) \bigg). \]
For an interaction with incoming photon energy \(x\) and scattering angle \(\theta\), the energy change \(E_\mathrm{out}/E_\mathrm{in}\) is given by the Compton factor \(C(x, \theta) = \big(1+x(1-\cos \theta)\big)^{-1}\). Equivalently, the wavelength change is given by \(\lambda_\mathrm{out} / \lambda_\mathrm{in} = \big(1+x(1-\cos \theta)\big)\).
Unpolarized Compton scattering
The normalized phase function for an interaction with incoming photon energy \(x\) is given by:
\[ \Phi(x, \theta) = \frac{\sigma_\mathrm{T}}{\sigma_\mathrm{C}(x)} \, \frac{3}{4} \left[ C^3(x, \theta) + C(x, \theta) -C^2(x, \theta)\sin^2\theta \right], \]
where \(\theta\) is the scattering angle and \(C(x, \theta)\) is the Compton factor defined earlier.
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 \(x\) of the incoming photon (see above), Hua et al. 1997 define the doubled scaled incoming photon energy \(\epsilon=2 x\) and the inverse Compton factor \(r = 1 + x (1-\cos\theta)\). The sampling algorithm draws a random number for \(r\), i.e. from the probability distribution for the inverse Compton factor at a given energy. The scattering angle can then easily be obtained from the definition of the inverse Compton factor.
Polarized Compton scattering
The Müller matrix describing Compton scattering can be expressed as a function of the scattering angle \(\theta\) and the incoming photon energy \(x\) as follows (Fano 1949):
\[ {\bf{M}}(x,\theta) \propto \begin{pmatrix} C^3(x,\theta) + C(x,\theta) -C^2(x,\theta) \sin^2\theta & -C^2(x,\theta)\sin^2\theta & 0 & 0 \\ -C^2(x,\theta)\sin^2\theta & C^2(x,\theta) (1+\cos^2\theta) & 0 & 0 \\ 0 & 0 & 2C^2(x,\theta)\cos\theta & 0 \\ 0 & 0 & 0 & (C^3(x,\theta) + C(x,\theta)) \cos\theta \end{pmatrix}, \]
with \(C(x, \theta)\) the Compton factor defined earlier, and assuming a random distribution for the electron spin direction, which causes the non-diagonal terms in the forth row and forth column to be zero (Depaola 2003). This matrix has five independent coefficients and converges to the Müller matrix for Thomson scattering at low photon energies, i.e. for \(x\to 0\) and thus \(C(x,\theta) \to 1\).
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:
\[ \Phi(x, \theta, \varphi, {\bf{S}}) = \frac{\sigma_\mathrm{T}}{\sigma_\mathrm{C}(x)} \, \frac{3}{4} \left[{\rm S}_{11}(x,\theta) + {\rm S}_{12}(x,\theta) \,P_\text{L}\cos2(\varphi-\gamma)\right], \]
with \(\theta\) and \(\varphi\) the inclination and azimuth angle of the scattering geometry, \(\sigma_\mathrm{C}(x)\) the total Compton scattering cross section as defined earlier, \({\rm S}_{11}(x,\theta)\) and \({\rm S}_{12}(x,\theta)\) two of the Compton Müller matrix elements, and \(P_\text{L}\) and \(\gamma\) the incoming photon's linear polarization degree and angle.
The marginal distribution for \(\theta\) is determined by the first term of this equation (the second term cancels out during the integration over \(\varphi\)), which is identical to the univariate distribution for \(\theta\) given earlier for the unpolarized case. We can thus use the same sampling procedure for \(\theta\).
Once a random \(\theta\) has been selected, we sample an azimuth angle \(\varphi\) from the normalized conditional distribution, again obtained similary as in Peest et al. 2017:
\[ \Phi'_\theta(x, \varphi, {\bf{S}}) \propto 1 + \frac{{\rm S}_{12}(x,\theta)} {{\rm S}_{11}(x,\theta)} P_\text{L}\cos2(\varphi-\gamma) \]
This expression has the same form as the formula derived for Thomson scattering by Peest et al. 2017, but with different matrix elements \({\rm S}_{11}(x,\theta)\) and \({\rm S}_{12}(x,\theta)\). Given a uniform deviate \(\chi\) between 0 and 1, a random \(\varphi\) can be obtained from this distribution by solving the equation
\[ \chi = \int_0^\varphi \Phi'_\theta(x, \varphi', {\bf{S}})\, d\varphi' = \frac{1}{2\pi}\left( \varphi + \frac{{{\rm S}_{12}(\theta, x)}}{{\rm S}_{11}(\theta, x)} P_\text{L}\sin\varphi\cos(\varphi-2\gamma)\right), \]
which must be inverted for \(\varphi\) numerically.
|
private |
This function applies the Mueller matrix transformation for the specified incoming photon energy and the specified scattering angle cosine \(\cos\theta\) to the given polarization state (which serves as both input and output for the function).
|
private |
This function generates a random azimuthal scattering angle \(\phi\) sampled from the marginal phase function for the specified incoming photon energy and incoming polarization state, and given the specified scattering angle cosine \(\cos\theta\).
|
private |
This function generates a random scattering angle cosine sampled from the phase function \(\Phi(x, \cos\theta)\) for the specified incoming photon energy \(x\).
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 \(\Phi(\theta,\phi)\) for the specified incoming photon energy, the scattering angles \(\theta\) (specified through its cosine) and \(\phi\), and the specified incoming polarization state. The phase function is normalized as
\[\int\Phi(\theta,\phi) \,\mathrm{d}\Omega =4\pi.\]
|
private |
This function returns the value of the scattering phase function \(\Phi(x, \cos\theta)\) for the specified incoming photon energy \(x\) and scattering angle cosine \(\cos\theta\), where the phase function is normalized for all \(x\) as
\[\int_{-1}^1 \Phi(x, \cos\theta) \,\mathrm{d}\cos\theta =2.\]
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.