From 41b014c0e298fdbf6035fed6f1444b0296984834 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 29 Jul 2019 12:24:33 -0500 Subject: avoid a division in get_expected_charge() --- src/likelihood.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit