From b11000942eb96c5b50a18030b0b8bb130a3701af Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 16 Nov 2020 08:00:44 -0600 Subject: loop over MC filenames --- utils/dc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'utils/dc') diff --git a/utils/dc b/utils/dc index 2032092..933f3d3 100755 --- a/utils/dc +++ b/utils/dc @@ -310,7 +310,14 @@ if __name__ == '__main__': for _, row in ev[ev[bg]].iterrows(): data[bg][row.radius_cut][row.psi_cut][row.z_cut][row.udotr_cut] += 1 - ev_mc = get_events(args.mc, merge_fits=True, apply_nhit_trigger=False) + # Note: We loop over the MC filenames here instead of just passing the + # whole list to get_events() because I had to rerun some of the MC events + # using SNOMAN and so most of the runs actually have two different files + # and otherwise the GTIDs will clash + ev_mcs = [] + for filename in args.mc: + ev_mcs.append(get_events([filename], merge_fits=True, nhit_thresh=args.nhit_thresh, apply_nhit_trigger=False)) + ev_mc = pd.concat(ev_mcs) ev_mc = ev_mc[ev_mc.prompt] ev_mc = ev_mc[ev_mc.nhit_cal > 100] -- cgit