Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UPiNuclearCrossSection Class Reference

#include <G4UPiNuclearCrossSection.hh>

+ Inheritance diagram for G4UPiNuclearCrossSection:

Public Member Functions

 G4UPiNuclearCrossSection ()
 
 ~G4UPiNuclearCrossSection () override=default
 
G4bool IsElementApplicable (const G4DynamicParticle *aParticle, G4int Z, const G4Material *) final
 
G4double GetElasticCrossSection (const G4DynamicParticle *aParticle, G4int Z, G4int A) const
 
G4double GetInelasticCrossSection (const G4DynamicParticle *aParticle, G4int Z, G4int A) const
 
void BuildPhysicsTable (const G4ParticleDefinition &) final
 
void DumpPhysicsTable (const G4ParticleDefinition &) final
 
void CrossSectionDescription (std::ostream &) const final
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
virtual G4double ComputeCrossSectionPerElement (G4double kinEnergy, G4double loge, const G4ParticleDefinition *, const G4Element *, const G4Material *mat=nullptr)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
virtual G4double ComputeIsoCrossSection (G4double kinEnergy, G4double loge, const G4ParticleDefinition *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
virtual const G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy, G4double logE)
 
virtual void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
bool ForAllAtomsAndEnergies () const
 
void SetForAllAtomsAndEnergies (G4bool val)
 
const G4StringGetName () const
 
void SetName (const G4String &nam)
 
G4VCrossSectionDataSetoperator= (const G4VCrossSectionDataSet &right)=delete
 
 G4VCrossSectionDataSet (const G4VCrossSectionDataSet &)=delete
 

Additional Inherited Members

- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel {0}
 
G4String name
 

Detailed Description

Definition at line 44 of file G4UPiNuclearCrossSection.hh.

Constructor & Destructor Documentation

◆ G4UPiNuclearCrossSection()

G4UPiNuclearCrossSection::G4UPiNuclearCrossSection ( )
explicit

Definition at line 58 of file G4UPiNuclearCrossSection.cc.

59 : G4VCrossSectionDataSet("G4UPiNuclearCrossSection")
60{
61 piPlus = G4PionPlus::PionPlus();
62 piMinus = G4PionMinus::PionMinus();
63 elow = 20.0*CLHEP::MeV;
64
65 if (idxZ[0] == 0) { LoadData(); }
66}
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
Definition G4PionPlus.cc:93
G4VCrossSectionDataSet(const G4String &nam="")

◆ ~G4UPiNuclearCrossSection()

G4UPiNuclearCrossSection::~G4UPiNuclearCrossSection ( )
overridedefault

Member Function Documentation

◆ BuildPhysicsTable()

void G4UPiNuclearCrossSection::BuildPhysicsTable ( const G4ParticleDefinition & p)
finalvirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 141 of file G4UPiNuclearCrossSection.cc.

142{
143 if(&p != piPlus && &p != piMinus) {
145 ed << "This cross section is applicable only to pions and not to "
146 << p.GetParticleName() << G4endl;
147 G4Exception("G4UPiNuclearCrossSection::BuildPhysicsTable", "had001",
148 FatalException, ed);
149 }
150}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4endl
Definition G4ios.hh:67
const G4String & GetParticleName() const

◆ CrossSectionDescription()

void G4UPiNuclearCrossSection::CrossSectionDescription ( std::ostream & outFile) const
finalvirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 548 of file G4UPiNuclearCrossSection.cc.

549{
550 outFile << "G4UPiNuclearCrossSection calculates the total, elastic and\n"
551 << "inelastic cross sections for pion scattering from nuclei\n"
552 << "heavier than hydrogen. It is based on the Barashenkov\n"
553 << "parameterization and is valid for all incident energies.\n";
554}

◆ DumpPhysicsTable()

void G4UPiNuclearCrossSection::DumpPhysicsTable ( const G4ParticleDefinition & p)
finalvirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 126 of file G4UPiNuclearCrossSection.cc.

127{
128 if(&p == piPlus) {
129 G4cout << "### G4UPiNuclearCrossSection Elastic data for pi+" << G4endl;
130 G4cout << *piPlusElastic << G4endl;
131 G4cout << "### G4UPiNuclearCrossSection Inelastic data for pi+" << G4endl;
132 G4cout << *piPlusInelastic << G4endl;
133 } else if(&p == piMinus) {
134 G4cout << "### G4UPiNuclearCrossSection Elastic data for pi-" << G4endl;
135 G4cout << *piMinusElastic << G4endl;
136 G4cout << "### G4UPiNuclearCrossSection Inelastic data for pi-" << G4endl;
137 G4cout << *piMinusInelastic << G4endl;
138 }
139}
G4GLOB_DLL std::ostream G4cout

◆ GetElasticCrossSection()

G4double G4UPiNuclearCrossSection::GetElasticCrossSection ( const G4DynamicParticle * aParticle,
G4int Z,
G4int A ) const
inline

Definition at line 101 of file G4UPiNuclearCrossSection.hh.

103{
104 const G4PhysicsTable* table =
105 (dp->GetDefinition() == piPlus) ? piPlusElastic : piMinusElastic;
106 return Interpolate(Z, A, dp->GetKineticEnergy(), table);
107}
const G4double A[17]

◆ GetInelasticCrossSection()

G4double G4UPiNuclearCrossSection::GetInelasticCrossSection ( const G4DynamicParticle * aParticle,
G4int Z,
G4int A ) const
inline

Definition at line 110 of file G4UPiNuclearCrossSection.hh.

112{
113 const G4PhysicsTable* table =
114 (dp->GetDefinition() == piPlus) ? piPlusInelastic : piMinusInelastic;
115 return Interpolate(Z, A, dp->GetKineticEnergy(), table);
116}

◆ IsElementApplicable()

G4bool G4UPiNuclearCrossSection::IsElementApplicable ( const G4DynamicParticle * aParticle,
G4int Z,
const G4Material *  )
finalvirtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 69 of file G4UPiNuclearCrossSection.cc.

71{
72 return (1 < Z);
73}

The documentation for this class was generated from the following files: