aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-10-18 10:16:39 -0500
committertlatorre <tlatorre@uchicago.edu>2018-10-18 10:16:39 -0500
commitf174de897339178f30cabaa0731141d04cfb2a9a (patch)
treedff5a1c588417ee1c43b2ba04c97d0da0bda7b93 /src
parent4f1c77fb1dcc1c1a927c0ee6b7571aebcff71495 (diff)
downloadsddm-f174de897339178f30cabaa0731141d04cfb2a9a.tar.gz
sddm-f174de897339178f30cabaa0731141d04cfb2a9a.tar.bz2
sddm-f174de897339178f30cabaa0731141d04cfb2a9a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/likelihood.c2
1 files changed, 1 insertions, 1 deletions
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;