diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-09 16:39:59 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-09 16:39:59 -0400 |
commit | 6870f1f5695c7cca3ed8e0a1cf559245991c80b5 (patch) | |
tree | 184fbbbb7cf2d44607dd192b34c0c5455d8cdcf5 /io/root.C | |
parent | 4f3e0b7709bb64ffc24f2a003509d5f480848239 (diff) | |
parent | 5b478fe72e600e06cd7b2e8a05a600f30c44d5c0 (diff) | |
download | chroma-6870f1f5695c7cca3ed8e0a1cf559245991c80b5.tar.gz chroma-6870f1f5695c7cca3ed8e0a1cf559245991c80b5.tar.bz2 chroma-6870f1f5695c7cca3ed8e0a1cf559245991c80b5.zip |
merge heads
Diffstat (limited to 'io/root.C')
-rw-r--r-- | io/root.C | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -9,7 +9,7 @@ struct Photon { TVector3 dir; TVector3 pol; double wavelength; // nm - int history; + unsigned int history; int last_hit_triangle; }; @@ -29,6 +29,7 @@ struct Channel { int channel_id; double t; double q; + unsigned int mc_history; }; struct Event { @@ -67,17 +68,19 @@ void fill_photons(Event *ev, bool start, } -void fill_hits(Event *ev, unsigned int nchannels, float *channel_times) +void fill_hits(Event *ev, unsigned int nchannels, float *t, + float *q, unsigned int *history) { ev->channel.resize(0); ev->nhit = 0; Channel ch; for (unsigned int i=0; i < nchannels; i++) { - if (channel_times[i] < 1e8) { + if (t[i] < 1e8) { ev->nhit++; ch.channel_id = i; - ch.t = channel_times[i]; - ch.q = 1.0; + ch.t = t[i]; + ch.q = q[i]; + ch.mc_history = history[i]; ev->channel.push_back(ch); } } |