aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-09-26 14:17:21 -0500
committertlatorre <tlatorre@uchicago.edu>2019-09-26 14:17:21 -0500
commita2d5287830c7dab92e78294c3a6833464dc5e59d (patch)
tree03af8240087b54d6a35055ceb399a9abae7014b2
parentdaa74302ded813f86ea4dc2083296de022447309 (diff)
downloadsddm-a2d5287830c7dab92e78294c3a6833464dc5e59d.tar.gz
sddm-a2d5287830c7dab92e78294c3a6833464dc5e59d.tar.bz2
sddm-a2d5287830c7dab92e78294c3a6833464dc5e59d.zip
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.
-rw-r--r--src/dc.c18
1 files 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);