File indexing completed on 2026-10-02 09:04:59
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 [[maybe_unused]] inline void SetLimitNumberOfShells(G4int n) { nShellLimit = n; };
0071 G4double GetBindingEnergy(G4int Z, G4int shell);
0072
0073 G4LivermorePhotoElectricModel& operator=
0074 (const G4LivermorePhotoElectricModel& right) = delete;
0075 G4LivermorePhotoElectricModel(const G4LivermorePhotoElectricModel&) = delete;
0076
0077 protected:
0078 G4ParticleChangeForGamma* fParticleChange = nullptr;
0079
0080 private:
0081 void ReadData(const G4int Z);
0082
0083 void FindDirectoryPath();
0084
0085 void InitialiseOnFly(G4int Z);
0086
0087 const G4ParticleDefinition* theGamma;
0088 const G4ParticleDefinition* theElectron;
0089 G4VAtomDeexcitation* fAtomDeexcitation{nullptr};
0090
0091 static constexpr G4int ZMAXPE{101};
0092 static G4ElementData* fCrossSection;
0093 static G4ElementData* fCrossSectionLE;
0094 static std::vector<G4double>* fParamHigh[ZMAXPE];
0095 static std::vector<G4double>* fParamLow[ZMAXPE];
0096 static G4int fNShells[ZMAXPE];
0097 static G4int fNShellsUsed[ZMAXPE];
0098 static G4Material* fWater;
0099 static G4double fWaterEnergyLimit;
0100 static G4String fDataDirectory;
0101
0102 std::vector<G4double> fSandiaCof;
0103
0104 G4double fCurrSection{0.0};
0105 G4int verboseLevel;
0106 G4int nShellLimit{100};
0107 G4bool fDeexcitationActive{false};
0108 G4bool isInitializer{false};
0109 };
0110
0111
0112
0113 #endif