diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/likelihood.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/likelihood.c b/src/likelihood.c index 8e12f57..aab4ede 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -404,8 +404,6 @@ static void integrate_path_shower(particle *p, double *x, double *pdf, double T0 n_d2o = get_index_snoman_d2o(wavelength0); n_h2o = get_index_snoman_h2o(wavelength0); - double range = x[n-1] - x[0]; - for (i = 0; i < n; i++) { pos[0] = pos0[0] + x[i]*dir0[0]; pos[1] = pos0[1] + x[i]*dir0[1]; @@ -416,8 +414,8 @@ static void integrate_path_shower(particle *p, double *x, double *pdf, double T0 t = x[i]/SPEED_OF_LIGHT + l_d2o*n_d2o/SPEED_OF_LIGHT + l_h2o*n_h2o/SPEED_OF_LIGHT; qs[i] = get_expected_charge_shower(p, pos, dir0, pmts[pmt].pos, pmts[pmt].normal, PMT_RADIUS, q_indirects+i, n_d2o, n_h2o, l_d2o, l_h2o, &q_delta_ray, &q_indirect_delta_ray); - qs[i] = qs[i]*pdf[i] + q_delta_ray/range; - q_indirects[i] = q_indirects[i]*pdf[i] + q_indirect_delta_ray/range; + qs[i] = qs[i]*pdf[i] + q_delta_ray/p->range; + q_indirects[i] = q_indirects[i]*pdf[i] + q_indirect_delta_ray/p->range; ts[i] = t*qs[i]; ts2[i] = t*t*qs[i]; } |