aboutsummaryrefslogtreecommitdiff
path: root/src/scattering.h
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-11-11update likelihood function to fit electrons!tlatorre
To characterize the angular distribution of photons from an electromagnetic shower I came up with the following functional form: f(cos_theta) ~ exp(-abs(cos_theta-mu)^alpha/beta) and fit this to data simulated using RAT-PAC at several different energies. I then fit the alpha and beta coefficients as a function of energy to the functional form: alpha = c0 + c1/log(c2*T0 + c3) beta = c0 + c1/log(c2*T0 + c3). where T0 is the initial energy of the electron in MeV and c0, c1, c2, and c3 are parameters which I fit. The longitudinal distribution of the photons generated from an electromagnetic shower is described by a gamma distribution: f(x) = x**(a-1)*exp(-x/b)/(Gamma(a)*b**a). This parameterization comes from the PDG "Passage of particles through matter" section 32.5. I also fit the data from my RAT-PAC simulation, but currently I am not using it, and instead using a simpler form to calculate the coefficients from the PDG (although I estimated the b parameter from the RAT-PAC data). I also sped up the calculation of the solid angle by making a lookup table since it was taking a significant fraction of the time to compute the likelihood function.
2018-10-17fix a bug in the theta0 calculation for a pathtlatorre
This commit fixes a bug in the calculation of the average rms width of the angular distribution for a path with a KL expansion. I also made a lot of updates to the test-path program: - plot the distribution of the KL expansion coefficients - plot the standard deviation of the angular distribution as a function of distance along with the prediction - plot the simulated and reconstructed path in 3D
2018-09-10add a fast likelihood functiontlatorre
This commit adds a fast function to calculate the expected number of PE at a PMT without numerically integrating over the track. This calculation is *much* faster than integrating over the track (~30 ms compared to several seconds) and so we use it during the "quick" minimization phase of the fit to quickly find the best position.
2018-08-14move everything to src directorytlatorre