G4Pow Class Reference

#include <G4Pow.hh>


Public Member Functions

G4double Z13 (G4int Z)
G4double A13 (G4double A)
G4double Z23 (G4int Z)
G4double A23 (G4double A)
G4double logZ (G4int Z)
G4double logA (G4double A)
G4double log10Z (G4int Z)
G4double log10A (G4double A)
G4double powZ (G4int Z, G4double y)
G4double powA (G4double A, G4double y)
G4double powN (G4double x, G4int n)
G4double factorial (G4int Z)
G4double logfactorial (G4int Z)

Static Public Member Functions

static G4PowGetInstance ()


Detailed Description

Definition at line 53 of file G4Pow.hh.


Member Function Documentation

G4double G4Pow::A13 ( G4double  A  )  [inline]

Definition at line 117 of file G4Pow.hh.

Referenced by A23(), G4AntiNuclElastic::CalculateAm(), G4TripathiLightCrossSection::GetElementCrossSection(), G4IonsShenCrossSection::GetIsoCrossSection(), and G4NistManager::GetZ13().

00118 {
00119   G4double res;
00120   G4double a = A;
00121   if(1.0 > A) { a = 1.0/A; }
00122   if(a <= maxA)
00123   {
00124     G4int i = G4int(a + 0.5);
00125     G4double x = (a/G4double(i) - 1.0)*onethird;
00126     res = pz13[i]*(1.0 + x - x*x*(1.0 - 1.66666666*x));
00127     if(1.0 > A) { res = 1.0/res; }
00128   }
00129   else
00130   {
00131     res = std::pow(A, onethird); 
00132   }
00133   return res;
00134 }

G4double G4Pow::A23 ( G4double  A  )  [inline]

Definition at line 142 of file G4Pow.hh.

References A13().

00143 {
00144   G4double x = A13(A);
00145   return x*x;
00146 }

G4double G4Pow::factorial ( G4int  Z  )  [inline]

Definition at line 192 of file G4Pow.hh.

Referenced by G4PomeronCrossSection::GetCutPomeronProbability().

00193 {
00194   return fact[Z];
00195 }

G4Pow * G4Pow::GetInstance (  )  [static]

Definition at line 50 of file G4Pow.cc.

Referenced by G4GEMCoulombBarrierHE::CalcCompoundRadius(), G4GEMCoulombBarrier::CalcCompoundRadius(), G4AntiNuclElastic::CalculateAm(), G4UrbanMscModel96::ComputeCrossSectionPerAtom(), G4UrbanMscModel95::ComputeCrossSectionPerAtom(), G4E1SingleProbability1::EmissionProbDensity(), G4ContinuumGammaTransition::G4ContinuumGammaTransition(), G4E1Probability::G4E1Probability(), G4FermiConfigurationList::G4FermiConfigurationList(), G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay(), G4GEMChannel::G4GEMChannel(), G4GEMProbability::G4GEMProbability(), G4Generator2BS::G4Generator2BS(), G4HadronCrossSections::G4HadronCrossSections(), G4ICRU49NuclearStoppingModel::G4ICRU49NuclearStoppingModel(), G4IonisParamElm::G4IonisParamElm(), G4IonisParamMat::G4IonisParamMat(), G4PreCompoundEmission::G4PreCompoundEmission(), G4PreCompoundTransitions::G4PreCompoundTransitions(), G4VEmissionProbability::G4VEmissionProbability(), G4VPreCompoundFragment::G4VPreCompoundFragment(), G4WentzelOKandVIxSection::G4WentzelOKandVIxSection(), G4WentzelVIModel::G4WentzelVIModel(), G4WentzelVIRelModel::G4WentzelVIRelModel(), G4WentzelVIRelXSection::G4WentzelVIRelXSection(), G4AntiNuclElastic::GetcosTeta1(), G4CoulombBarrier::GetCoulombBarrier(), G4NeutronInelasticCrossSection::GetCrossSection(), G4PomeronCrossSection::GetCutPomeronProbability(), G4TripathiLightCrossSection::GetElementCrossSection(), G4IonsSihverCrossSection::GetElementCrossSection(), G4IonsShenCrossSection::GetIsoCrossSection(), G4HadronElastic::SampleInvariantT(), G4AntiNuclElastic::SampleInvariantT(), and G4DiscreteGammaTransition::SelectGamma().

00051 {
00052   if (fpInstance == 0)
00053   {
00054     fpInstance = new G4Pow;
00055   }
00056   return fpInstance;
00057 }

G4double G4Pow::log10A ( G4double  A  )  [inline]

Definition at line 177 of file G4Pow.hh.

References logA().

00178 {
00179   return logA(A)/lz[10];
00180 }

G4double G4Pow::log10Z ( G4int  Z  )  [inline]

Definition at line 172 of file G4Pow.hh.

00173 {
00174   return lz[Z]/lz[10];
00175 }

G4double G4Pow::logA ( G4double  A  )  [inline]

Definition at line 153 of file G4Pow.hh.

Referenced by G4NistManager::GetLOGA(), log10A(), and powA().

