diff options
-rw-r--r-- | chroma/io/root.C | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chroma/io/root.C b/chroma/io/root.C index 2b39b1b..9e7ef39 100644 --- a/chroma/io/root.C +++ b/chroma/io/root.C @@ -42,6 +42,14 @@ struct Event { unsigned int nchannels; Vertex primary_vertex; + + double TotalQ() const { + double sum = 0.0; + for (unsigned int i=0; i < channels.size(); i++) + sum += channels[i].q; + return sum; + } + std::vector<Vertex> vertices; std::vector<Photon> photons_beg; |