aboutsummaryrefslogtreecommitdiff
path: root/utils/plot-dc
diff options
context:
space:
mode:
Diffstat (limited to 'utils/plot-dc')
-rwxr-xr-xutils/plot-dc29
1 files changed, 15 insertions, 14 deletions
diff --git a/utils/plot-dc b/utils/plot-dc
index 89de2a9..acd7e7b 100755
--- a/utils/plot-dc
+++ b/utils/plot-dc
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2019, Anthony Latorre <tlatorre at uchicago>
#
# This program is free software: you can redistribute it and/or modify it
@@ -123,23 +123,24 @@ if __name__ == '__main__':
for run, df in rhdr.groupby('run'):
evs.append(get_events(df.filename.values, merge_fits=True))
if len(mc_filenames):
- evs.append(get_events(mc_filenames, merge_fits=True))
- ev = pd.concat(evs)
+ for filename in mc_filenames:
+ evs.append(get_events([filename], merge_fits=True, mc=True))
+ ev = pd.concat([ev for ev in evs if len(ev) > 0])
ev = ev[ev.prompt & ~np.isnan(ev.fmin)]
ev = ev[ev.ke > 20]
- with pd.option_context('display.max_rows', None, 'display.max_columns', None):
- print("Noise events")
- print(ev[ev.noise][['psi','x','y','z','id1','id2']])
- print("Muons")
- print(ev[ev.muon][['psi','r','id1','id2','id3','energy1','energy2','energy3']])
- print("Neck")
- print(ev[ev.neck & ev.psi < 6][['psi','r','id1','cos_theta']])
- print("Flashers")
- print(ev[ev.flasher & ev.udotr > 0])
- print("Signal")
- print(ev[ev.signal])
+ #with pd.option_context('display.max_rows', None, 'display.max_columns', None):
+ # print("Noise events")
+ # print(ev[ev.noise][['psi','x','y','z','id1','id2']])
+ # print("Muons")
+ # print(ev[ev.muon][['psi','r','id1','id2','id3','energy1','energy2','energy3']])
+ # print("Neck")
+ # print(ev[ev.neck & ev.psi < 6][['psi','r','id1','cos_theta']])
+ # print("Flashers")
+ # print(ev[ev.flasher & ev.udotr > 0])
+ # print("Signal")
+ # print(ev[ev.signal])
# save as PDF b/c EPS doesn't support alpha values
if args.save: