From 2c3d4cd7ef42e878f0e981cf91295ff8ad051877 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 29 Jul 2019 15:45:56 -0500 Subject: use standard PCA time for MC --- src/zdab_utils.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/zdab_utils.c b/src/zdab_utils.c index d4e3215..2259676 100644 --- a/src/zdab_utils.c +++ b/src/zdab_utils.c @@ -127,9 +127,15 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) ev->pmt_hits[id].pt1 = bpmt.pt1; ev->pmt_hits[id].ptm = bpmt.ptm; - /* Use the multiphoton PCA time since we are looking at high energy - * events. */ - ev->pmt_hits[id].t = bpmt.ptm; + if (is_mc(&ev_bank)) { + /* Use standard time if this is MC since the multiphoton time + * isn't calculated for MC. */ + ev->pmt_hits[id].t = bpmt.pt; + } else { + /* Use the multiphoton PCA time since we are looking at high + * energy events. */ + ev->pmt_hits[id].t = bpmt.ptm; + } /* Clear the PMT_FLAG_DIS bit. */ ev->pmt_hits[id].flags &= ~PMT_FLAG_DIS; -- cgit