diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-05-24 11:47:27 -0400 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-05-24 11:47:27 -0400 |
commit | b3ef3430c0fb025771501766286c176ca7411445 (patch) | |
tree | 746d9c067462e6e7767d14d4e1b4483de6b32f3d /src | |
parent | 56b85815c96e56e96085afd3c2575d9eaef1ae91 (diff) | |
download | sddm-b3ef3430c0fb025771501766286c176ca7411445.tar.gz sddm-b3ef3430c0fb025771501766286c176ca7411445.tar.bz2 sddm-b3ef3430c0fb025771501766286c176ca7411445.zip |
add a comment to get_theta0_min()
Also, delete a check on cos_theta_pmt which isn't necessary.
Diffstat (limited to 'src')
-rw-r--r-- | src/likelihood.c | 16 |
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); |