Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4NuclearFermiDensity Class Reference

#include <G4NuclearFermiDensity.hh>

Inheritance diagram for G4NuclearFermiDensity:
G4VNuclearDensity

Public Member Functions

 G4NuclearFermiDensity (G4int anA, G4int aZ)
 
 ~G4NuclearFermiDensity ()
 
G4double GetRelativeDensity (const G4ThreeVector &aPosition) const
 
G4double GetRadius (const G4double maxRelativeDenisty) const
 
G4double GetDeriv (const G4ThreeVector &aPosition) const
 
- Public Member Functions inherited from G4VNuclearDensity
 G4VNuclearDensity ()
 
virtual ~G4VNuclearDensity ()
 
G4double GetDensity (const G4ThreeVector &aPosition) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VNuclearDensity
void Setrho0 (G4double arho0)
 
G4double Getrho0 () const
 

Detailed Description

Definition at line 38 of file G4NuclearFermiDensity.hh.

Constructor & Destructor Documentation

G4NuclearFermiDensity::G4NuclearFermiDensity ( G4int  anA,
G4int  aZ 
)

Definition at line 32 of file G4NuclearFermiDensity.cc.

References python.hepunit::fermi, python.hepunit::pi, python.hepunit::pi2, G4VNuclearDensity::Setrho0(), and sqr().

33  : theA(anA), a(0.545 * fermi)
34 {
35  const G4double r0 = 1.16 * (1. - 1.16 * std::pow(G4double(anA), -2./3.)) * fermi;
36  theR = r0 * std::pow(anA, 1./3.);
37  Setrho0(3./ (4.*pi * std::pow(r0,3.) * theA * (1. + sqr(a/theR)*pi2 )));
38 }
void Setrho0(G4double arho0)
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
G4NuclearFermiDensity::~G4NuclearFermiDensity ( )

Definition at line 40 of file G4NuclearFermiDensity.cc.

40 {}

Member Function Documentation

G4double G4NuclearFermiDensity::GetDeriv ( const G4ThreeVector aPosition) const
inlinevirtual

Implements G4VNuclearDensity.

Definition at line 55 of file G4NuclearFermiDensity.hh.

References G4VNuclearDensity::GetDensity(), G4VNuclearDensity::Getrho0(), CLHEP::Hep3Vector::mag(), and sqr().

56  {
57  G4double currentR=aPosition.mag();
58  if (currentR > 40*theR ) {return 0;}
59  else return -std::exp((currentR-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
60  }
G4double Getrho0() const
G4double GetDensity(const G4ThreeVector &aPosition) const
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
double mag() const
G4double G4NuclearFermiDensity::GetRadius ( const G4double  maxRelativeDenisty) const
inlinevirtual

Implements G4VNuclearDensity.

Definition at line 49 of file G4NuclearFermiDensity.hh.

References DBL_MAX.

50  {
51  return (maxRelativeDenisty>0 && maxRelativeDenisty <= 1 ) ?
52  (theR + a*std::log((1-maxRelativeDenisty+std::exp(-1*theR/a))/maxRelativeDenisty)) : DBL_MAX;
53  }
#define DBL_MAX
Definition: templates.hh:83
G4double G4NuclearFermiDensity::GetRelativeDensity ( const G4ThreeVector aPosition) const
inlinevirtual

Implements G4VNuclearDensity.

Definition at line 44 of file G4NuclearFermiDensity.hh.

References CLHEP::Hep3Vector::mag().

45  {
46  return 1./(1.+std::exp((aPosition.mag()-theR)/a));
47  }
double mag() const

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