#include <G4RegionModel.hh>
Public Member Functions | |
G4RegionModel (const G4int numberOfLayers, const G4int A, const G4int Z) | |
~G4RegionModel () | |
G4double | GetDensity (G4double radius) |
G4double | GetPotentialEnergy (G4double r, G4int particle) |
G4double | GetMaximumNucleonMomentum (G4double radius, G4int nucleon) |
Definition at line 40 of file G4RegionModel.hh.
Definition at line 41 of file G4RegionModel.cc.
References G4InuclSpecialFunctions::G4cbrt(), G4ParticleDefinition::GetPDGMass(), G4Neutron::Neutron(), G4INCL::Math::pi, and G4Proton::Proton().
00043 : massNumber(A), protonNumber(Z) 00044 { 00045 //count the radiuses, densities and fermi momenta with A and Z 00046 G4double r = radius0*G4cbrt(A); 00047 00048 if(numberOfLayers==1){ 00049 radius.push_back(r); 00050 00051 G4double vol = 4.0/3.0 * pi * r*r*r; 00052 G4double rho = G4double(A) / vol; 00053 density.push_back(rho); 00054 00055 G4double protonMass = G4Proton::Proton()->GetPDGMass(); 00056 G4double neutronMass = G4Neutron::Neutron()->GetPDGMass(); 00057 G4double protonDensity = G4double(Z) / vol; 00058 G4double neutronDensity = G4double(A-Z) / vol; 00059 00060 protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass)); 00061 neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass)); 00062 00063 protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass)); 00064 neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass)); 00065 00066 G4double fermiEP = *protonFermiEnergy.begin(); 00067 G4double fermiEN = *neutronFermiEnergy.begin(); 00068 protonPotentialEnergy.push_back(-(fermiEP + BE)); 00069 neutronPotentialEnergy.push_back(-(fermiEN + BE)); 00070 } 00071 else{ 00072 if(numberOfLayers==3){ 00073 radius.push_back(0.1*r); 00074 radius.push_back(0.2*r); 00075 radius.push_back(0.9*r); 00076 00077 } 00078 } 00079 }
G4RegionModel::~G4RegionModel | ( | ) |
Definition at line 83 of file G4RegionModel.cc.
00083 { 00084 my_iterator j=density.begin(); 00085 for(my_iterator i=radius.begin(); i<radius.end(); i++){ 00086 if(r <= *i) return *j; 00087 j++; 00088 } 00089 return 0; 00090 }
Definition at line 113 of file G4RegionModel.cc.
00114 { 00115 if(nucleon == 0){ 00116 my_iterator j=protonFermiMomentum.begin(); 00117 for(my_iterator i=radius.begin(); i<radius.end(); i++){ 00118 if(r <= *i) return *j; 00119 j++; 00120 } 00121 } 00122 if(nucleon==1){ 00123 my_iterator j=neutronFermiMomentum.begin(); 00124 for(my_iterator i=radius.begin(); i<radius.end(); i++){ 00125 if(r <= *i) return *j; 00126 j++; 00127 } 00128 } 00129 throw G4HadronicException(__FILE__, __LINE__, "G4RegionModel::GetMaximumNucleonMomentum - return value undefined"); 00130 return 0; 00131 00132 }
Definition at line 92 of file G4RegionModel.cc.
00092 { 00093 if(particle == 0){ //proton 00094 my_iterator j=protonPotentialEnergy.begin(); 00095 for(my_iterator i=radius.begin(); i<radius.end(); i++){ 00096 if(r <= *i) return *j; 00097 j++; 00098 } 00099 return 0; 00100 } 00101 00102 if(particle == 1){ //neutron 00103 my_iterator j=neutronPotentialEnergy.begin(); 00104 for(my_iterator i=radius.begin(); i<radius.end(); i++){ 00105 if(r <= *i) return *j; 00106 j++; 00107 } 00108 return 0; 00109 } 00110 return 0; 00111 }