From afb161aa87744990ba0806fd6c73fc39e38110e5 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 25 Mar 2019 17:12:17 -0500 Subject: fix delta ray charge calculation Previously I was calculating the expected number of delta ray photons when integrating over the shower path, but since the delta rays are produced along the particle path and not further out like the shower photons, this wasn't correct. The normalization of the probability distribution for the photons produced along the path was also not handled correctly. This commit adds a new function called integrate_path_delta_ray() to compute the expected number of photons from delta rays hitting each PMT. Currently this means that the likelihood function for muons will be significantly slower than previously, but hopefully I can speed it up again in the future (for example by skipping the shower calculation which is negligible for lower energy muons). --- src/likelihood.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/likelihood.h') diff --git a/src/likelihood.h b/src/likelihood.h index 691a606..bda46f0 100644 --- a/src/likelihood.h +++ b/src/likelihood.h @@ -92,8 +92,8 @@ typedef struct particle { particle *particle_init(int id, double T0, size_t n); double particle_get_energy(double x, particle *p); void particle_free(particle *p); -double time_pdf(double t, double mu_noise, double mu_indirect, double *mu_direct, double *mu_shower, size_t n, double *ts, double *ts_shower, double tmean, double sigma, double *ts_sigma); -double time_cdf(double t, double mu_noise, double mu_indirect, double *mu_direct, double *mu_shower, size_t n, double *ts, double *ts_shower, double tmean, double sigma, double *ts_sigma); +double time_pdf(double t, double mu_noise, double mu_indirect, double *mu, size_t n, double *ts, double tmean, double *ts_sigma); +double time_cdf(double t, double mu_noise, double mu_indirect, double *mu, size_t n, double *ts, double tmean, double *ts_sigma); double nll_best(event *ev); double nll(event *ev, vertex *v, size_t n, double dx, double dx_shower, int fast, int charge_only, int hit_only); -- cgit