00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "G4RegionModel.hh"
00032 #include "G4PhysicalConstants.hh"
00033 #include "G4HadronicException.hh"
00034 #include "G4InuclSpecialFunctions.hh"
00035
00036 using namespace G4InuclSpecialFunctions;
00037
00038 const G4double G4RegionModel::radius0 = 1.0E-15;
00039 const G4double G4RegionModel::BE = 7;
00040
00041 G4RegionModel::G4RegionModel(const G4int numberOfLayers,
00042 const G4int A, const G4int Z)
00043 : massNumber(A), protonNumber(Z)
00044 {
00045
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 }
00080
00081 G4RegionModel::~G4RegionModel(){}
00082
00083 G4double G4RegionModel::GetDensity(G4double r){
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 }
00091
00092 G4double G4RegionModel::GetPotentialEnergy(G4double r, G4int particle){
00093 if(particle == 0){
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){
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 }
00112
00113 G4double G4RegionModel::GetMaximumNucleonMomentum(G4double r,
00114 G4int nucleon){
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 }
00133
00134 G4double G4RegionModel::GetFermiMomentum(G4double aDensity,
00135 G4double aMass){
00136 return std::sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
00137 }
00138
00139 G4double G4RegionModel::GetFermiEnergy(G4double aDensity,
00140 G4double aMass){
00141 G4double densFactor = G4cbrt(3.0*pi2*aDensity);
00142 densFactor *= densFactor;
00143
00144 return hbar_Planck*hbar_Planck/(2.0*aMass) * densFactor;
00145 }
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159