aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/likelihood.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index 25563af..587349b 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -542,7 +542,7 @@ static void get_expected_charge_shower(particle *p, double *pos, double *dir, in
* effectively averages across the face of a PMT. */
double get_theta0_min(double R, double r, double sin_theta_pmt)
{
- return fast_acos((R-r*sin_theta_pmt)/sqrt(r*r + R*R - 2*r*R*sin_theta_pmt));
+ return fast_acos((R-r*sin_theta_pmt)/fast_sqrt(r*r + R*R - 2*r*R*sin_theta_pmt));
}
static void get_expected_charge(double beta, double theta0, double *pos, double *dir, int pmt, double *q, double *reflected, double *t)
@@ -567,10 +567,10 @@ static void get_expected_charge(double beta, double theta0, double *pos, double
/* Calculate the cosine of the angle between the track direction and the
* vector to the PMT. */
cos_theta = DOT(dir,pmt_dir);
- sin_theta = sqrt(1-cos_theta*cos_theta);
+ sin_theta = fast_sqrt(1-cos_theta*cos_theta);
cos_theta_pmt = DOT(pmt_dir,pmts[pmt].normal);
- sin_theta_pmt = sqrt(1-cos_theta_pmt*cos_theta_pmt);
+ sin_theta_pmt = fast_sqrt(1-cos_theta_pmt*cos_theta_pmt);
theta0 = fmax(theta0,get_theta0_min(R,PMT_RADIUS,sin_theta_pmt));