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 | // $Id: G4AblaFission.cc,v 1.5 2010/11/17 20:19:09 kaitanie Exp $ |
---|
27 | // Translation of INCL4.2/ABLA V3 |
---|
28 | // Pekka Kaitaniemi, HIP (translation) |
---|
29 | // Christelle Schmidt, IPNL (fission code) |
---|
30 | // Alain Boudard, CEA (contact person INCL/ABLA) |
---|
31 | // Aatos Heikkinen, HIP (project coordination) |
---|
32 | |
---|
33 | #include "G4AblaFission.hh" |
---|
34 | #include <time.h> |
---|
35 | |
---|
36 | G4AblaFission::G4AblaFission() |
---|
37 | { |
---|
38 | hazard = 0; |
---|
39 | randomGenerator = 0; |
---|
40 | } |
---|
41 | |
---|
42 | G4AblaFission::G4AblaFission(G4Hazard *hzr, G4InclRandomInterface *rndm) |
---|
43 | { |
---|
44 | hazard = hzr; |
---|
45 | randomGenerator = rndm; |
---|
46 | setAboutString("Fission model: Based on ABLA V3 and SimFis3"); |
---|
47 | } |
---|
48 | |
---|
49 | G4AblaFission::~G4AblaFission() |
---|
50 | { |
---|
51 | } |
---|
52 | |
---|
53 | void G4AblaFission::doFission(G4double &A, G4double &Z, G4double &E, |
---|
54 | G4double &A1, G4double &Z1, G4double &E1, G4double &K1, |
---|
55 | G4double &A2, G4double &Z2, G4double &E2, G4double &K2) |
---|
56 | { |
---|
57 | fissionDistri(A,Z,E,A1,Z1,E1,K1,A2,Z2,E2,K2); |
---|
58 | } |
---|
59 | |
---|
60 | void G4AblaFission::even_odd(G4double r_origin,G4double r_even_odd,G4int &i_out) |
---|
61 | { |
---|
62 | // Procedure to calculate I_OUT from R_IN in a way that |
---|
63 | // on the average a flat distribution in R_IN results in a |
---|
64 | // fluctuating distribution in I_OUT with an even-odd effect as |
---|
65 | // given by R_EVEN_ODD |
---|
66 | |
---|
67 | // /* ------------------------------------------------------------ */ |
---|
68 | // /* EXAMPLES : */ |
---|
69 | // /* ------------------------------------------------------------ */ |
---|
70 | // /* If R_EVEN_ODD = 0 : */ |
---|
71 | // /* CEIL(R_IN) ---- */ |
---|
72 | // /* */ |
---|
73 | // /* R_IN -> */ |
---|
74 | // /* (somewhere in between CEIL(R_IN) and FLOOR(R_IN)) */ */ |
---|
75 | // /* */ |
---|
76 | // /* FLOOR(R_IN) ---- --> I_OUT */ |
---|
77 | // /* ------------------------------------------------------------ */ |
---|
78 | // /* If R_EVEN_ODD > 0 : */ |
---|
79 | // /* The interval for the above treatment is */ |
---|
80 | // /* larger for FLOOR(R_IN) = even and */ |
---|
81 | // /* smaller for FLOOR(R_IN) = odd */ |
---|
82 | // /* For R_EVEN_ODD < 0 : just opposite treatment */ |
---|
83 | // /* ------------------------------------------------------------ */ |
---|
84 | |
---|
85 | // /* ------------------------------------------------------------ */ |
---|
86 | // /* On input: R_ORIGIN nuclear charge (real number) */ |
---|
87 | // /* R_EVEN_ODD requested even-odd effect */ |
---|
88 | // /* Intermediate quantity: R_IN = R_ORIGIN + 0.5 */ |
---|
89 | // /* On output: I_OUT nuclear charge (integer) */ |
---|
90 | // /* ------------------------------------------------------------ */ |
---|
91 | |
---|
92 | // G4double R_ORIGIN,R_IN,R_EVEN_ODD,R_REST,R_HELP; |
---|
93 | G4double r_in = 0.0, r_rest = 0.0, r_help = 0.0; |
---|
94 | G4double r_floor = 0.0; |
---|
95 | G4double r_middle = 0.0; |
---|
96 | // G4int I_OUT,N_FLOOR; |
---|
97 | G4int n_floor = 0; |
---|
98 | |
---|
99 | r_in = r_origin + 0.5; |
---|
100 | r_floor = (float)((int)(r_in)); |
---|
101 | if (r_even_odd < 0.001) { |
---|
102 | i_out = (int)(r_floor); |
---|
103 | } |
---|
104 | else { |
---|
105 | r_rest = r_in - r_floor; |
---|
106 | r_middle = r_floor + 0.5; |
---|
107 | n_floor = (int)(r_floor); |
---|
108 | if (n_floor%2 == 0) { |
---|
109 | // even before modif. |
---|
110 | r_help = r_middle + (r_rest - 0.5) * (1.0 - r_even_odd); |
---|
111 | } |
---|
112 | else { |
---|
113 | // odd before modification |
---|
114 | r_help = r_middle + (r_rest - 0.5) * (1.0 + r_even_odd); |
---|
115 | } |
---|
116 | i_out = (int)(r_help); |
---|
117 | } |
---|
118 | } |
---|
119 | |
---|
120 | G4double G4AblaFission::umass(G4double z,G4double n,G4double beta) |
---|
121 | { |
---|
122 | // liquid-drop mass, Myers & Swiatecki, Lysekil, 1967 |
---|
123 | // pure liquid drop, without pairing and shell effects |
---|
124 | |
---|
125 | // On input: Z nuclear charge of nucleus |
---|
126 | // N number of neutrons in nucleus |
---|
127 | // beta deformation of nucleus |
---|
128 | // On output: binding energy of nucleus |
---|
129 | |
---|
130 | G4double a = 0.0, umass = 0.0; |
---|
131 | G4double alpha = 0.0; |
---|
132 | G4double xcom = 0.0, xvs = 0.0, xe = 0.0; |
---|
133 | const G4double pi = 3.1416; |
---|
134 | |
---|
135 | a = n + z; |
---|
136 | alpha = ( std::sqrt(5.0/(4.0*pi)) ) * beta; |
---|
137 | |
---|
138 | xcom = 1.0 - 1.7826 * ((a - 2.0*z)/a)*((a - 2.0*z)/a); |
---|
139 | // factor for asymmetry dependence of surface and volume term |
---|
140 | xvs = - xcom * ( 15.4941 * a - |
---|
141 | 17.9439 * std::pow(a,2.0/3.0) * (1.0+0.4*alpha*alpha) ); |
---|
142 | // sum of volume and surface energy |
---|
143 | xe = z*z * (0.7053/(std::pow(a,1.0/3.0)) * (1.0-0.2*alpha*alpha) - 1.1529/a); |
---|
144 | umass = xvs + xe; |
---|
145 | |
---|
146 | return umass; |
---|
147 | } |
---|
148 | |
---|
149 | G4double G4AblaFission::ecoul(G4double z1,G4double n1,G4double beta1,G4double z2,G4double n2,G4double beta2,G4double d) |
---|
150 | { |
---|
151 | // Coulomb potential between two nuclei |
---|
152 | // surfaces are in a distance of d |
---|
153 | // in a tip to tip configuration |
---|
154 | |
---|
155 | // approximate formulation |
---|
156 | // On input: Z1 nuclear charge of first nucleus |
---|
157 | // N1 number of neutrons in first nucleus |
---|
158 | // beta1 deformation of first nucleus |
---|
159 | // Z2 nuclear charge of second nucleus |
---|
160 | // N2 number of neutrons in second nucleus |
---|
161 | // beta2 deformation of second nucleus |
---|
162 | // d distance of surfaces of the nuclei |
---|
163 | |
---|
164 | // G4double Z1,N1,beta1,Z2,N2,beta2,d,ecoul; |
---|
165 | G4double ecoul = 0; |
---|
166 | G4double dtot = 0; |
---|
167 | const G4double r0 = 1.16; |
---|
168 | |
---|
169 | dtot = r0 * ( std::pow((z1+n1),1.0/3.0) * (1.0+0.6666*beta1) |
---|
170 | + std::pow((z2+n2),1.0/3.0) * (1.0+0.6666*beta2) ) + d; |
---|
171 | ecoul = z1 * z2 * 1.44 / dtot; |
---|
172 | |
---|
173 | return ecoul; |
---|
174 | } |
---|
175 | |
---|
176 | void G4AblaFission::fissionDistri(G4double &a,G4double &z,G4double &e, |
---|
177 | G4double &a1,G4double &z1,G4double &e1,G4double &v1, |
---|
178 | G4double &a2,G4double &z2,G4double &e2,G4double &v2) |
---|
179 | { |
---|
180 | // G4cout <<"Fission: a = " << a << " z = " << z << " e = " << e << G4endl; |
---|
181 | // On input: A, Z, E (mass, atomic number and exc. energy of compound nucleus |
---|
182 | // before fission) |
---|
183 | // On output: Ai, Zi, Ei (mass, atomic number and exc. energy of fragment 1 and 2 |
---|
184 | // after fission) |
---|
185 | |
---|
186 | // Additionally calculated but not put in the parameter list: |
---|
187 | // Kinetic energy of prefragments EkinR1, EkinR2 |
---|
188 | |
---|
189 | // Translation of SIMFIS18.PLI (KHS, 2.1.2001) |
---|
190 | |
---|
191 | // This program calculates isotopic distributions of fission fragments |
---|
192 | // with a semiempirical model |
---|
193 | // Copy from SIMFIS3, KHS, 8. February 1995 |
---|
194 | // Modifications made by Jose Benlliure and KHS in August 1996 |
---|
195 | // Energy counted from lowest barrier (J. Benlliure, KHS 1997) |
---|
196 | // Some bugs corrected (J. Benlliure, KHS 1997) |
---|
197 | // Version used for thesis S. Steinhaueser (August 1997) |
---|
198 | // (Curvature of LD potential increased by factor of 2!) |
---|
199 | |
---|
200 | // Weiter veraendert mit der Absicht, eine Version zu erhalten, die |
---|
201 | // derjenigen entspricht, die von J. Benlliure et al. |
---|
202 | // in Nucl. Phys. A 628 (1998) 458 verwendet wurde, |
---|
203 | // allerdings ohne volle Neutronenabdampfung. |
---|
204 | |
---|
205 | // The excitation energy was calculate now for each fission channel |
---|
206 | // separately. The dissipation from saddle to scission was taken from |
---|
207 | // systematics, the deformation energy at scission considers the shell |
---|
208 | // effects in a simplified way, and the fluctuation is included. |
---|
209 | // KHS, April 1999 |
---|
210 | |
---|
211 | // The width in N/Z was carefully adapted to values given by Lang et al. |
---|
212 | |
---|
213 | // The width and eventually a shift in N/Z (polarization) follows the |
---|
214 | // following rules: |
---|
215 | |
---|
216 | // The line N/Z following UCD has an angle of std::atan(Zcn/Ncn) |
---|
217 | // to the horizontal axis on a chart of nuclides. |
---|
218 | // (For 238U the angle is 32.2 deg.) |
---|
219 | |
---|
220 | // The following relations hold: (from Armbruster) |
---|
221 | // |
---|
222 | // sigma(N) (A=const) = sigma(Z) (A=const) |
---|
223 | // sigma(A) (N=const) = sigma(Z) (N=const) |
---|
224 | // sigma(A) (Z=const) = sigma(N) (Z=const) |
---|
225 | // |
---|
226 | // From this we get: |
---|
227 | // sigma(Z) (N=const) * N = sigma(N) (Z=const) * Z |
---|
228 | // sigma(A) (Z=const) = sigma(Z) (A=const) * A/Z |
---|
229 | // sigma(N) (Z=const) = sigma(Z) (A=const) * A/Z |
---|
230 | // Z*sigma(N) (Z=const) = N*sigma(Z) (N=const) = A*sigma(Z) (A=const) |
---|
231 | |
---|
232 | // Excitation energy now calculated above the lowest potential point |
---|
233 | // Inclusion of a distribution of excitation energies |
---|
234 | |
---|
235 | // Several modifications, starting from SIMFIS12: KHS November 2000 |
---|
236 | // This version seems to work quite well for 238U. |
---|
237 | // The transition from symmetric to asymmetric fission around 226Th |
---|
238 | // is reasonably well reproduced, although St. I is too strong and St. II |
---|
239 | // is too weak. St. I and St. II are also weakly seen for 208Pb. |
---|
240 | |
---|
241 | // Extensions for an event generator of fission events (21.11.2000,KHS) |
---|
242 | |
---|
243 | // Defalt parameters (IPARS) rather carefully adjusted to |
---|
244 | // pre-neutron mass distributions of Vives et al. (238U + n) |
---|
245 | // Die Parameter Fgamma1 und Fgamma2 sind kleiner als die resultierenden |
---|
246 | // Breiten der Massenverteilungen!!! |
---|
247 | // Fgamma1 und Fgamma2 wurden angepaᅵ, so daᅵ |
---|
248 | // Sigma-A(ST-I) = 3.3, Sigma-A(St-II) = 5.8 (nach Vives) |
---|
249 | |
---|
250 | // Parameters of the model carefully adjusted by KHS (2.2.2001) to |
---|
251 | // 238U + 208Pb, 1000 A MeV, Timo Enqvist et al. |
---|
252 | |
---|
253 | G4double n = 0.0; |
---|
254 | G4double nlight1 = 0.0, nlight2 = 0.0; |
---|
255 | G4double aheavy1 = 0.0,alight1 = 0.0, aheavy2 = 0.0, alight2 = 0.0; |
---|
256 | // G4double eheavy1 = 0.0, elight1 = 0.0, eheavy2 = 0.0, elight2 = 0.0; |
---|
257 | G4double zheavy1_shell = 0.0, zheavy2_shell = 0.0; |
---|
258 | G4double zlight1 = 0.0, zlight2 = 0.0; |
---|
259 | G4double masscurv = 0.0; |
---|
260 | G4double sasymm1 = 0.0, sasymm2 = 0.0, ssymm = 0.0, ysum = 0.0, yasymm = 0.0; |
---|
261 | G4double ssymm_mode1 = 0.0, ssymm_mode2 = 0.0; |
---|
262 | G4double cz_asymm1_saddle = 0.0, cz_asymm2_saddle = 0.0; |
---|
263 | // Curvature at saddle, modified by ld-potential |
---|
264 | G4double wzasymm1_saddle, wzasymm2_saddle, wzsymm_saddle = 0.0; |
---|
265 | G4double wzasymm1_scission = 0.0, wzasymm2_scission = 0.0, wzsymm_scission = 0.0; |
---|
266 | G4double wzasymm1 = 0.0, wzasymm2 = 0.0, wzsymm = 0.0; |
---|
267 | G4double nlight1_eff = 0.0, nlight2_eff = 0.0; |
---|
268 | G4int imode = 0; |
---|
269 | G4double rmode = 0.0; |
---|
270 | G4double z1mean = 0.0, z1width = 0.0; |
---|
271 | // G4double Z1,Z2,N1R,N2R,A1R,A2R,N1,N2,A1,A2; |
---|
272 | G4double n1r = 0.0, n2r = 0.0, n1 = 0.0, n2 = 0.0; |
---|
273 | |
---|
274 | G4double zsymm = 0.0, nsymm = 0.0, asymm = 0.0; |
---|
275 | G4double n1mean = 0.0, n1width = 0.0; |
---|
276 | // effective shell effect at lowest barrier |
---|
277 | // Excitation energy with respect to ld barrier |
---|
278 | G4double re1 = 0.0, re2 = 0.0, re3 = 0.0; |
---|
279 | G4double n1ucd = 0.0, n2ucd = 0.0; |
---|
280 | |
---|
281 | // shift of most probable neutron number for given Z, |
---|
282 | // according to polarization |
---|
283 | G4int i_help = 0; |
---|
284 | |
---|
285 | // /* Parameters of the semiempirical fission model */ |
---|
286 | G4double a_levdens = 0.0; |
---|
287 | // /* level-density parameter */ |
---|
288 | G4double a_levdens_light1 = 0.0, a_levdens_light2 = 0.0; |
---|
289 | G4double a_levdens_heavy1 = 0.0, a_levdens_heavy2 = 0.0; |
---|
290 | const G4double r_null = 1.16; |
---|
291 | // /* radius parameter */ |
---|
292 | G4double epsilon_1_saddle = 0.0, epsilon0_1_saddle = 0.0; |
---|
293 | G4double epsilon_2_saddle = 0.0, epsilon0_2_saddle = 0.0, epsilon_symm_saddle = 0.0; |
---|
294 | G4double epsilon_1_scission = 0.0, epsilon0_1_scission = 0.0; |
---|
295 | G4double epsilon_2_scission = 0.0, epsilon0_2_scission = 0.0; |
---|
296 | G4double epsilon_symm_scission = 0.0; |
---|
297 | // /* modified energy */ |
---|
298 | G4double e_eff1_saddle = 0.0, e_eff2_saddle = 0.0; |
---|
299 | G4double a1r; |
---|
300 | G4int icz = 0, k = 0; |
---|
301 | |
---|
302 | G4int i_inter = 0; |
---|
303 | G4double ne_min = 0, ne_m1 = 0, ne_m2 = 0; |
---|
304 | G4double ed1_low = 0.0, ed2_low = 0.0, ed1_high = 0.0, ed2_high = 0.0, ed1 = 0.0, ed2 = 0.0; |
---|
305 | G4double atot = 0.0; |
---|
306 | |
---|
307 | // Input parameters: |
---|
308 | //OMMENT(Nuclear charge number); |
---|
309 | // G4double Z; |
---|
310 | //OMMENT(Nuclear mass number); |
---|
311 | // G4double A; |
---|
312 | //OMMENT(Excitation energy above fission barrier); |
---|
313 | // G4double E; |
---|
314 | |
---|
315 | // Model parameters: |
---|
316 | //OMMENT(position of heavy peak valley 1); |
---|
317 | const G4double nheavy1 = 82.0; |
---|
318 | const G4double nheavy2 = 89.0; |
---|
319 | //OMMENT(position of heavy peak valley 2); |
---|
320 | const G4double e_crit = 5; // Critical pairing energy :::PK |
---|
321 | //OMMENT(Shell effect for valley 1); |
---|
322 | // Parameter (Delta_U2_shell = -3.2) |
---|
323 | //OMMENT(I: used shell effect); |
---|
324 | G4double delta_u1 = 0.0; |
---|
325 | //omment(I: used shell effect); |
---|
326 | G4double delta_u2 = 0.0; |
---|
327 | const G4double delta_u1_shell = -2.5; |
---|
328 | // Parameter (Delta_U1_shell = -2) |
---|
329 | //OMMENT(Shell effect for valley 2); |
---|
330 | const G4double delta_u2_shell = -5.5; |
---|
331 | const G4double el = 30.0; |
---|
332 | //OMMENT(Curvature of asymmetric valley 1); |
---|
333 | const G4double cz_asymm1_shell = 0.7; |
---|
334 | //OMMENT(Curvature of asymmetric valley 2); |
---|
335 | const G4double cz_asymm2_shell = 0.08; |
---|
336 | //OMMENT(Factor for width of distr. valley 1); |
---|
337 | const G4double fwidth_asymm1 = 1.2; |
---|
338 | //OMMENT(Factor for width of distr. valley 2); |
---|
339 | const G4double fwidth_asymm2 = 1.0; |
---|
340 | // Parameter (CZ_asymm2_scission = 0.12) |
---|
341 | //OMMENT(Factor to gamma_heavy1); |
---|
342 | const G4double fgamma1 = 1.0; |
---|
343 | //OMMENT(I: fading of shells (general)); |
---|
344 | G4double gamma = 0.0; |
---|
345 | //OMMENT(I: fading of shell 1); |
---|
346 | G4double gamma_heavy1 = 0.0; |
---|
347 | //OMMENT(I: fading of shell 2); |
---|
348 | G4double gamma_heavy2 = 0.0; |
---|
349 | //OMMENT(Zero-point energy at saddle); |
---|
350 | const G4double e_zero_point = 0.5; |
---|
351 | G4int i_eva = 0; // Calculate A = 1 or Aprime = 0 :::PK |
---|
352 | //OMMENT(I: friction from saddle to scission); |
---|
353 | G4double e_saddle_scission = 10.0; |
---|
354 | //OMMENT(Friction factor); |
---|
355 | const G4double friction_factor = 1.0; |
---|
356 | //OMMENT(I: Internal counter for different modes); INIT(0,0,0) |
---|
357 | // Integer*4 I_MODE(3) |
---|
358 | //OMMENT(I: Yield of symmetric mode); |
---|
359 | G4double ysymm = 0.0; |
---|
360 | //OMMENT(I: Yield of asymmetric mode 1); |
---|
361 | G4double yasymm1 = 0.0; |
---|
362 | //OMMENT(I: Yield of asymmetric mode 2); |
---|
363 | G4double yasymm2 = 0.0; |
---|
364 | //OMMENT(I: Effective position of valley 1); |
---|
365 | G4double nheavy1_eff = 0.0; |
---|
366 | //OMMENT(I: position of heavy peak valley 1); |
---|
367 | G4double zheavy1 = 0.0; |
---|
368 | //omment(I: Effective position of valley 2); |
---|
369 | G4double nheavy2_eff = 0.0; |
---|
370 | //OMMENT(I: position of heavy peak valley 2); |
---|
371 | G4double zheavy2 = 0.0; |
---|
372 | //omment(I: Excitation energy above saddle 1); |
---|
373 | G4double eexc1_saddle = 0.0; |
---|
374 | //omment(I: Excitation energy above saddle 2); |
---|
375 | G4double eexc2_saddle = 0.0; |
---|
376 | //omment(I: Excitation energy above lowest saddle); |
---|
377 | G4double eexc_max = 0.0; |
---|
378 | //omment(I: Effective mass mode 1); |
---|
379 | G4double aheavy1_mean = 0.0; |
---|
380 | //omment(I: Effective mass mode 2); |
---|
381 | G4double aheavy2_mean = 0.0; |
---|
382 | //omment(I: Width of symmetric mode); |
---|
383 | G4double wasymm_saddle = 0.0; |
---|
384 | //OMMENT(I: Width of asymmetric mode 1); |
---|
385 | G4double waheavy1_saddle = 0.0; |
---|
386 | //OMMENT(I: Width of asymmetric mode 2); |
---|
387 | G4double waheavy2_saddle = 0.0; |
---|
388 | //omment(I: Width of symmetric mode); |
---|
389 | G4double wasymm = 0.0; |
---|
390 | //OMMENT(I: Width of asymmetric mode 1); |
---|
391 | G4double waheavy1 = 0.0; |
---|
392 | //OMMENT(I: Width of asymmetric mode 2); |
---|
393 | G4double waheavy2 = 0.0; |
---|
394 | //OMMENT(I: Even-odd effect in Z); |
---|
395 | G4double r_e_o = 0.0; |
---|
396 | G4double r_e_o_max = 0.0; |
---|
397 | G4double e_pair = 0.0; |
---|
398 | //OMMENT(I: Curveture of symmetric valley); |
---|
399 | G4double cz_symm = 0.0; |
---|
400 | //OMMENT(I: Curvature of mass distribution for fixed Z); |
---|
401 | G4double cn = 0.0; |
---|
402 | //OMMENT(=1: test output, =0: no test output); |
---|
403 | const G4int itest = 0; |
---|
404 | // G4double UMASS, ECOUL, reps1, reps2, rn1_pol; |
---|
405 | G4double reps1 = 0.0, reps2 = 0.0, rn1_pol = 0.0; |
---|
406 | // Float_t HAZ,GAUSSHAZ; |
---|
407 | //G4int kkk = 0; |
---|
408 | G4int kkk = 10; |
---|
409 | G4double Bsym = 0.0; |
---|
410 | G4double Basym_1 = 0.0; |
---|
411 | G4double Basym_2 = 0.0; |
---|
412 | G4int iz = 0; |
---|
413 | // I_MODE = 0; |
---|
414 | |
---|
415 | if(itest == 1) { |
---|
416 | G4cout << " cn mass " << a << G4endl; |
---|
417 | G4cout << " cn charge " << z << G4endl; |
---|
418 | G4cout << " cn energy " << e << G4endl; |
---|
419 | } |
---|
420 | |
---|
421 | // /* average Z of asymmetric and symmetric components: */ |
---|
422 | n = a - z; /* neutron number of the fissioning nucleus */ |
---|
423 | |
---|
424 | k = 0; |
---|
425 | icz = 0; |
---|
426 | if ( (std::pow(z,2)/a < 25.0) || (n < nheavy2) || (e > 500.0) ) { |
---|
427 | icz = -1; |
---|
428 | // GOTO 1002; |
---|
429 | goto milledeux; |
---|
430 | } |
---|
431 | |
---|
432 | nlight1 = n - nheavy1; |
---|
433 | nlight2 = n - nheavy2; |
---|
434 | |
---|
435 | // /* Polarisation assumed for standard I and standard II: |
---|
436 | // Z - Zucd = cpol (for A = const); |
---|
437 | // from this we get (see Armbruster) |
---|
438 | // Z - Zucd = Acn/Ncn * cpol (for N = const) */ |
---|
439 | |
---|
440 | // zheavy1_shell = ((nheavy1/n) * z) - ((a/n) * cpol1); // Simfis18 PK::: |
---|
441 | zheavy1_shell = ((nheavy1/n) * z) - 0.8; // Simfis3 PK::: |
---|
442 | //zheavy2_shell = ((nheavy2/n) * z) - ((a/n) * cpol2); // Simfis18 PK::: |
---|
443 | zheavy2_shell = ((nheavy2/n) * z) - 0.8; // Simfis3 PK::: |
---|
444 | |
---|
445 | // p(zheavy1_shell, zheavy2_shell); |
---|
446 | |
---|
447 | // e_saddle_scission = |
---|
448 | // (-24.0 + 0.02227 * (std::pow(z,2))/(std::pow(a,0.33333)) ) * friction_factor; |
---|
449 | e_saddle_scission = (3.535 * std::pow(z,2)/a - 121.1) * friction_factor; // PK::: |
---|
450 | |
---|
451 | // /* Energy dissipated from saddle to scission */ |
---|
452 | // /* F. Rejmund et al., Nucl. Phys. A 678 (2000) 215, fig. 4 b */ |
---|
453 | // E_saddle_scission = DMAX1(0.,E_saddle_scission); |
---|
454 | // Heavy Ion Induced Reactions, Schroeder W. ed., Harwood, 1986, 101 |
---|
455 | if (e_saddle_scission < 0.0) { |
---|
456 | e_saddle_scission = 0.0; |
---|
457 | } |
---|
458 | |
---|
459 | // /* Semiempirical fission model: */ |
---|
460 | |
---|
461 | // /* Fit to experimental result on curvature of potential at saddle */ |
---|
462 | // /* reference: */ |
---|
463 | // /* IF Z**2/A < 33.15E0 THEN |
---|
464 | // MassCurv = 30.5438538E0 - 4.00212049E0 * Z**2/A |
---|
465 | // + 0.11983384E0 * Z**4 / (A**2) ; |
---|
466 | // ELSE |
---|
467 | // MassCurv = 10.E0 ** (7.16993332E0 - 0.26602401E0 * Z**2/A |
---|
468 | // + 0.00283802E0 * Z**4 / (A**2)) ; */ |
---|
469 | // /* New parametrization of T. Enqvist according to Mulgin et al. 1998 NPA 640(1998) 375 */ |
---|
470 | if ( (std::pow(z,2))/a < 33.9186) { |
---|
471 | masscurv = std::pow( 10.0,(-1.093364 + 0.082933 * (std::pow(z,2)/a) |
---|
472 | - 0.0002602 * (std::pow(z,4)/std::pow(a,2))) ); |
---|
473 | } else { |
---|
474 | masscurv = std::pow( 10.0,(3.053536 - 0.056477 * (std::pow(z,2)/a) |
---|
475 | + 0.0002454 * (std::pow(z,4)/std::pow(a,2))) ); |
---|
476 | } |
---|
477 | |
---|
478 | cz_symm = (8.0/std::pow(z,2)) * masscurv; |
---|
479 | |
---|
480 | if(itest == 1) { |
---|
481 | G4cout << "cz_symmetry= " << cz_symm << G4endl; |
---|
482 | } |
---|
483 | |
---|
484 | icz = 0; |
---|
485 | if (cz_symm < 0) { |
---|
486 | icz = -1; |
---|
487 | // GOTO 1002; |
---|
488 | goto milledeux; |
---|
489 | } |
---|
490 | |
---|
491 | // /* proton number in symmetric fission (centre) */ |
---|
492 | zsymm = z/2.0; |
---|
493 | nsymm = n/2.0; |
---|
494 | asymm = nsymm + zsymm; |
---|
495 | |
---|
496 | zheavy1 = (cz_symm*zsymm + cz_asymm1_shell*zheavy1_shell)/(cz_symm + cz_asymm1_shell); |
---|
497 | zheavy2 = (cz_symm*zsymm + cz_asymm2_shell*zheavy2_shell)/(cz_symm + cz_asymm2_shell); |
---|
498 | |
---|
499 | // /* position of valley due to influence of liquid-drop potential */ |
---|
500 | nheavy1_eff = (zheavy1 + 0.8)*(n/z); |
---|
501 | nheavy2_eff = (zheavy2 + 0.8)*(n/z); |
---|
502 | nlight1_eff = n - nheavy1_eff; |
---|
503 | nlight2_eff = n - nheavy2_eff; |
---|
504 | // /* proton number of light fragments (centre) */ |
---|
505 | zlight1 = z - zheavy1; |
---|
506 | // /* proton number of light fragments (centre) */ |
---|
507 | zlight2 = z - zheavy2; |
---|
508 | aheavy1 = nheavy1_eff + zheavy1; |
---|
509 | aheavy2 = nheavy2_eff + zheavy2; |
---|
510 | aheavy1_mean = aheavy1; |
---|
511 | aheavy2_mean = aheavy2; |
---|
512 | alight1 = nlight1_eff + zlight1; |
---|
513 | alight2 = nlight2_eff + zlight2; |
---|
514 | // Eheavy1 = E * Aheavy1 / A |
---|
515 | // Eheavy2 = E * Aheavy2 / A |
---|
516 | // Elight1 = E * Alight1 / A |
---|
517 | // Elight2 = E * Alight2 / A |
---|
518 | a_levdens = a / 8.0; |
---|
519 | a_levdens_heavy1 = aheavy1 / 8.0; |
---|
520 | a_levdens_heavy2 = aheavy2 / 8.0; |
---|
521 | a_levdens_light1 = alight1 / 8.0; |
---|
522 | a_levdens_light2 = alight2 / 8.0; |
---|
523 | gamma = a_levdens / (0.4 * (std::pow(a,1.3333)) ); |
---|
524 | gamma_heavy1 = ( a_levdens_heavy1 / (0.4 * (std::pow(aheavy1,1.3333)) ) ) * fgamma1; |
---|
525 | gamma_heavy2 = a_levdens_heavy2 / (0.4 * (std::pow(aheavy2,1.3333)) ); |
---|
526 | |
---|
527 | cz_asymm1_saddle = cz_asymm1_shell + cz_symm; |
---|
528 | cz_asymm2_saddle = cz_asymm2_shell + cz_symm; |
---|
529 | |
---|
530 | // Up to here: Ok! Checked CS 10/10/05 |
---|
531 | |
---|
532 | cn = umass(zsymm,(nsymm+1.),0.0) + umass(zsymm,(nsymm-1.),0.0) |
---|
533 | + 1.44 * (std::pow(zsymm,2))/ |
---|
534 | ( (std::pow(r_null,2)) * |
---|
535 | ( std::pow((asymm+1.0),1.0/3.0) + std::pow((asymm-1.0),1.0/3.0) ) * |
---|
536 | ( std::pow((asymm+1.0),1.0/3.0) + std::pow((asymm-1.0),1.0/3.0) ) ) |
---|
537 | - 2.0 * umass(zsymm,nsymm,0.0) |
---|
538 | - 1.44 * (std::pow(zsymm,2))/ |
---|
539 | ( ( 2.0 * r_null * (std::pow(asymm,1.0/3.0)) ) * |
---|
540 | ( 2.0 * r_null * (std::pow(asymm,1.0/3.0)) ) ); |
---|
541 | |
---|
542 | // /* shell effect in valley of mode 1 */ |
---|
543 | delta_u1 = delta_u1_shell + (std::pow((zheavy1_shell-zheavy1),2))*cz_asymm1_shell; |
---|
544 | // /* shell effect in valley of mode 2 */ |
---|
545 | delta_u2 = delta_u2_shell + (std::pow((zheavy2_shell-zheavy2),2))*cz_asymm2_shell; |
---|
546 | |
---|
547 | Bsym = 0.0; |
---|
548 | Basym_1 = Bsym + std::pow((zheavy1-zsymm), 2) * cz_symm + delta_u1; |
---|
549 | Basym_2 = Bsym + std::pow((zheavy2-zsymm), 2) * cz_symm + delta_u2; |
---|
550 | if(Bsym < Basym_1 && Bsym < Basym_2) { |
---|
551 | // Excitation energies at the saddle point |
---|
552 | // without and with shell effect |
---|
553 | epsilon0_1_saddle = (e + e_zero_point - std::pow((zheavy1 - zsymm), 2) * cz_symm); |
---|
554 | epsilon0_2_saddle = (e + e_zero_point - std::pow((zheavy2 - zsymm), 2) * cz_symm); |
---|
555 | |
---|
556 | epsilon_1_saddle = epsilon0_1_saddle - delta_u1; |
---|
557 | epsilon_2_saddle = epsilon0_2_saddle - delta_u2; |
---|
558 | |
---|
559 | epsilon_symm_saddle = e + e_zero_point; |
---|
560 | eexc1_saddle = epsilon_1_saddle; |
---|
561 | eexc2_saddle = epsilon_2_saddle; |
---|
562 | |
---|
563 | // Excitation energies at the scission point |
---|
564 | // heavy fragment without and with shell effect |
---|
565 | epsilon0_1_scission = (e + e_saddle_scission - std::pow((zheavy1 - zsymm), 2) * cz_symm) * aheavy1/a; |
---|
566 | epsilon_1_scission = epsilon0_1_scission - delta_u1*(aheavy1/a); |
---|
567 | |
---|
568 | epsilon0_2_scission = (e + e_saddle_scission - std::pow((zheavy2 - zsymm), 2) * cz_symm) * aheavy2/a; |
---|
569 | epsilon_2_scission = epsilon0_2_scission - delta_u2*(aheavy2/a); |
---|
570 | |
---|
571 | epsilon_symm_scission = e + e_saddle_scission; |
---|
572 | } else if (Basym_1 < Bsym && Basym_1 < Basym_2) { |
---|
573 | // Excitation energies at the saddle point |
---|
574 | // without and with shell effect |
---|
575 | epsilon_symm_saddle = (e + e_zero_point + delta_u1 + std::pow((zheavy1-zsymm), 2) * cz_symm); |
---|
576 | epsilon0_2_saddle = (epsilon_symm_saddle - std::pow((zheavy2-zsymm), 2) * cz_symm); |
---|
577 | epsilon_2_saddle = epsilon0_2_saddle - delta_u2; |
---|
578 | epsilon0_1_saddle = e + e_zero_point + delta_u1; |
---|
579 | epsilon_1_saddle = e + e_zero_point; |
---|
580 | eexc1_saddle = epsilon_1_saddle; |
---|
581 | eexc2_saddle = epsilon_2_saddle; |
---|
582 | |
---|
583 | // Excitation energies at the scission point |
---|
584 | // heavy fragment without and with shell effect |
---|
585 | epsilon_symm_scission = (e + e_saddle_scission + std::pow((zheavy1-zsymm), 2) * cz_symm + delta_u1); |
---|
586 | epsilon0_2_scission = (epsilon_symm_scission - std::pow((zheavy2-zsymm), 2) * cz_symm) * aheavy2/a; |
---|
587 | epsilon_2_scission = epsilon0_2_scission - delta_u2*aheavy2/a; |
---|
588 | epsilon0_1_scission = (e + e_saddle_scission + delta_u1) * aheavy1/a; |
---|
589 | epsilon_1_scission = (e + e_saddle_scission) * aheavy1/a; |
---|
590 | } else if (Basym_2 < Bsym && Basym_2 < Basym_1) { |
---|
591 | // Excitation energies at the saddle point |
---|
592 | // without and with shell effect |
---|
593 | epsilon_symm_saddle = (e + e_zero_point + delta_u2 + std::pow((zheavy2-zsymm), 2) * cz_symm); |
---|
594 | epsilon0_1_saddle = (epsilon_symm_saddle - std::pow((zheavy1-zsymm), 2) * cz_symm); |
---|
595 | epsilon_1_saddle = epsilon0_1_saddle - delta_u1; |
---|
596 | epsilon0_2_saddle = e + e_zero_point + delta_u2; |
---|
597 | epsilon_2_saddle = e + e_zero_point; |
---|
598 | eexc1_saddle = epsilon_1_saddle; |
---|
599 | eexc2_saddle = epsilon_2_saddle; |
---|
600 | |
---|
601 | // Excitation energies at the scission point |
---|
602 | // heavy fragment without and with shell effect |
---|
603 | epsilon_symm_scission = (e + e_saddle_scission + std::pow((zheavy2-zsymm), 2) * cz_symm + delta_u2); |
---|
604 | epsilon0_1_scission = (epsilon_symm_scission - std::pow((zheavy1-zsymm), 2) * cz_symm) * aheavy1/a; |
---|
605 | epsilon_1_scission = epsilon0_1_scission - delta_u1*aheavy1/a; |
---|
606 | epsilon0_2_scission = (e + e_saddle_scission + delta_u2) * aheavy2/a; |
---|
607 | epsilon_2_scission = (e + e_saddle_scission) * aheavy2/a; |
---|
608 | |
---|
609 | } else { |
---|
610 | G4cout <<"G4AblaFission: " << G4endl; |
---|
611 | } |
---|
612 | if(epsilon_1_saddle < 0.0) epsilon_1_saddle = 0.0; |
---|
613 | if(epsilon_2_saddle < 0.0) epsilon_2_saddle = 0.0; |
---|
614 | if(epsilon0_1_saddle < 0.0) epsilon0_1_saddle = 0.0; |
---|
615 | if(epsilon0_2_saddle < 0.0) epsilon0_2_saddle = 0.0; |
---|
616 | if(epsilon_symm_saddle < 0.0) epsilon_symm_saddle = 0.0; |
---|
617 | |
---|
618 | if(epsilon_1_scission < 0.0) epsilon_1_scission = 0.0; |
---|
619 | if(epsilon_2_scission < 0.0) epsilon_2_scission = 0.0; |
---|
620 | if(epsilon0_1_scission < 0.0) epsilon0_1_scission = 0.0; |
---|
621 | if(epsilon0_2_scission < 0.0) epsilon0_2_scission = 0.0; |
---|
622 | if(epsilon_symm_scission < 0.0) epsilon_symm_scission = 0.0; |
---|
623 | |
---|
624 | if(itest == 1) { |
---|
625 | G4cout <<"E, E1, E2, Es" << e << epsilon_1_saddle << epsilon_2_saddle << epsilon_symm_saddle << G4endl; |
---|
626 | } |
---|
627 | |
---|
628 | e_eff1_saddle = epsilon0_1_saddle - delta_u1 * (std::exp((-epsilon_1_saddle*gamma))); |
---|
629 | |
---|
630 | if (e_eff1_saddle > 0.0) { |
---|
631 | wzasymm1_saddle = std::sqrt( (0.5) * |
---|
632 | (std::sqrt(1.0/a_levdens*e_eff1_saddle)) / |
---|
633 | (cz_asymm1_shell * std::exp((-epsilon_1_saddle*gamma)) + cz_symm) ); |
---|
634 | } else { |
---|
635 | wzasymm1_saddle = 1.0; |
---|
636 | } |
---|
637 | |
---|
638 | e_eff2_saddle = epsilon0_2_saddle - delta_u2 * std::exp((-epsilon_2_saddle*gamma)); |
---|
639 | if (e_eff2_saddle > 0.0) { |
---|
640 | wzasymm2_saddle = std::sqrt( (0.5 * |
---|
641 | (std::sqrt(1.0/a_levdens*e_eff2_saddle)) / |
---|
642 | (cz_asymm2_shell * std::exp((-epsilon_2_saddle*gamma)) + cz_symm) ) ); |
---|
643 | } else { |
---|
644 | wzasymm2_saddle = 1.0; |
---|
645 | } |
---|
646 | |
---|
647 | if(e - e_zero_point > 0.0) { |
---|
648 | wzsymm_saddle = std::sqrt( (0.5 * |
---|
649 | (std::sqrt(1.0/a_levdens*(e+epsilon_symm_saddle))) / cz_symm ) ); |
---|
650 | } else { |
---|
651 | wzsymm_saddle = 1.0; |
---|
652 | } |
---|
653 | |
---|
654 | // if (itest == 1) { |
---|
655 | // G4cout << "wz1(saddle) = " << wzasymm1_saddle << G4endl; |
---|
656 | // G4cout << "wz2(saddle) = " << wzasymm2_saddle << G4endl; |
---|
657 | // G4cout << "wzsymm(saddle) = " << wzsymm_saddle << G4endl; |
---|
658 | // } |
---|
659 | |
---|
660 | // /* Calculate widhts at the scission point: */ |
---|
661 | // /* fits of ref. Beizin 1991 (Plots brought to GSI by Sergei Zhdanov) */ |
---|
662 | |
---|
663 | wzsymm_scission = wzsymm_saddle; |
---|
664 | |
---|
665 | if (e_saddle_scission == 0.0) { |
---|
666 | wzasymm1_scission = wzasymm1_saddle; |
---|
667 | wzasymm2_scission = wzasymm2_saddle; |
---|
668 | } else { |
---|
669 | if (nheavy1_eff > 75.0) { |
---|
670 | wzasymm1_scission = (std::sqrt(21.0)) * z/a; |
---|
671 | double RR = (70.0-28.0)/3.0*(z*z/a-35.0)+28.0; |
---|
672 | if(RR > 0.0) { |
---|
673 | wzasymm2_scission = std::sqrt(RR)*(z/a); |
---|
674 | } else { |
---|
675 | wzasymm2_scission = 0.0; |
---|
676 | } |
---|
677 | wzasymm2_scission = (std::sqrt (max( (70.0-28.0)/3.0*(z*z/a-35.0)+28.,0.0 )) ) * z/a; |
---|
678 | } else { |
---|
679 | wzasymm1_scission = wzasymm1_saddle; |
---|
680 | wzasymm2_scission = wzasymm2_saddle; |
---|
681 | } |
---|
682 | } |
---|
683 | |
---|
684 | wzasymm1_scission = max(wzasymm1_scission,wzasymm1_saddle); |
---|
685 | wzasymm2_scission = max(wzasymm2_scission,wzasymm2_saddle); |
---|
686 | |
---|
687 | wzasymm1 = wzasymm1_scission * fwidth_asymm1; |
---|
688 | wzasymm2 = wzasymm2_scission * fwidth_asymm2; |
---|
689 | wzsymm = wzsymm_scission; |
---|
690 | |
---|
691 | // /* if (ITEST == 1) { |
---|
692 | // G4cout << "WZ1(scission) = " << WZasymm1_scission << G4endl; |
---|
693 | // G4cout << "WZ2(scission) = " << WZasymm2_scission << G4endl; |
---|
694 | // G4cout << "WZsymm(scission) = " << WZsymm_scission << G4endl; |
---|
695 | // } |
---|
696 | // if (ITEST == 1) { |
---|
697 | // G4cout << "WZ1(scission) final= " << WZasymm1 << G4endl; |
---|
698 | // G4cout << "WZ2(scission) final= " << WZasymm2 << G4endl; |
---|
699 | // G4cout << "WZsymm(scission) final= " << WZsymm << G4endl; |
---|
700 | // } */ |
---|
701 | |
---|
702 | wasymm = wzsymm * a/z; |
---|
703 | waheavy1 = wzasymm1 * a/z; |
---|
704 | waheavy2 = wzasymm2 * a/z; |
---|
705 | |
---|
706 | // G4cout <<"al, e, es, cn " << a_levdens << e << e_saddle_scission << cn << G4endl; |
---|
707 | |
---|
708 | wasymm_saddle = wzsymm_saddle * a/z; |
---|
709 | waheavy1_saddle = wzasymm1_saddle * a/z; |
---|
710 | waheavy2_saddle = wzasymm2_saddle * a/z; |
---|
711 | |
---|
712 | // if (itest == 1) { |
---|
713 | // G4cout << "wasymm = " << wzsymm << G4endl; |
---|
714 | // G4cout << "waheavy1 = " << waheavy1 << G4endl; |
---|
715 | // G4cout << "waheavy2 = " << waheavy2 << G4endl; |
---|
716 | // } |
---|
717 | |
---|
718 | // sig_0 = quantum fluctuation = 0.45 z units for A=cte |
---|
719 | // 0.45*2.58 = 1.16 n units for Z=cte |
---|
720 | // sig_0^2 = 1.16*2 = 1.35 n units for Z=cte |
---|
721 | n1width = std::sqrt(0.5 * std::sqrt(1.0/a_levdens*(e + e_saddle_scission)) / cn + 1.35); |
---|
722 | if ( (epsilon0_1_saddle - delta_u1*std::exp((-epsilon_1_saddle*gamma_heavy1))) < 0.0) { |
---|
723 | sasymm1 = -10.0; |
---|
724 | } else { |
---|
725 | sasymm1 = 2.0 * std::sqrt( a_levdens * (epsilon0_1_saddle - |
---|
726 | delta_u1*(std::exp((-epsilon_1_saddle*gamma_heavy1))) ) ); |
---|
727 | } |
---|
728 | |
---|
729 | if ( (epsilon0_2_saddle - delta_u2*std::exp((-epsilon_2_saddle*gamma_heavy2))) < 0.0) { |
---|
730 | sasymm2 = -10.0; |
---|
731 | } else { |
---|
732 | sasymm2 = 2.0 * std::sqrt( a_levdens * (epsilon0_2_saddle - |
---|
733 | delta_u2*(std::exp((-epsilon_2_saddle*gamma_heavy2))) ) ); |
---|
734 | } |
---|
735 | |
---|
736 | if (epsilon_symm_saddle > 0.0) { |
---|
737 | ssymm = 2.0 * std::sqrt( a_levdens*(epsilon_symm_saddle) ); |
---|
738 | } else { |
---|
739 | ssymm = -10.0; |
---|
740 | } |
---|
741 | |
---|
742 | if (ssymm > -10.0) { |
---|
743 | ysymm = 1.0; |
---|
744 | if (epsilon0_1_saddle < 0.0) { // /* low energy */ |
---|
745 | yasymm1 = std::exp((sasymm1-ssymm)) * wzasymm1_saddle / wzsymm_saddle * 2.0; |
---|
746 | // /* factor of 2 for symmetry classes */ |
---|
747 | } else { // /* high energy */ |
---|
748 | ssymm_mode1 = 2.0 * std::sqrt( a_levdens*(epsilon0_1_saddle) ); |
---|
749 | yasymm1 = ( std::exp((sasymm1-ssymm)) - std::exp((ssymm_mode1 - ssymm)) ) |
---|
750 | * wzasymm1_saddle / wzsymm_saddle * 2.0; |
---|
751 | } |
---|
752 | |
---|
753 | if (epsilon0_2_saddle < 0.0) { // /* low energy */ |
---|
754 | yasymm2 = std::exp((sasymm2-ssymm)) * wzasymm2_saddle / wzsymm_saddle * 2.0; |
---|
755 | // /* factor of 2 for symmetry classes */ |
---|
756 | } else { // /* high energy */ |
---|
757 | ssymm_mode2 = 2.0 * std::sqrt( a_levdens*(epsilon0_2_saddle) ); |
---|
758 | yasymm2 = ( std::exp((sasymm2-ssymm)) - std::exp((ssymm_mode2 - ssymm)) ) |
---|
759 | * wzasymm2_saddle / wzsymm_saddle * 2.0; |
---|
760 | } |
---|
761 | // /* difference in the exponent in order */ |
---|
762 | // /* to avoid numerical overflow */ |
---|
763 | } |
---|
764 | else { |
---|
765 | if ( (sasymm1 > -10.0) && (sasymm2 > -10.0) ) { |
---|
766 | ysymm = 0.0; |
---|
767 | yasymm1 = std::exp(sasymm1) * wzasymm1_saddle * 2.0; |
---|
768 | yasymm2 = std::exp(sasymm2) * wzasymm2_saddle * 2.0; |
---|
769 | } |
---|
770 | } |
---|
771 | |
---|
772 | // /* normalize */ |
---|
773 | ysum = ysymm + yasymm1 + yasymm2; |
---|
774 | if (ysum > 0.0) { |
---|
775 | ysymm = ysymm / ysum; |
---|
776 | yasymm1 = yasymm1 / ysum; |
---|
777 | yasymm2 = yasymm2 / ysum; |
---|
778 | yasymm = yasymm1 + yasymm2; |
---|
779 | } else { |
---|
780 | ysymm = 0.0; |
---|
781 | yasymm1 = 0.0; |
---|
782 | yasymm2 = 0.0; |
---|
783 | // /* search minimum threshold and attribute all events to this mode */ |
---|
784 | if ( (epsilon_symm_saddle < epsilon_1_saddle) && (epsilon_symm_saddle < epsilon_2_saddle) ) { |
---|
785 | ysymm = 1.0; |
---|
786 | } else { |
---|
787 | if (epsilon_1_saddle < epsilon_2_saddle) { |
---|
788 | yasymm1 = 1.0; |
---|
789 | } else { |
---|
790 | yasymm2 = 1.0; |
---|
791 | } |
---|
792 | } |
---|
793 | } |
---|
794 | |
---|
795 | // if (itest == 1) { |
---|
796 | // G4cout << "ysymm normalized= " << ysymm << G4endl; |
---|
797 | // G4cout << "yasymm1 normalized= " << yasymm1 << G4endl; |
---|
798 | // G4cout << "yasymm2 normalized= " << yasymm2 << G4endl; |
---|
799 | // } |
---|
800 | |
---|
801 | // /* even-odd effect */ |
---|
802 | // /* simple parametrization KHS, Nov. 2000. From Rejmund et al. */ |
---|
803 | eexc_max = max(eexc1_saddle, eexc2_saddle); |
---|
804 | eexc_max = max(eexc_max, e); |
---|
805 | iz = (G4int)z; |
---|
806 | // G4cout << "mod(z, 2)" << iz%2 << G4endl; |
---|
807 | if ((G4int)(z) % 2 == 0) { |
---|
808 | r_e_o_max = 0.3 * (1.0 - 0.2 * (std::pow(z, 2)/a - std::pow(92.0, 2)/238.0)); |
---|
809 | e_pair = 2.0 * 12.0 / std::sqrt(a); |
---|
810 | if(eexc_max > (e_crit + e_pair)) { |
---|
811 | r_e_o = 0.0; |
---|
812 | } else { |
---|
813 | if(eexc_max < e_pair) { |
---|
814 | r_e_o = r_e_o_max; |
---|
815 | } else { |
---|
816 | r_e_o = std::pow((eexc_max - e_crit - e_pair)/e_crit, 2) * r_e_o_max; |
---|
817 | } |
---|
818 | } |
---|
819 | } else { |
---|
820 | r_e_o = 0.0; |
---|
821 | } |
---|
822 | |
---|
823 | // G4cout <<"rmax " << r_e_o_max << G4endl; |
---|
824 | // if(r_e_o > 0.0) G4cout <<"e_crit, r_e_o" << e_crit << r_e_o << G4endl; |
---|
825 | // $LOOP; /* event loop */ |
---|
826 | // I_COUNT = I_COUNT + 1; |
---|
827 | |
---|
828 | /* random decision: symmetric or asymmetric */ |
---|
829 | /* IMODE = 3 means asymmetric fission, mode 1, |
---|
830 | IMODE = 2 means asymmetric fission, mode 2, |
---|
831 | IMODE = 1 means symmetric */ |
---|
832 | // RMODE = dble(HAZ(k)); |
---|
833 | // rmode = rnd.rndm(); |
---|
834 | // // Safety check added to make sure we always select well defined |
---|
835 | // // fission mode. |
---|
836 | rmode = haz(k); |
---|
837 | // Cast for test CS 11/10/05 |
---|
838 | // RMODE = 0.54; |
---|
839 | // rmode = 0.54; |
---|
840 | if (rmode < ysymm) { |
---|
841 | imode = 1; |
---|
842 | } else if (rmode < (ysymm + yasymm1)) { |
---|
843 | imode = 2; |
---|
844 | } else { |
---|
845 | imode = 3; |
---|
846 | } |
---|
847 | // /* determine parameters of the Z distribution */ |
---|
848 | // force imode (for testing, PK) |
---|
849 | // imode = 3; |
---|
850 | |
---|
851 | if (imode == 1) { |
---|
852 | z1mean = zsymm; |
---|
853 | z1width = wzsymm; |
---|
854 | } else if (imode == 2) { |
---|
855 | z1mean = zheavy1; |
---|
856 | z1width = wzasymm1; |
---|
857 | } else if (imode == 3) { |
---|
858 | z1mean = zheavy2; |
---|
859 | z1width = wzasymm2; |
---|
860 | } |
---|
861 | |
---|
862 | if (itest == 1) { |
---|
863 | G4cout << "nbre aleatoire tire " << rmode << G4endl; |
---|
864 | G4cout << "fission mode " << imode << G4endl; |
---|
865 | G4cout << "z1mean= " << z1mean << G4endl; |
---|
866 | G4cout << "z1width= " << z1width << G4endl; |
---|
867 | } |
---|
868 | |
---|
869 | // /* random decision: Z1 and Z2 at scission: */ |
---|
870 | z1 = 1.0; |
---|
871 | z2 = 1.0; |
---|
872 | |
---|
873 | while ( (z1<5.0) || (z2<5.0) ) { |
---|
874 | // Z1 = dble(GAUSSHAZ(K,sngl(Z1mean),sngl(Z1width))); |
---|
875 | // z1 = rnd.gaus(z1mean,z1width); |
---|
876 | // z1 = 48.26; // gausshaz(k, z1mean, z1width); |
---|
877 | z1 = gausshaz(k, z1mean, z1width); |
---|
878 | even_odd(z1, r_e_o, i_help); |
---|
879 | z1 = double(i_help); |
---|
880 | z2 = z - z1; |
---|
881 | } |
---|
882 | |
---|
883 | if (itest == 1) { |
---|
884 | G4cout << "ff charge sample " << G4endl; |
---|
885 | G4cout << "z1 = " << z1 << G4endl; |
---|
886 | G4cout << "z2 = " << z2 << G4endl; |
---|
887 | } |
---|
888 | |
---|
889 | // // CALL EVEN_ODD(Z1,R_E_O,I_HELP); |
---|
890 | // // /* Integer proton number with even-odd effect */ |
---|
891 | // // Z1 = REAL(I_HELP) |
---|
892 | // // /* Z1 = INT(Z1+0.5E0); */ |
---|
893 | // z2 = z - z1; |
---|
894 | |
---|
895 | // /* average N of both fragments: */ |
---|
896 | if (imode == 1) { |
---|
897 | n1ucd = z1 * n/z; |
---|
898 | n2ucd = z2 * n/z; |
---|
899 | re1 = umass(z1,n1ucd,0.6) + umass(z2,n2ucd,0.6) + ecoul(z1,n1ucd,0.6,z2,n2ucd,0.6,2.0); // umass == massdef |
---|
900 | re2 = umass(z1,n1ucd+1.,0.6) + umass(z2,n2ucd-1.,0.6) + ecoul(z1,n1ucd+1.,0.6,z2,n2ucd-1.,0.6,2.0); |
---|
901 | re3 = umass(z1,n1ucd+2.,0.6) + umass(z2,n2ucd-2.,0.6) + ecoul(z1,n1ucd+2.,0.6,z2,n2ucd-2.,0.6,2.0); |
---|
902 | reps2 = (re1-2.0*re2+re3) / 2.0; |
---|
903 | reps1 = re2 - re1 - reps2; |
---|
904 | rn1_pol = - reps1 / (2.0 * reps2); |
---|
905 | n1mean = n1ucd + rn1_pol; |
---|
906 | } else { |
---|
907 | n1mean = (z1 + 0.5) * n/z; |
---|
908 | } |
---|
909 | |
---|
910 | // n1mean nsymm + (z1 - zsymm) * 1.6 from 238 U(nth, f) |
---|
911 | // n1width = 0.9 + E * 0.002 KHS |
---|
912 | |
---|
913 | // random decision: N1R and N2R at scission, before evaporation |
---|
914 | n1r = 1.0; |
---|
915 | n2r = 1.0; |
---|
916 | while (n1r < 5 || n2r < 5) { |
---|
917 | // n1r = 76.93; gausshaz(kkk,n1mean,n1width); |
---|
918 | n1r = gausshaz(kkk,n1mean,n1width); |
---|
919 | // modification to have n1r as integer, and n=n1r+n2r rigorously a.b. 19/4/2001 |
---|
920 | i_inter = int(n1r + 0.5); |
---|
921 | n1r = double(i_inter); |
---|
922 | n2r = n - n1r; |
---|
923 | } |
---|
924 | |
---|
925 | // neutron evaporation from fragments |
---|
926 | if (i_eva > 0) { |
---|
927 | // treatment sz |
---|
928 | ne_min = 0.095e0 * a - 20.4e0; |
---|
929 | if (ne_min < 0) ne_min = 0.0; |
---|
930 | ne_min = ne_min + e / 8.e0; // 1 neutron per 8 mev */ |
---|
931 | a1r = z1 + n1r; // mass of first fragment */ |
---|
932 | ne_m1 = a1r / a * ne_min; // devide nbr. of neutrons acc. mass |
---|
933 | ne_m2 = ne_min - ne_m1; // nmbr. of neutrons of 2. fragment |
---|
934 | n1 = n1r - ne_m1; // final neutron number 1. fragment |
---|
935 | n2 = n2r - ne_m2; // ! final neutron number 2. fragment |
---|
936 | } else { |
---|
937 | n1 = n1r; |
---|
938 | n2 = n2r; |
---|
939 | } |
---|
940 | |
---|
941 | // excitation energy due to deformation |
---|
942 | |
---|
943 | a1 = z1 + n1r; // mass of first fragment */ |
---|
944 | a2 = z2 + n2r; // mass of second fragment */ |
---|
945 | if (a1 < 80) { |
---|
946 | ed1_low = 0.0; |
---|
947 | } else if (a1 >= 80 && a1 < 110) { |
---|
948 | ed1_low = (a1-80.)*20./30.; |
---|
949 | } else if (a1 >= 110 && a1 < 130) { |
---|
950 | ed1_low = -(a1-110.)*20./20. + 20.; |
---|
951 | } else if (a1 >= 130) { |
---|
952 | ed1_low = (a1-130.)*20./30.; |
---|
953 | } |
---|
954 | |
---|
955 | if (a2 < 80) { |
---|
956 | ed2_low = 0.0; |
---|
957 | } else if (a2 >= 80 && a2 < 110) { |
---|
958 | ed2_low = (a2-80.)*20./30.; |
---|
959 | } else if (a2 >= 110 && a2 < 130) { |
---|
960 | ed2_low = -(a2-110.)*20./20. + 20.; |
---|
961 | } else if (a2 >= 130) { |
---|
962 | ed2_low = (a2-130.)*20./30.; |
---|
963 | } |
---|
964 | |
---|
965 | ed1_high = 20.0*a1/(a1+a2); |
---|
966 | ed2_high = 20.0 - ed1_high; |
---|
967 | ed1 = ed1_low*std::exp(-e/el) + ed1_high*(1-std::exp(-e/el)); |
---|
968 | ed2 = ed2_low*std::exp(-e/el) + ed2_high*(1-std::exp(-e/el)); |
---|
969 | |
---|
970 | // write(6,101)e,a1,a2,ed1,ed2,ed1+ed2 |
---|
971 | // write(6,102)ed1_low,ed1_high,ed2_low,ed2_high |
---|
972 | e1 = e*a1/(a1+a2) + ed1; |
---|
973 | e2 = e - e*a1/(a1+a2) + ed2; |
---|
974 | atot = a1+a2; |
---|
975 | if (atot > a+1) { |
---|
976 | // write(6,*)'a,,a1,a2,atot',a,a1,a2,atot |
---|
977 | // write(6,*)'n,n1r,n2r',n,n1r,n2r |
---|
978 | // write(6,*)'z,z1,z2',z,z1,z2 |
---|
979 | } |
---|
980 | |
---|
981 | milledeux: |
---|
982 | // only symmetric fission |
---|
983 | // Symmetric fission: Ok! Checked CS 10/10/05 |
---|
984 | if ( (icz == -1) || (a1 < 0.0) || (a2 < 0.0) ) { |
---|
985 | // IF (z.eq.92) THEN |
---|
986 | // write(6,*)'symmetric fission' |
---|
987 | // write(6,*)'Z,A,E,A1,A2,icz,Atot',Z,A,E,A1,A2,icz,Atot |
---|
988 | // END IF |
---|
989 | |
---|
990 | if (itest == 1) { |
---|
991 | G4cout << "milledeux: liquid-drop option " << G4endl; |
---|
992 | } |
---|
993 | |
---|
994 | n = a-z; |
---|
995 | // proton number in symmetric fission (centre) * |
---|
996 | zsymm = z / 2.0; |
---|
997 | nsymm = n / 2.0; |
---|
998 | asymm = nsymm + zsymm; |
---|
999 | |
---|
1000 | a_levdens = a / 8.0; |
---|
1001 | |
---|
1002 | masscurv = 2.0; |
---|
1003 | cz_symm = 8.0 / std::pow(z,2) * masscurv; |
---|
1004 | |
---|
1005 | wzsymm = std::sqrt( (0.5 * std::sqrt(1.0/a_levdens*e) / cz_symm) ) ; |
---|
1006 | |
---|
1007 | if (itest == 1) { |
---|
1008 | G4cout << " symmetric high energy fission " << G4endl; |
---|
1009 | G4cout << "wzsymm " << wzsymm << G4endl; |
---|
1010 | } |
---|
1011 | |
---|
1012 | z1mean = zsymm; |
---|
1013 | z1width = wzsymm; |
---|
1014 | |
---|
1015 | // random decision: Z1 and Z2 at scission: */ |
---|
1016 | z1 = 1.0; |
---|
1017 | z2 = 1.0; |
---|
1018 | while ( (z1 < 5.0) || (z2 < 5.0) ) { |
---|
1019 | // z1 = dble(gausshaz(kkk,sngl(z1mean),sngl(z1width))); |
---|
1020 | // z1 = rnd.gaus(z1mean,z1width); |
---|
1021 | // z1 = 24.8205585; //gausshaz(kkk, z1mean, z1width); |
---|
1022 | z1 = gausshaz(kkk, z1mean, z1width); |
---|
1023 | z2 = z - z1; |
---|
1024 | } |
---|
1025 | |
---|
1026 | if (itest == 1) { |
---|
1027 | G4cout << " z1 " << z1 << G4endl; |
---|
1028 | G4cout << " z2 " << z2 << G4endl; |
---|
1029 | } |
---|
1030 | if (itest == 1) { |
---|
1031 | G4cout << " zsymm " << zsymm << G4endl; |
---|
1032 | G4cout << " nsymm " << nsymm << G4endl; |
---|
1033 | G4cout << " asymm " << asymm << G4endl; |
---|
1034 | } |
---|
1035 | |
---|
1036 | cn = umass(zsymm, nsymm+1.0, 0.0) + umass(zsymm, nsymm-1.0, 0.0) |
---|
1037 | + 1.44 * std::pow(zsymm, 2)/ |
---|
1038 | (std::pow(r_null, 2) * std::pow(std::pow(asymm+1.0, 1.0/3.0) + std::pow(asymm-1.0, 1.0/3.0), 2)) |
---|
1039 | - 2.0 * umass(zsymm, nsymm, 0.0) - 1.44 * std::pow(zsymm, 2) / |
---|
1040 | std::pow(r_null * 2.0 *std::pow(asymm, 1.0/3.0), 2); |
---|
1041 | // This is an approximation! Coulomb energy is neglected. |
---|
1042 | |
---|
1043 | n1width = std::sqrt( (0.5 * std::sqrt(1.0/a_levdens*e) / cn) + 1.35); |
---|
1044 | if (itest == 1) { |
---|
1045 | G4cout << " cn " << cn << G4endl; |
---|
1046 | G4cout << " n1width " << n1width << G4endl; |
---|
1047 | } |
---|
1048 | |
---|
1049 | // /* average N of both fragments: */ |
---|
1050 | n1ucd = z1 * n/z; |
---|
1051 | n2ucd = z2 * n/z; |
---|
1052 | re1 = umass(z1,n1ucd, 0.6) + umass(z2,n2ucd, 0.6) + ecoul(z1,n1ucd, 0.6,z2,n2ucd, 0.6,2.0); |
---|
1053 | re2 = umass(z1,n1ucd+1.,0.6) + umass(z2,n2ucd-1.,0.6) + ecoul(z1,n1ucd+1.,0.6,z2,n2ucd-1.,0.6,2.0); |
---|
1054 | re3 = umass(z1,n1ucd+2.,0.6) + umass(z2,n2ucd-2.,0.6) + ecoul(z1,n1ucd+2.,0.6,z2,n2ucd-2.,0.6,2.0); |
---|
1055 | reps2 = (re1-2.0*re2+re3) / 2.0; |
---|
1056 | reps1 = re2 - re1 - reps2; |
---|
1057 | rn1_pol = - reps1 / (2.0 * reps2); |
---|
1058 | n1mean = n1ucd + rn1_pol; |
---|
1059 | |
---|
1060 | // random decision: N1R and N2R at scission, before evaporation: */ |
---|
1061 | // N1R = dfloat(NINT(GAUSSHAZ(KKK,sngl(N1mean),sngl(N1width)))); |
---|
1062 | // n1r = (float)( (int)(rnd.gaus(n1mean,n1width)) ); |
---|
1063 | // n1r = 34.0; //(float)( (int)(gausshaz(k, n1mean,n1width)) ); |
---|
1064 | n1r = (float)( (int)(gausshaz(k, n1mean,n1width)) ); |
---|
1065 | n2r = n - n1r; |
---|
1066 | // Mass of first and second fragment */ |
---|
1067 | a1 = z1 + n1r; |
---|
1068 | a2 = z2 + n2r; |
---|
1069 | |
---|
1070 | e1 = e*a1/(a1+a2); |
---|
1071 | e2 = e - e*a1/(a1+a2); |
---|
1072 | } |
---|
1073 | v1 = 0.0; // These are not calculated in SimFis3. |
---|
1074 | v2 = 0.0; |
---|
1075 | if (itest == 1) { |
---|
1076 | G4cout << " n1r " << n1r << G4endl; |
---|
1077 | G4cout << " n2r " << n2r << G4endl; |
---|
1078 | } |
---|
1079 | |
---|
1080 | if (itest == 1) { |
---|
1081 | G4cout << " a1 " << a1 << G4endl; |
---|
1082 | G4cout << " z1 " << z1 << G4endl; |
---|
1083 | G4cout << " a2 " << a2 << G4endl; |
---|
1084 | G4cout << " z2 " << z2 << G4endl; |
---|
1085 | G4cout << " e1 " << e1 << G4endl; |
---|
1086 | G4cout << " e2 " << e << G4endl; |
---|
1087 | } |
---|
1088 | } |
---|
1089 | |
---|
1090 | void G4AblaFission::standardRandom(G4double *rndm, G4long*) |
---|
1091 | { |
---|
1092 | // Use Geant4 G4UniformRand |
---|
1093 | (*rndm) = randomGenerator->getRandom(); |
---|
1094 | } |
---|
1095 | |
---|
1096 | G4double G4AblaFission::haz(G4int k) |
---|
1097 | { |
---|
1098 | const G4int pSize = 110; |
---|
1099 | static G4double p[pSize]; |
---|
1100 | static G4long ix = 0, i = 0; |
---|
1101 | static G4double x = 0.0, y = 0.0, a = 0.0, haz = 0.0; |
---|
1102 | // k =< -1 on initialise |
---|
1103 | // k = -1 c'est reproductible |
---|
1104 | // k < -1 || k > -1 ce n'est pas reproductible |
---|
1105 | |
---|
1106 | // Zero is invalid random seed. Set proper value from our random seed collection: |
---|
1107 | if(ix == 0) { |
---|
1108 | ix = hazard->ial; |
---|
1109 | } |
---|
1110 | |
---|
1111 | if (k <= -1) { //then |
---|
1112 | if(k == -1) { //then |
---|
1113 | ix = 0; |
---|
1114 | } |
---|
1115 | else { |
---|
1116 | x = 0.0; |
---|
1117 | y = secnds(int(x)); |
---|
1118 | ix = int(y * 100 + 43543000); |
---|
1119 | if(mod(ix,2) == 0) { |
---|
1120 | ix = ix + 1; |
---|
1121 | } |
---|
1122 | } |
---|
1123 | |
---|
1124 | // Here we are using random number generator copied from INCL code |
---|
1125 | // instead of the CERNLIB one! This causes difficulties for |
---|
1126 | // automatic testing since the random number generators, and thus |
---|
1127 | // the behavior of the routines in C++ and FORTRAN versions is no |
---|
1128 | // longer exactly the same! |
---|
1129 | x = randomGenerator->getRandom(); |
---|
1130 | // standardRandom(&x, &ix); |
---|
1131 | for(G4int i = 0; i < pSize; i++) { //do i=1,110 |
---|
1132 | p[i] = randomGenerator->getRandom(); |
---|
1133 | // standardRandom(&(p[i]), &ix); |
---|
1134 | } |
---|
1135 | a = randomGenerator->getRandom(); |
---|
1136 | //standardRandom(&a, &ix); |
---|
1137 | k = 0; |
---|
1138 | } |
---|
1139 | |
---|
1140 | i = nint(100*a)+1; |
---|
1141 | haz = p[i]; |
---|
1142 | a = randomGenerator->getRandom(); |
---|
1143 | // standardRandom(&a, &ix); |
---|
1144 | p[i] = a; |
---|
1145 | |
---|
1146 | hazard->ial = ix; |
---|
1147 | // haz=0.4; |
---|
1148 | return haz; |
---|
1149 | } |
---|
1150 | |
---|
1151 | G4double G4AblaFission::gausshaz(int k, double xmoy, double sig) |
---|
1152 | { |
---|
1153 | // Gaussian random numbers: |
---|
1154 | |
---|
1155 | // 1005 C*** TIRAGE ALEATOIRE DANS UNE GAUSSIENNE DE LARGEUR SIG ET MOYENNE XMOY |
---|
1156 | static G4int iset = 0; |
---|
1157 | static G4double v1,v2,r,fac,gset,gausshaz; |
---|
1158 | |
---|
1159 | if(iset == 0) { //then |
---|
1160 | do { |
---|
1161 | v1 = 2.0*haz(k) - 1.0; |
---|
1162 | v2 = 2.0*haz(k) - 1.0; |
---|
1163 | r = std::pow(v1,2) + std::pow(v2,2); |
---|
1164 | } while(r >= 1); |
---|
1165 | |
---|
1166 | fac = std::sqrt(-2.*std::log(r)/r); |
---|
1167 | gset = v1*fac; |
---|
1168 | gausshaz = v2*fac*sig+xmoy; |
---|
1169 | iset = 1; |
---|
1170 | } |
---|
1171 | else { |
---|
1172 | gausshaz=gset*sig+xmoy; |
---|
1173 | iset=0; |
---|
1174 | } |
---|
1175 | return gausshaz; |
---|
1176 | } |
---|
1177 | |
---|
1178 | // Utilities |
---|
1179 | |
---|
1180 | G4double G4AblaFission::min(G4double a, G4double b) |
---|
1181 | { |
---|
1182 | if(a < b) { |
---|
1183 | return a; |
---|
1184 | } |
---|
1185 | else { |
---|
1186 | return b; |
---|
1187 | } |
---|
1188 | } |
---|
1189 | |
---|
1190 | G4int G4AblaFission::min(G4int a, G4int b) |
---|
1191 | { |
---|
1192 | if(a < b) { |
---|
1193 | return a; |
---|
1194 | } |
---|
1195 | else { |
---|
1196 | return b; |
---|
1197 | } |
---|
1198 | } |
---|
1199 | |
---|
1200 | G4double G4AblaFission::max(G4double a, G4double b) |
---|
1201 | { |
---|
1202 | if(a > b) { |
---|
1203 | return a; |
---|
1204 | } |
---|
1205 | else { |
---|
1206 | return b; |
---|
1207 | } |
---|
1208 | } |
---|
1209 | |
---|
1210 | G4int G4AblaFission::max(G4int a, G4int b) |
---|
1211 | { |
---|
1212 | if(a > b) { |
---|
1213 | return a; |
---|
1214 | } |
---|
1215 | else { |
---|
1216 | return b; |
---|
1217 | } |
---|
1218 | } |
---|
1219 | |
---|
1220 | G4int G4AblaFission::nint(G4double number) |
---|
1221 | { |
---|
1222 | G4double intpart = 0.0; |
---|
1223 | G4double fractpart = 0.0; |
---|
1224 | fractpart = std::modf(number, &intpart); |
---|
1225 | if(number == 0) { |
---|
1226 | return 0; |
---|
1227 | } |
---|
1228 | if(number > 0) { |
---|
1229 | if(fractpart < 0.5) { |
---|
1230 | return int(std::floor(number)); |
---|
1231 | } |
---|
1232 | else { |
---|
1233 | return int(std::ceil(number)); |
---|
1234 | } |
---|
1235 | } |
---|
1236 | if(number < 0) { |
---|
1237 | if(fractpart < -0.5) { |
---|
1238 | return int(std::floor(number)); |
---|
1239 | } |
---|
1240 | else { |
---|
1241 | return int(std::ceil(number)); |
---|
1242 | } |
---|
1243 | } |
---|
1244 | |
---|
1245 | return int(std::floor(number)); |
---|
1246 | } |
---|
1247 | |
---|
1248 | G4int G4AblaFission::secnds(G4int x) |
---|
1249 | { |
---|
1250 | time_t mytime; |
---|
1251 | tm *mylocaltime; |
---|
1252 | |
---|
1253 | time(&mytime); |
---|
1254 | mylocaltime = localtime(&mytime); |
---|
1255 | |
---|
1256 | if(x == 0) { |
---|
1257 | return(mylocaltime->tm_hour*60*60 + mylocaltime->tm_min*60 + mylocaltime->tm_sec); |
---|
1258 | } |
---|
1259 | else { |
---|
1260 | return(mytime - x); |
---|
1261 | } |
---|
1262 | } |
---|
1263 | |
---|
1264 | G4int G4AblaFission::mod(G4int a, G4int b) |
---|
1265 | { |
---|
1266 | if(b != 0) { |
---|
1267 | return (a - (a/b)*b); |
---|
1268 | } |
---|
1269 | else { |
---|
1270 | return 0; |
---|
1271 | } |
---|
1272 | } |
---|
1273 | |
---|
1274 | G4double G4AblaFission::dmod(G4double a, G4double b) |
---|
1275 | { |
---|
1276 | if(b != 0) { |
---|
1277 | return (a - (a/b)*b); |
---|
1278 | } |
---|
1279 | else { |
---|
1280 | return 0.0; |
---|
1281 | } |
---|
1282 | } |
---|
1283 | |
---|
1284 | G4double G4AblaFission::dint(G4double a) |
---|
1285 | { |
---|
1286 | G4double value = 0.0; |
---|
1287 | |
---|
1288 | if(a < 0.0) { |
---|
1289 | value = double(std::ceil(a)); |
---|
1290 | } |
---|
1291 | else { |
---|
1292 | value = double(std::floor(a)); |
---|
1293 | } |
---|
1294 | |
---|
1295 | return value; |
---|
1296 | } |
---|
1297 | |
---|
1298 | G4int G4AblaFission::idint(G4double a) |
---|
1299 | { |
---|
1300 | G4int value = 0; |
---|
1301 | |
---|
1302 | if(a < 0) { |
---|
1303 | value = int(std::ceil(a)); |
---|
1304 | } |
---|
1305 | else { |
---|
1306 | value = int(std::floor(a)); |
---|
1307 | } |
---|
1308 | |
---|
1309 | return value; |
---|
1310 | } |
---|
1311 | |
---|
1312 | G4int G4AblaFission::idnint(G4double value) |
---|
1313 | { |
---|
1314 | G4double valueCeil = int(std::ceil(value)); |
---|
1315 | G4double valueFloor = int(std::floor(value)); |
---|
1316 | |
---|
1317 | if(std::fabs(value - valueCeil) < std::fabs(value - valueFloor)) { |
---|
1318 | return int(valueCeil); |
---|
1319 | } |
---|
1320 | else { |
---|
1321 | return int(valueFloor); |
---|
1322 | } |
---|
1323 | } |
---|
1324 | |
---|
1325 | G4double G4AblaFission::dmin1(G4double a, G4double b, G4double c) |
---|
1326 | { |
---|
1327 | if(a < b && a < c) { |
---|
1328 | return a; |
---|
1329 | } |
---|
1330 | if(b < a && b < c) { |
---|
1331 | return b; |
---|
1332 | } |
---|
1333 | if(c < a && c < b) { |
---|
1334 | return c; |
---|
1335 | } |
---|
1336 | return a; |
---|
1337 | } |
---|
1338 | |
---|
1339 | G4double G4AblaFission::utilabs(G4double a) |
---|
1340 | { |
---|
1341 | if(a > 0) { |
---|
1342 | return a; |
---|
1343 | } |
---|
1344 | if(a < 0) { |
---|
1345 | return (-1*a); |
---|
1346 | } |
---|
1347 | if(a == 0) { |
---|
1348 | return a; |
---|
1349 | } |
---|
1350 | |
---|
1351 | return a; |
---|
1352 | } |
---|
1353 | |
---|
1354 | void G4AblaFission::p(G4int a, G4int b) { |
---|
1355 | G4cout << a << std::setw(8) << b << G4endl; |
---|
1356 | } |
---|
1357 | |
---|
1358 | void G4AblaFission::p(G4double a, G4double b) { |
---|
1359 | G4cout << " " << a << std::setw(12) << b << G4endl; |
---|
1360 | } |
---|
1361 | |
---|
1362 | void G4AblaFission::p(G4String msg, G4double a, G4double b) { |
---|
1363 | G4cout << " " << msg << " " << a << std::setw(12) << b << G4endl; |
---|
1364 | } |
---|