aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-11-18 10:56:17 -0600
committertlatorre <tlatorre@uchicago.edu>2019-11-18 10:56:17 -0600
commitfcd203f8c97d4858f6a23f233a501dad0d3b97da (patch)
tree6f702dff750153835b559c5e8513de4957b850c5 /src
parent9dab6b3defa3054f32e814cf35c971089db20261 (diff)
downloadsddm-fcd203f8c97d4858f6a23f233a501dad0d3b97da.tar.gz
sddm-fcd203f8c97d4858f6a23f233a501dad0d3b97da.tar.bz2
sddm-fcd203f8c97d4858f6a23f233a501dad0d3b97da.zip
switch to using pt1 instead of the ptm
This commit updates the likelihood function to use the PMT hit time without the time walk correction applied (when the charge is greater than 1.5 PE) instead of the multiphoton PCA time. The reason is that after talking with Chris Kyba I realized that the multiphoton PCA time was calibrated to give the mean PMT hit time when mulitiple photons hit at the same time instead of the time when the first photon hits which is what I assume in my likelihood function. Therefore I now use the regular PMT hit time without time walk correction applied which should be closer to the first order statistic.
Diffstat (limited to 'src')
-rw-r--r--src/zdab_utils.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/src/zdab_utils.c b/src/zdab_utils.c
index 911850e..b26dd78 100644
--- a/src/zdab_utils.c
+++ b/src/zdab_utils.c
@@ -157,10 +157,6 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev)
ev->pmt_hits[id].ptm = 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;
-
/* Do a *very* simple conversion between time and TAC by
* assuming a linear relationship. Note: This ignores *lots* of
* effects like the TAC curl, any non-linearities, PCA offsets,
@@ -171,10 +167,6 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev)
* calibrated time are just equal to the calibrated time. */
ev->pmt_hits[id].ept = bpmt.pt;
ev->pmt_hits[id].pt1 = 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. */
@@ -266,6 +258,36 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev)
ev->pmt_hits[id].flags |= PMT_FLAG_CHARGE;
}
+ /* Use the multiphoton PCA time since we are looking at high
+ * energy events. */
+ ev->pmt_hits[id].t = bpmt.ptm;
+
+ /* Set the PMT hit time we'll use in the likelihood function. */
+ if (ev->pmt_hits[id].q < 1.5) {
+ /* If the charge is less than 1.5 PE we just use the standard
+ * PMT hit time with the time walk correction applied. */
+ ev->pmt_hits[id].t = ev->pmt_hits[id].pt;
+ } else {
+ /* Otherwise, we use the PMT hit time without the time walk
+ * correction applied.
+ *
+ * Note: Previously I was using the multiphoton PCA hit time:
+ *
+ * ev->pmt_hits[id].t = bpmt.ptm;
+ *
+ * which is designed exactly for high energy events in which
+ * you expect multiple PE. However, after talking to Chris Kyba
+ * on the phone I realized that he calibrated the multiphoton
+ * hit time to represent the *expected* value of the hit times
+ * when multiple photons hit. However, in my likelihood
+ * function I currently assume the time is governed by the
+ * first order statistic of the time when multiple photons hit.
+ *
+ * Therefore, we just use the pt1 variable which represents the
+ * PMT hit time without the time walk correction applied. */
+ ev->pmt_hits[id].t = ev->pmt_hits[id].pt1;
+ }
+
/* The following check prints out a warning on a handful of channels:
*
* 3/15/9 has PMT type NECK but expected OWL based on bank