File indexing completed on 2025-01-18 09:58:45
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 #ifndef G4NucleonNuclearCrossSection_h
0036 #define G4NucleonNuclearCrossSection_h
0037
0038 #include "G4VCrossSectionDataSet.hh"
0039 #include "G4ParticleDefinition.hh"
0040 #include "globals.hh"
0041
0042 class G4ComponentBarNucleonNucleusXsc;
0043 class G4ParticleDefinition;
0044
0045 class G4NucleonNuclearCrossSection : public G4VCrossSectionDataSet
0046 {
0047 public:
0048
0049 explicit G4NucleonNuclearCrossSection();
0050 ~G4NucleonNuclearCrossSection() override;
0051
0052 static const char* Default_Name() {return "BarashenkovNucleonXS";}
0053
0054 G4bool IsElementApplicable(const G4DynamicParticle* aParticle,
0055 G4int Z, const G4Material* mat) final;
0056
0057 G4double GetElementCrossSection(const G4DynamicParticle* aParticle,
0058 G4int Z, const G4Material* mat=nullptr) final;
0059
0060 void BuildPhysicsTable(const G4ParticleDefinition&) final;
0061
0062 void CrossSectionDescription(std::ostream&) const final;
0063
0064 inline G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
0065 G4int Z);
0066
0067 inline G4double GetTotalXsc() { return fTotalXsc; };
0068 inline G4double GetInelasticXsc() { return fInelasticXsc; };
0069 inline G4double GetElasticXsc() { return fElasticXsc; };
0070
0071 private:
0072
0073 void ComputeCrossSections(const G4ParticleDefinition*,
0074 G4double kinEnergy, G4int Z);
0075
0076 G4ComponentBarNucleonNucleusXsc* fBarash;
0077
0078 const G4ParticleDefinition* theProton;
0079 const G4ParticleDefinition* theNeutron;
0080
0081 G4double fTotalXsc;
0082 G4double fInelasticXsc;
0083 G4double fElasticXsc;
0084
0085 };
0086
0087 inline
0088 G4double G4NucleonNuclearCrossSection::GetElasticCrossSection(
0089 const G4DynamicParticle* dp, G4int Z)
0090 {
0091 ComputeCrossSections(dp->GetDefinition(), dp->GetKineticEnergy(), Z);
0092 return fElasticXsc;
0093 }
0094
0095 #endif