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

#include <G4Pow.hh>

Public Member Functions

 ~G4Pow ()=default
 
G4double Z13 (G4int Z) const
 
G4double A13 (G4double A) const
 
G4double Z23 (G4int Z) const
 
G4double A23 (G4double A) const
 
G4double logZ (G4int Z) const
 
G4double logA (G4double A) const
 
G4double logX (G4double x) const
 
G4double log10Z (G4int Z) const
 
G4double log10A (G4double A) const
 
G4double expA (G4double A) const
 
G4double powZ (G4int Z, G4double y) const
 
G4double powA (G4double A, G4double y) const
 
G4double powN (G4double x, G4int n) const
 
G4double factorial (G4int Z) const
 
G4double logfactorial (G4int Z) const
 

Static Public Member Functions

static G4PowGetInstance ()
 

Detailed Description

Definition at line 48 of file G4Pow.hh.

Constructor & Destructor Documentation

◆ ~G4Pow()

G4Pow::~G4Pow ( )
default

Member Function Documentation

◆ A13()

◆ A23()

◆ expA()

G4double G4Pow::expA ( G4double A) const
inline

Definition at line 203 of file G4Pow.hh.

204{
205 G4double res;
206 G4double a = (0.0 <= A) ? A : -A;
207
208 if(a <= maxAexp)
209 {
210 G4int i = G4int(2 * a + 0.5);
211 G4double x = a - i * 0.5;
212 res = fexp[i] * (1.0 + x * (1.0 + 0.5 * (1.0 + onethird * x) * x));
213 }
214 else
215 {
216 res = G4Exp(a);
217 }
218 if(0.0 > A)
219 {
220 res = 1.0 / res;
221 }
222 return res;
223}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:180
int G4int
Definition G4Types.hh:85

Referenced by powA(), and powZ().

◆ factorial()

G4double G4Pow::factorial ( G4int Z) const
inline

Definition at line 235 of file G4Pow.hh.

235{ return fact[Z]; }

Referenced by G4LegendrePolynomial::EvalAssocLegendrePoly().

◆ GetInstance()

G4Pow * G4Pow::GetInstance ( )
static

Definition at line 41 of file G4Pow.cc.

42{
43 if(fpInstance == nullptr)
44 {
45 static G4Pow geant4pow;
46 fpInstance = &geant4pow;
47 }
48 return fpInstance;
49}
Definition G4Pow.hh:49

