From 43fa5ed691d849c7f8e7c2140f59100c39853d4d Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 1 Nov 2020 11:14:23 -0600 Subject: cut orphans instead of JUNK events This commit updates get_events() to only cut orphans instead of all JUNK events before calculating time differences. The reason is that some large instrumental events (or muons) can get flagged as JUNK events since they sometimes have multiple hits from the same PMT. If we remove them before calculating the time difference, the follower might not get cut. See run 10040 GTID 349491 for an example. --- utils/sddm/plot_energy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py index d9edf11..7852412 100644 --- a/utils/sddm/plot_energy.py +++ b/utils/sddm/plot_energy.py @@ -457,9 +457,9 @@ def get_events(filenames, merge_fits=False, nhit_thresh=None, apply_nhit_trigger first_gtid = rhdr.set_index('run').to_dict()['first_gtid'] - # First, remove junk events since orphans won't have a 50 MHz clock and so - # could screw up the 50 MHz clock unwrapping - ev = ev[ev.dc & DC_JUNK == 0] + # First, remove orphans since they won't have a 50 MHz clock and so could + # screw up the 50 MHz clock unwrapping + ev = ev[(ev.gtid == 0) & (ev.gtr == 0)] # We need the events to be in time order here in order to calculate the # delta t between events. It's not obvious exactly how to do this. You -- cgit