File indexing completed on 2025-01-18 09:58:53
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 #ifndef G4ParticleHPThermalScatteringData_h
0030 #define G4ParticleHPThermalScatteringData_h 1
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 #include "G4DynamicParticle.hh"
0050 #include "G4Element.hh"
0051 #include "G4Material.hh"
0052 #include "G4ParticleDefinition.hh"
0053 #include "G4ParticleHPThermalScatteringNames.hh"
0054 #include "G4ParticleHPVector.hh"
0055 #include "G4VCrossSectionDataSet.hh"
0056
0057
0058 #include <map>
0059 #include <vector>
0060
0061 class G4ParticleHPThermalScatteringData : public G4VCrossSectionDataSet
0062 {
0063 public:
0064 G4ParticleHPThermalScatteringData();
0065
0066 ~G4ParticleHPThermalScatteringData() override;
0067
0068 G4bool IsIsoApplicable(const G4DynamicParticle*, G4int , G4int ,
0069 const G4Element* , const G4Material* ) override;
0070
0071 G4double GetIsoCrossSection(const G4DynamicParticle*, G4int , G4int ,
0072 const G4Isotope* , const G4Element* ,
0073 const G4Material* ) override;
0074
0075 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
0076
0077
0078
0079
0080 G4double GetCrossSection(const G4DynamicParticle*, const G4Element*, const G4Material*);
0081 G4double GetInelasticCrossSection(const G4DynamicParticle*, const G4Element*,
0082 const G4Material*);
0083 G4double GetCoherentCrossSection(const G4DynamicParticle*, const G4Element*, const G4Material*);
0084 G4double GetIncoherentCrossSection(const G4DynamicParticle*, const G4Element*,
0085 const G4Material*);
0086
0087 void BuildPhysicsTable(const G4ParticleDefinition&) override;
0088
0089 void DumpPhysicsTable(const G4ParticleDefinition&) override;
0090
0091
0092
0093 void AddUserThermalScatteringFile(G4String, G4String);
0094
0095 void CrossSectionDescription(std::ostream&) const override;
0096
0097 private:
0098 G4double GetX(const G4DynamicParticle*, G4double aT, std::map<G4double, G4ParticleHPVector*>*);
0099
0100 G4double emax;
0101
0102 void clearCurrentXSData();
0103
0104
0105 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* coherent{nullptr};
0106 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* incoherent{nullptr};
0107 std::map<G4int, std::map<G4double, G4ParticleHPVector*>*>* inelastic{nullptr};
0108
0109 std::map<G4double, G4ParticleHPVector*>* readData(G4String);
0110
0111 std::vector<G4int> indexOfThermalElement;
0112 G4ParticleHPThermalScatteringNames* names;
0113
0114
0115
0116 G4double ke_cache;
0117 G4double xs_cache;
0118 const G4Element* element_cache;
0119 const G4Material* material_cache;
0120
0121 std::map<std::pair<const G4Material*, const G4Element*>, G4int> dic;
0122 G4int getTS_ID(const G4Material*, const G4Element*);
0123 };
0124
0125 #endif