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