diff options
Diffstat (limited to 'src/zdab_utils.c')
-rw-r--r-- | src/zdab_utils.c | 12 |
1 files 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; |