1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // $Id: Tst1Run.hh,v 1.1 2007/07/13 05:55:34 asaim Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | // |
---|
30 | |
---|
31 | #ifndef Tst1Run_h |
---|
32 | #define Tst1Run_h 1 |
---|
33 | |
---|
34 | #include "globals.hh" |
---|
35 | #include "G4Run.hh" |
---|
36 | |
---|
37 | #include "G4THitsMap.hh" |
---|
38 | |
---|
39 | class G4Event; |
---|
40 | |
---|
41 | class Tst1Run : public G4Run |
---|
42 | { |
---|
43 | public: |
---|
44 | Tst1Run(); |
---|
45 | virtual ~Tst1Run(); |
---|
46 | |
---|
47 | public: |
---|
48 | virtual void RecordEvent(const G4Event*); |
---|
49 | |
---|
50 | private: |
---|
51 | G4double GetTotal(const G4THitsMap<G4double> &map) const; |
---|
52 | |
---|
53 | private: |
---|
54 | // Maps for accumulation |
---|
55 | // mapSum[7] |
---|
56 | // i = 0 : eDep |
---|
57 | // i = 1 : trackLengthGamma |
---|
58 | // i = 2 : trackLengthElec |
---|
59 | // i = 3 : trackLengthPosi |
---|
60 | // i = 4 : nStepGamma |
---|
61 | // i = 5 : nStepElec |
---|
62 | // i = 6 : nStepPosi |
---|
63 | G4THitsMap<G4double> mapSum[7]; |
---|
64 | G4int colIDSum[7]; |
---|
65 | |
---|
66 | public: |
---|
67 | inline G4double GetTotal(G4int i) const |
---|
68 | { return GetTotal(mapSum[i]); } |
---|
69 | }; |
---|
70 | |
---|
71 | #endif |
---|
72 | |
---|