aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/likelihood.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index 9a98562..3f27915 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -526,6 +526,20 @@ static void get_expected_charge_shower(particle *p, double *pos, double *dir, in
*q = (1.0-prob_abs)*(1.0-prob_sct)*f*charge;
}
+/* Returns the angular width of the PMT bucket from the center of the PMT to
+ * the edge of the bucket in the plane formed by the particle direction and the
+ * direction to the PMT.
+ *
+ * `R` is the distance to the PMT, `r` is the PMT radius, and `sin_theta_pmt`
+ * is the sine of the angle between the vector from the particle position to
+ * the PMT and the PMT normal vector.
+ *
+ * This function is called get_theta0_min because we use this angular width to
+ * set a minimum value for the RMS scattering angle of the particle as a kind
+ * of hack to deal with the fact that we assume that the angular distribution
+ * is constant across the face of the PMT. By introducing a minimum value for
+ * the scattering RMS we broaden the angular distribution such that it
+ * 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));
@@ -562,8 +576,6 @@ static void get_expected_charge(double beta, double theta0, double *pos, double
if (fabs(cos_theta-1.0/(n*beta))/(sin_theta*theta0) > 5) return;
- if (cos_theta_pmt > 0) return;
-
omega = get_solid_angle_fast(pos,pmts[pmt].pos,pmts[pmt].normal,PMT_RADIUS);
f_reflec = get_weighted_pmt_reflectivity(-cos_theta_pmt);