source: trunk/examples/extended/electromagnetic/TestEm9/include/HistoManager.hh@ 1353

Last change on this file since 1353 was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 5.2 KB
Line 
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// $Id: HistoManager.hh,v 1.12 2010/04/29 15:21:39 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28
29#ifndef HistoManager_h
30#define HistoManager_h 1
31
32//---------------------------------------------------------------------------
33//
34// ClassName: HistoManager
35//
36// Description: Singleton class to hold Emc parameters and build histograms.
37// User cannot access to the constructor.
38// The pointer of the only existing object can be got via
39// HistoManager::GetPointer() static method.
40// The first invokation of this static method makes
41// the singleton object.
42//
43// Author: V.Ivanchenko 27/09/00
44//
45//----------------------------------------------------------------------------
46//
47
48//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
49
50#include "globals.hh"
51#include <vector>
52#include "G4DynamicParticle.hh"
53#include "G4VPhysicalVolume.hh"
54#include "G4DataVector.hh"
55#include "G4Track.hh"
56
57//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
58
59class Histo;
60
61class HistoManager
62{
63
64public:
65 // With description
66
67 static HistoManager* GetPointer();
68
69private:
70
71 HistoManager();
72
73public: // Without description
74
75 ~HistoManager();
76
77 void bookHisto();
78
79 void BeginOfRun();
80 void EndOfRun();
81
82 void BeginOfEvent();
83 void EndOfEvent();
84
85 void ScoreNewTrack(const G4Track* aTrack);
86 void AddEnergy(G4double edep, G4int idx, G4int copyNo);
87
88 void AddDeltaElectron(const G4DynamicParticle*);
89 void AddPhoton(const G4DynamicParticle*);
90
91 G4double GetTrackLength() const {return trackLength;};
92 void ResetTrackLength() {trackLength = 0.0, trackAbs = true;};
93 void SetTrackOutAbsorber() {trackAbs = false;};
94 G4bool GetTrackInAbsorber() const {return trackAbs;};
95 void AddTrackLength(G4double x) {trackLength += x;};
96 void AddPositron(const G4DynamicParticle*) {n_posit++;};
97 void SetVerbose(G4int val) {verbose = val;};
98 G4int GetVerbose() const {return verbose;};
99 void SetHistoNumber(G4int val) {nHisto = val;};
100 void SetNtuple(G4bool val) {nTuple = val;};
101
102 void SetFirstEventToDebug(G4int val) {nEvt1 = val;};
103 G4int FirstEventToDebug() const {return nEvt1;};
104 void SetLastEventToDebug(G4int val) {nEvt2 = val;};
105 G4int LastEventToDebug() const {return nEvt2;};
106
107 void SetMaxEnergy(G4double val) {maxEnergy = val;};
108 G4double GetMaxEnergy() const {return maxEnergy;};
109 void SetThresholdEnergy(G4double val) {thKinE = val;};
110 void SetThresholdZ(G4double val) {thPosZ = val;};
111 void AddStep() {n_step += 1.0;};
112
113 // Acceptance parameters
114 void SetEdepAndRMS(G4int, G4ThreeVector);
115 void SetBeamEnergy(G4double val) {beamEnergy = val;};
116
117private:
118
119 // MEMBERS
120 static HistoManager* fManager;
121
122 G4int nHisto;
123 G4int verbose;
124 G4int nEvt1;
125 G4int nEvt2;
126
127 G4double beamEnergy;
128 G4double maxEnergy;
129 G4double maxEnergyAbs;
130 G4double thKinE;
131 G4double thPosZ;
132
133 G4double trackLength;
134 G4double n_step;
135 G4double n_step_target;
136 G4bool trackAbs; // Track is in absorber
137 G4int n_evt;
138 G4int n_elec;
139 G4int n_posit;
140 G4int n_gam;
141 G4int n_gamph;
142 G4int n_gam_tar;
143 G4int n_lowe;
144 G4int nBinsE, nBinsEA, nBinsED;
145 G4bool nTuple;
146
147 G4double Eabs1, Eabs2, Eabs3, Eabs4;
148 G4double E[25];
149 G4DataVector Evertex;
150 G4DataVector Nvertex;
151 G4DataVector brem;
152 G4DataVector phot;
153 G4DataVector comp;
154 G4DataVector conv;
155
156 G4double edeptrue[3];
157 G4double rmstrue[3];
158 G4double limittrue[3];
159 G4double edep[6];
160 G4double erms[6];
161 G4double edeptr[6];
162 G4double ermstr[6];
163 G4int stat[6];
164 G4int nmax;
165
166 Histo* histo;
167
168
169
170};
171
172#endif
Note: See TracBrowser for help on using the repository browser.