aboutsummaryrefslogtreecommitdiff
path: root/utils/dm-search
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2021-01-03 11:40:47 -0600
committertlatorre <tlatorre@uchicago.edu>2021-01-03 11:40:47 -0600
commit6fc97e22fa2a8cc48a96b2ce22c4d55a8fd2b80f (patch)
treef5bf72de18002e0d126b8e37c628f68ec3926fb6 /utils/dm-search
parentc71532924c8c2be07026041b7cd62819e90e8c64 (diff)
downloadsddm-6fc97e22fa2a8cc48a96b2ce22c4d55a8fd2b80f.tar.gz
sddm-6fc97e22fa2a8cc48a96b2ce22c4d55a8fd2b80f.tar.bz2
sddm-6fc97e22fa2a8cc48a96b2ce22c4d55a8fd2b80f.zip
cache results from get_events()
Diffstat (limited to 'utils/dm-search')
-rwxr-xr-xutils/dm-search8
1 files changed, 2 insertions, 6 deletions
diff --git a/utils/dm-search b/utils/dm-search
index 8e2473c..cd91eab 100755
--- a/utils/dm-search
+++ b/utils/dm-search
@@ -616,7 +616,7 @@ if __name__ == '__main__':
# Add the "flux_weight" column to the ev_mc data since I stupidly simulated
# the muon neutrino flux for the tau neutrino flux in GENIE. Doh!
mcpl = load_mcpl_files(args.mcpl)
- ev_mc = renormalize_data(ev_mc.reset_index(),mcpl)
+ ev_mc = renormalize_data(ev_mc,mcpl)
# Merge weights with MCPL dataframe to get the unique id column in the
# weights dataframe since that is what we use to merge with the Monte
@@ -653,11 +653,7 @@ if __name__ == '__main__':
muon_mc = correct_energy_bias(muon_mc)
# Set all prompt events in the MC to be muons
- muon_mc.loc[muon_mc.prompt & muon_mc.filename.str.contains("cosmic"),'muon'] = True
-
- ev = ev.reset_index()
- ev_mc = ev_mc.reset_index()
- muon_mc = muon_mc.reset_index()
+ muon_mc.loc[muon_mc.prompt,'muon'] = True
# 00-orphan cut
ev = ev[(ev.gtid & 0xff) != 0]