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

#include <G4NeutronField.hh>

+ Inheritance diagram for G4NeutronField:

Public Member Functions

 G4NeutronField (G4V3DNucleus *nucleus)
 
virtual ~G4NeutronField ()
 
virtual G4double GetField (const G4ThreeVector &aPosition)
 
virtual G4double GetBarrier ()
 
- Public Member Functions inherited from G4VNuclearField
 G4VNuclearField (G4V3DNucleus *aNucleus=0)
 
virtual ~G4VNuclearField ()
 
void SetNucleus (G4V3DNucleus *aNucleus)
 
virtual G4double GetField (const G4ThreeVector &aPosition)=0
 
virtual G4double GetBarrier ()=0
 
virtual G4double GetCoeff ()
 

Additional Inherited Members

- Protected Attributes inherited from G4VNuclearField
G4V3DNucleustheNucleus
 
const G4double radius
 

Detailed Description

Definition at line 48 of file G4NeutronField.hh.

Constructor & Destructor Documentation

◆ G4NeutronField()

G4NeutronField::G4NeutronField ( G4V3DNucleus nucleus)

Definition at line 45 of file G4NeutronField.cc.

45 :
46 G4VNuclearField(aNucleus), theDensity(theNucleus->GetNuclearDensity())
47{
48 theA = theNucleus->GetMassNumber();
49 theZ = theNucleus->GetCharge();
50 theFermi.Init(theA, theZ);
51 theR = 2.*theNucleus->GetOuterRadius();
52 G4double aR=0;
53 while(aR<theR)
54 {
55 G4ThreeVector aPosition(0,0,aR);
56 G4double density = GetDensity(aPosition);
57 G4double fermiMom = GetFermiMomentum(density);
58 theFermiMomBuffer.push_back(fermiMom);
59 aR+=0.3*fermi;
60 }
61 {
62 G4ThreeVector aPosition(0,0,theR);
63 G4double density = GetDensity(aPosition);
64 G4double fermiMom = GetFermiMomentum(density);
65 theFermiMomBuffer.push_back(fermiMom);
66 }
67 {
68 G4ThreeVector aPosition(0,0,theR+0.001*fermi);
69 theFermiMomBuffer.push_back(0);
70 }
71 {
72 G4ThreeVector aPosition(0,0,1.*m);
73 theFermiMomBuffer.push_back(0);
74 }
75}
double G4double
Definition: G4Types.hh:64
void Init(G4int anA, G4int aZ)
virtual G4double GetOuterRadius()=0
virtual const G4VNuclearDensity * GetNuclearDensity() const =0
virtual G4int GetCharge()=0
virtual G4int GetMassNumber()=0
G4V3DNucleus * theNucleus

◆ ~G4NeutronField()

G4NeutronField::~G4NeutronField ( )
virtual

Definition at line 77 of file G4NeutronField.cc.

78{ }

Member Function Documentation

◆ GetBarrier()

G4double G4NeutronField::GetBarrier ( )
virtual

Implements G4VNuclearField.

Definition at line 93 of file G4NeutronField.cc.

94{
95/*
96 * G4double A = theNucleus->GetMassNumber();
97 * G4double Z = theNucleus->GetCharge();
98 *
99 * return G4NucleiPropertiesTable::GetBindingEnergy(Z, A)/A;
100 */
101 return 0.;
102}

◆ GetField()

G4double G4NeutronField::GetField ( const G4ThreeVector aPosition)
virtual

Implements G4VNuclearField.

Definition at line 80 of file G4NeutronField.cc.

81{
82 G4double x = aPosition.mag();
83 G4int index = static_cast<G4int>(x/(0.3*fermi) );
84 if(index+2> static_cast<G4int>(theFermiMomBuffer.size())) return theFermiMomBuffer.back();
85 G4double y1 = theFermiMomBuffer[index];
86 G4double y2 = theFermiMomBuffer[index+1];
87 G4double x1 = (0.3*fermi)*index;
88 G4double x2 = (0.3*fermi)*(index+1);
89 G4double fermiMom = y1 + (x-x1)*(y2-y1)/(x2-x1);
90 return -1*(fermiMom*fermiMom)/(2*neutron_mass_c2);
91}
int G4int
Definition: G4Types.hh:66
double mag() const

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