From 3cd64e60eda03c7a6bf45b0a1e15f28a2f8b6406 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 22 Jun 2020 09:12:54 -0500 Subject: update get_events() to require at least 1 nhit trigger to fire This commit updates get_events() to require at least 1 nhit trigger to fire. The reason for this is that after looking at a small fraction of the data I noticed a bunch of instrumental events that weren't getting tagged in run 10141. They looked sort of like neck events and were surrounded by hundreds of orphaned PMT hits. My best guess is that they really were neck events but the neck PMT hits and the hits in the lower hemisphere were erroneously not getting built into the events. Luckily, all of these events failed the psi cut, but it's not great to rely on such a high level cut to cut these events. One other thing I noticed was that these events were triggered mostly by MISS, OWLEL, and OWLEH. Therefore I thought it might be a good idea to require events to have at least 1 NHIT trigger. To test whether the NHIT triggers were reliably firing before the other triggers I looked at all muon events which *didn't* have an NHIT trigger fire. All of them appeared to be falsely tagged neck events so I'm fairly confident that the NHIT triggers do reliably fire before the other triggers for physics events. --- utils/sddm/plot_energy.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py index 1971c8d..1a55a85 100755 --- a/utils/sddm/plot_energy.py +++ b/utils/sddm/plot_energy.py @@ -33,6 +33,12 @@ MUON_MASS = 105.6583745 # MeV PROTON_MASS = 938.272081 # MeV FINE_STRUCTURE_CONSTANT = 7.297352566417e-3 +TRIG_NHIT_100_LO = 0x00000001 +TRIG_NHIT_100_MED = 0x00000002 +TRIG_NHIT_100_HI = 0x00000004 +TRIG_NHIT_20 = 0x00000008 +TRIG_NHIT_20_LB = 0x00000010 + def unwrap(p, delta, axis=-1): """ A modified version of np.unwrap() useful for unwrapping the 50 MHz clock. @@ -558,6 +564,9 @@ def get_events(filenames, merge_fits=False): # only need the lower nhit events for neutrons. ev = ev[ev.nhit_cal >= 100] + # Require at least 1 NHIT trigger to fire + ev = ev[(ev.trg_type & (TRIG_NHIT_100_LO | TRIG_NHIT_100_MED | TRIG_NHIT_100_HI | TRIG_NHIT_20 | TRIG_NHIT_20_LB)) != 0] + if merge_fits: ev = pd.merge(ev,fits,how='left',on=['run','gtid']) # Reset n, id1, id2, and id3 columns to integers -- cgit