diff options
Diffstat (limited to 'src/likelihood.c')
-rw-r--r-- | src/likelihood.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/likelihood.c b/src/likelihood.c index 92c8306..2e0f135 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -212,7 +212,7 @@ double get_total_charge_approx(double T0, double *pos, double *dir, int i, doubl z = R*cos_theta; /* `x` is the perpendicular distance from the PMT position to the track. */ - x = R*fabs(sin(acos(cos_theta))); + x = R*fabs(sin(theta)); /* `b` is the second coefficient in the Taylor expansion. */ b = (s-z)/a; @@ -421,6 +421,10 @@ double nll_muon(event *ev, double T0, double *pos, double *dir, double t0, doubl nll[nhit++] = -logsumexp(logp+1, jmax-1); } else { logp[0] = -mu[i]; + if (fast) { + nll[nhit++] = -logp[0]; + continue; + } for (j = 1; j < MAX_PE_NO_HIT; j++) { logp[j] = get_log_pmiss(j) - mu[i] + j*log_mu - lnfact(j); } |