aboutsummaryrefslogtreecommitdiff
path: root/src/test-likelihood.c
AgeCommit message (Collapse)Author
2019-06-02update get_probability() to take sin(theta) as an argumenttlatorre
Since we already calculate sin(theta) in get_expected_charge() there's no reason to calculate it again in get_probability(). This *may* already be optimized out by the compiler.
2019-03-16add GPLv3 licensetlatorre
2018-08-27fix how multiple Coulomb scattering is treatedtlatorre
Previously I had been assuming that a particle undergoing many small angle Coulomb scatters had a track direction whose polar angle was a Gaussian. However, this was just due to a misunderstanding of the PDG section "Multiple scattering through small angles" in the "Passage of particles through matter" article. In fact, what is described by a Gaussian is the polar angle projected onto a plane. Therefore the distribution of the polar angle is actually: (1/(sqrt(2*pi)*theta0**2))*theta*exp(-theta**2/(2*theta0)) This commit updates the code in scattering.c to correctly calculate the probability that a photon is emitted at a particular angle. I also updated test-likelihood.c to simulate a track correctly.
2018-08-14move everything to src directorytlatorre