00154 {
00155   G4double res;
00156   G4double a = A;
00157   if(1.0 > A) { a = 1.0/A; }
00158   if(a <= maxA)
00159   {
00160     G4int i = G4int(a + 0.5);
00161     G4double x = a/G4double(i) - 1;
00162     res = lz[i] + x*(1.0 - (0.5 - onethird*x)*x);
00163     if(1.0 > A) { res = -res; }
00164   }
00165   else
00166   {
00167     res = std::log(A);
00168   }
00169   return res;
00170 }

G4double G4Pow::logfactorial ( G4int  Z  )  [inline]

Definition at line 197 of file G4Pow.hh.

00198 {
00199   return logfact[Z];
00200 }

G4double G4Pow::logZ ( G4int  Z  )  [inline]

Definition at line 148 of file G4Pow.hh.

Referenced by G4GEMProbability::G4GEMProbability(), G4IonisParamElm::G4IonisParamElm(), G4IonisParamMat::G4IonisParamMat(), G4NeutronInelasticCrossSection::GetCrossSection(), G4NistManager::GetLOGZ(), G4PreCompoundProton::GetOpt2(), and G4DiscreteGammaTransition::SelectGamma().

00149 {
00150   return lz[Z];
00151 }

G4double G4Pow::powA ( G4double  A,
G4double  y 
) [inline]

Definition at line 187 of file G4Pow.hh.

References logA().

00188 {
00189   return std::exp(y*logA(A));
00190 }

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

Definition at line 100 of file G4Pow.cc.

References G4InuclParticleNames::nn.

Referenced by G4PreCompoundTransitions::CalculateProbability(), G4FermiConfigurationList::G4FermiConfigurationList(), G4PreCompoundNucleon::ProbabilityDistributionFunction(), and G4PreCompoundIon::ProbabilityDistributionFunction().

00101 {
00102   if(std::abs(n) > 8) { return std::pow(x, G4double(n)); }
00103   G4double res = 1.0;
00104   if(n >= 0) { for(G4int i=0; i<n; ++i) { res *= x; } }
00105   else if((n < 0) && (x != 0.0))
00106   {
00107     G4double y = 1.0/x;
00108     G4int nn = -n;
00109     for(G4int i=0; i<nn; ++i) { res *= y; }
00110   }
00111   return res;
00112 }

G4double G4Pow::powZ ( G4int  Z,
G4double  y 
) [inline]

Definition at line 182 of file G4Pow.hh.

Referenced by G4E1SingleProbability1::EmissionProbDensity(), G4E1Probability::EmissionProbDensity(), G4ContinuumGammaTransition::G4ContinuumGammaTransition(), G4PreCompoundProton::GetOpt1(), G4PreCompoundTriton::GetOpt12(), G4PreCompoundHe3::GetOpt12(), G4PreCompoundDeuteron::GetOpt12(), G4PreCompoundAlpha::GetOpt12(), G4PreCompoundProton::GetOpt3(), G4PreCompoundTriton::GetOpt34(), G4PreCompoundHe3::GetOpt34(), G4PreCompoundDeuteron::GetOpt34(), G4PreCompoundAlpha::GetOpt34(), and G4HadronElastic::SampleInvariantT().

00183 {
00184   return std::exp(y*lz[Z]);
00185 }

G4double G4Pow::Z13 ( G4int  Z  )  [inline]

Definition at line 112 of file G4Pow.hh.

Referenced by G4GEMProbability::CalcAlphaParam(), G4GEMCoulombBarrierHE::CalcCompoundRadius(), G4GEMCoulombBarrier::CalcCompoundRadius(), G4PreCompoundTriton::CrossSection(), G4PreCompoundProton::CrossSection(), G4PreCompoundNeutron::CrossSection(), G4PreCompoundHe3::CrossSection(), G4PreCompoundDeuteron::CrossSection(), G4PreCompoundAlpha::CrossSection(), G4FermiConfigurationList::G4FermiConfigurationList(), G4IonisParamElm::G4IonisParamElm(), G4WentzelOKandVIxSection::G4WentzelOKandVIxSection(), G4WentzelVIRelXSection::G4WentzelVIRelXSection(), G4HETCNeutron::GetAlpha(), G4NeutronInelasticCrossSection::GetCrossSection(), G4TripathiLightCrossSection::GetElementCrossSection(), G4IonsSihverCrossSection::GetElementCrossSection(), G4HadronCrossSections::GetFissionCrossSection(), G4IonsShenCrossSection::GetIsoCrossSection(), G4NistManager::GetZ13(), G4VPreCompoundFragment::Initialize(), G4Generator2BS::SampleDirection(), G4HadronElastic::SampleInvariantT(), G4AntiNuclElastic::SampleInvariantT(), and Z23().

00113 {
00114   return pz13[Z];
00115 }

G4double G4Pow::Z23 ( G4int  Z  )  [inline]

Definition at line 136 of file G4Pow.hh.

References Z13().

Referenced by G4GEMProbability::CalcBetaParam(), G4UrbanMscModel96::ComputeCrossSectionPerAtom(), G4UrbanMscModel95::ComputeCrossSectionPerAtom(), G4HETCNeutron::GetBeta(), G4AntiNuclElastic::GetcosTeta1(), G4HadronElastic::SampleInvariantT(), and G4WentzelOKandVIxSection::SetupTarget().

00137 {
00138   G4double x = Z13(Z);
00139   return x*x;
00140 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:58 2013 for Geant4 by  doxygen 1.4.7