aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-07-29 15:45:56 -0500
committertlatorre <tlatorre@uchicago.edu>2019-07-29 15:45:56 -0500
commit2c3d4cd7ef42e878f0e981cf91295ff8ad051877 (patch)
treef3a47b1393265fb8830f96170ec266c530733b16
parent56e8016298c1ed657e2727002b7cefc29e046740 (diff)
downloadsddm-2c3d4cd7ef42e878f0e981cf91295ff8ad051877.tar.gz
sddm-2c3d4cd7ef42e878f0e981cf91295ff8ad051877.tar.bz2
sddm-2c3d4cd7ef42e878f0e981cf91295ff8ad051877.zip
use standard PCA time for MC
-rw-r--r--src/zdab_utils.c12
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;