aboutsummaryrefslogtreecommitdiff
path: root/utils/sddm/plot_energy.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/sddm/plot_energy.py')
-rwxr-xr-xutils/sddm/plot_energy.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py
index 90c4498..cf59bc6 100755
--- a/utils/sddm/plot_energy.py
+++ b/utils/sddm/plot_energy.py
@@ -116,10 +116,10 @@ def tag_michels(ev):
ev['michel'] &= ev.dc & (DC_JUNK | DC_CRATE_ISOTROPY | DC_QVNHIT | DC_FLASHER | DC_NECK | DC_ESUM | DC_OWL | DC_OWL_TRIGGER | DC_FTS) == 0
ev['michel'] &= ev.nhit >= 100
ev['michel'] &= (time_since_last_prompt_plus_muon > 800) & (time_since_last_prompt_plus_muon < 200e3)
- ev.loc[~ev.michel,'muon_gtid'] = -1
- ev.loc[~ev.michel,'muon_nhit'] = -1
- ev['stopping_muon'] = np.zeros(len(ev),dtype=np.bool)
- ev.loc[ev.gtid.isin(ev.muon_gtid[ev.muon_gtid > 0].values),'stopping_muon'] = 1
+ ev['muon_gtid'] = ev.muon_gtid.where(ev.michel,other=-1)
+ ev['muon_nhit'] = ev.muon_nhit.where(ev.michel,other=-1)
+ ev['stopping_muon'] = np.ones(len(ev),dtype=np.bool)
+ ev['stopping_muon'] = ev.stopping_muon.where(ev.gtid.isin(ev.muon_gtid[ev.muon_gtid > 0].values),other=False)
return ev
def atmospheric_events(ev):