diff options
Diffstat (limited to 'utils/sddm/plot_energy.py')
-rw-r--r-- | utils/sddm/plot_energy.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py index d2c9656..106c2f9 100644 --- a/utils/sddm/plot_energy.py +++ b/utils/sddm/plot_energy.py @@ -600,6 +600,8 @@ def get_events(filenames, merge_fits=False, nhit_thresh=None, mc=False): ev = ev.groupby('run',group_keys=False).apply(burst_cut) + ev['nhit_cal_over_nhit'] = ev['nhit_cal']/ev['nhit'] + # Label instrumentals ev['noise'] = ev.dc & (DC_JUNK | DC_CRATE_ISOTROPY | DC_QVNHIT | DC_ITC | DC_ESUM) != 0 ev['neck'] = ((ev.dc & DC_NECK) != 0) & ~ev.noise @@ -607,6 +609,7 @@ def get_events(filenames, merge_fits=False, nhit_thresh=None, mc=False): ev['breakdown'] = ((ev.dc & (DC_FLASHER | DC_BREAKDOWN)) != 0) & ~(ev.noise | ev.neck) & (ev.nhit >= 1000) ev['muon'] = ((ev.dc & DC_MUON) != 0) & ~(ev.noise | ev.neck | ev.flasher | ev.breakdown) ev['signal'] = ~(ev.noise | ev.neck | ev.flasher | ev.breakdown | ev.muon) + ev['signal'] &= ev['nhit_cal_over_nhit'] > 0.8 ev['instrumental'] = ~ev.signal n_pulse_gt = np.count_nonzero((ev.trg_type & TRIG_PULSE_GT) != 0) |