G4ProtonField Class Reference

#include <G4ProtonField.hh>

Inheritance diagram for G4ProtonField:

G4VNuclearField

Public Member Functions

 G4ProtonField (G4V3DNucleus *nucleus)
virtual ~G4ProtonField ()
virtual G4double GetField (const G4ThreeVector &aPosition)
virtual G4double GetBarrier ()

Detailed Description

Definition at line 48 of file G4ProtonField.hh.


Constructor & Destructor Documentation

G4ProtonField::G4ProtonField ( G4V3DNucleus nucleus  ) 

Definition at line 46 of file G4ProtonField.cc.

References GetBarrier(), G4V3DNucleus::GetCharge(), G4V3DNucleus::GetMassNumber(), G4V3DNucleus::GetOuterRadius(), G4FermiMomentum::Init(), and G4VNuclearField::theNucleus.

00046                                                     : 
00047    G4VNuclearField(aNucleus), theDensity(theNucleus->GetNuclearDensity())
00048 { 
00049   theA = theNucleus->GetMassNumber();
00050   theZ = theNucleus->GetCharge();
00051   theBarrier = GetBarrier();
00052   theRadius = 2.*theNucleus->GetOuterRadius();
00053   theFermi.Init(theA, theZ);
00054   G4double aR=0;
00055   while(aR<theRadius)
00056   {
00057     G4ThreeVector aPosition(0,0,aR);
00058     G4double density = GetDensity(aPosition);
00059     G4double fermiMom = GetFermiMomentum(density);
00060     theFermiMomBuffer.push_back(fermiMom);
00061     aR+=0.3*fermi;
00062   }
00063   {
00064   G4ThreeVector aPosition(0,0,theRadius);
00065   G4double density = GetDensity(aPosition);
00066   G4double fermiMom = GetFermiMomentum(density);
00067   theFermiMomBuffer.push_back(fermiMom);  
00068   }
00069   {
00070   G4ThreeVector aPosition(0,0,theRadius+0.001*fermi);
00071   theFermiMomBuffer.push_back(0);  
00072   }
00073   {
00074   G4ThreeVector aPosition(0,0,1.*m);
00075   theFermiMomBuffer.push_back(0);  
00076   }
00077 }

G4ProtonField::~G4ProtonField (  )  [virtual]

Definition at line 80 of file G4ProtonField.cc.

00081 { }


Member Function Documentation

G4double G4ProtonField::GetBarrier (  )  [virtual]

Implements G4VNuclearField.

Definition at line 99 of file G4ProtonField.cc.

References G4InuclSpecialFunctions::bindingEnergy().

Referenced by G4ProtonField().

00100 {
00101   G4double coulombBarrier = (1.44/1.14) * MeV * theZ / (1.0 + std::pow(theA,1./3.));
00102 //GF   G4double bindingEnergy = G4NucleiPropertiesTable::GetBindingEnergy(Z, A);
00103   G4double bindingEnergy =0;
00104 /*
00105  *   G4cout << " coulombBarrier/bindingEnergy : " 
00106  *       << coulombBarrier << " /" << bindingEnergy << G4endl;
00107  */
00108   return bindingEnergy/theA+coulombBarrier;
00109 }

G4double G4ProtonField::GetField ( const G4ThreeVector aPosition  )  [virtual]

Implements G4VNuclearField.

Definition at line 83 of file G4ProtonField.cc.

00084 {
00085 //G4cout << " Fermi Potential " << (fermiMom*fermiMom)/(2*proton_mass_c2) <<G4endl;
00086   G4double x = aPosition.mag();
00087   G4int index = static_cast<G4int>(x/(0.3*fermi) );
00088   if(index+2>static_cast<G4int>(theFermiMomBuffer.size())) return theFermiMomBuffer.back();
00089   G4double y1 = theFermiMomBuffer[index];
00090   G4double y2 = theFermiMomBuffer[index+1];
00091   G4double x1 = (0.3*fermi)*index;
00092   G4double x2 = (0.3*fermi)*(index+1);
00093   G4double fermiMom = y1 + (x-x1)*(y2-y1)/(x2-x1);
00094   G4double y = -1*(fermiMom*fermiMom)/(2*proton_mass_c2)+theBarrier;
00095 //  G4cout <<" Protonfield test "<<index<<" "<< x1<<" "<<y1<<" "<<x2<<" "<<y2<<" "<<x<<" "<<y<<" "<<theBarrier<<G4endl;
00096   return y;
00097 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:00 2013 for Geant4 by  doxygen 1.4.7