Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE06Run.hh
Go to the documentation of this file.
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 //
28 //
29 // $Id: RE06Run.hh 75123 2013-10-28 09:53:28Z gcosmo $
30 //
31 
32 #ifndef RE06Run_h
33 #define RE06Run_h 1
34 
35 #include "globals.hh"
36 #include "G4Run.hh"
37 
38 #include "G4THitsMap.hh"
39 
40 class G4Event;
41 
42 class RE06Run : public G4Run
43 {
44 public:
45  RE06Run();
46  virtual ~RE06Run();
47 
48  virtual void RecordEvent(const G4Event*);
49  virtual void Merge(const G4Run*);
50 
51  G4double GetTotalE(G4int i) const { return GetTotal(fMapSum[i][0]); }
52  G4double GetNGamma(G4int i) const { return GetTotal(fMapSum[i][1]); }
53  G4double GetNElectron(G4int i) const { return GetTotal(fMapSum[i][2]); }
54  G4double GetNPositron(G4int i) const { return GetTotal(fMapSum[i][3]); }
55  G4double GetTotalL(G4int i) const { return GetTotal(fMapSum[i][4]); }
56  G4double GetNStep(G4int i) const { return GetTotal(fMapSum[i][5]); }
57 
58  G4double GetEMinGamma(G4int i) const { return FindMinimum(fMapMin[i][0]);}
59  G4double GetEMinElectron(G4int i) const { return FindMinimum(fMapMin[i][1]);}
60  G4double GetEMinPositron(G4int i) const { return FindMinimum(fMapMin[i][2]);}
61 
63  {
64  G4double* p = fMapPara[i][j][k];
65  if(p) return *p;
66  return 0.;
67  }
68 
69 private:
70  G4double GetTotal(const G4THitsMap<G4double> &map) const;
71  G4double FindMinimum(const G4THitsMap<G4double> &map) const;
72 
73  // Maps for accumulation
74  // fMapSum[i][j]
75  // i = 0 : Calor-A_abs j = 0 : total eDep
76  // i = 1 : Calor-A_gap j = 1 : number of gamma
77  // i = 2 : Calor-B_abs j = 2 : number of electron
78  // i = 3 : Calor-B_gap j = 3 : number of positron
79  // i = 4 : Calor-C_abs j = 4 : total step length for e+/e-
80  // i = 5 : Calor-C_gap j = 5 : total number of steps for e+/e-
81  G4THitsMap<G4double> fMapSum[6][6];
82  G4int fColIDSum[6][6];
83 
84  // Maps for minimum value
85  // i = 0 : Calor-A_abs j = 0 : minimum kinE at generation for gamma
86  // i = 1 : Calor-A_gap j = 1 : minimum kinE at generation for electron
87  // i = 2 : Calor-B_abs j = 2 : minimum kinE at generation for positron
88  // i = 3 : Calor-B_gap
89  // i = 4 : Calor-C_abs
90  // i = 5 : Calor-C_gap
91  G4THitsMap<G4double> fMapMin[6][3];
92  G4int fColIDMin[6][3];
93 
94  // Maps for accumulation in parallel world
95  // fMapPara[i][j]
96  // i = 0 : Calor-AP_para j = 0 : total eDep
97  // i = 1 : Calor-BP_para j = 1 : number of gamma
98  // i = 2 : Calor-CP_para j = 2 : number of electron
99  // j = 3 : number of positron
100  // j = 4 : total step length for e+/e-
101  // j = 5 : total number of steps for e+/e-
102  G4THitsMap<G4double> fMapPara[3][6];
103  G4int fColIDPara[3][6];
104 
105 };
106 
107 #endif
108 
G4double GetNGamma(G4int i) const
Definition: RE06Run.hh:52
G4double GetEMinElectron(G4int i) const
Definition: RE06Run.hh:59
G4double GetNElectron(G4int i) const
Definition: RE06Run.hh:53
G4double GetNPositron(G4int i) const
Definition: RE06Run.hh:54
const char * p
Definition: xmltok.h:285
virtual void Merge(const G4Run *)
Definition: RE06Run.cc:133
RE06Run()
Definition: RE06Run.cc:39
G4double GetNStep(G4int i) const
Definition: RE06Run.hh:56
int G4int
Definition: G4Types.hh:78
G4double GetEMinPositron(G4int i) const
Definition: RE06Run.hh:60
Definition: G4Run.hh:46
G4double GetParaValue(G4int i, G4int j, G4int k) const
Definition: RE06Run.hh:62
G4double GetTotalL(G4int i) const
Definition: RE06Run.hh:55
virtual ~RE06Run()
Definition: RE06Run.cc:85
G4double GetTotalE(G4int i) const
Definition: RE06Run.hh:51
double G4double
Definition: G4Types.hh:76
G4double GetEMinGamma(G4int i) const
Definition: RE06Run.hh:58
virtual void RecordEvent(const G4Event *)
Definition: RE06Run.cc:90