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

#include <G4ProtonField.hh>

+ Inheritance diagram for G4ProtonField:

Public Member Functions

 G4ProtonField (G4V3DNucleus *nucleus)
 
virtual ~G4ProtonField ()
 
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 G4ProtonField.hh.

Constructor & Destructor Documentation

◆ G4ProtonField()

G4ProtonField::G4ProtonField ( G4V3DNucleus nucleus)

Definition at line 47 of file G4ProtonField.cc.

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

◆ ~G4ProtonField()

G4ProtonField::~G4ProtonField ( )
virtual

Definition at line 79 of file G4ProtonField.cc.

80{ }

Member Function Documentation

◆ GetBarrier()

G4double G4ProtonField::GetBarrier ( )
virtual

Implements G4VNuclearField.

Definition at line 98 of file G4ProtonField.cc.

99{
100 G4double coulombBarrier = (1.44/1.14) * MeV * theZ / (1.0 + G4Pow::GetInstance()->Z13(theA));
101//GF G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
103/*
104 * G4cout << " coulombBarrier/bindingEnergy : "
105 * << coulombBarrier << " /" << bindingEnergy << G4endl;
106 */
107 return bindingEnergy/theA+coulombBarrier;
108}
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double Z13(G4int Z) const
Definition: G4Pow.hh:123
G4double bindingEnergy(G4int A, G4int Z)

Referenced by G4ProtonField().

◆ GetField()

G4double G4ProtonField::GetField ( const G4ThreeVector aPosition)
virtual

Implements G4VNuclearField.

Definition at line 82 of file G4ProtonField.cc.

83{
84//G4cout << " Fermi Potential " << (fermiMom*fermiMom)/(2*proton_mass_c2) <<G4endl;
85 G4double x = aPosition.mag();
86 unsigned int index = static_cast<unsigned int>(x/(0.3*fermi));
87 if((index+2) > theFermiMomBuffer.size()) return theFermiMomBuffer.back();
88 G4double y1 = theFermiMomBuffer[index];
89 G4double y2 = theFermiMomBuffer[index+1];
90 G4double x1 = (0.3*fermi)*index;
91 G4double x2 = (0.3*fermi)*(index+1);
92 G4double fermiMom = y1 + (x-x1)*(y2-y1)/(x2-x1);
93 G4double y = -1*(fermiMom*fermiMom)/(2*proton_mass_c2)+theBarrier;
94// G4cout <<" Protonfield test "<<index<<" "<< x1<<" "<<y1<<" "<<x2<<" "<<y2<<" "<<x<<" "<<y<<" "<<theBarrier<<G4endl;
95 return y;
96}
double mag() const

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