summaryrefslogtreecommitdiff
path: root/sim.py
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-08-05 22:48:55 -0400
committerStan Seibert <stan@mtrr.org>2011-08-05 22:48:55 -0400
commitfb69b3c60399a614b225591c071143fb8bbdd58f (patch)
tree56bb2f1089cd3c26578355757efce7a100d08ece /sim.py
parent34f81c141a94de028f6ae6c54df63f972ccbe75e (diff)
downloadchroma-fb69b3c60399a614b225591c071143fb8bbdd58f.tar.gz
chroma-fb69b3c60399a614b225591c071143fb8bbdd58f.tar.bz2
chroma-fb69b3c60399a614b225591c071143fb8bbdd58f.zip
Run a short dummy GEANT4 event to force it to load the tables before
the timer starts on the real events.
Diffstat (limited to 'sim.py')
-rwxr-xr-xsim.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sim.py b/sim.py
index 6432e7d..b8deef6 100755
--- a/sim.py
+++ b/sim.py
@@ -74,6 +74,14 @@ if __name__ == '__main__':
gpu_worker.setup_propagate()
gpu_worker.setup_daq(max(detector.pmtids))
+ print >>sys.stderr, 'Loading tables in GEANT4...'
+ # Do easy event to force tables to load, throw away photons
+ generator.generate_photons(particle_name='e-',
+ total_energy=1.5,
+ position=(0,0,0),
+ direction=(1,0,0))
+
+
# Create output file
f = ROOT.TFile(output_filename, 'RECREATE')
ev, T = root.make_tree('T')