Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // 28 // Hadronic Process: Nuclear De-excitations 29 // by V. Lara 30 31 #include <numeric> 32 33 #include "G4StatMFMicroCanonical.hh" 34 #include "G4PhysicalConstants.hh" 35 #include "G4SystemOfUnits.hh" 36 #include "G4HadronicException.hh" 37 #include "G4Pow.hh" 38 39 // constructor 40 G4StatMFMicroCanonical::G4StatMFMicroCanonical 41 { 42 // Perform class initialization 43 Initialize(theFragment); 44 } 45 46 // destructor 47 G4StatMFMicroCanonical::~G4StatMFMicroCanonica 48 { 49 // garbage collection 50 if (!_ThePartitionManagerVector.empty()) { 51 std::for_each(_ThePartitionManagerVector.b 52 _ThePartitionManagerVector.end(), 53 DeleteFragment()); 54 } 55 } 56 57 void G4StatMFMicroCanonical::Initialize(const 58 { 59 60 std::vector<G4StatMFMicroManager*>::iterator 61 62 // Excitation Energy 63 G4double U = theFragment.GetExcitationEnergy 64 65 G4int A = theFragment.GetA_asInt(); 66 G4int Z = theFragment.GetZ_asInt(); 67 G4double x = 1.0 - 2.0*Z/G4double(A); 68 G4Pow* g4calc = G4Pow::GetInstance(); 69 70 // Configuration temperature 71 G4double TConfiguration = std::sqrt(8.0*U/G4 72 73 // Free internal energy at Temperature T = 0 74 __FreeInternalE0 = A*( 75 // Volume term (for T = 0) 76 -G4StatMFParameters::GetE0() + 77 // Symmetry term 78 G4StatMFParameters::GetGamma0()*x*x 79 ) + 80 // Surface term (for T = 0) 81 G4StatMFParameters::GetBeta0()*g4calc->Z23 82 // Coulomb term 83 elm_coupling*0.6*Z*Z/(G4StatMFParameters:: 84 85 // Statistical weight 86 G4double W = 0.0; 87 88 // Mean breakup multiplicity 89 __MeanMultiplicity = 0.0; 90 91 // Mean channel temperature 92 __MeanTemperature = 0.0; 93 94 // Mean channel entropy 95 __MeanEntropy = 0.0; 96 97 // Calculate entropy of compound nucleus 98 G4double SCompoundNucleus = CalcEntropyOfCom 99 100 // Statistical weight of compound nucleus 101 _WCompoundNucleus = 1.0; 102 103 W += _WCompoundNucleus; 104 105 // Maximal fragment multiplicity allowed in 106 G4int MaxMult = G4StatMFMicroCanonical::MaxA 107 if (A > 110) MaxMult -= 1; 108 109 for (G4int im = 2; im <= MaxMult; im++) { 110 G4StatMFMicroManager * aMicroManager = 111 new G4StatMFMicroManager(theFragment,im, 112 _ThePartitionManagerVector.push_back(aMicr 113 } 114 115 // W is the total probability 116 W = std::accumulate(_ThePartitionManagerVect 117 _ThePartitionManagerVector.end(), 118 W, [](const G4double& running_total, 119 G4StatMFMicroManag 120 { 121 return running_total + manager- 122 } ); 123 124 // Normalization of statistical weights 125 for (it = _ThePartitionManagerVector.begin( 126 { 127 (*it)->Normalize(W); 128 } 129 130 _WCompoundNucleus /= W; 131 132 __MeanMultiplicity += 1.0 * _WCompoundNucleu 133 __MeanTemperature += TConfiguration * _WComp 134 __MeanEntropy += SCompoundNucleus * _WCompou 135 136 for (it = _ThePartitionManagerVector.begin( 137 { 138 __MeanMultiplicity += (*it)->GetMeanMult 139 __MeanTemperature += (*it)->GetMeanTempe 140 __MeanEntropy += (*it)->GetMeanEntropy() 141 } 142 143 return; 144 } 145 146 G4double G4StatMFMicroCanonical::CalcFreeInter 147 G4double T) 148 { 149 G4int A = theFragment.GetA_asInt(); 150 G4int Z = theFragment.GetZ_asInt(); 151 G4double A13 = G4Pow::GetInstance()->Z13(A); 152 153 G4double InvLevelDensityPar = G4StatMFParame 154 *(1.0 + 3.0/G4double(A-1)); 155 156 G4double VolumeTerm = (-G4StatMFParameters:: 157 158 G4double SymmetryTerm = G4StatMFParameters:: 159 *(A - 2*Z)*(A - 2*Z)/G4double(A); 160 161 G4double SurfaceTerm = (G4StatMFParameters:: 162 - T*G4StatMFParameters::DBetaDT(T))*A1 163 164 G4double CoulombTerm = elm_coupling*0.6*Z*Z/ 165 166 return VolumeTerm + SymmetryTerm + SurfaceTe 167 } 168 169 G4double 170 G4StatMFMicroCanonical::CalcEntropyOfCompoundN 171 G4double & TConf) 172 // Calculates Temperature and Entropy of com 173 { 174 G4int A = theFragment.GetA_asInt(); 175 G4double U = theFragment.GetExcitationEnergy 176 G4double A13 = G4Pow::GetInstance()->Z13(A); 177 178 G4double Ta = std::max(std::sqrt(U/(0.125*A) 179 G4double Tb = Ta; 180 181 G4double ECompoundNucleus = CalcFreeInternal 182 G4double Da = (U+__FreeInternalE0-ECompoundN 183 G4double Db = 0.0; 184 185 G4double InvLevelDensity = CalcInvLevelDensi 186 187 // bracketing the solution 188 if (Da == 0.0) { 189 TConf = Ta; 190 return 2*Ta*A/InvLevelDensity - G4StatMFPa 191 } else if (Da < 0.0) { 192 do { 193 Tb -= 0.5*Tb; 194 ECompoundNucleus = CalcFreeInternalEnerg 195 Db = (U+__FreeInternalE0-ECompoundNucleu 196 } while (Db < 0.0); 197 } else { 198 do { 199 Tb += 0.5*Tb; 200 ECompoundNucleus = CalcFreeInternalEnerg 201 Db = (U+__FreeInternalE0-ECompoundNucleu 202 } while (Db > 0.0); 203 } 204 205 G4double eps = 1.0e-14 * std::abs(Tb-Ta); 206 207 for (G4int i = 0; i < 1000; i++) { 208 G4double Tc = (Ta+Tb)*0.5; 209 if (std::abs(Ta-Tb) <= eps) { 210 TConf = Tc; 211 return 2*Tc*A/InvLevelDensity - G4StatMF 212 } 213 ECompoundNucleus = CalcFreeInternalEnergy( 214 G4double Dc = (U+__FreeInternalE0-ECompoun 215 216 if (Dc == 0.0) { 217 TConf = Tc; 218 return 2*Tc*A/InvLevelDensity - G4StatMF 219 } 220 221 if (Da*Dc < 0.0) { 222 Tb = Tc; 223 Db = Dc; 224 } else { 225 Ta = Tc; 226 Da = Dc; 227 } 228 } 229 230 G4cout << 231 "G4StatMFMicrocanoncal::CalcEntropyOfCompo 232 << G4endl; 233 234 return 0.0; 235 } 236 237 G4StatMFChannel * G4StatMFMicroCanonical::Cho 238 // Choice of fragment atomic numbers and cha 239 { 240 // We choose a multiplicity (1,2,3,...) and 241 G4double RandNumber = G4UniformRand(); 242 243 if (RandNumber < _WCompoundNucleus) { 244 245 G4StatMFChannel * aChannel = new G4StatMFC 246 aChannel->CreateFragment(theFragment.GetA_ 247 return aChannel; 248 249 } else { 250 251 G4double AccumWeight = _WCompoundNucleus; 252 std::vector<G4StatMFMicroManager*>::iterat 253 for (it = _ThePartitionManagerVector.begin 254 AccumWeight += (*it)->GetProbability(); 255 if (RandNumber < AccumWeight) { 256 return (*it)->ChooseChannel(theFragment.GetA 257 } 258 } 259 throw G4HadronicException(__FILE__, __LINE 260 } 261 262 return 0; 263 } 264 265 G4double G4StatMFMicroCanonical::CalcInvLevelD 266 { 267 G4double res = 0.0; 268 if (anA > 1) { 269 res = G4StatMFParameters::GetEpsilon0()*(1 270 } 271 return res; 272 } 273