Geant4  10.02.p03
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 ()
 

Private Member Functions

 G4ProtonField (const G4ProtonField &right)
 
const G4ProtonFieldoperator= (const G4ProtonField &right)
 
int operator== (const G4ProtonField &right) const
 
int operator!= (const G4ProtonField &right) const
 
G4double GetDensity (const G4ThreeVector &aPosition)
 
G4double GetFermiMomentum (const G4double aDensity)
 

Private Attributes

G4int theA
 
G4int theZ
 
G4double theBarrier
 
G4double theRadius
 
G4FermiMomentum theFermi
 
const G4VNuclearDensitytheDensity
 
std::vector< G4doubletheFermiMomBuffer
 

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() [1/2]

G4ProtonField::G4ProtonField ( G4V3DNucleus nucleus)

Definition at line 47 of file G4ProtonField.cc.

47  :
49 {
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
G4double theRadius
virtual G4double GetOuterRadius()=0
G4double density
Definition: TRTMaterials.hh:39
G4double GetFermiMomentum(const G4double aDensity)
void Init(G4int anA, G4int aZ)
G4double theBarrier
const G4VNuclearDensity * theDensity
G4V3DNucleus * theNucleus
virtual G4double GetBarrier()
static const double m
Definition: G4SIunits.hh:128
double G4double
Definition: G4Types.hh:76
G4double GetDensity(const G4ThreeVector &aPosition)
static const double fermi
Definition: G4SIunits.hh:102
G4FermiMomentum theFermi
std::vector< G4double > theFermiMomBuffer
Here is the call graph for this function:

◆ ~G4ProtonField()

G4ProtonField::~G4ProtonField ( )
virtual

Definition at line 79 of file G4ProtonField.cc.

80 { }

◆ G4ProtonField() [2/2]

G4ProtonField::G4ProtonField ( const G4ProtonField right)
private

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);
102  G4double bindingEnergy =0;
103 /*
104  * G4cout << " coulombBarrier/bindingEnergy : "
105  * << coulombBarrier << " /" << bindingEnergy << G4endl;
106  */
107  return bindingEnergy/theA+coulombBarrier;
108 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
static const double MeV
Definition: G4SIunits.hh:211
G4double Z13(G4int Z) const
Definition: G4Pow.hh:127
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDensity()

G4double G4ProtonField::GetDensity ( const G4ThreeVector aPosition)
inlineprivate

Definition at line 68 of file G4ProtonField.hh.

69  {
70  return theDensity->GetDensity(aPosition);
71  }
G4double GetDensity(const G4ThreeVector &aPosition) const
const G4VNuclearDensity * theDensity
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFermiMomentum()

G4double G4ProtonField::GetFermiMomentum ( const G4double  aDensity)
inlineprivate

Definition at line 72 of file G4ProtonField.hh.

73  {
74  return theFermi.GetFermiMomentum(aDensity);
75  }
G4double GetFermiMomentum(G4double density)
G4FermiMomentum theFermi
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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();
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_t y2[nxs]
Double_t y1[nxs]
Double_t x2[nxs]
Int_t index
Double_t y
double mag() const
Double_t x1[nxs]
float proton_mass_c2
Definition: hepunit.py:275
G4double theBarrier
double G4double
Definition: G4Types.hh:76
static const double fermi
Definition: G4SIunits.hh:102
std::vector< G4double > theFermiMomBuffer
Here is the call graph for this function:

◆ operator!=()

int G4ProtonField::operator!= ( const G4ProtonField right) const
private

◆ operator=()

const G4ProtonField& G4ProtonField::operator= ( const G4ProtonField right)
private

◆ operator==()

int G4ProtonField::operator== ( const G4ProtonField right) const
private

Member Data Documentation

◆ theA

G4int G4ProtonField::theA
private

Definition at line 77 of file G4ProtonField.hh.

◆ theBarrier

G4double G4ProtonField::theBarrier
private

Definition at line 79 of file G4ProtonField.hh.

◆ theDensity

const G4VNuclearDensity* G4ProtonField::theDensity
private

Definition at line 82 of file G4ProtonField.hh.

◆ theFermi

G4FermiMomentum G4ProtonField::theFermi
private

Definition at line 81 of file G4ProtonField.hh.

◆ theFermiMomBuffer

std::vector<G4double> G4ProtonField::theFermiMomBuffer
private

Definition at line 84 of file G4ProtonField.hh.

◆ theRadius

G4double G4ProtonField::theRadius
private

Definition at line 80 of file G4ProtonField.hh.

◆ theZ

G4int G4ProtonField::theZ
private

Definition at line 78 of file G4ProtonField.hh.


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