File indexing completed on 2026-03-30 07:50:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef HistoManager_h
0030 #define HistoManager_h 1
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 #include "G4DataVector.hh"
0051 #include "G4DynamicParticle.hh"
0052 #include "G4Track.hh"
0053 #include "G4VPhysicalVolume.hh"
0054 #include "globals.hh"
0055
0056 #include <vector>
0057
0058
0059
0060 class Histo;
0061
0062 class HistoManager
0063 {
0064 public:
0065
0066
0067 static HistoManager* GetPointer();
0068
0069 private:
0070 HistoManager();
0071
0072 public:
0073 ~HistoManager();
0074
0075 void BookHisto();
0076
0077 void BeginOfRun();
0078 void EndOfRun(G4int runID);
0079
0080 void BeginOfEvent();
0081 void EndOfEvent();
0082
0083 void ScoreNewTrack(const G4Track* aTrack);
0084 void AddEnergy(G4double edep, G4int idx, G4int copyNo);
0085
0086 void AddDeltaElectron(const G4DynamicParticle*);
0087 void AddPhoton(const G4DynamicParticle*);
0088
0089 inline void ResetTrackLength() { fTrackLength = 0.0, fTrackAbs = true; };
0090 inline void AddPositron(const G4DynamicParticle*) { ++fPosit; };
0091 inline void SetVerbose(G4int val) { fVerbose = val; };
0092 inline G4int GetVerbose() const { return fVerbose; };
0093 inline void SetHistoNumber(G4int val) { fNHisto = val; };
0094
0095 inline void SetFirstEventToDebug(G4int val) { fEvt1 = val; };
0096 inline G4int FirstEventToDebug() const { return fEvt1; };
0097 inline void SetLastEventToDebug(G4int val) { fEvt2 = val; };
0098 inline G4int LastEventToDebug() const { return fEvt2; };
0099
0100 inline void SetMaxEnergy(G4double val) { fMaxEnergy = val; };
0101 inline G4double GetMaxEnergy() const { return fMaxEnergy; };
0102 inline void AddStep() { fStep += 1.0; };
0103
0104
0105 inline void SetBeamEnergy(G4double val) { fBeamEnergy = val; };
0106
0107 void SetEdepAndRMS(G4int, const G4ThreeVector&);
0108
0109 private:
0110
0111 static HistoManager* fManager;
0112
0113 const G4ParticleDefinition* fGamma;
0114 const G4ParticleDefinition* fElectron;
0115 const G4ParticleDefinition* fPositron;
0116
0117 Histo* fHisto;
0118
0119 G4int fNHisto;
0120 G4int fVerbose;
0121 G4int fEvt1;
0122 G4int fEvt2;
0123
0124 G4double fBeamEnergy;
0125 G4double fMaxEnergy;
0126 G4double fMaxEnergyAbs;
0127
0128 G4double fTrackLength;
0129 G4double fStep;
0130 G4bool fTrackAbs;
0131 G4int fEvt;
0132 G4int fElec;
0133 G4int fPosit;
0134 G4int fGam;
0135 G4int fLowe;
0136 G4int fBinsE, fBinsEA, fBinsED;
0137
0138 G4double fEabs1, fEabs2, fEabs3, fEabs4;
0139 G4double fE[25];
0140 G4DataVector fEvertex;
0141 G4DataVector fNvertex;
0142 G4DataVector fBrem;
0143 G4DataVector fPhot;
0144 G4DataVector fComp;
0145 G4DataVector fConv;
0146
0147 G4double fEdeptrue[3];
0148 G4double fRmstrue[3];
0149 G4double fLimittrue[3];
0150 G4double fEdep[6];
0151 G4double fErms[6];
0152 G4double fEdeptr[6];
0153 G4double fErmstr[6];
0154 G4int fStat[6];
0155 G4int fNmax;
0156 };
0157
0158 #endif