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