File indexing completed on 2025-04-04 08:05:04
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
0048 #ifndef HistoManager_h
0049 #define HistoManager_h 1
0050
0051 #include "G4AnalysisManager.hh"
0052 #include "G4Material.hh"
0053 #include "globals.hh"
0054
0055
0056
0057 class Histo;
0058 class G4ParticleDefinition;
0059 class HistoManagerMessenger;
0060
0061 class HistoManager
0062 {
0063 public:
0064 HistoManager();
0065
0066 ~HistoManager();
0067
0068 void BeginOfRun();
0069 void EndOfRun();
0070
0071 void SetVerbose(G4int val);
0072
0073 inline void SetParticleName(const G4String&);
0074 inline void SetElementName(const G4String&);
0075
0076 inline void SetNumberOfBinsE(G4int val);
0077 inline void SetNumberOfBinsP(G4int val);
0078
0079 inline void SetMinKinEnergy(G4double val);
0080 inline void SetMaxKinEnergy(G4double val);
0081
0082 inline void SetMinMomentum(G4double val);
0083 inline void SetMaxMomentum(G4double val);
0084
0085 inline void SetHistoName(G4String& val);
0086
0087 inline void SetTargetMaterial(const G4Material* p);
0088
0089 private:
0090 HistoManagerMessenger* fMessenger;
0091 G4AnalysisManager* fAnalysisManager;
0092
0093 const G4ParticleDefinition* fNeutron;
0094 const G4Material* fTargetMaterial;
0095
0096 G4String fParticleName;
0097 G4String fElementName;
0098
0099 G4double fMinKinEnergy;
0100 G4double fMaxKinEnergy;
0101 G4double fMinMomentum;
0102 G4double fMaxMomentum;
0103
0104 G4int fVerbose;
0105 G4int fBinsE;
0106 G4int fBinsP;
0107
0108 G4String fHistoName;
0109 };
0110
0111 inline void HistoManager::SetParticleName(const G4String& name)
0112 {
0113 fParticleName = name;
0114 }
0115
0116 inline void HistoManager::SetElementName(const G4String& name)
0117 {
0118 fElementName = name;
0119 }
0120
0121 inline void HistoManager::SetNumberOfBinsE(G4int val)
0122 {
0123 if (val > 0) {
0124 fBinsE = val;
0125 }
0126 }
0127
0128 inline void HistoManager::SetNumberOfBinsP(G4int val)
0129 {
0130 if (val > 0) {
0131 fBinsP = val;
0132 }
0133 }
0134
0135 inline void HistoManager::SetMinKinEnergy(G4double val)
0136 {
0137 if (val > 0 && val < fMaxKinEnergy) {
0138 fMinKinEnergy = val;
0139 }
0140 }
0141
0142 inline void HistoManager::SetMaxKinEnergy(G4double val)
0143 {
0144 if (val > fMinKinEnergy) {
0145 fMaxKinEnergy = val;
0146 }
0147 }
0148
0149 inline void HistoManager::SetMinMomentum(G4double val)
0150 {
0151 if (val > 0 && val < fMaxMomentum) {
0152 fMinMomentum = val;
0153 }
0154 }
0155
0156 inline void HistoManager::SetMaxMomentum(G4double val)
0157 {
0158 if (val > fMinMomentum) {
0159 fMaxMomentum = val;
0160 }
0161 }
0162
0163 inline void HistoManager::SetHistoName(G4String& val)
0164 {
0165 fHistoName = val;
0166 }
0167
0168 inline void HistoManager::SetTargetMaterial(const G4Material* p)
0169 {
0170 fTargetMaterial = p;
0171 }
0172
0173 #endif