Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
extended/hadronic/Hadr02/include/HistoManager.hh
이 파일의 문서화 페이지로 가기
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 81932 2014-06-06 15:39:45Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName: HistoManager
34 //
35 // Description: Singleton class to hold parameters 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 03/03/2011
43 //
44 // Modified:
45 //
46 //----------------------------------------------------------------------------
47 //
48 
49 #ifndef HistoManager_h
50 #define HistoManager_h 1
51 
52 #include "globals.hh"
53 #include "G4Material.hh"
54 
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56 
57 class Histo;
58 class G4Track;
59 class G4Step;
63 
64 class HistoManager
65 {
66 public:
67 
68  static HistoManager* GetPointer();
69 
70  ~HistoManager();
71 
72  void BookHisto();
73 
74  void BeginOfRun();
75  void EndOfRun();
76  void BeginOfEvent();
77  void EndOfEvent();
78  void Fill(G4int id, G4double x, G4double w);
79 
80  void ScoreNewTrack(const G4Track*);
81  void AddTargetStep(const G4Step*);
82 
83  void SetVerbose(G4int val);
84  void SetIonPhysics(const G4String&);
85 
86  inline void SetTargetMaterial(const G4Material* mat) {fMaterial = mat;};
87  inline void SetTargetLength(G4double val) {fLength = val;};
88  inline void SetNumberOfSlices(G4int val) {fNSlices = val;};
89  inline void SetNumberOfBinsE(G4int val) {fNBinsE = val;};
90 
91  inline G4double Length() const {return fLength;};
92  inline G4int NumberOfSlices() const {return fNSlices;};
93 
94  inline G4int GetVerbose() const {return fVerbose;};
95 
97  inline G4bool DefaultBeamPosition() const {return fBeamFlag;};
98 
99  inline void SetMaxEnergyDeposit(G4double val) {fEdepMax = val;};
100 
102 
103 private:
104  HistoManager();
105 
106  void Initialise();
107 
108  static HistoManager* fManager;
109 
115 
123 
124  G4int fVerbose;
125  G4int fNBinsE;
126  G4int fNSlices;
127 
128  G4int fNevt;
129  G4int fNelec;
130  G4int fNposit;
131  G4int fNgam;
132  G4int fNcpions;
133  G4int fNpi0;
134  G4int fNkaons;
135  G4int fNmuons;
136  G4int fNions;
137  G4int fNdeut;
138  G4int fNalpha;
140  G4int fNproton;
142  G4int fNstep;
143  G4int fNHisto;
144 
146 
147  Histo* fHisto;
148 };
149 
150 #endif
Float_t x
Definition: compare.C:6
void Fill(G4int id, G4double x, G4double w)
const char * p
Definition: xmltok.h:285
void SetTargetMaterial(const G4Material *mat)
const G4ParticleDefinition * fPrimaryDef
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void SetPhysicsList(G4VModularPhysicsList *p)
Definition: G4Step.hh:76
Float_t mat
int G4int
Definition: G4Types.hh:78
const G4ParticleDefinition * fNeutron