From a2d5287830c7dab92e78294c3a6833464dc5e59d Mon Sep 17 00:00:00 2001 From: tlatorre Date: Thu, 26 Sep 2019 14:17:21 -0500 Subject: update QVNHIT cut This commit updates the QvNHIT cut to not require PMT hits to have a good calibration to be included in the charge sum. The reason for this is that many electrical pickup events have lots of hits which are pickup and thus have small or negative charges. When the charge is low like this the PMT hits get flagged with the bad calibration bit (I'm not sure if it's because of the PMT charge walk calibration or what). Therefore, now we include all hit PMTs in the charge sum if there ECA calibrated QHL value is above -100. --- src/dc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dc.c b/src/dc.c index e8a3183..5cb26b3 100644 --- a/src/dc.c +++ b/src/dc.c @@ -451,7 +451,12 @@ int crate_isotropy(event *ev) * throw away the 10% of the tubes that have the largest charge and then * divide this by 0.9* NHIT. Tag the event if this ratio is below 0.25. * - * I copied the logic from the SNOMAN file flt_q_nhit_cut.for. */ + * I copied the logic from the SNOMAN file flt_q_nhit_cut.for. + * + * Update: I changed the logic from the SNOMAN code to not require good + * calibrations. The reason is that for electrical pickup events, the charges + * on most of the hits can be very small or negative and so we wouldn't tag + * them with this cut. */ int qvnhit(event *ev) { size_t i; @@ -461,13 +466,10 @@ int qvnhit(event *ev) nhit = 0; for (i = 0; i < MAX_PMTS; i++) { - if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL) continue; - - /* Require good calibrations. */ - if (ev->pmt_hits[i].pf & (KPF_NO_CAL | KPF_BAD_CAL)) continue; + if (!ev->pmt_hits[i].hit || pmts[i].pmt_type != PMT_NORMAL) continue; /* Remove unphysical charge hits. */ - if (ev->pmt_hits[i].qhl <= -100) continue; + if (ev->pmt_hits[i].ehl <= -100) continue; /* FIXME: SNOMAN code checks for pmt terminator. I don't know where * that info is stored. */ @@ -478,9 +480,7 @@ int qvnhit(event *ev) * we use QHL since it is a better measure of pickup (long integrate) * */ - if (ev->pmt_hits[i].hit) { - ehl[nhit++] = ev->pmt_hits[i].ehl/32.3; - } + ehl[nhit++] = ev->pmt_hits[i].ehl/32.3; } gsl_sort(ehl,1,nhit); -- cgit