Geant4 11.1.1
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 for (G4double aR=0.;aR<theR; aR+=0.3*fermi)
53 {
54 G4ThreeVector aPosition(0,0,aR);
55 G4double density = GetDensity(aPosition);
56 G4double fermiMom = GetFermiMomentum(density);
57 theFermiMomBuffer.push_back(fermiMom);
58 }
59 {
60 G4ThreeVector aPosition(0,0,theR);
61 G4double density = GetDensity(aPosition);
62 G4double fermiMom = GetFermiMomentum(density);
63 theFermiMomBuffer.push_back(fermiMom);
64 }
65 {
66 G4ThreeVector aPosition(0,0,theR+0.001*fermi);
67 theFermiMomBuffer.push_back(0);
68 }
69 {
70 G4ThreeVector aPosition(0,0,1.*m);
71 theFermiMomBuffer.push_back(0);
72 }
73}
double G4double
Definition: G4Types.hh:83
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 75 of file G4NeutronField.cc.

76{ }

Member Function Documentation

◆ GetBarrier()

G4double G4NeutronField::GetBarrier ( )
virtual

Implements G4VNuclearField.

Definition at line 91 of file G4NeutronField.cc.

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

◆ GetField()

G4double G4NeutronField::GetField ( const G4ThreeVector aPosition)
virtual

Implements G4VNuclearField.

Definition at line 78 of file G4NeutronField.cc.

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

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