From b3ef3430c0fb025771501766286c176ca7411445 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Fri, 24 May 2019 11:47:27 -0400 Subject: add a comment to get_theta0_min() Also, delete a check on cos_theta_pmt which isn't necessary. --- src/likelihood.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit