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

#include <G4NuclearFermiDensity.hh>

+ Inheritance diagram for G4NuclearFermiDensity:

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
 
virtual G4double GetRelativeDensity (const G4ThreeVector &aPosition) const =0
 
virtual G4double GetRadius (const G4double maxRelativeDenisty) const =0
 
virtual G4double GetDeriv (const G4ThreeVector &point) const =0
 

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::G4NuclearFermiDensity ( G4int  anA,
G4int  aZ 
)

Definition at line 33 of file G4NuclearFermiDensity.cc.

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

◆ ~G4NuclearFermiDensity()

G4NuclearFermiDensity::~G4NuclearFermiDensity ( )

Definition at line 42 of file G4NuclearFermiDensity.cc.

42{}

Member Function Documentation

◆ GetDeriv()

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

Implements G4VNuclearDensity.

Definition at line 56 of file G4NuclearFermiDensity.hh.

57 {
58 G4double currentR=aPosition.mag();
59 if (currentR > 40*theR ) {return 0;}
60 else return -std::exp((currentR-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
61 }
double mag() const
G4double GetDensity(const G4ThreeVector &aPosition) const
G4double Getrho0() const

◆ GetRadius()

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

Implements G4VNuclearDensity.

Definition at line 50 of file G4NuclearFermiDensity.hh.

51 {
52 return (maxRelativeDenisty>0 && maxRelativeDenisty <= 1 ) ?
53 (theR + a*std::log((1-maxRelativeDenisty+std::exp(-1*theR/a))/maxRelativeDenisty)) : DBL_MAX;
54 }
#define DBL_MAX
Definition: templates.hh:83

◆ GetRelativeDensity()

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

Implements G4VNuclearDensity.

Definition at line 45 of file G4NuclearFermiDensity.hh.

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

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