diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-06-13 11:08:04 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-06-13 11:08:04 -0500 |
commit | f8c99fdd302b6d2190ae619681fb1cea5f74f391 (patch) | |
tree | a8fdb0a578a35a24697976fea2e7ea65d6c65ec7 /src/zdab_utils.c | |
parent | 52133d6cc594a4a7780accdf070b61eb7f6c5628 (diff) | |
download | sddm-f8c99fdd302b6d2190ae619681fb1cea5f74f391.tar.gz sddm-f8c99fdd302b6d2190ae619681fb1cea5f74f391.tar.bz2 sddm-f8c99fdd302b6d2190ae619681fb1cea5f74f391.zip |
add a data cleaning cut to tag incoming muons
This commit adds a data cleaning cut to tag incoming muons by looking for early
OWL hits. It also significantly updates the flasher cut to catch more flashers.
In particular, the flasher cut now does the following:
- loops over *all* paddle cards with at least 4 hits instead of just the paddle
cards with the most hits
- uses QLX to look for charge outliers in the paddle card
- fixes a few bugs (for example, uninitialized values in the charge array)
- adds a check to to see if the given slot is early with respect to all PMTs
within 4 meters to catch the case where the flashing channel is missing from
the event
Diffstat (limited to 'src/zdab_utils.c')
-rw-r--r-- | src/zdab_utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zdab_utils.c b/src/zdab_utils.c index ba76b63..6dffe0f 100644 --- a/src/zdab_utils.c +++ b/src/zdab_utils.c @@ -78,6 +78,11 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) channel = bpmt.pin % 32; id = crate*512 + card*32 + channel; + if (id >= MAX_PMTS) { + fprintf(stderr, "PMT hit from %i/%i/%i\n", crate, card, channel); + return -1; + } + if (ev->pmt_hits[id].hit) { fprintf(stderr, "%i/%i/%i is in the PMT bank twice!\n", crate, card, channel); } @@ -105,6 +110,9 @@ int get_event(zebraFile *f, event *ev, zebraBank *bev) fprintf(stderr, "%i/%i/%i has PMT type %s but expected %s based on bank\n", crate, card, channel, pmt_type_string, pmt_names[i]); } + /* For now we assume SNOMAN has it correct. */ + pmts[id].pmt_type = pmt_types[i]; + if (!b.next) break; rv = zebra_get_bank(f,&b,b.next); |