From 86de4bf17f7ed0ee7a70fd38770223fdde61f5a5 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 9 Sep 2019 11:12:15 -0500 Subject: switch to using ept instead of pt1 in is_flasher() and is_slot_early() --- src/dc.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/dc.c') diff --git a/src/dc.c b/src/dc.c index bc5765b..30d089a 100644 --- a/src/dc.c +++ b/src/dc.c @@ -666,12 +666,19 @@ int is_slot_early(event *ev, int flasher_pmt_id) * * Here, we use the pt1 value which is the ECA+PCA time except without * walk correction which is what was causing the issue with the bad - * regular time. */ - if (ev->pmt_hits[i].pt1 < -100) continue; + * regular time. + * + * Another update: + * + * When testing out the data cleaning cuts I found an event (run 20664 + * GTID 573780) where an obvious flasher was missed because all the + * channels in the slot had pt1 = -9999. So now we just use ept which + * should be good enough. */ + if (ev->pmt_hits[i].ept < -100) continue; if (i/32 == flasher_pmt_id/32) { /* This hit is in the same slot as the potential flasher. */ - t_slot += ev->pmt_hits[i].pt1; + t_slot += ev->pmt_hits[i].ept; n_slot += 1; continue; } @@ -682,7 +689,7 @@ int is_slot_early(event *ev, int flasher_pmt_id) distance = NORM(pmt_dir); if (distance < 400.0) { - t_nearby += ev->pmt_hits[i].pt1; + t_nearby += ev->pmt_hits[i].ept; n_nearby += 1; continue; } @@ -820,7 +827,7 @@ int is_flasher(event *ev) qlx_pc[nhit] = qlx; } - if (ev->pmt_hits[i].pt1 < -100) { + if (ev->pmt_hits[i].ept < -100) { /* This can happen if the channel has bad calibration or is in * the TAC curl region. * @@ -834,7 +841,7 @@ int is_flasher(event *ev) * at least 12 meters away. */ t_pc[nhit] = -100; } else { - t_pc[nhit] = ev->pmt_hits[i].pt1; + t_pc[nhit] = ev->pmt_hits[i].ept; } channel_pc[nhit] = channel; @@ -916,7 +923,7 @@ int is_flasher(event *ev) if (id/4 == flasher_pc/4) continue; /* Require good calibrations. */ - if (ev->pmt_hits[i].pt1 < -100) continue; + if (ev->pmt_hits[i].ept < -100) continue; nhit += 1; @@ -930,7 +937,7 @@ int is_flasher(event *ev) /* If this channel fired more than 50 ns after the high charge channel, * increment nhit_late. */ - if (ev->pmt_hits[i].pt1 > t + 50.0) nhit_late += 1; + if (ev->pmt_hits[i].ept > t + 50.0) nhit_late += 1; } /* If at least 70% of the regular PMTs fired within 50 ns and were at -- cgit