aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/likelihood.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index 8e3f983..3ee8445 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -332,7 +332,7 @@ double get_total_charge_approx(double T0, double *pos, double *dir, particle *p,
*
* `smax` is currently calculated as the point where the particle velocity
* drops to 0.8 times the speed of light. */
- double pmt_dir[3], tmp[3], R, cos_theta, x, z, s, a, b, beta, E, mom, T, omega, cos_theta_cerenkov, sin_theta_cerenkov, n_d2o, n_h2o, sin_theta, E0, p0, beta0, f, cos_theta_pmt, absorption_length_h2o, absorption_length_d2o, absorption_length_acrylic, l_h2o, l_d2o, l_acrylic, wavelength0, f_reflected;
+ double pmt_dir[3], tmp[3], R, cos_theta, x, z, s, a, b, beta, E, mom, T, omega, cos_theta_cerenkov, sin_theta_cerenkov, n_d2o, n_h2o, sin_theta, E0, p0, beta0, f, cos_theta_pmt, theta_pmt, absorption_length_h2o, absorption_length_d2o, absorption_length_acrylic, l_h2o, l_d2o, l_acrylic, wavelength0, f_reflected;
/* Calculate beta at the start of the track. */
E0 = T0 + p->mass;
@@ -429,8 +429,9 @@ double get_total_charge_approx(double T0, double *pos, double *dir, particle *p,
double frac = sqrt(2)*n_d2o*x*beta0*theta0;
- f = get_weighted_pmt_response(acos(-cos_theta_pmt));
- f_reflected = get_weighted_pmt_reflectivity(acos(-cos_theta_pmt));
+ theta_pmt = acos(-cos_theta_pmt);
+ f = get_weighted_pmt_response(theta_pmt);
+ f_reflected = get_weighted_pmt_reflectivity(theta_pmt);
absorption_length_d2o = get_absorption_length_snoman_d2o(wavelength0);
absorption_length_h2o = get_absorption_length_snoman_h2o(wavelength0);