Geant4 11.2.2
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
 

Additional Inherited Members

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

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}
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

◆ ~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 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:180
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 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:227
#define DBL_MAX
Definition templates.hh:62

◆ 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 }

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