File indexing completed on 2025-01-18 09:58:09
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 #ifndef G4DNASancheExcitationModel_h
0033 #define G4DNASancheExcitationModel_h 1
0034
0035 #include <deque>
0036 #include <CLHEP/Units/SystemOfUnits.h>
0037
0038 #include "G4VEmModel.hh"
0039 #include "G4ParticleChangeForGamma.hh"
0040 #include "G4Electron.hh"
0041 #include "G4NistManager.hh"
0042
0043 class G4DNASancheExcitationModel : public G4VEmModel
0044 {
0045 public:
0046 G4DNASancheExcitationModel(const G4ParticleDefinition* p = nullptr,
0047 const G4String& nam = "DNASancheExcitationModel");
0048
0049 ~G4DNASancheExcitationModel() override;
0050
0051 G4DNASancheExcitationModel & operator=(const G4DNASancheExcitationModel &right) = delete;
0052 G4DNASancheExcitationModel(const G4DNASancheExcitationModel&) = delete;
0053
0054 void Initialise(const G4ParticleDefinition*,
0055 const G4DataVector&) override;
0056
0057 G4double CrossSectionPerVolume(const G4Material* material,
0058 const G4ParticleDefinition* p,
0059 G4double ekin,
0060 G4double emin,
0061 G4double emax) override;
0062
0063 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0064 const G4MaterialCutsCouple*,
0065 const G4DynamicParticle*,
0066 G4double tmin,
0067 G4double maxEnergy) override;
0068
0069
0070
0071 G4double PartialCrossSection(G4double energy, G4int level);
0072 G4double TotalCrossSection(G4double t);
0073
0074 inline void ExtendLowEnergyLimit(G4double );
0075
0076 inline void SetVerboseLevel(G4int verbose)
0077 {
0078 verboseLevel = verbose;
0079 }
0080
0081 inline void SelectStationary(G4bool input);
0082
0083 protected:
0084
0085 G4ParticleChangeForGamma* fParticleChangeForGamma;
0086
0087 private:
0088
0089 G4bool statCode;
0090
0091
0092 const std::vector<G4double>* fpWaterDensity;
0093
0094 G4bool isInitialised{false};
0095 G4int verboseLevel;
0096
0097
0098
0099 G4int RandomSelect(G4double energy);
0100 G4int nLevels;
0101 G4double VibrationEnergy(G4int level);
0102 G4double Sum(G4double k);
0103 G4double LinInterpolate(G4double e1,
0104 G4double e2,
0105 G4double e,
0106 G4double xs1,
0107 G4double xs2);
0108
0109
0110
0111
0112 std::vector<G4double> tdummyVec;
0113 std::vector<std::vector<G4double>> fEnergyLevelXS;
0114 std::vector<G4double> fEnergyTotalXS;
0115
0116 };
0117
0118
0119
0120 inline void G4DNASancheExcitationModel::ExtendLowEnergyLimit(G4double threshold)
0121 {
0122 if(threshold < 2 * CLHEP::eV)
0123 G4Exception("*** WARNING : the G4DNASancheExcitationModel class is not "
0124 "validated below 2 eV !",
0125 "", JustWarning, "");
0126
0127 SetLowEnergyLimit(threshold);
0128 }
0129
0130
0131
0132 inline void G4DNASancheExcitationModel::SelectStationary (G4bool input)
0133 {
0134 statCode = input;
0135 }
0136
0137
0138
0139 #endif