Geant4  10.02
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 //
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
117 
121 
126 
130 
133 // G4double fStepTarget;
134  G4bool fTrackAbs; // Track is in absorber
139 // G4int fGamph;
140 // G4int fGamTar;
143 
152 
162 
164 
165 
166 
167 };
168 
169 #endif
void AddPositron(const G4DynamicParticle *)
Definition: HistoManager.hh:94
void SetMaxEnergy(G4double val)
G4double fStep
G4double fMaxEnergy
void bookHisto()
void SetHistoNumber(G4int val)
Definition: HistoManager.hh:97
void AddPhoton(const G4DynamicParticle *)
CLHEP::Hep3Vector G4ThreeVector
void SetFirstEventToDebug(G4int val)
Definition: HistoManager.hh:99
void EndOfEvent()
Definition: Histo.hh:56
void SetLastEventToDebug(G4int val)
G4double fErmstr[6]
const G4ParticleDefinition * fGamma
void SetBeamEnergy(G4double val)
void SetEdepAndRMS(G4int, G4ThreeVector)
G4DataVector fPhot
G4double fRmstrue[3]
G4DataVector fNvertex
int G4int
Definition: G4Types.hh:78
G4int LastEventToDebug() const
G4double fEabs2
G4DataVector fConv
G4double fErms[6]
G4double fEdep[6]
G4DataVector fEvertex
G4DataVector fBrem
void AddDeltaElectron(const G4DynamicParticle *)
bool G4bool
Definition: G4Types.hh:79
const G4ParticleDefinition * fElectron
void BeginOfEvent()
void BeginOfRun()
G4double fBeamEnergy
G4int FirstEventToDebug() const
G4int fStat[6]
G4bool fTrackAbs
G4double fEabs1
G4double fEdeptr[6]
Histo * fHisto
G4int GetVerbose() const
Definition: HistoManager.hh:96
G4double fEdeptrue[3]
static HistoManager * fManager
G4double fEabs3
G4double GetMaxEnergy() const
void ScoreNewTrack(const G4Track *aTrack)
void SetVerbose(G4int val)
Definition: HistoManager.hh:95
const G4ParticleDefinition * fPositron
G4double fLimittrue[3]
static HistoManager * GetPointer()
Definition: HistoManager.cc:64
double G4double
Definition: G4Types.hh:76
G4double fE[25]
void ResetTrackLength()
Definition: HistoManager.hh:93
G4DataVector fComp
G4double fEabs4
G4double fTrackLength
G4double fMaxEnergyAbs
void AddEnergy(G4double edep, G4int idx, G4int copyNo)