Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4StatMFMicroPartition.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27//
28// by V. Lara
29// --------------------------------------------------------------------
30
33#include "G4SystemOfUnits.hh"
35#include "Randomize.hh"
36#include "G4Log.hh"
37#include "G4Exp.hh"
38#include "G4Pow.hh"
39
40// Copy constructor
42{
43 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroPartition::copy_constructor meant to not be accessible");
44}
45
46// Operators
47
48G4StatMFMicroPartition & G4StatMFMicroPartition::
49operator=(const G4StatMFMicroPartition & )
50{
51 throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroPartition::operator= meant to not be accessible");
52 return *this;
53}
54
55
57{
58 //throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroPartition::operator== meant to not be accessible");
59 return false;
60}
61
62
64{
65 //throw G4HadronicException(__FILE__, __LINE__, "G4StatMFMicroPartition::operator!= meant to not be accessible");
66 return true;
67}
68
69void G4StatMFMicroPartition::CoulombFreeEnergy(G4int anA)
70{
71 // This Z independent factor in the Coulomb free energy
72 G4double CoulombConstFactor = G4StatMFParameters::GetCoulomb();
73
74 // We use the aproximation Z_f ~ Z/A * A_f
75
76 G4double ZA = G4double(theZ)/G4double(theA);
77
78 if (anA == 0 || anA == 1)
79 {
80 _theCoulombFreeEnergy.push_back(CoulombConstFactor*ZA*ZA);
81 }
82 else if (anA == 2 || anA == 3 || anA == 4)
83 {
84 // Z/A ~ 1/2
85 _theCoulombFreeEnergy.push_back(CoulombConstFactor*0.5
86 *anA*G4Pow::GetInstance()->Z23(anA));
87 }
88 else // anA > 4
89 {
90 _theCoulombFreeEnergy.push_back(CoulombConstFactor*ZA*ZA
91 *anA*G4Pow::GetInstance()->Z23(anA));
92 }
93}
94
95G4double G4StatMFMicroPartition::GetCoulombEnergy(void)
96{
97 G4Pow* g4calc = G4Pow::GetInstance();
98 G4double CoulombFactor = 1.0/g4calc->A13(1.0+G4StatMFParameters::GetKappaCoulomb());
99
100 G4double CoulombEnergy = elm_coupling*0.6*theZ*theZ*CoulombFactor/
101 (G4StatMFParameters::Getr0()*g4calc->Z13(theA));
102
103 G4double ZA = G4double(theZ)/G4double(theA);
104 for (unsigned int i = 0; i < _thePartition.size(); i++)
105 CoulombEnergy += _theCoulombFreeEnergy[i] - elm_coupling*0.6*
106 ZA*ZA*_thePartition[i]*g4calc->Z23(_thePartition[i])/
108
109 return CoulombEnergy;
110}
111
112G4double G4StatMFMicroPartition::GetPartitionEnergy(G4double T)
113{
114 G4Pow* g4calc = G4Pow::GetInstance();
115 G4double CoulombFactor = 1.0/g4calc->A13(1.0+G4StatMFParameters::GetKappaCoulomb());
116
117 G4double PartitionEnergy = 0.0;
118
119 // We use the aprox that Z_f ~ Z/A * A_f
120 for (unsigned int i = 0; i < _thePartition.size(); i++)
121 {
122 if (_thePartition[i] == 0 || _thePartition[i] == 1)
123 {
124 PartitionEnergy += _theCoulombFreeEnergy[i];
125 }
126 else if (_thePartition[i] == 2)
127 {
128 PartitionEnergy +=
129 -2.796 // Binding Energy of deuteron ??????
130 + _theCoulombFreeEnergy[i];
131 }
132 else if (_thePartition[i] == 3)
133 {
134 PartitionEnergy +=
135 -9.224 // Binding Energy of trtion/He3 ??????
136 + _theCoulombFreeEnergy[i];
137 }
138 else if (_thePartition[i] == 4)
139 {
140 PartitionEnergy +=
141 -30.11 // Binding Energy of ALPHA ??????
142 + _theCoulombFreeEnergy[i]
143 + 4.*T*T/InvLevelDensity(4.);
144 }
145 else
146 {
147 PartitionEnergy +=
148 //Volume term
150 T*T/InvLevelDensity(_thePartition[i]))
151 *_thePartition[i] +
152
153 // Symmetry term
155 (1.0-2.0*theZ/theA)*(1.0-2.0*theZ/theA)*_thePartition[i] +
156
157 // Surface term
159 g4calc->Z23(_thePartition[i]) +
160
161 // Coulomb term
162 _theCoulombFreeEnergy[i];
163 }
164 }
165
166 PartitionEnergy += elm_coupling*0.6*theZ*theZ*CoulombFactor/
167 (G4StatMFParameters::Getr0()*g4calc->Z13(theA))
168 + 1.5*T*(_thePartition.size()-1);
169
170 return PartitionEnergy;
171}
172
173G4double G4StatMFMicroPartition::CalcPartitionTemperature(G4double U,
174 G4double FreeInternalE0)
175{
176 G4double PartitionEnergy = GetPartitionEnergy(0.0);
177
178 // If this happens, T = 0 MeV, which means that probability for this
179 // partition will be 0
180 if (std::abs(U + FreeInternalE0 - PartitionEnergy) < 0.003) {
181 return -1.0;
182 }
183
184 // Calculate temperature by midpoint method
185
186 // Bracketing the solution
187 G4double Ta = 0.001;
188 G4double Tb = std::max(std::sqrt(8.0*U/theA),0.0012*MeV);
189 G4double Tmid = 0.0;
190
191 G4double Da = (U + FreeInternalE0 - GetPartitionEnergy(Ta))/U;
192 G4double Db = (U + FreeInternalE0 - GetPartitionEnergy(Tb))/U;
193
194 if (Da*Db < 0.0) {
195 G4bool yes = false;
196 for (G4int i = 0; i < 1000; ++i) {
197 Tb += 0.5*Tb;
198 Db = (U + FreeInternalE0 - GetPartitionEnergy(Tb))/U;
199 if (Da*Db >= 0.0) {
200 yes = true;
201 break;
202 }
203 }
204 if (!yes) { return -1.0; }
205 }
206 G4double eps = 1.0e-10*std::abs(Ta-Tb);
207
208 for (G4int i = 0; i < 1000; ++i)
209 {
210 Tmid = (Ta+Tb)/2.0;
211 if (std::abs(Ta-Tb) <= eps) { return Tmid; }
212 G4double Dmid = (U + FreeInternalE0 - GetPartitionEnergy(Tmid))/U;
213 if (std::abs(Dmid) < 0.003) { return Tmid; }
214 if (Da*Dmid < 0.0)
215 {
216 Tb = Tmid;
217 Db = Dmid;
218 }
219 else
220 {
221 Ta = Tmid;
222 Da = Dmid;
223 }
224 }
225 return -1.0;
226}
227
229 G4double FreeInternalE0,
230 G4double SCompound)
231{
232 G4double T = CalcPartitionTemperature(U,FreeInternalE0);
233 if ( T <= 0.0) return _Probability = 0.0;
234 _Temperature = T;
235
236 G4Pow* g4calc = G4Pow::GetInstance();
237 G4int n = (G4int)_thePartition.size();
238
239 // Factorial of fragment multiplicity
240 G4double Fact = g4calc->factorial(n);
241
242 G4double ProbDegeneracy = 1.0;
243 G4double ProbA32 = 1.0;
244 G4double PartitionEntropy = 0.0;
246
247 for (G4int i = 0; i < n; ++i) {
248 G4int par = _thePartition[i];
249 ProbDegeneracy *= GetDegeneracyFactor(par);
250 ProbA32 *= _thePartition[i]*std::sqrt((G4double)par);
251
252 // interaction entropy for alpha
253 if (par == 4) {
254 PartitionEntropy += 2.0 * T * par/InvLevelDensity(par);
255 }
256 // interaction entropy for Af > 4
257 else if (par > 4) {
258 PartitionEntropy += 2.0 * T * par/InvLevelDensity(par) - db * g4calc->Z23(par);
259 }
260 }
261
262 // Thermal Wave Lenght = std::sqrt(2 pi hbar^2 / nucleon_mass T)
263 G4double ThermalWaveLenght3 = 16.15*fermi/std::sqrt(T);
264 ThermalWaveLenght3 = ThermalWaveLenght3*ThermalWaveLenght3*ThermalWaveLenght3;
265
266 // Translational Entropy
268 G4double kappa = 1. + elm_coupling*(g4calc->Z13(n) - 1.0)/(r0*g4calc->Z13(theA));
269 G4double V0 = (4./3.)*pi*theA*r0*r0*r0;
270 G4double FreeVolume = (kappa*kappa*kappa - 1.0)*V0;
271 G4double TranslationalS = G4Log(ProbA32/Fact)
272 + (n - 1)*G4Log(FreeVolume/ThermalWaveLenght3)
273 + 1.5*(n - 1) - 1.5*g4calc->logZ(theA);
274 TranslationalS = std::max(TranslationalS, 0.0);
275
276 PartitionEntropy += G4Log(ProbDegeneracy) + TranslationalS;
277 _Entropy = PartitionEntropy;
278
279 // And finally compute probability of fragment configuration
280 G4double exponent = std::min(PartitionEntropy - SCompound, 200.);
281 return _Probability = G4Exp(exponent);
282}
283
284G4double G4StatMFMicroPartition::GetDegeneracyFactor(G4int A)
285{
286 // Degeneracy factors are statistical factors
287 // DegeneracyFactor for nucleon is (2S_n + 1)(2I_n + 1) = 4
288 G4double DegFactor = 0;
289 if (A > 4) DegFactor = 1.0;
290 else if (A == 1) DegFactor = 4.0; // nucleon
291 else if (A == 2) DegFactor = 3.0; // Deuteron
292 else if (A == 3) DegFactor = 4.0; // Triton + He3
293 else if (A == 4) DegFactor = 1.0; // alpha
294 return DegFactor;
295}
296
298// Gives fragments charges
299{
300 std::vector<G4int> FragmentsZ;
301 G4int n = (G4int)_thePartition.size();
302
303 G4int ZBalance = 0;
304 do {
306 G4int SumZ = 0;
307 for (G4int i = 0; i < n; ++i) {
308 G4double ZMean;
309 G4double Af = _thePartition[i];
310 if (Af > 1.5 && Af < 4.5) { ZMean = 0.5*Af; }
311 else ZMean = Af*Z0/A0;
312 G4double ZDispersion = std::sqrt(Af * MeanT/CC);
313 G4int Zf;
314 do {
315 Zf = static_cast<G4int>(G4RandGauss::shoot(ZMean, ZDispersion));
316 }
317 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
318 while (Zf < 0 || Zf > Af);
319 FragmentsZ.push_back(Zf);
320 SumZ += Zf;
321 }
322 ZBalance = Z0 - SumZ;
323 }
324 // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
325 while (std::abs(ZBalance) > 1);
326 FragmentsZ[0] += ZBalance;
327
328 G4StatMFChannel * theChannel = new G4StatMFChannel;
329 for (G4int i = 0; i < n; ++i) {
330 theChannel->CreateFragment(_thePartition[i], FragmentsZ[i]);
331 }
332
333 return theChannel;
334}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition G4Exp.hh:132
G4double G4Log(G4double x)
Definition G4Log.hh:169
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
const G4double A[17]
Definition G4Pow.hh:49
static G4Pow * GetInstance()
Definition G4Pow.cc:41
G4double logZ(G4int Z) const
Definition G4Pow.hh:137
G4double factorial(G4int Z) const
Definition G4Pow.hh:235
G4double A13(G4double A) const
Definition G4Pow.cc:116
G4double Z13(G4int Z) const
Definition G4Pow.hh:123
G4double Z23(G4int Z) const
Definition G4Pow.hh:125
void CreateFragment(G4int A, G4int Z)
G4bool operator==(const G4StatMFMicroPartition &right) const
G4double CalcPartitionProbability(G4double U, G4double FreeInternalE0, G4double SCompound)
G4StatMFMicroPartition(G4int A, G4int Z)
G4bool operator!=(const G4StatMFMicroPartition &right) const
G4StatMFChannel * ChooseZ(G4int A0, G4int Z0, G4double MeanT)
static G4double DBetaDT(G4double T)
static G4double GetE0()
static G4double GetGamma0()
static G4double Beta(G4double T)
static G4double GetCoulomb()
static G4double Getr0()
static G4double GetKappaCoulomb()