Geant4-11
Public Member Functions | Protected Member Functions | Private Attributes
G4NuclearFermiDensity Class Reference

#include <G4NuclearFermiDensity.hh>

Inheritance diagram for G4NuclearFermiDensity:
G4VNuclearDensity

Public Member Functions

 G4NuclearFermiDensity (G4int anA, G4int aZ)
 
G4double GetDensity (const G4ThreeVector &aPosition) const
 
G4double GetDeriv (const G4ThreeVector &aPosition) const
 
G4double GetRadius (const G4double maxRelativeDenisty) const
 
G4double GetRelativeDensity (const G4ThreeVector &aPosition) const
 
 ~G4NuclearFermiDensity ()
 

Protected Member Functions

G4double Getrho0 () const
 
void Setrho0 (G4double arho0)
 

Private Attributes

const G4double a
 
G4double rho0
 
G4int theA
 
G4double theR
 

Detailed Description

Definition at line 40 of file G4NuclearFermiDensity.hh.

Constructor & Destructor Documentation

◆ G4NuclearFermiDensity()

G4NuclearFermiDensity::G4NuclearFermiDensity ( G4int  anA,
G4int  aZ 
)

Definition at line 33 of file G4NuclearFermiDensity.cc.

34 : theA(anA), a(0.545 * fermi)
35{
36 G4double a13 = G4Pow::GetInstance()->Z13(anA);
37 const G4double r0 = 1.16 * (1. - 1.16/(a13*a13)) * fermi;
38 theR = r0 * a13;
39 Setrho0(3./ (4.*pi *r0*r0*r0 * theA * (1. + sqr(a/theR)*pi2 )));
40}
static constexpr double pi2
Definition: G4SIunits.hh:58
static constexpr double fermi
Definition: G4SIunits.hh:83
static constexpr double pi
Definition: G4SIunits.hh:55
double G4double
Definition: G4Types.hh:83
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double Z13(G4int Z) const
Definition: G4Pow.hh:123
void Setrho0(G4double arho0)
T sqr(const T &x)
Definition: templates.hh:128

References a, fermi, G4Pow::GetInstance(), pi, pi2, G4VNuclearDensity::Setrho0(), sqr(), theA, theR, and G4Pow::Z13().

◆ ~G4NuclearFermiDensity()

G4NuclearFermiDensity::~G4NuclearFermiDensity ( )

Definition at line 42 of file G4NuclearFermiDensity.cc.

42{}

Member Function Documentation

◆ GetDensity()

G4double G4VNuclearDensity::GetDensity ( const G4ThreeVector aPosition) const
inlineinherited

◆ GetDeriv()

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

Implements G4VNuclearDensity.

Definition at line 57 of file G4NuclearFermiDensity.hh.

58 {
59 G4double currentR=aPosition.mag();
60 if (currentR > 40*theR ) {return 0;}
61 else return -G4Exp((currentR-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
62 }
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
double mag() const
G4double GetDensity(const G4ThreeVector &aPosition) const
G4double Getrho0() const

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

◆ GetRadius()

G4double G4NuclearFermiDensity::GetRadius ( const G4double  maxRelativeDenisty) const
inlinevirtual

Implements G4VNuclearDensity.

Definition at line 51 of file G4NuclearFermiDensity.hh.

52 {
53 return (maxRelativeDenisty>0 && maxRelativeDenisty <= 1 ) ?
54 (theR + a*G4Log((1-maxRelativeDenisty+G4Exp(-1*theR/a))/maxRelativeDenisty)) : DBL_MAX;
55 }
G4double G4Log(G4double x)
Definition: G4Log.hh:226
#define DBL_MAX
Definition: templates.hh:62

References a, DBL_MAX, G4Exp(), G4Log(), and theR.

◆ GetRelativeDensity()

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

Implements G4VNuclearDensity.

Definition at line 46 of file G4NuclearFermiDensity.hh.

47 {
48 return 1./(1.+G4Exp((aPosition.mag()-theR)/a));
49 }

References a, G4Exp(), CLHEP::Hep3Vector::mag(), and theR.

◆ Getrho0()

G4double G4VNuclearDensity::Getrho0 ( ) const
inlineprotectedinherited

Definition at line 53 of file G4VNuclearDensity.hh.

53{ return rho0; };

References G4VNuclearDensity::rho0.

Referenced by GetDeriv().

◆ Setrho0()

void G4VNuclearDensity::Setrho0 ( G4double  arho0)
inlineprotectedinherited

Field Documentation

◆ a

const G4double G4NuclearFermiDensity::a
private

◆ rho0

G4double G4VNuclearDensity::rho0
privateinherited

◆ theA

G4int G4NuclearFermiDensity::theA
private

Definition at line 65 of file G4NuclearFermiDensity.hh.

Referenced by G4NuclearFermiDensity().

◆ theR

G4double G4NuclearFermiDensity::theR
private

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