G4FermiMomentum Class Reference

#include <G4FermiMomentum.hh>


Public Member Functions

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


Detailed Description

Definition at line 35 of file G4FermiMomentum.hh.


Constructor & Destructor Documentation

G4FermiMomentum::G4FermiMomentum (  ) 

Definition at line 31 of file G4FermiMomentum.cc.

00031                                  :
00032    theA(0), theZ(0),
00033    constofpmax(hbarc*cbrt(3.*pi2))
00034 {}

G4FermiMomentum::~G4FermiMomentum (  ) 

Definition at line 36 of file G4FermiMomentum.cc.

00036 {}    


Member Function Documentation

G4double G4FermiMomentum::GetFermiMomentum ( G4double  density  )  [inline]

Definition at line 44 of file G4FermiMomentum.hh.

Referenced by GetMomentum().

00045     {
00046         return constofpmax * cbrt(density * theA);
00047     }

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

Definition at line 49 of file G4FermiMomentum.hh.

References G4UniformRand, and GetFermiMomentum().

00051     { 
00052         if (maxMomentum < 0 ) maxMomentum=GetFermiMomentum(density);
00053         G4ThreeVector p;
00054         
00055         do {
00056             p=G4ThreeVector(2.*G4UniformRand()-1.,
00057                             2.*G4UniformRand()-1.,
00058                             2.*G4UniformRand()-1.);
00059             } while ( p.mag() > 1. );
00060         return p*maxMomentum; 
00061      }

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

Definition at line 42 of file G4FermiMomentum.hh.

Referenced by G4NeutronField::G4NeutronField(), G4ProtonField::G4ProtonField(), and G4Fancy3DNucleus::Init().

00042 {theA = anA; theZ = aZ;}


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:59 2013 for Geant4 by  doxygen 1.4.7