Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extended/electromagnetic/TestEm8/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/TestEm8/include/HistoManager.hh
27 /// \brief Definition of the HistoManager class
28 //
29 // $Id: HistoManager.hh 79241 2014-02-20 16:03:35Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName: HistoManager
34 //
35 // Description: Singleton class to make analysis and build histograms.
36 // User cannot access to the constructor.
37 // The pointer of the only existing object can be got via
38 // HistoManager::GetPointer() static method.
39 // The first invokation of this static method makes
40 // the singleton object.
41 //
42 // Author: V.Ivanchenko 01.09.2010
43 //
44 //----------------------------------------------------------------------------
45 //
46 
47 #ifndef HistoManager_h
48 #define HistoManager_h 1
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
51 
52 #include "globals.hh"
53 #include "G4DataVector.hh"
54 #include "G4StatDouble.hh"
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57 
58 class Histo;
59 class G4Step;
60 class G4ElectronIonPair;
61 
62 class HistoManager
63 {
64 
65 public:
66  // With description
67 
68  static HistoManager* GetPointer();
69 
70 private:
71 
72  HistoManager();
73 
74 public: // Without description
75 
76  ~HistoManager();
77 
78  void BeginOfRun();
79  void EndOfRun();
80 
81  void BeginOfEvent();
82  void EndOfEvent();
83 
84  void AddEnergy(G4double edep, const G4Step*);
85 
86  inline void SetMaxEnergy(G4double value);
87 
88  inline void SetNumberBins(G4int value);
89 
90  inline void SetNumberBinsCluster(G4int value);
91 
92  inline void SetEnergyPerChannel(G4double value);
93 
94  inline void SetVerbose(G4int value);
95 
96  inline G4int GetVerbose() const;
97 
98 private:
99 
100  // MEMBERS
101  static HistoManager* fManager;
102 
103  G4int fNHisto;
104  G4int fVerbose;
105 
106  G4double fMaxEnergy;
107  G4double fStepGas;
108  G4double fCluster;
109  G4double fTotStepGas;
110  G4double fTotCluster;
111  G4double fMeanCluster;
112  G4double fFactorALICE;
113  G4double fEvt;
114 
115  G4int fBinsE;
116  G4int fBinsCluster;
117 
118  G4bool fHistoBooked;
119 
120  G4double fTotEdep;
121  G4StatDouble fEdep;
122  G4double fOverflow;
123  G4DataVector fEgas;
124 
125  Histo* fHisto;
126  G4ElectronIonPair* fElIonPair;
127 };
128 
130 {
131  fMaxEnergy = value;
132 }
133 
135 {
136  fBinsE = value;
137 }
138 
140 {
141  fBinsCluster = value;
142 }
143 
145 {
146  if(value > 0.0) { fFactorALICE = 1./value; }
147 }
148 
150 {
151  fVerbose = value;
152 }
153 
155 {
156  return fVerbose;
157 }
158 
159 #endif
void AddEnergy(G4double edep, const G4Step *)
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
Definition: G4Step.hh:76
const XML_Char int const XML_Char * value
double G4double
Definition: G4Types.hh:76