Geant4 9.6.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 46 of file G4ProtonField.cc.

46 :
47 G4VNuclearField(aNucleus), theDensity(theNucleus->GetNuclearDensity())
48{
49 theA = theNucleus->GetMassNumber();
50 theZ = theNucleus->GetCharge();
51 theBarrier = GetBarrier();
52 theRadius = 2.*theNucleus->GetOuterRadius();
53 theFermi.Init(theA, theZ);
54 G4double aR=0;
55 while(aR<theRadius)
56 {
57 G4ThreeVector aPosition(0,0,aR);
58 G4double density = GetDensity(aPosition);
59 G4double fermiMom = GetFermiMomentum(density);
60 theFermiMomBuffer.push_back(fermiMom);
61 aR+=0.3*fermi;
62 }
63 {
64 G4ThreeVector aPosition(0,0,theRadius);
65 G4double density = GetDensity(aPosition);
66 G4double fermiMom = GetFermiMomentum(density);
67 theFermiMomBuffer.push_back(fermiMom);
68 }
69 {
70 G4ThreeVector aPosition(0,0,theRadius+0.001*fermi);
71 theFermiMomBuffer.push_back(0);
72 }
73 {
74 G4ThreeVector aPosition(0,0,1.*m);
75 theFermiMomBuffer.push_back(0);
76 }
77}
double G4double
Definition: G4Types.hh:64
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 80 of file G4ProtonField.cc.

81{ }

Member Function Documentation

◆ GetBarrier()

G4double G4ProtonField::GetBarrier ( )
virtual

Implements G4VNuclearField.

Definition at line 99 of file G4ProtonField.cc.

100{
101 G4double coulombBarrier = (1.44/1.14) * MeV * theZ / (1.0 + std::pow(theA,1./3.));
102//GF G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
104/*
105 * G4cout << " coulombBarrier/bindingEnergy : "
106 * << coulombBarrier << " /" << bindingEnergy << G4endl;
107 */
108 return bindingEnergy/theA+coulombBarrier;
109}
G4double bindingEnergy(G4int A, G4int Z)

Referenced by G4ProtonField().

◆ GetField()

G4double G4ProtonField::GetField ( const G4ThreeVector aPosition)
virtual

Implements G4VNuclearField.

Definition at line 83 of file G4ProtonField.cc.

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

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