Geant4_10
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 67235 2013-02-08 16:34:49Z vnivanch $
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 
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56 
57 class Histo;
58 class G4Step;
59 class G4ElectronIonPair;
60 
61 class HistoManager
62 {
63 
64 public:
65  // With description
66 
67  static HistoManager* GetPointer();
68 
69 private:
70 
71  HistoManager();
72 
73 public: // Without description
74 
75  ~HistoManager();
76 
77  void BeginOfRun();
78  void EndOfRun();
79 
80  void BeginOfEvent();
81  void EndOfEvent();
82 
83  void AddEnergy(G4double edep, const G4Step*);
84 
85  inline void SetMaxEnergy(G4double value);
86 
87  inline void SetNumberBins(G4int value);
88 
89  inline void SetNumberBinsCluster(G4int value);
90 
91  inline void SetEnergyPerChannel(G4double value);
92 
93  inline void SetVerbose(G4int value);
94 
95  inline G4int GetVerbose() const;
96 
97 private:
98 
99  // MEMBERS
100  static HistoManager* fManager;
101 
102  G4int fNHisto;
103  G4int fVerbose;
104 
105  G4double fMaxEnergy;
106  G4double fStepGas;
107  G4double fCluster;
108  G4double fTotStepGas;
109  G4double fTotCluster;
110  G4double fMeanCluster;
111  G4double fFactorALICE;
112  G4double fEvt;
113 
114  G4int fBinsE;
115  G4int fBinsCluster;
116 
117  G4bool fHistoBooked;
118 
119  G4double fTotEdep;
120  G4double fOverflow;
121  G4DataVector fEgas;
122 
123  Histo* fHisto;
124  G4ElectronIonPair* fElIonPair;
125 };
126 
128 {
129  fMaxEnergy = value;
130 }
131 
133 {
134  fBinsE = value;
135 }
136 
138 {
139  fBinsCluster = value;
140 }
141 
143 {
144  if(value > 0.0) { fFactorALICE = 1./value; }
145 }
146 
148 {
149  fVerbose = value;
150 }
151 
153 {
154  return fVerbose;
155 }
156 
157 #endif
void SetEnergyPerChannel(G4double value)
void EndOfEvent()
Definition: Histo.hh:56
void SetNumberBins(G4int value)
void AddEnergy(G4double edep, const G4Step *)
void SetNumberBinsCluster(G4int value)
int G4int
Definition: G4Types.hh:78
Double_t edep
Definition: macro.C:13
bool G4bool
Definition: G4Types.hh:79
void BeginOfEvent()
void BeginOfRun()
Definition: G4Step.hh:76
G4int GetVerbose() const
const XML_Char int const XML_Char * value
Definition: expat.h:331
static HistoManager * GetPointer()
Definition: HistoManager.cc:58
double G4double
Definition: G4Types.hh:76
void SetMaxEnergy(G4double value)
void SetVerbose(G4int value)