File indexing completed on 2025-01-18 09:58:54
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 #ifndef G4PENELOPERAYLEIGHMODEL_HH
0044 #define G4PENELOPERAYLEIGHMODEL_HH 1
0045
0046 #include "globals.hh"
0047 #include "G4VEmModel.hh"
0048 #include "G4DataVector.hh"
0049 #include "G4ParticleChangeForGamma.hh"
0050
0051 class G4ParticleDefinition;
0052 class G4DynamicParticle;
0053 class G4MaterialCutsCouple;
0054 class G4Material;
0055 class G4PhysicsFreeVector;
0056 class G4PenelopeSamplingData;
0057
0058 class G4PenelopeRayleighModel : public G4VEmModel
0059 {
0060
0061 public:
0062 explicit G4PenelopeRayleighModel(const G4ParticleDefinition* p=nullptr,
0063 const G4String& processName ="PenRayleigh");
0064
0065 virtual ~G4PenelopeRayleighModel();
0066
0067 void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0068 void InitialiseLocal(const G4ParticleDefinition*,
0069 G4VEmModel *masterModel) override;
0070
0071 G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0072 G4double kinEnergy,
0073 G4double Z,
0074 G4double A=0,
0075 G4double cut=0,
0076 G4double emax=DBL_MAX) override;
0077
0078 void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0079 const G4MaterialCutsCouple*,
0080 const G4DynamicParticle*,
0081 G4double tmin,
0082 G4double maxEnergy) override;
0083
0084 void SetVerbosityLevel(G4int lev){fVerboseLevel = lev;};
0085 G4int GetVerbosityLevel(){return fVerboseLevel;};
0086
0087
0088 void DumpFormFactorTable(const G4Material*);
0089
0090 G4PenelopeRayleighModel& operator=(const G4PenelopeRayleighModel &right) = delete;
0091 G4PenelopeRayleighModel(const G4PenelopeRayleighModel&) = delete;
0092
0093 protected:
0094 G4ParticleChangeForGamma* fParticleChange;
0095 const G4ParticleDefinition* fParticle;
0096
0097 private:
0098 void SetParticle(const G4ParticleDefinition*);
0099
0100 void ReadDataFile(G4int);
0101 void ClearTables();
0102 void BuildFormFactorTable(const G4Material*);
0103 void GetPMaxTable(const G4Material*);
0104
0105 G4double GetFSquared(const G4Material*,const G4double);
0106 void InitializeSamplingAlgorithm(const G4Material*);
0107
0108 G4DataVector fLogQSquareGrid;
0109 std::map<const G4Material*,G4PhysicsFreeVector*> *fLogFormFactorTable;
0110
0111 G4DataVector fLogEnergyGridPMax;
0112 std::map<const G4Material*,G4PhysicsFreeVector*> *fPMaxTable;
0113 std::map<const G4Material*,G4PenelopeSamplingData*> *fSamplingTable;
0114
0115
0116 static const G4int fMaxZ =99;
0117 static G4PhysicsFreeVector* fLogAtomicCrossSection[fMaxZ+1];
0118 static G4PhysicsFreeVector* fAtomicFormFactor[fMaxZ+1];
0119
0120
0121
0122 G4double fIntrinsicLowEnergyLimit;
0123 G4double fIntrinsicHighEnergyLimit;
0124 G4int fVerboseLevel;
0125 G4bool fIsInitialised;
0126
0127 G4bool fLocalTable;
0128 };
0129
0130 #endif
0131