ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HistoManager.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 
30 #ifndef HistoManager_h
31 #define HistoManager_h 1
32 
33 //---------------------------------------------------------------------------
34 //
35 // ClassName: HistoManager
36 //
37 // Description: Singleton class to hold Emc parameters and build histograms.
38 // User cannot access to the constructor.
39 // The pointer of the only existing object can be got via
40 // HistoManager::GetPointer() static method.
41 // The first invokation of this static method makes
42 // the singleton object.
43 //
44 // Author: V.Ivanchenko 27/09/00
45 //
46 //----------------------------------------------------------------------------
47 //
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
50 
51 #include "globals.hh"
52 #include <vector>
53 #include "G4DynamicParticle.hh"
54 #include "G4VPhysicalVolume.hh"
55 #include "G4DataVector.hh"
56 #include "G4Track.hh"
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
59 
60 class Histo;
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 BookHisto();
79 
80  void BeginOfRun();
81  void EndOfRun(G4int runID);
82 
83  void BeginOfEvent();
84  void EndOfEvent();
85 
86  void ScoreNewTrack(const G4Track* aTrack);
87  void AddEnergy(G4double edep, G4int idx, G4int copyNo);
88 
90  void AddPhoton(const G4DynamicParticle*);
91 
92  inline void ResetTrackLength() {fTrackLength = 0.0, fTrackAbs = true;};
93  inline void AddPositron(const G4DynamicParticle*) {++fPosit;};
94  inline void SetVerbose(G4int val) {fVerbose = val;};
95  inline G4int GetVerbose() const {return fVerbose;};
96  inline void SetHistoNumber(G4int val) {fNHisto = val;};
97 
98  inline void SetFirstEventToDebug(G4int val) {fEvt1 = val;};
99  inline G4int FirstEventToDebug() const {return fEvt1;};
100  inline void SetLastEventToDebug(G4int val) {fEvt2 = val;};
101  inline G4int LastEventToDebug() const {return fEvt2;};
102 
103  inline void SetMaxEnergy(G4double val) {fMaxEnergy = val;};
104  inline G4double GetMaxEnergy() const {return fMaxEnergy;};
105  inline void AddStep() {fStep += 1.0;};
106 
107  // Acceptance parameters
108  inline void SetBeamEnergy(G4double val) {fBeamEnergy = val;};
109 
111 
112 private:
113 
114  // MEMBERS
116 
120 
125 
129 
132 // G4double fStepTarget;
133  G4bool fTrackAbs; // Track is in absorber
138 // G4int fGamph;
139 // G4int fGamTar;
142 
151 
161 
163 
164 
165 
166 };
167 
168 #endif