Geant4  10.02.p03
G4FermiMomentum Class Reference

#include <G4FermiMomentum.hh>

Collaboration diagram for G4FermiMomentum:

Public Member Functions

 G4FermiMomentum ()
 
 ~G4FermiMomentum ()
 
void Init (G4int anA, G4int aZ)
 
G4double GetFermiMomentum (G4double density)
 
G4ThreeVector GetMomentum (G4double density, G4double maxMomentum=-1.)
 

Private Member Functions

G4double cbrt (G4double x)
 

Private Attributes

G4int theA
 
G4int theZ
 
G4double constofpmax
 

Detailed Description

Definition at line 36 of file G4FermiMomentum.hh.

Constructor & Destructor Documentation

◆ G4FermiMomentum()

G4FermiMomentum::G4FermiMomentum ( )

Definition at line 31 of file G4FermiMomentum.cc.

31  :
32  theA(0), theZ(0),
34 {}
G4double cbrt(G4double x)
static const double pi2
Definition: G4SIunits.hh:77
float hbarc
Definition: hepunit.py:265

◆ ~G4FermiMomentum()

G4FermiMomentum::~G4FermiMomentum ( )

Definition at line 36 of file G4FermiMomentum.cc.

36 {}

Member Function Documentation

◆ cbrt()

G4double G4FermiMomentum::cbrt ( G4double  x)
inlineprivate

Definition at line 66 of file G4FermiMomentum.hh.

66 { return G4Pow::GetInstance()->A13(x); }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
G4double A13(G4double A) const
Definition: G4Pow.hh:132
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFermiMomentum()

G4double G4FermiMomentum::GetFermiMomentum ( G4double  density)
inline

Definition at line 45 of file G4FermiMomentum.hh.

46  {
47  return constofpmax * cbrt(density * theA);
48  }
G4double cbrt(G4double x)
G4double density
Definition: TRTMaterials.hh:39
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetMomentum()

G4ThreeVector G4FermiMomentum::GetMomentum ( G4double  density,
G4double  maxMomentum = -1. 
)
inline

Definition at line 50 of file G4FermiMomentum.hh.

52  {
53  if (maxMomentum < 0 ) maxMomentum=GetFermiMomentum(density);
54  G4ThreeVector p;
55 
56  do {
57  p=G4ThreeVector(2.*G4UniformRand()-1.,
58  2.*G4UniformRand()-1.,
59  2.*G4UniformRand()-1.);
60  } while ( p.mag() > 1. ); /* Loop checking, 30-Oct-2015, G.Folger */
61  return p*maxMomentum;
62  }
CLHEP::Hep3Vector G4ThreeVector
G4double density
Definition: TRTMaterials.hh:39
#define G4UniformRand()
Definition: Randomize.hh:97
double mag() const
G4double GetFermiMomentum(G4double density)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init()

void G4FermiMomentum::Init ( G4int  anA,
G4int  aZ 
)
inline

Definition at line 43 of file G4FermiMomentum.hh.

43 {theA = anA; theZ = aZ;}
Here is the caller graph for this function:

Member Data Documentation

◆ constofpmax

G4double G4FermiMomentum::constofpmax
private

Definition at line 75 of file G4FermiMomentum.hh.

◆ theA

G4int G4FermiMomentum::theA
private

Definition at line 70 of file G4FermiMomentum.hh.

◆ theZ

G4int G4FermiMomentum::theZ
private

Definition at line 71 of file G4FermiMomentum.hh.


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