Skip to main content

sample_cos_theta

Function sample_cos_theta 

Source
pub fn sample_cos_theta(e_ev: f64, e_after_ev: f64, u: f64) -> f64
Expand description

cos θ of a phonon event that takes the electron from e_ev to e_after_ev (both positive and different), at cumulative probability u in [0, 1): the inverse of the distribution of Ding et al. (2021) Eq. (16), see the module docs. ln R is evaluated as 2 ln[(√E + √E')² / |E - E'|] to avoid the cancellation in E + E' - 2√(EE').