aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-07-29 12:24:33 -0500
committertlatorre <tlatorre@uchicago.edu>2019-07-29 12:24:33 -0500
commit41b014c0e298fdbf6035fed6f1444b0296984834 (patch)
treecf21607b5d90fa3c8b5f5052ab00448390087839
parent92a5425aaa49d90d4d4c1e88e8595ce932c1ad9b (diff)
downloadsddm-41b014c0e298fdbf6035fed6f1444b0296984834.tar.gz
sddm-41b014c0e298fdbf6035fed6f1444b0296984834.tar.bz2
sddm-41b014c0e298fdbf6035fed6f1444b0296984834.zip
avoid a division in get_expected_charge()
-rw-r--r--src/likelihood.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index abf064f..4a0e755 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -579,7 +579,7 @@ static void get_expected_charge(double beta, double theta0, double *pos, double
theta0 = fmax(theta0,get_theta0_min(distance_to_pmt,PMT_RADIUS,sin_theta_pmt));
- if (fabs(cos_theta-cos_theta_cerenkov)/(sin_theta*theta0) > 5) return;
+ if (fabs(cos_theta-cos_theta_cerenkov) > 5*sin_theta*theta0) return;
omega = get_solid_angle_fast(pos,pmts[pmt].pos,pmts[pmt].normal,PMT_RADIUS);