File indexing completed on 2025-01-18 09:58:37
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 #ifndef G4LivermorePhotoElectricModel_h
0038 #define G4LivermorePhotoElectricModel_h 1
0039
0040 #include "G4ElementData.hh"
0041 #include "G4VEmModel.hh"
0042
0043 #include <vector>
0044
0045 class G4ParticleChangeForGamma;
0046 class G4VAtomDeexcitation;
0047 class G4PhysicsFreeVector;
0048
0049 class G4LivermorePhotoElectricModel : public G4VEmModel
0050 {
0051 public:
0052 explicit G4LivermorePhotoElectricModel(const G4String& nam = "LivermorePhElectric");
0053
0054 ~G4LivermorePhotoElectricModel() override;
0055
0056 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0057
0058 G4double CrossSectionPerVolume(const G4Material*, const G4ParticleDefinition*,
0059 G4double energy, G4double cutEnergy = 0.0,
0060 G4double maxEnergy = DBL_MAX) override;
0061
0062 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*, G4double energy,
0063 G4double Z, G4double A = 0, G4double cut = 0,
0064 G4double emax = DBL_MAX) override;
0065
0066 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0067 const G4MaterialCutsCouple*, const G4DynamicParticle*,
0068 G4double tmin, G4double maxEnergy) override;
0069
0070 void InitialiseForElement(const G4ParticleDefinition*, G4int Z) override;
0071
0072 [[maybe_unused]] inline void SetLimitNumberOfShells(G4int n) { nShellLimit = n; };
0073 G4double GetBindingEnergy(G4int Z, G4int shell);
0074
0075 G4LivermorePhotoElectricModel& operator=
0076 (const G4LivermorePhotoElectricModel& right) = delete;
0077 G4LivermorePhotoElectricModel(const G4LivermorePhotoElectricModel&) = delete;
0078
0079 protected:
0080 G4ParticleChangeForGamma* fParticleChange = nullptr;
0081
0082 private:
0083 void ReadData(const G4int Z);
0084
0085 const G4String& FindDirectoryPath();
0086
0087 void InitialiseOnFly(G4int Z);
0088
0089 const G4ParticleDefinition* theGamma;
0090 const G4ParticleDefinition* theElectron;
0091 G4VAtomDeexcitation* fAtomDeexcitation{nullptr};
0092
0093 static constexpr G4int ZMAXPE{101};
0094 static G4ElementData* fCrossSection;
0095 static G4ElementData* fCrossSectionLE;
0096 static std::vector<G4double>* fParamHigh[ZMAXPE];
0097 static std::vector<G4double>* fParamLow[ZMAXPE];
0098 static G4int fNShells[ZMAXPE];
0099 static G4int fNShellsUsed[ZMAXPE];
0100 static G4Material* fWater;
0101 static G4double fWaterEnergyLimit;
0102 static G4String fDataDirectory;
0103
0104 std::vector<G4double> fSandiaCof;
0105
0106 G4double fCurrSection{0.0};
0107 G4int verboseLevel;
0108 G4int nShellLimit{100};
0109 G4bool fDeexcitationActive{false};
0110 G4bool isInitializer{false};
0111 };
0112
0113
0114
0115 #endif