From 52133d6cc594a4a7780accdf070b61eb7f6c5628 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 10 Jun 2019 14:58:18 -0500 Subject: add a bunch of SNO data quality cuts This commit adds the following data quality cuts used in SNOMAN: - neck - qvnhit - crate isotropy - junk Still need to test these. --- src/zdab_utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/zdab_utils.c') diff --git a/src/zdab_utils.c b/src/zdab_utils.c index f0651d5..ba76b63 100644 --- a/src/zdab_utils.c +++ b/src/zdab_utils.c @@ -77,14 +77,24 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) crate = (bpmt.pin % 1024)/32; channel = bpmt.pin % 32; id = crate*512 + card*32 + channel; + + if (ev->pmt_hits[id].hit) { + fprintf(stderr, "%i/%i/%i is in the PMT bank twice!\n", crate, card, channel); + } + ev->pmt_hits[id].hit = 1; + ev->pmt_hits[id].ept = bpmt.ept; ev->pmt_hits[id].t = bpmt.pt; ev->pmt_hits[id].qihl = bpmt.pihl; ev->pmt_hits[id].qihs = bpmt.pihs; ev->pmt_hits[id].qilx = bpmt.pilx; + ev->pmt_hits[id].ehl = bpmt.ehl; + ev->pmt_hits[id].ehs = bpmt.ehs; + ev->pmt_hits[id].elx = bpmt.elx; ev->pmt_hits[id].qhl = bpmt.phl; ev->pmt_hits[id].qhs = bpmt.phs; ev->pmt_hits[id].qlx = bpmt.plx; + ev->pmt_hits[id].pf = bpmt.pf; /* Clear the PMT_FLAG_DIS bit. */ ev->pmt_hits[id].flags &= ~PMT_FLAG_DIS; if (bpmt.pf & KPF_DIS) -- cgit