From d38aa64a9de0af9ac886cd7f51ea5ff575399519 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Tue, 27 Aug 2019 14:16:38 -0500 Subject: fix the fts cut This commit fixes the FTS cut so that it returns 1 when the event is flagged as failing the cut. Previously, the function returned the following: not enough PMT pairs: 0 (fail) median time > 6.8 ns: 0 (fail) otherwise: 1 (pass) This had two issues: the return value wasn't consistent with the rest of the data cleaning cuts and it should pass if there aren't enough PMT pairs. Now, I fixed the not enough PMT pairs case and made the return value consistent with the rest of the data cleaning cuts: not enough PMT pairs: 0 (pass) median time > 6.8 ns: 1 (fail) otherwise: 0 (pass) --- src/dc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dc.c b/src/dc.c index 7b5b1d7..8b85070 100644 --- a/src/dc.c +++ b/src/dc.c @@ -106,7 +106,7 @@ int is_fts(event *ev) /* Get the absolute value of the time difference. */ dt = fabs(ev->pmt_hits[i].t - ev->pmt_hits[j].t); - if (dt <= 25.0 && distance < 300.0) { + if (dt <= FTS_DT_THRESH && distance < FTS_DIST_THRESH) { deltat_array[count++] = dt; if (count >= MAX_PAIRS) goto end; } @@ -118,7 +118,7 @@ end: if (count > FTS_COUNT_THRESH) { gsl_sort(deltat_array,1,count); dtmedian = gsl_stats_median_from_sorted_data(deltat_array,1,count); - return dtmedian < FTS_MEDIAN_CUT; + return dtmedian > FTS_MEDIAN_CUT; } return 0; -- cgit