aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-01-29 13:20:59 -0600
committertlatorre <tlatorre@uchicago.edu>2019-01-29 13:20:59 -0600
commit10502e7ed56c9cce707fcf027e9ba5a9e2695303 (patch)
tree4189dbeb9c31fde304fa7d77fd7eb5beff932c9b /src
parentc79b3cf71e2e22f704e724e0c5ecb156550ac32e (diff)
downloadsddm-10502e7ed56c9cce707fcf027e9ba5a9e2695303.tar.gz
sddm-10502e7ed56c9cce707fcf027e9ba5a9e2695303.tar.bz2
sddm-10502e7ed56c9cce707fcf027e9ba5a9e2695303.zip
normalize delta ray charge by total range
This is so that in the future if we only integrate over the path in the PSUP we don't overestimate the Cerenkov light from delta rays.
Diffstat (limited to 'src')
-rw-r--r--src/likelihood.c6
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];
}