From f174de897339178f30cabaa0731141d04cfb2a9a Mon Sep 17 00:00:00 2001 From: tlatorre Date: Thu, 18 Oct 2018 10:16:39 -0500 Subject: fix a bug in get_total_charge_approx() This commit fixes a bug which was double counting the pmt response when computing the direct charge and incorrectly multiplying the reflected charge by the pmt response. I think this was just a typo left in when I added the reflected charge. --- src/likelihood.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/likelihood.c b/src/likelihood.c index b06ebc4..1aa1653 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -452,7 +452,7 @@ double get_total_charge_approx(double T0, double *pos, double *dir, particle *p, /* Assume the particle is travelling at the speed of light. */ *t = s/SPEED_OF_LIGHT + l_d2o*n_d2o/SPEED_OF_LIGHT + l_h2o*n_h2o/SPEED_OF_LIGHT; - double charge = f*exp(-l_d2o/absorption_length_d2o-l_h2o/absorption_length_h2o-l_acrylic/absorption_length_acrylic)*n_d2o*x*beta0*prob*(1/sin_theta)*omega*(erf((a+b*(smax-s)+n_d2o*(smax-z)*beta0)/frac) + erf((-a+b*s+n_d2o*z*beta0)/frac))/(b+n_d2o*beta0)/(4*M_PI); + double charge = exp(-l_d2o/absorption_length_d2o-l_h2o/absorption_length_h2o-l_acrylic/absorption_length_acrylic)*n_d2o*x*beta0*prob*(1/sin_theta)*omega*(erf((a+b*(smax-s)+n_d2o*(smax-z)*beta0)/frac) + erf((-a+b*s+n_d2o*z*beta0)/frac))/(b+n_d2o*beta0)/(4*M_PI); *mu_reflected = f_reflected*charge; -- cgit