Referenced by G4ParticleHPKallbachMannSyst::A(), G4FTFAnnihilation::Annihilate(), G4LENDElastic::ApplyYourself(), G4LightIonQMDReaction::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4LFission::Atomas(), G4CascadeFinalStateAlgorithm::BetaKopylov(), G4HadPhaseSpaceKopylov::BetaKopylov(), G4WilsonAblationModel::BreakItUp(), G4UPiNuclearCrossSection::BuildPhysicsTable(), G4LightIonQMDMeanField::Cal2BodyQuantities(), G4LightIonQMDMeanField::Cal2BodyQuantities(), G4QMDMeanField::Cal2BodyQuantities(), G4QMDMeanField::Cal2BodyQuantities(), G4StatMFMacroMultiplicity::CalcChemicalPotentialMu(), G4StatMFMacroChemicalPotential::CalcChemicalPotentialNu(), G4StatMFMacroBiNucleon::CalcEnergy(), G4StatMFMacroMultiNucleon::CalcEnergy(), G4StatMFMacroTetraNucleon::CalcEnergy(), G4StatMFMacroTriNucleon::CalcEnergy(), G4StatMFMacroMultiNucleon::CalcEntropy(), G4StatMFMacroBiNucleon::CalcMeanMultiplicity(), G4StatMFMacroMultiNucleon::CalcMeanMultiplicity(), G4StatMFMacroTetraNucleon::CalcMeanMultiplicity(), G4StatMFMacroTriNucleon::CalcMeanMultiplicity(), G4StatMFMicroPartition::CalcPartitionProbability(), G4AntiNuclElastic::CalculateAm(), G4DiffuseElastic::CalculateAm(), G4DiffuseElasticV2::CalculateAm(), G4NuclNuclDiffuseElastic::CalculateAm(), G4DiffuseElastic::CalculateNuclearRad(), G4DiffuseElasticV2::CalculateNuclearRad(), G4NuclNuclDiffuseElastic::CalculateNuclearRad(), G4StatMFMacroMultiNucleon::CalcZARatio(), G4LightIonQMDNucleus::CalEnergyAndAngularMomentumInCM(), G4QMDNucleus::CalEnergyAndAngularMomentumInCM(), G4LightIonQMDCollision::CalFinalStateOfTheBinaryCollisionJQMD(), G4QMDCollision::CalFinalStateOfTheBinaryCollisionJQMD(), G4LightIonQMDMeanField::CalGraduate(), G4QMDMeanField::CalGraduate(), G4Reggeons::Chi_pomeron(), G4Reggeons::Chi_reggeon(), G4Clebsch::ClebschGordanCoeff(), G4UrbanAdjointMscModel::ComputeCrossSectionPerAtom(), G4UrbanMscModel::ComputeCrossSectionPerAtom(), G4ComponentGGHadronNucleusXsc::ComputeCrossSections(), G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(), G4KalbachCrossSection::ComputePowerParameter(), G4GoudsmitSaundersonMscModel::ComputeTrueStepLength(), G4RToEConvForElectron::ComputeValue(), G4RToEConvForGamma::ComputeValue(), G4RToEConvForPositron::ComputeValue(), G4Fancy3DNucleus::CoulombBarrier(), G4DiffractiveExcitation::CreateStrings(), G4XAqmElastic::CrossSection(), G4XAqmTotal::CrossSection(), G4XPDGElastic::CrossSection(), G4XPDGTotal::CrossSection(), G4LightIonQMDMeanField::DoClusterJudgment(), G4QMDMeanField::DoClusterJudgment(), G4LENDCrossSection::DumpPhysicsTable(), G4ParticleHPElasticData::DumpPhysicsTable(), G4ParticleHPFissionData::DumpPhysicsTable(), G4ParticleHPInelasticData::DumpPhysicsTable(), G4LegendrePolynomial::EvalAssocLegendrePoly(), G4KM_NucleonEqRhs::EvaluateRhsGivenB(), G4FPYSamplingOps::EvaluateWattConstants(), G4QuarkExchange::ExciteParticipants(), G4NuclearAbrasionGeometry::F(), G4VCrossSectionSource::FcrossX(), G4InuclSpecialFunctions::FermiEnergy(), G4JTPolynomialSolver::FindRoots(), G4AtimaEnergyLossModel::G4AtimaEnergyLossModel(), G4AtimaFluctuations::G4AtimaFluctuations(), G4BetaDecayCorrections::G4BetaDecayCorrections(), G4BGGPionElasticXS::G4BGGPionElasticXS(), G4BGGPionInelasticXS::G4BGGPionInelasticXS(), G4InuclSpecialFunctions::G4cbrt(), G4ChargeExchangeXS::G4ChargeExchangeXS(), G4DNARuddIonisationExtendedModel::G4DNARuddIonisationExtendedModel(), G4EmCorrections::G4EmCorrections(), G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay(), G4GEMChannel::G4GEMChannel(), G4GEMProbability::G4GEMProbability(), G4Generator2BS::G4Generator2BS(), G4FissionProductYieldDist::G4GetFission(), G4HadronNucleonXsc::G4HadronNucleonXsc(), G4ICRU49NuclearStoppingModel::G4ICRU49NuclearStoppingModel(), G4IonCoulombCrossSection::G4IonCoulombCrossSection(), G4ionEffectiveCharge::G4ionEffectiveCharge(), G4IonFluctuations::G4IonFluctuations(), G4IonisParamElm::G4IonisParamElm(), G4IonisParamMat::G4IonisParamMat(), G4KM_NucleonEqRhs::G4KM_NucleonEqRhs(), G4LevelManager::G4LevelManager(), G4LevelReader::G4LevelReader(), G4LightIonQMDGroundStateNucleus::G4LightIonQMDGroundStateNucleus(), G4LindhardSorensenData::G4LindhardSorensenData(), G4NuclearFermiDensity::G4NuclearFermiDensity(), G4NuclearShellModelDensity::G4NuclearShellModelDensity(), G4PreCompoundEmission::G4PreCompoundEmission(), G4QMDGroundStateNucleus::G4QMDGroundStateNucleus(), G4FPYSamplingOps::G4SampleWatt(), G4ScreeningMottCrossSection::G4ScreeningMottCrossSection(), G4VEmissionProbability::G4VEmissionProbability(), G4VPreCompoundFragment::G4VPreCompoundFragment(), G4WentzelOKandVIxSection::G4WentzelOKandVIxSection(), G4QMDParticipant::Get4Momentum(), G4HyperNucleiProperties::GetAtomicMass(), G4AntiProtonField::GetBarrier(), G4KaonMinusField::GetBarrier(), G4KaonPlusField::GetBarrier(), G4PionMinusField::GetBarrier(), G4PionPlusField::GetBarrier(), G4ProtonField::GetBarrier(), G4SigmaMinusField::GetBarrier(), G4SigmaPlusField::GetBarrier(), G4ParticleHPInterpolator::GetBinIntegral(), G4EMDissociationSpectrum::GetClosestApproach(), G4AntiNuclElastic::GetcosTeta1(), G4EMDissociationCrossSection::GetCrossSectionForProjectile(), G4ChargeExchangeProcess::GetElementCrossSection(), G4StatMFFragment::GetEnergy(), G4ChipsAntiBaryonElasticXS::GetExchangeT(), G4ChipsHyperonElasticXS::GetExchangeT(), G4ChipsPionMinusElasticXS::GetExchangeT(), G4ChipsPionPlusElasticXS::GetExchangeT(), G4NuclearAbrasionGeometry::GetExcitationEnergyOfProjectile(), G4NuclearAbrasionGeometry::GetExcitationEnergyOfTarget(), G4EMDissociationSpectrum::GetGeneralE2Spectrum(), G4NuclNuclDiffuseElastic::GetHadronNucleonXscNS(), G4IonsShenCrossSection::GetIsoCrossSection(), G4InuclParamMomDst::GetMomentum(), G4LightIonQMDNucleus::GetNuclearMass(), G4QMDNucleus::GetNuclearMass(), G4LightIonQMDMeanField::GetPotential(), G4QMDMeanField::GetPotential(), G4LightIonQMDMeanField::GetTotalPotential(), G4QMDMeanField::GetTotalPotential(), G4ParticleHPInterpolator::GetWeightedBinIntegral(), G4WilsonRadius::GetWilsonRMSRadius(), G4Bessel::I0(), G4Bessel::I1(), G4FTFParameters::InitForInteraction(), G4mplIonisationModel::Initialise(), G4mplIonisationWithDeltaModel::Initialise(), G4ParticleHPVector::Integrate(), MCGIDI_sampling_interpolationValues(), MCGIDI_sampling_sampleX_from_pdfsOfXGivenW(), G4NuclearAbrasionGeometry::P(), ptwXY_f_integrate(), G4LEHadronProtonElastic::RandCosThetaDipPen(), G4InuclSpecialFunctions::randomInuclPowers(), G4AntiNuclElastic::SampleInvariantT(), G4HadronElastic::SampleInvariantT(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4ChargeExchange::SampleT(), G4QGSParticipants::SampleX(), G4ParticleHPKallbachMannSyst::SeparationEnergy(), G4FissionProductYieldDist::SetNubar(), G4Clebsch::TriangleCoeff(), G4Clebsch::Wigner6J(), and G4Clebsch::WignerLittleD().

◆ log10A()

G4double G4Pow::log10A ( G4double A) const
inline

Definition at line 201 of file G4Pow.hh.

201{ return logX(A) / lz[10]; }
G4double logX(G4double x) const
Definition G4Pow.hh:170

◆ log10Z()

G4double G4Pow::log10Z ( G4int Z) const
inline

Definition at line 199 of file G4Pow.hh.

199{ return lz[Z] / lz[10]; }

◆ logA()

G4double G4Pow::logA ( G4double A) const
inline

Definition at line 165 of file G4Pow.hh.

166{
167 return (1.0 <= A ? logBase(A) : -logBase(1. / A));
168}

◆ logfactorial()

G4double G4Pow::logfactorial ( G4int Z) const
inline

◆ logX()

G4double G4Pow::logX ( G4double x) const
inline

Definition at line 170 of file G4Pow.hh.

171{
172 G4double res = 0.0;
173 G4double a = (1.0 <= x) ? x : 1.0 / x;
174
175 if(a <= maxA)
176 {
177 res = logBase(a);
178 }
179 else if(a <= ener[2])
180 {
181 res = logen[1] + logBase(a / ener[1]);
182 }
183 else if(a <= ener[3])
184 {
185 res = logen[2] + logBase(a / ener[2]);
186 }
187 else
188 {
189 res = G4Log(a);
190 }
191
192 if(1.0 > x)
193 {
194 res = -res;
195 }
196 return res;
197}
G4double G4Log(G4double x)
Definition G4Log.hh:227

Referenced by log10A(), and powA().

◆ logZ()

◆ powA()

G4double G4Pow::powA ( G4double A,
G4double y ) const
inline

Definition at line 230 of file G4Pow.hh.

231{
232 return (0.0 == A ? 0.0 : expA(y * logX(A)));
233}
G4double expA(G4double A) const
Definition G4Pow.hh:203

Referenced by G4FTFAnnihilation::Annihilate(), G4LENDElastic::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4WilsonAbrasionModel::ApplyYourself(), G4LFission::Atomas(), G4WilsonAblationModel::BreakItUp(), G4UPiNuclearCrossSection::BuildPhysicsTable(), G4DiffuseElastic::CalculateNuclearRad(), G4DiffuseElasticV2::CalculateNuclearRad(), G4LightIonQMDMeanField::CalGraduate(), G4QMDMeanField::CalGraduate(), G4Reggeons::Chi_pomeron(), G4Reggeons::Chi_reggeon(), G4GoudsmitSaundersonMscModel::ComputeGeomPathLength(), G4GoudsmitSaundersonMscModel::ComputeTrueStepLength(), G4XAqmElastic::CrossSection(), G4XPDGElastic::CrossSection(), G4XPDGTotal::CrossSection(), G4DNADingfelderChargeIncreaseModel::CrossSectionPerVolume(), G4NonEquilibriumEvaporator::deExcite(), G4AtimaFluctuations::Dispersion(), G4LENDCrossSection::DumpPhysicsTable(), G4ParticleHPElasticData::DumpPhysicsTable(), G4ParticleHPFissionData::DumpPhysicsTable(), G4ParticleHPInelasticData::DumpPhysicsTable(), G4FPYSamplingOps::EvaluateWattConstants(), G4QuarkExchange::ExciteParticipants(), G4NuclearAbrasionGeometry::F(), G4VCrossSectionSource::FcrossX(), G4ParticleHPInterpolator::GetBinIntegral(), G4EMDissociationSpectrum::GetClosestApproach(), G4EMDissociationCrossSection::GetCrossSectionForProjectile(), G4ChargeExchangeProcess::GetElementCrossSection(), G4ChipsAntiBaryonElasticXS::GetExchangeT(), G4ChipsHyperonElasticXS::GetExchangeT(), G4ChipsPionMinusElasticXS::GetExchangeT(), G4ChipsPionPlusElasticXS::GetExchangeT(), G4EMDissociationSpectrum::GetGeneralE2Spectrum(), G4NuclNuclDiffuseElastic::GetHadronNucleonXscNS(), G4ChargeExchangeXS::GetIsoCrossSection(), G4LightIonQMDMeanField::GetPotential(), G4QMDMeanField::GetPotential(), G4LightIonQMDMeanField::GetTotalPotential(), G4QMDMeanField::GetTotalPotential(), G4FTFParameters::InitForInteraction(), G4ParticleHPVector::Integrate(), MCGIDI_sampling_interpolationValues(), MCGIDI_sampling_sampleX_from_pdfsOfXGivenW(), ptwXY_f_integrate(), G4LEHadronProtonElastic::RandCosThetaDipPen(), G4QGSParticipants::SampleX(), G4ParticleHPKallbachMannSyst::SeparationEnergy(), and G4FissionProductYieldDist::SetNubar().

◆ powN()

G4double G4Pow::powN ( G4double x,
G4int n ) const

Definition at line 162 of file G4Pow.cc.

163{
164 if(0.0 == x)
165 {
166 return 0.0;
167 }
168 if(std::abs(n) > 8)
169 {
170 return std::pow(x, G4double(n));
171 }
172 G4double res = 1.0;
173 if(n >= 0)
174 {
175 for(G4int i = 0; i < n; ++i)
176 {
177 res *= x;
178 }
179 }
180 else if(n < 0)
181 {
182 G4double y = 1.0 / x;
183 G4int nn = -n;
184 for(G4int i = 0; i < nn; ++i)
185 {
186 res *= y;
187 }
188 }
189 return res;
190}

Referenced by G4ParticleHPKallbachMannSyst::A(), G4LightIonQMDReaction::ApplyYourself(), G4QMDReaction::ApplyYourself(), G4CascadeFinalStateAlgorithm::BetaKopylov(), G4HadPhaseSpaceKopylov::BetaKopylov(), G4LightIonQMDMeanField::Cal2BodyQuantities(), G4LightIonQMDMeanField::Cal2BodyQuantities(), G4QMDMeanField::Cal2BodyQuantities(), G4QMDMeanField::Cal2BodyQuantities(), G4LightIonQMDCollision::CalFinalStateOfTheBinaryCollisionJQMD(), G4QMDCollision::CalFinalStateOfTheBinaryCollisionJQMD(), G4XAqmTotal::CrossSection(), G4NonEquilibriumEvaporator::deExcite(), G4NuclearAbrasionGeometry::F(), G4JTPolynomialSolver::FindRoots(), G4ComponentAntiNuclNuclearXS::GetAntiHadronNucleonTotCrSc(), G4InuclParamMomDst::GetMomentum(), G4HadronNucleonXsc::HadronNucleonXscNS(), G4Bessel::I0(), G4Bessel::I1(), G4PreCompoundIon::ProbabilityDistributionFunction(), G4PreCompoundNucleon::ProbabilityDistributionFunction(), G4NuclearRadii::RadiusECS(), G4InuclSpecialFunctions::randomInuclPowers(), and G4FissionProductYieldDist::SetNubar().

◆ powZ()

◆ Z13()

◆ Z23()


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