File indexing completed on 2026-09-16 08:29:45
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
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 #ifndef HistoManager_h
0048 #define HistoManager_h 1
0049
0050 #include "G4Material.hh"
0051 #include "globals.hh"
0052
0053
0054
0055 class Histo;
0056 class G4Track;
0057 class G4Step;
0058 class G4ParticleDefinition;
0059 class G4VModularPhysicsList;
0060 class G4VPhysicsConstructor;
0061
0062 class HistoManager
0063 {
0064 public:
0065 static HistoManager* GetPointer();
0066
0067 ~HistoManager();
0068
0069 void BookHisto();
0070
0071 void BeginOfRun();
0072 void EndOfRun();
0073 void BeginOfEvent();
0074 void EndOfEvent();
0075 void Fill(G4int id, G4double x, G4double w);
0076
0077 void ScoreNewTrack(const G4Track*);
0078 void AddTargetStep(const G4Step*);
0079
0080 void SetVerbose(G4int val);
0081 void SetIonPhysics(const G4String&);
0082
0083 inline void SetTargetMaterial(const G4Material* mat) { fMaterial = mat; };
0084 inline void SetTargetLength(G4double val) { fLength = val; };
0085 inline void SetNumberOfSlices(G4int val) { fNSlices = val; };
0086 inline void SetNumberOfBinsE(G4int val) { fNBinsE = val; };
0087
0088 inline G4double Length() const { return fLength; };
0089 inline G4int NumberOfSlices() const { return fNSlices; };
0090
0091 inline G4int GetVerbose() const { return fVerbose; };
0092
0093 inline void SetDefaultBeamPositionFlag(G4bool f) { fBeamFlag = f; };
0094 inline G4bool DefaultBeamPosition() const { return fBeamFlag; };
0095
0096 inline void SetMaxEnergyDeposit(G4double val) { fEdepMax = val; };
0097
0098 inline void SetPhysicsList(G4VModularPhysicsList* p) { fPhysList = p; };
0099
0100 private:
0101 HistoManager();
0102
0103 void Initialise();
0104
0105 static HistoManager* fManager;
0106
0107 G4VModularPhysicsList* fPhysList;
0108 G4VPhysicsConstructor* fIonPhysics;
0109 const G4ParticleDefinition* fPrimaryDef;
0110 const G4ParticleDefinition* fNeutron;
0111 const G4Material* fMaterial;
0112
0113 G4double fEdepMax;
0114 G4double fEdepEvt;
0115 G4double fEdepSum;
0116 G4double fEdepSum2;
0117 G4double fLength;
0118 G4double fAbsZ0;
0119 G4double fPrimaryKineticEnergy;
0120
0121 G4int fVerbose;
0122 G4int fNBinsE;
0123 G4int fNSlices;
0124
0125 G4int fNevt;
0126 G4int fNelec;
0127 G4int fNposit;
0128 G4int fNgam;
0129 G4int fNcpions;
0130 G4int fNpi0;
0131 G4int fNkaons;
0132 G4int fNmuons;
0133 G4int fNions;
0134 G4int fNdeut;
0135 G4int fNalpha;
0136 G4int fNneutron;
0137 G4int fNproton;
0138 G4int fNaproton;
0139 G4int fNstep;
0140 G4int fNHisto;
0141
0142 G4bool fBeamFlag;
0143
0144 Histo* fHisto;
0145 };
0146
0147 #endif