Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ProtonField Class Reference

#include <G4ProtonField.hh>

Inheritance diagram for G4ProtonField:
Collaboration 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 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 ( 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 }
virtual G4int GetCharge()=0
G4VNuclearField(G4V3DNucleus *aNucleus=0)
virtual const G4VNuclearDensity * GetNuclearDensity() const =0
virtual G4int GetMassNumber()=0
virtual G4double GetOuterRadius()=0
static constexpr double m
Definition: G4SIunits.hh:129
void Init(G4int anA, G4int aZ)
G4V3DNucleus * theNucleus
virtual G4double GetBarrier()
double G4double
Definition: G4Types.hh:76
static constexpr double fermi
Definition: G4SIunits.hh:103

Here is the call graph for this function:

G4ProtonField::~G4ProtonField ( )
virtual

Definition at line 79 of file G4ProtonField.cc.

80 { }

Member Function Documentation

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:55
G4double Z13(G4int Z) const
Definition: G4Pow.hh:127
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
G4double bindingEnergy(G4int A, G4int Z)

Here is the call graph for this function:

Here is the caller graph for this function:

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 }
static constexpr double proton_mass_c2
double G4double
Definition: G4Types.hh:76
static constexpr double fermi
Definition: G4SIunits.hh:103
double mag() const

Here is the call graph for this function:


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