From b78b16d32f4ed170f4a24d290348765da198d5f0 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Wed, 6 Nov 2019 11:28:27 -0600 Subject: add a couple of improvements to the quad fitter and fix a bug in get_hough_transform() This commit adds two improvements to the quad fitter: 1. I updated quad to weight the random PMT hit selection by the probability that the PMT hit is a multiphoton hit. The idea here is that we really only want to sample direct light and for high energy events the reflected and scattered light is usually single photon. 2. I added an option to quad to only use points in the quad cloud which are below a given quantile of t0. The idea here is that for particles like muons which travel more than a few centimeters in the detector the quad cloud usually looks like the whole track. Since we want the QUAD fitter to find the position of the *start* of the track we select only those quad cloud points with an early time so the position is closer to the position of the start of the track. Also, I fixed a major bug in get_hough_transform() in which I was using the wrong index variable when checking if a PMT was not flagged, a normal PMT, and was hit. This was causing the algorithm to completely miss finding more than one ring while I was testing it. --- src/quad.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/quad.h') diff --git a/src/quad.h b/src/quad.h index 51ff6ee..e95ae37 100644 --- a/src/quad.h +++ b/src/quad.h @@ -19,12 +19,16 @@ #include "event.h" #include /* for size_t */ +#include /* Maximum number of quad cloud points. */ #define QUAD_MAX 10000 +/* Maximum number of PE to consider when calculating P(> 1 hit|q) */ +#define QUAD_MAX_PE 10 + extern char quad_err[256]; -int quad(event *ev, double *pos, double *t0, size_t npoints); +int quad(event *ev, double *pos, double *t0, size_t npoints, double f); #endif -- cgit