32 #define ABLAXX_IN_GEANT4_MODE 1
52 fissionDistri(A,Z,E,A1,Z1,E1,K1,A2,Z2,E2,K2);
88 G4double r_in = 0.0, r_rest = 0.0, r_help = 0.0;
94 r_in = r_origin + 0.5;
95 r_floor = (float)((
int)(r_in));
96 if (r_even_odd < 0.001) {
97 i_out = (
int)(r_floor);
100 r_rest = r_in - r_floor;
101 r_middle = r_floor + 0.5;
102 n_floor = (
int)(r_floor);
103 if (n_floor%2 == 0) {
105 r_help = r_middle + (r_rest - 0.5) * (1.0 - r_even_odd);
109 r_help = r_middle + (r_rest - 0.5) * (1.0 + r_even_odd);
111 i_out = (
int)(r_help);
127 G4double xcom = 0.0, xvs = 0.0, xe = 0.0;
131 alpha = ( std::sqrt(5.0/(4.0*pi)) ) * beta;
133 xcom = 1.0 - 1.7826 * ((a - 2.0*
z)/a)*((a - 2.0*
z)/a);
135 xvs = - xcom * ( 15.4941 * a -
136 17.9439 * std::pow(a,2.0/3.0) * (1.0+0.4*alpha*alpha) );
138 xe = z*z * (0.7053/(std::pow(a,1.0/3.0)) * (1.0-0.2*alpha*alpha) - 1.1529/
a);
164 dtot = r0 * ( std::pow((z1+n1),1.0/3.0) * (1.0+0.6666*beta1)
165 + std::pow((z2+n2),1.0/3.0) * (1.0+0.6666*beta2) ) +
d;
166 fecoul = z1 * z2 * 1.44 / dtot;
249 G4double aheavy1 = 0.0, aheavy2 = 0.0;
251 G4double zheavy1_shell = 0.0, zheavy2_shell = 0.0;
253 G4double sasymm1 = 0.0, sasymm2 = 0.0, ssymm = 0.0, ysum = 0.0;
254 G4double ssymm_mode1 = 0.0, ssymm_mode2 = 0.0;
256 G4double wzasymm1_saddle, wzasymm2_saddle, wzsymm_saddle = 0.0;
257 G4double wzasymm1_scission = 0.0, wzasymm2_scission = 0.0, wzsymm_scission = 0.0;
258 G4double wzasymm1 = 0.0, wzasymm2 = 0.0, wzsymm = 0.0;
261 G4double z1mean = 0.0, z1width = 0.0;
265 G4double zsymm = 0.0, nsymm = 0.0, asymm = 0.0;
266 G4double n1mean = 0.0, n1width = 0.0;
269 G4double re1 = 0.0, re2 = 0.0, re3 = 0.0;
279 G4double a_levdens_heavy1 = 0.0, a_levdens_heavy2 = 0.0;
282 G4double epsilon_1_saddle = 0.0, epsilon0_1_saddle = 0.0;
283 G4double epsilon_2_saddle = 0.0, epsilon0_2_saddle = 0.0, epsilon_symm_saddle = 0.0;
284 G4double epsilon_1_scission = 0.0, epsilon0_1_scission = 0.0;
285 G4double epsilon_2_scission = 0.0, epsilon0_2_scission = 0.0;
286 G4double epsilon_symm_scission = 0.0;
288 G4double e_eff1_saddle = 0.0, e_eff2_saddle = 0.0;
289 G4int icz = 0, k = 0;
293 G4double ed1_low = 0.0, ed2_low = 0.0, ed1_high = 0.0, ed2_high = 0.0, ed1 = 0.0, ed2 = 0.0;
316 const G4double delta_u1_shell = -2.5;
319 const G4double delta_u2_shell = -5.5;
322 const G4double cz_asymm1_shell = 0.7;
324 const G4double cz_asymm2_shell = 0.08;
344 const G4double friction_factor = 1.0;
376 const G4int itest = 0;
378 G4double reps1 = 0.0, reps2 = 0.0, rn1_pol = 0.0;
392 if ( (std::pow(z,2)/a < 25.0) || (n < nheavy2) || (e > 500.0) ) {
404 zheavy1_shell = ((nheavy1/
n) * z) - 0.8;
406 zheavy2_shell = ((nheavy2/
n) * z) - 0.8;
412 e_saddle_scission = (3.535 * std::pow(z,2)/a - 121.1) * friction_factor;
418 if (e_saddle_scission < 0.0) {
419 e_saddle_scission = 0.0;
433 if ( (std::pow(z,2))/a < 33.9186) {
434 masscurv = std::pow( 10.0,(-1.093364 + 0.082933 * (std::pow(z,2)/a)
435 - 0.0002602 * (std::pow(z,4)/std::pow(a,2))) );
437 masscurv = std::pow( 10.0,(3.053536 - 0.056477 * (std::pow(z,2)/a)
438 + 0.0002454 * (std::pow(z,4)/std::pow(a,2))) );
441 cz_symm = (8.0/std::pow(z,2)) * masscurv;
457 asymm = nsymm + zsymm;
459 zheavy1 = (cz_symm*zsymm + cz_asymm1_shell*zheavy1_shell)/(cz_symm + cz_asymm1_shell);
460 zheavy2 = (cz_symm*zsymm + cz_asymm2_shell*zheavy2_shell)/(cz_symm + cz_asymm2_shell);
463 nheavy1_eff = (zheavy1 + 0.8)*(n/
z);
464 nheavy2_eff = (zheavy2 + 0.8)*(n/
z);
465 aheavy1 = nheavy1_eff + zheavy1;
466 aheavy2 = nheavy2_eff + zheavy2;
472 a_levdens_heavy1 = aheavy1 / 8.0;
473 a_levdens_heavy2 = aheavy2 / 8.0;
474 gamma = a_levdens / (0.4 * (std::pow(a,1.3333)) );
475 gamma_heavy1 = ( a_levdens_heavy1 / (0.4 * (std::pow(aheavy1,1.3333)) ) ) * fgamma1;
476 gamma_heavy2 = a_levdens_heavy2 / (0.4 * (std::pow(aheavy2,1.3333)) );
480 cn =
umass(zsymm,(nsymm+1.),0.0) +
umass(zsymm,(nsymm-1.),0.0)
481 + 1.44 * (std::pow(zsymm,2))/
482 ( (std::pow(r_null,2)) *
483 ( std::pow((asymm+1.0),1.0/3.0) + std::pow((asymm-1.0),1.0/3.0) ) *
484 ( std::pow((asymm+1.0),1.0/3.0) + std::pow((asymm-1.0),1.0/3.0) ) )
485 - 2.0 *
umass(zsymm,nsymm,0.0)
486 - 1.44 * (std::pow(zsymm,2))/
487 ( ( 2.0 * r_null * (std::pow(asymm,1.0/3.0)) ) *
488 ( 2.0 * r_null * (std::pow(asymm,1.0/3.0)) ) );
491 delta_u1 = delta_u1_shell + (std::pow((zheavy1_shell-zheavy1),2))*cz_asymm1_shell;
493 delta_u2 = delta_u2_shell + (std::pow((zheavy2_shell-zheavy2),2))*cz_asymm2_shell;
496 Basym_1 = Bsym + std::pow((zheavy1-zsymm), 2) * cz_symm + delta_u1;
497 Basym_2 = Bsym + std::pow((zheavy2-zsymm), 2) * cz_symm + delta_u2;
498 if(Bsym < Basym_1 && Bsym < Basym_2) {
501 epsilon0_1_saddle = (e + e_zero_point - std::pow((zheavy1 - zsymm), 2) * cz_symm);
502 epsilon0_2_saddle = (e + e_zero_point - std::pow((zheavy2 - zsymm), 2) * cz_symm);
504 epsilon_1_saddle = epsilon0_1_saddle - delta_u1;
505 epsilon_2_saddle = epsilon0_2_saddle - delta_u2;
507 epsilon_symm_saddle = e + e_zero_point;
508 eexc1_saddle = epsilon_1_saddle;
509 eexc2_saddle = epsilon_2_saddle;
513 epsilon0_1_scission = (e + e_saddle_scission - std::pow((zheavy1 - zsymm), 2) * cz_symm) * aheavy1/a;
514 epsilon_1_scission = epsilon0_1_scission - delta_u1*(aheavy1/
a);
516 epsilon0_2_scission = (e + e_saddle_scission - std::pow((zheavy2 - zsymm), 2) * cz_symm) * aheavy2/a;
517 epsilon_2_scission = epsilon0_2_scission - delta_u2*(aheavy2/
a);
519 epsilon_symm_scission = e + e_saddle_scission;
520 }
else if (Basym_1 < Bsym && Basym_1 < Basym_2) {
523 epsilon_symm_saddle = (e + e_zero_point + delta_u1 + std::pow((zheavy1-zsymm), 2) * cz_symm);
524 epsilon0_2_saddle = (epsilon_symm_saddle - std::pow((zheavy2-zsymm), 2) * cz_symm);
525 epsilon_2_saddle = epsilon0_2_saddle - delta_u2;
526 epsilon0_1_saddle = e + e_zero_point + delta_u1;
527 epsilon_1_saddle = e + e_zero_point;
528 eexc1_saddle = epsilon_1_saddle;
529 eexc2_saddle = epsilon_2_saddle;
533 epsilon_symm_scission = (e + e_saddle_scission + std::pow((zheavy1-zsymm), 2) * cz_symm + delta_u1);
534 epsilon0_2_scission = (epsilon_symm_scission - std::pow((zheavy2-zsymm), 2) * cz_symm) * aheavy2/a;
535 epsilon_2_scission = epsilon0_2_scission - delta_u2*aheavy2/
a;
536 epsilon0_1_scission = (e + e_saddle_scission + delta_u1) * aheavy1/a;
537 epsilon_1_scission = (e + e_saddle_scission) * aheavy1/a;
538 }
else if (Basym_2 < Bsym && Basym_2 < Basym_1) {
541 epsilon_symm_saddle = (e + e_zero_point + delta_u2 + std::pow((zheavy2-zsymm), 2) * cz_symm);
542 epsilon0_1_saddle = (epsilon_symm_saddle - std::pow((zheavy1-zsymm), 2) * cz_symm);
543 epsilon_1_saddle = epsilon0_1_saddle - delta_u1;
544 epsilon0_2_saddle = e + e_zero_point + delta_u2;
545 epsilon_2_saddle = e + e_zero_point;
546 eexc1_saddle = epsilon_1_saddle;
547 eexc2_saddle = epsilon_2_saddle;
551 epsilon_symm_scission = (e + e_saddle_scission + std::pow((zheavy2-zsymm), 2) * cz_symm + delta_u2);
552 epsilon0_1_scission = (epsilon_symm_scission - std::pow((zheavy1-zsymm), 2) * cz_symm) * aheavy1/a;
553 epsilon_1_scission = epsilon0_1_scission - delta_u1*aheavy1/
a;
554 epsilon0_2_scission = (e + e_saddle_scission + delta_u2) * aheavy2/a;
555 epsilon_2_scission = (e + e_saddle_scission) * aheavy2/a;
560 if(epsilon_1_saddle < 0.0) epsilon_1_saddle = 0.0;
561 if(epsilon_2_saddle < 0.0) epsilon_2_saddle = 0.0;
562 if(epsilon0_1_saddle < 0.0) epsilon0_1_saddle = 0.0;
563 if(epsilon0_2_saddle < 0.0) epsilon0_2_saddle = 0.0;
564 if(epsilon_symm_saddle < 0.0) epsilon_symm_saddle = 0.0;
566 if(epsilon_1_scission < 0.0) epsilon_1_scission = 0.0;
567 if(epsilon_2_scission < 0.0) epsilon_2_scission = 0.0;
568 if(epsilon0_1_scission < 0.0) epsilon0_1_scission = 0.0;
569 if(epsilon0_2_scission < 0.0) epsilon0_2_scission = 0.0;
570 if(epsilon_symm_scission < 0.0) epsilon_symm_scission = 0.0;
576 e_eff1_saddle = epsilon0_1_saddle - delta_u1 * (std::exp((-epsilon_1_saddle*gamma)));
578 if (e_eff1_saddle > 0.0) {
579 wzasymm1_saddle = std::sqrt( (0.5) *
580 (std::sqrt(1.0/a_levdens*e_eff1_saddle)) /
581 (cz_asymm1_shell * std::exp((-epsilon_1_saddle*gamma)) + cz_symm) );
583 wzasymm1_saddle = 1.0;
586 e_eff2_saddle = epsilon0_2_saddle - delta_u2 * std::exp((-epsilon_2_saddle*gamma));
587 if (e_eff2_saddle > 0.0) {
588 wzasymm2_saddle = std::sqrt( (0.5 *
589 (std::sqrt(1.0/a_levdens*e_eff2_saddle)) /
590 (cz_asymm2_shell * std::exp((-epsilon_2_saddle*gamma)) + cz_symm) ) );
592 wzasymm2_saddle = 1.0;
595 if(e - e_zero_point > 0.0) {
596 wzsymm_saddle = std::sqrt( (0.5 *
597 (std::sqrt(1.0/a_levdens*(e+epsilon_symm_saddle))) / cz_symm ) );
611 wzsymm_scission = wzsymm_saddle;
613 if (e_saddle_scission == 0.0) {
614 wzasymm1_scission = wzasymm1_saddle;
615 wzasymm2_scission = wzasymm2_saddle;
617 if (nheavy1_eff > 75.0) {
618 wzasymm1_scission = (std::sqrt(21.0)) * z/a;
619 double RR = (70.0-28.0)/3.0*(z*z/a-35.0)+28.0;
621 wzasymm2_scission = std::sqrt(RR)*(z/
a);
623 wzasymm2_scission = 0.0;
625 wzasymm2_scission = (std::sqrt (
max( (70.0-28.0)/3.0*(z*z/a-35.0)+28.,0.0 )) ) * z/a;
627 wzasymm1_scission = wzasymm1_saddle;
628 wzasymm2_scission = wzasymm2_saddle;
632 wzasymm1_scission =
max(wzasymm1_scission,wzasymm1_saddle);
633 wzasymm2_scission =
max(wzasymm2_scission,wzasymm2_saddle);
635 wzasymm1 = wzasymm1_scission * fwidth_asymm1;
636 wzasymm2 = wzasymm2_scission * fwidth_asymm2;
637 wzsymm = wzsymm_scission;
662 n1width = std::sqrt(0.5 * std::sqrt(1.0/a_levdens*(e + e_saddle_scission)) / cn + 1.35);
663 if ( (epsilon0_1_saddle - delta_u1*std::exp((-epsilon_1_saddle*gamma_heavy1))) < 0.0) {
666 sasymm1 = 2.0 * std::sqrt( a_levdens * (epsilon0_1_saddle -
667 delta_u1*(std::exp((-epsilon_1_saddle*gamma_heavy1))) ) );
670 if ( (epsilon0_2_saddle - delta_u2*std::exp((-epsilon_2_saddle*gamma_heavy2))) < 0.0) {
673 sasymm2 = 2.0 * std::sqrt( a_levdens * (epsilon0_2_saddle -
674 delta_u2*(std::exp((-epsilon_2_saddle*gamma_heavy2))) ) );
677 if (epsilon_symm_saddle > 0.0) {
678 ssymm = 2.0 * std::sqrt( a_levdens*(epsilon_symm_saddle) );
685 if (epsilon0_1_saddle < 0.0) {
686 yasymm1 = std::exp((sasymm1-ssymm)) * wzasymm1_saddle / wzsymm_saddle * 2.0;
689 ssymm_mode1 = 2.0 * std::sqrt( a_levdens*(epsilon0_1_saddle) );
690 yasymm1 = ( std::exp((sasymm1-ssymm)) - std::exp((ssymm_mode1 - ssymm)) )
691 * wzasymm1_saddle / wzsymm_saddle * 2.0;
694 if (epsilon0_2_saddle < 0.0) {
695 yasymm2 = std::exp((sasymm2-ssymm)) * wzasymm2_saddle / wzsymm_saddle * 2.0;
698 ssymm_mode2 = 2.0 * std::sqrt( a_levdens*(epsilon0_2_saddle) );
699 yasymm2 = ( std::exp((sasymm2-ssymm)) - std::exp((ssymm_mode2 - ssymm)) )
700 * wzasymm2_saddle / wzsymm_saddle * 2.0;
706 if ( (sasymm1 > -10.0) && (sasymm2 > -10.0) ) {
708 yasymm1 = std::exp(sasymm1) * wzasymm1_saddle * 2.0;
709 yasymm2 = std::exp(sasymm2) * wzasymm2_saddle * 2.0;
714 ysum = ysymm + yasymm1 + yasymm2;
716 ysymm = ysymm / ysum;
717 yasymm1 = yasymm1 / ysum;
718 yasymm2 = yasymm2 / ysum;
724 if ( (epsilon_symm_saddle < epsilon_1_saddle) && (epsilon_symm_saddle < epsilon_2_saddle) ) {
727 if (epsilon_1_saddle < epsilon_2_saddle) {
743 eexc_max =
max(eexc1_saddle, eexc2_saddle);
744 eexc_max =
max(eexc_max, e);
746 if ((
G4int)(z) % 2 == 0) {
747 r_e_o_max = 0.3 * (1.0 - 0.2 * (std::pow(z, 2)/a - std::pow(92.0, 2)/238.0));
748 e_pair = 2.0 * 12.0 / std::sqrt(a);
749 if(eexc_max > (e_crit + e_pair)) {
752 if(eexc_max < e_pair) {
755 r_e_o = std::pow((eexc_max - e_crit - e_pair)/e_crit, 2) * r_e_o_max;
781 }
else if (rmode < (ysymm + yasymm1)) {
793 }
else if (imode == 2) {
796 }
else if (imode == 3) {
812 while ( (z1<5.0) || (z2<5.0) ) {
838 re1 =
umass(z1,n1ucd,0.6) +
umass(z2,n2ucd,0.6) +
ecoul(z1,n1ucd,0.6,z2,n2ucd,0.6,2.0);
839 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);
840 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);
841 reps2 = (re1-2.0*re2+re3) / 2.0;
842 reps1 = re2 - re1 - reps2;
843 rn1_pol = - reps1 / (2.0 * reps2);
844 n1mean = n1ucd + rn1_pol;
846 n1mean = (z1 + 0.5) * n/
z;
855 while (n1r < 5 || n2r < 5) {
859 i_inter =
int(n1r + 0.5);
860 n1r = double(i_inter);
867 ne_min = 0.095e0 * a - 20.4e0;
868 if (ne_min < 0) ne_min = 0.0;
869 ne_min = ne_min + e / 8.e0;
878 }
else if (a1 >= 80 && a1 < 110) {
879 ed1_low = (a1-80.)*20./30.;
880 }
else if (a1 >= 110 && a1 < 130) {
881 ed1_low = -(a1-110.)*20./20. + 20.;
882 }
else if (a1 >= 130) {
883 ed1_low = (a1-130.)*20./30.;
888 }
else if (a2 >= 80 && a2 < 110) {
889 ed2_low = (a2-80.)*20./30.;
890 }
else if (a2 >= 110 && a2 < 130) {
891 ed2_low = -(a2-110.)*20./20. + 20.;
892 }
else if (a2 >= 130) {
893 ed2_low = (a2-130.)*20./30.;
896 ed1_high = 20.0*a1/(a1+a2);
897 ed2_high = 20.0 - ed1_high;
898 ed1 = ed1_low*std::exp(-e/el) + ed1_high*(1-std::exp(-e/el));
899 ed2 = ed2_low*std::exp(-e/el) + ed2_high*(1-std::exp(-e/el));
903 e1 = e*a1/(a1+a2) + ed1;
904 e2 = e - e*a1/(a1+a2) + ed2;
915 if ( (icz == -1) || (a1 < 0.0) || (a2 < 0.0) ) {
929 asymm = nsymm + zsymm;
934 cz_symm = 8.0 / std::pow(z,2) * masscurv;
936 wzsymm = std::sqrt( (0.5 * std::sqrt(1.0/a_levdens*e) / cz_symm) ) ;
949 while ( (z1 < 5.0) || (z2 < 5.0) ) {
953 z1 =
gausshaz(kkk, z1mean, z1width);
967 cn =
umass(zsymm, nsymm+1.0, 0.0) +
umass(zsymm, nsymm-1.0, 0.0)
968 + 1.44 * std::pow(zsymm, 2)/
969 (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))
970 - 2.0 *
umass(zsymm, nsymm, 0.0) - 1.44 * std::pow(zsymm, 2) /
971 std::pow(r_null * 2.0 *std::pow(asymm, 1.0/3.0), 2);
974 n1width = std::sqrt( (0.5 * std::sqrt(1.0/a_levdens*e) / cn) + 1.35);
983 re1 =
umass(z1,n1ucd, 0.6) +
umass(z2,n2ucd, 0.6) +
ecoul(z1,n1ucd, 0.6,z2,n2ucd, 0.6,2.0);
984 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);
985 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);
986 reps2 = (re1-2.0*re2+re3) / 2.0;
987 reps1 = re2 - re1 - reps2;
988 rn1_pol = - reps1 / (2.0 * reps2);
989 n1mean = n1ucd + rn1_pol;
995 n1r = (float)( (
int)(
gausshaz(k, n1mean,n1width)) );
1002 e2 = e - e*a1/(a1+a2);
1023 const G4int pSize = 110;
1043 ix =
int(
y * 100 + 43543000);
1044 if(
mod(ix,2) == 0) {
1056 for(
G4int iRandom = 0; iRandom < pSize; iRandom++) {
1086 v1 = 2.0*
haz(k) - 1.0;
1087 v2 = 2.0*
haz(k) - 1.0;
1088 r = std::pow(v1,2) + std::pow(v2,2);
1091 fac = std::sqrt(-2.*std::log(r)/r);
1093 fgausshaz = v2*fac*sig+xmoy;
1097 fgausshaz=gset*sig+xmoy;
1149 fractpart = std::modf(number, &intpart);
1154 if(fractpart < 0.5) {
1155 return int(std::floor(number));
1158 return int(std::ceil(number));
1162 if(fractpart < -0.5) {
1163 return int(std::floor(number));
1166 return int(std::ceil(number));
1170 return int(std::floor(number));
1179 mylocaltime = localtime(&mytime);
1182 return(mylocaltime->tm_hour*60*60 + mylocaltime->tm_min*60 + mylocaltime->tm_sec);
1192 return (a - (a/b)*b);
1202 return (a - (a/b)*b);
1214 value = double(std::ceil(a));
1217 value = double(std::floor(a));
1228 value =
int(std::ceil(a));
1231 value =
int(std::floor(a));
1239 if(a < b && a < c) {
1242 if(b < a && b < c) {
1245 if(c < a && c < b) {
G4int mod(G4int a, G4int b)
subroutine gset(AX, BX, NX, Z, W)
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
G4double dint(G4double a)
G4double umass(G4double z, G4double n, G4double beta)
G4int max(G4int a, G4int b)
G4double dmin1(G4double a, G4double b, G4double c)
void doFission(G4double &A, G4double &Z, G4double &E, G4double &A1, G4double &Z1, G4double &E1, G4double &K1, G4double &A2, G4double &Z2, G4double &E2, G4double &K2)
G4double gausshaz(int k, double xmoy, double sig)
G4double ecoul(G4double z1, G4double n1, G4double beta1, G4double z2, G4double n2, G4double beta2, G4double d)
void even_odd(G4double r_origin, G4double r_even_odd, G4int &i_out)
void fissionDistri(G4double &a, G4double &z, G4double &e, G4double &a1, G4double &z1, G4double &e1, G4double &v1, G4double &a2, G4double &z2, G4double &e2, G4double &v2)
G4double dmod(G4double a, G4double b)
const XML_Char int const XML_Char * value
G4int nint(G4double number)
G4int min(G4int a, G4int b)
G4double utilabs(G4double a)