From 06ece999c3866f2d19acfd0f23b2f62d02b50577 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Tue, 9 Aug 2011 15:43:36 -0400 Subject: Store a photon history for each hit channel. If multiple photons hit the same channel, their history bits are OR'ed together. --- sim.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sim.py') diff --git a/sim.py b/sim.py index 87993ab..c8f9fdb 100755 --- a/sim.py +++ b/sim.py @@ -72,9 +72,10 @@ def write_event(T, ev, event_id, hits, photon_start=None, photon_stop=None): photons['wavelength'], photons['t0'], photons['histories'], photons['last_hit_triangles']) - root.fill_hits(ev, len(hits), hits) + root.fill_hits(ev, len(hits), hits['t'], hits['q'], hits['history']) T.Fill() +#@profile def main(): parser = optparse.OptionParser('%prog') parser.add_option('-b', type='int', dest='nbits', default=10) @@ -159,7 +160,7 @@ def main(): gpu_worker.load_photons(**photons) gpu_worker.propagate() gpu_worker.run_daq() - hit_times = gpu_worker.get_hits() + hits = gpu_worker.get_hits() if options.save_photon_start: photon_start = photons @@ -170,7 +171,7 @@ def main(): else: photon_stop = None - write_event(T, ev, i, hit_times, + write_event(T, ev, i, hits, photon_start=photon_start, photon_stop=photon_stop) if i % 10 == 0: print >>sys.stderr, "\rEvent:", i, -- cgit