From ae90fe0e0c47e39a803c453e565e0eebea2ecd65 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Thu, 6 Sep 2018 10:13:52 -0500 Subject: introduce a minimum value for the scattering RMS theta0 --- src/path.c | 2 +- src/path.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/path.c b/src/path.c index 80bba50..5a87cf6 100644 --- a/src/path.c +++ b/src/path.c @@ -175,7 +175,7 @@ void path_eval(path *p, double s, double *pos, double *dir, double *T, double *t dir[2] = interp1d(s,p->s,p->dz,N); /* FIXME: This should be the *residual* scattering RMS. */ - *theta0 = p->theta0*sqrt(s); + *theta0 = fmax(MIN_THETA0, p->theta0*sqrt(s)); } void path_free(path *p) diff --git a/src/path.h b/src/path.h index 0c97f18..1e40061 100644 --- a/src/path.h +++ b/src/path.h @@ -3,6 +3,16 @@ #include +/* Minimum value for the scattering RMS `theta0`. + * + * This is a bit of a hack to correct for the fact that we assume the + * probability of a photon hitting a PMT is uniform across the face of a 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. + * + * FIXME: Should do some tests to figure out what is the best value. */ +#define MIN_THETA0 0.01 + typedef double getKineticEnergyFunc(double x, double T0); typedef struct path { -- cgit