Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extended/electromagnetic/TestEm9/include/HistoManager.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 //
26 /// \file electromagnetic/TestEm9/include/HistoManager.hh
27 /// \brief Definition of the HistoManager class
28 //
29 // $Id: HistoManager.hh 73029 2013-08-15 09:19:37Z gcosmo $
30 
31 #ifndef HistoManager_h
32 #define HistoManager_h 1
33 
34 //---------------------------------------------------------------------------
35 //
36 // ClassName: HistoManager
37 //
38 // Description: Singleton class to hold Emc parameters and build histograms.
39 // User cannot access to the constructor.
40 // The pointer of the only existing object can be got via
41 // HistoManager::GetPointer() static method.
42 // The first invokation of this static method makes
43 // the singleton object.
44 //
45 // Author: V.Ivanchenko 27/09/00
46 //
47 //----------------------------------------------------------------------------
48 //
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
51 
52 #include "globals.hh"
53 #include <vector>
54 #include "G4DynamicParticle.hh"
55 #include "G4VPhysicalVolume.hh"
56 #include "G4DataVector.hh"
57 #include "G4Track.hh"
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
60 
61 class Histo;
62 
63 class HistoManager
64 {
65 
66 public:
67  // With description
68 
69  static HistoManager* GetPointer();
70 
71 private:
72 
73  HistoManager();
74 
75 public: // Without description
76 
77  ~HistoManager();
78 
79  void bookHisto();
80 
81  void BeginOfRun();
82  void EndOfRun(G4int runID);
83 
84  void BeginOfEvent();
85  void EndOfEvent();
86 
87  void ScoreNewTrack(const G4Track* aTrack);
88  void AddEnergy(G4double edep, G4int idx, G4int copyNo);
89 
91  void AddPhoton(const G4DynamicParticle*);
92 
93  inline void ResetTrackLength() {fTrackLength = 0.0, fTrackAbs = true;};
94  inline void AddPositron(const G4DynamicParticle*) {++fPosit;};
95  inline void SetVerbose(G4int val) {fVerbose = val;};
96  inline G4int GetVerbose() const {return fVerbose;};
97  inline void SetHistoNumber(G4int val) {fNHisto = val;};
98 
99  inline void SetFirstEventToDebug(G4int val) {fEvt1 = val;};
100  inline G4int FirstEventToDebug() const {return fEvt1;};
101  inline void SetLastEventToDebug(G4int val) {fEvt2 = val;};
102  inline G4int LastEventToDebug() const {return fEvt2;};
103 
104  inline void SetMaxEnergy(G4double val) {fMaxEnergy = val;};
105  inline G4double GetMaxEnergy() const {return fMaxEnergy;};
106  inline void AddStep() {fStep += 1.0;};
107 
108  // Acceptance parameters
109  inline void SetBeamEnergy(G4double val) {fBeamEnergy = val;};
110 
112 
113 private:
114 
115  // MEMBERS
116  static HistoManager* fManager;
117 
118  const G4ParticleDefinition* fGamma;
119  const G4ParticleDefinition* fElectron;
120  const G4ParticleDefinition* fPositron;
121 
122  G4int fNHisto;
123  G4int fVerbose;
124  G4int fEvt1;
125  G4int fEvt2;
126 
127  G4double fBeamEnergy;
128  G4double fMaxEnergy;
129  G4double fMaxEnergyAbs;
130 
131  G4double fTrackLength;
132  G4double fStep;
133 // G4double fStepTarget;
134  G4bool fTrackAbs; // Track is in absorber
135  G4int fEvt;
136  G4int fElec;
137  G4int fPosit;
138  G4int fGam;
139 // G4int fGamph;
140 // G4int fGamTar;
141  G4int fLowe;
142  G4int fBinsE, fBinsEA, fBinsED;
143 
144  G4double fEabs1, fEabs2, fEabs3, fEabs4;
145  G4double fE[25];
146  G4DataVector fEvertex;
147  G4DataVector fNvertex;
148  G4DataVector fBrem;
149  G4DataVector fPhot;
150  G4DataVector fComp;
151  G4DataVector fConv;
152 
153  G4double fEdeptrue[3];
154  G4double fRmstrue[3];
155  G4double fLimittrue[3];
156  G4double fEdep[6];
157  G4double fErms[6];
158  G4double fEdeptr[6];
159  G4double fErmstr[6];
160  G4int fStat[6];
161  G4int fNmax;
162 
163  Histo* fHisto;
164 
165 
166 
167 };
168 
169 #endif
void AddPhoton(const G4DynamicParticle *)
void AddEnergy(G4double edep, const G4Step *)
int G4int
Definition: G4Types.hh:78
void AddDeltaElectron(const G4DynamicParticle *)
bool G4bool
Definition: G4Types.hh:79
double G4double
Definition: G4Types.hh:76