Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
extended/hadronic/Hadr01/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 100811 2016-11-02 15:05:20Z 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 27/09/00
43 //
44 // Modified:
45 // 04.06.2006 Adoptation of Hadr01 (V.Ivanchenko)
46 // 03.10.2006 Add csFlag (V.Ivanchenko)
47 // 16.11.2006 Add beamFlag (V.Ivanchenko)
48 //
49 //----------------------------------------------------------------------------
50 //
51 
52 #ifndef HistoManager_h
53 #define HistoManager_h 1
54 
55 #include "globals.hh"
56 #include "G4Material.hh"
57 #include "G4Element.hh"
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
60 
61 class Histo;
62 class G4Track;
63 class G4Step;
65 
66 class HistoManager
67 {
68 public:
69 
70  static HistoManager* GetPointer();
71 
72 private:
73 
74  HistoManager();
75 
76 public:
77 
78  ~HistoManager();
79 
80  void BookHisto();
81 
82  void BeginOfRun();
83  void EndOfRun();
84  void BeginOfEvent();
85  void EndOfEvent();
86  void Fill(G4int id, G4double x, G4double w);
87 
88  void ScoreNewTrack(const G4Track*);
89  void AddTargetStep(const G4Step*);
90  void AddLeakingParticle(const G4Track*);
91 
92  void SetVerbose(G4int val);
93 
94  inline void SetTargetLength(G4double val) {fLength = val;};
95  inline void SetNumberOfSlices(G4int val) {fNSlices = val;};
96  inline void SetNumberOfBinsE(G4int val) {fNBinsE = val;};
98  inline void SetMaxEnergyDeposit(G4double val) {fEdepMax = val;};
99 
100  inline G4double Length() const {return fLength;};
101  inline G4bool DefaultBeamPosition() const {return fBeamFlag;};
102  inline G4int NumberOfSlices() const {return fNSlices;};
103  inline G4int GetVerbose() const {return fVerbose;};
104 
105 private:
106 
107  static HistoManager* fManager;
108 
111 
122 
123  G4int fVerbose;
126 
147  G4int fNHisto;
148 
151 
152  Histo* fHisto;
153 };
154 
155 #endif
Float_t x
Definition: compare.C:6
void Fill(G4int id, G4double x, G4double w)
const G4ParticleDefinition * fPrimaryDef
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
Definition: G4Step.hh:76
int G4int
Definition: G4Types.hh:78
const G4ParticleDefinition * fNeutron