32 #define ABLAXX_IN_GEANT4_MODE 1
44 #ifdef ABLAXX_IN_GEANT4_MODE
50 #ifndef ABLAXX_IN_GEANT4_MODE
62 if(verboseLevel > 0) {
63 fissionModel->about();
111 G4double alrem = 0.0, berem = 0.0, garem = 0.0;
118 for(
G4int init_i = 0; init_i < 4; init_i++) {
119 csdir1[init_i] = 0.0;
120 csdir2[init_i] = 0.0;
122 pfis_rem[init_i] = 0.0;
123 pf1_rem[init_i] = 0.0;
124 for(
G4int init_j = 0; init_j < 4; init_j++) {
125 R[init_i][init_j] = 0.0;
129 G4double plab1 = 0.0, gam1 = 0.0, eta1 = 0.0;
130 G4double plab2 = 0.0, gam2 = 0.0, eta2 = 0.0;
137 G4int mempaw = 0, memiv = 0;
159 G4int lma_pf1 = 0, lmi_pf1 = 0;
160 G4int lma_pf2 = 0, lmi_pf2 = 0;
163 G4double cst = 0.0, sst = 0.0, csf = 0.0, ssf = 0.0;
165 G4double zf = 0.0, af = 0.0, mtota = 0.0, pleva = 0.0, pxeva = 0.0, pyeva = 0.0;
167 G4int inum = eventnumber;
191 G4double pcorem = std::sqrt(std::pow(momX,2) + std::pow(momY,2) + std::pow(momZ,2));
193 alrem = pxrem/pcorem;
194 berem = pyrem/pcorem;
195 garem = pzrem/pcorem;
220 if(esrem >= 1.0e-3) {
221 evapora(zprf,aprf,&ee,jprf, &zf, &af, &mtota, &pleva, &pxeva, &pyeva, &ff, &inttype, &inum);
238 trem = double(erecrem);
239 remmass =
pace2(aprf,zprf) + aprf*uma - zprf*melec;
243 G4double gamrem = (remmass + trem)/remmass;
244 G4double etrem = std::sqrt(trem*(trem + 2.0*remmass))/remmass;
249 remmass =
pace2(aprf,zprf) + aprf*uma - zprf*melec+double(esrem);
252 mglms(aprf,zprf,0,&el);
253 remmass = zprf*fmp + (aprf-zprf)*fmn + el +
double(esrem);
254 gamrem = std::sqrt(std::pow(pcorem,2) + std::pow(remmass,2))/remmass;
255 etrem = pcorem/remmass;
269 for(
G4int iloc = 1; iloc <= volant->
iv; iloc++) {
270 mglms(
double(volant->
acv[iloc]),
double(volant->
zpcv[iloc]),0,&el);
271 masse = volant->
zpcv[iloc]*fmp + (volant->
acv[iloc] - volant->
zpcv[iloc])*fmn + el;
272 bil_e = bil_e + std::sqrt(std::pow(volant->
pcv[iloc],2) + std::pow(masse,2));
273 bil_px = bil_px + volant->
pcv[iloc]*(volant->
xcv[iloc]);
274 bil_py = bil_py + volant->
pcv[iloc]*(volant->
ycv[iloc]);
275 bil_pz = bil_pz + volant->
pcv[iloc]*(volant->
zcv[iloc]);
281 if(volant->
iv != 0) {
282 nopart = varntp->
ntrack - 1;
283 translab(gamrem,etrem,csrem,nopart,ndec);
285 nbpevap = volant->
iv;
299 fissionModel->
doFission(af,zf,ee,aff1,zff1,eff1,v1,aff2,zff2,eff2,v2);
301 G4int na_f =
int(std::floor(af + 0.5));
302 G4int nz_f =
int(std::floor(zf + 0.5));
303 varntp->
izfis = nz_f;
304 varntp->
iafis = na_f;
323 G4double massef = zf*fmp + (af - zf)*fmn + el + ee + ef;
324 mglms(
double(aff1),
double(zff1),0,&el);
325 G4double masse1 = zff1*fmp + (aff1-zff1)*fmn + el + eff1;
326 mglms(aff2,zff2,0,&el);
327 G4double masse2 = zff2*fmp + (aff2 - zff2)*fmn + el + eff2;
333 G4double t1 = b*(b + 2.0*masse2)/(2.0*massef);
334 G4double p1 = std::sqrt(t1*(t1 + 2.0*masse1));
338 ctet1 = 2.0*rndm - 1.0;
340 phi1 = rndm*2.0*3.141592654;
343 G4double peva = std::pow(pxeva,2) + std::pow(pyeva,2) + std::pow(pleva,2);
344 G4double gamfis = std::sqrt(std::pow(massef,2) + peva)/massef;
345 peva = std::sqrt(peva);
353 sitet = std::sqrt(std::pow(pxeva,2)+std::pow(pyeva,2))/peva;
357 G4double siphi = pyeva/(sitet*peva);
358 G4double csphi = pxeva/(sitet*peva);
360 R[1][1] = cstet*csphi;
362 R[1][3] = sitet*csphi;
363 R[2][1] = cstet*siphi;
365 R[2][3] = sitet*siphi;
383 if((zff1 <= 0.0) || (aff1 <= 0.0) || (aff1 < zff1)) {
384 if(verboseLevel > 2) {
390 epf1_in = double(eff1);
396 G4double zf1 = 0.0, af1 = 0.0, malpha1 = 0.0, ffpleva1 = 0.0, ffpxeva1 = 0.0, ffpyeva1 = 0.0;
397 G4int ff1 = 0, ftype1 = 0;
398 evapora(zff1, aff1, &epf1_out, 0.0, &zf1, &af1, &malpha1, &ffpleva1,
399 &ffpxeva1, &ffpyeva1, &ff1, &ftype1, &inum);
401 volant->
iv = volant->
iv + 1;
402 volant->
acv[volant->
iv] = af1;
403 volant->
zpcv[volant->
iv] = zf1;
404 if(verboseLevel > 2) {
408 if(verboseLevel > 2) {
411 peva = std::sqrt(std::pow(ffpxeva1,2) + std::pow(ffpyeva1,2) + std::pow(ffpleva1,2));
412 volant->
pcv[volant->
iv] = peva;
414 volant->
xcv[volant->
iv] = ffpxeva1/peva;
415 volant->
ycv[volant->
iv] = ffpyeva1/peva;
416 volant->
zcv[volant->
iv] = ffpleva1/peva;
419 volant->
xcv[volant->
iv] = 1.0;
420 volant->
ycv[volant->
iv] = 0.0;
421 volant->
zcv[volant->
iv] = 0.0;
429 for(
G4int iloc = nbpevap + 1; iloc <= volant->
iv; iloc++) {
432 masse = volant->
zpcv[iloc]*fmp + (volant->
acv[iloc] - volant->
zpcv[iloc])*fmn + el;
433 bil1_e = bil1_e + std::sqrt(std::pow(volant->
pcv[iloc],2) + std::pow(masse,2));
434 bil1_px = bil1_px + volant->
pcv[iloc]*(volant->
xcv[iloc]);
435 bil1_py = bil1_py + volant->
pcv[iloc]*(volant->
ycv[iloc]);
436 bil1_pz = bil1_pz + volant->
pcv[iloc]*(volant->
zcv[iloc]);
441 translabpf(masse1,t1,p1,ctet1,phi1,gamfis,etfis,R,&plab1,&gam1,&eta1,csdir1);
444 nopart = varntp->
ntrack - 1;
445 translab(gam1,eta1,csdir1,nopart,nbpevap+1);
448 lmi_pf1 = nopart + nbpevap + 1;
449 lma_pf1 = nopart + volant->
iv;
450 nbpevap = volant->
iv;
455 if((zff2 <= 0.0) || (aff2 <= 0.0) || (aff2 <= zff2)) {
456 if(verboseLevel > 2) {
468 G4double zf2 = 0.0, af2 = 0.0, malpha2 = 0.0, ffpleva2 = 0.0, ffpxeva2 = 0.0, ffpyeva2 = 0.0;
469 G4int ff2 = 0, ftype2 = 0;
470 evapora(zff2,aff2,&epf2_out,0.0,&zf2,&af2,&malpha2,&ffpleva2,
471 &ffpxeva2,&ffpyeva2,&ff2,&ftype2,&inum);
473 volant->
iv = volant->
iv + 1;
474 volant->
acv[volant->
iv] = af2;
475 volant->
zpcv[volant->
iv] = zf2;
476 peva = std::sqrt(std::pow(ffpxeva2,2) + std::pow(ffpyeva2,2) + std::pow(ffpleva2,2));
477 volant->
pcv[volant->
iv] = peva;
480 volant->
xcv[volant->
iv] = ffpxeva2/peva;
481 volant->
ycv[volant->
iv] = ffpyeva2/peva;
482 volant->
zcv[volant->
iv] = ffpleva2/peva;
485 volant->
xcv[volant->
iv] = 1.0;
486 volant->
ycv[volant->
iv] = 0.0;
487 volant->
zcv[volant->
iv] = 0.0;
495 for(
G4int iloc = nbpevap + 1; iloc <= volant->
iv; iloc++) {
497 masse = volant->
zpcv[iloc]*fmp + (volant->
acv[iloc] - volant->
zpcv[iloc])*fmn + el;
498 bil2_e = bil2_e + std::sqrt(std::pow(volant->
pcv[iloc],2) + std::pow(masse,2));
499 bil2_px = bil2_px + volant->
pcv[iloc]*(volant->
xcv[iloc]);
500 bil2_py = bil2_py + volant->
pcv[iloc]*(volant->
ycv[iloc]);
501 bil2_pz = bil2_pz + volant->
pcv[iloc]*(volant->
zcv[iloc]);
509 phi2 = std::fmod(phi1+3.141592654,6.283185308);
510 p2 = std::sqrt(t2*(t2+2.0*masse2));
515 translabpf(masse2,t2,p2,ctet2,phi2,gamfis,etfis,R,&plab2,&gam2,&eta2,csdir2);
519 nopart = varntp->
ntrack - 1;
520 translab(gam2,eta2,csdir2,nopart,nbpevap+1);
521 lmi_pf2 = nopart + nbpevap + 1;
522 lma_pf2 = nopart + volant->
iv;
528 for(
G4int iloc = 1; iloc <= 3; iloc++) {
529 pfis_rem[iloc] = 0.0;
532 lorab(gamfis,etfis,massef,pfis_rem,&efis_rem,pfis_trav);
533 rotab(R,pfis_trav,pfis_rem);
535 stet1 = std::sqrt(1.0 - std::pow(ctet1,2));
536 pf1_rem[1] = p1*stet1*std::cos(phi1);
537 pf1_rem[2] = p1*stet1*std::sin(phi1);
538 pf1_rem[3] = p1*ctet1;
540 lorab(gamfis,etfis,masse1+t1,pf1_rem,&e1_rem,pfis_trav);
541 rotab(R,pfis_trav,pf1_rem);
543 stet2 = std::sqrt(1.0 - std::pow(ctet2,2));
547 pf2_rem[1] = p2*stet2*std::cos(phi2);
548 pf2_rem[2] = p2*stet2*std::sin(phi2);
549 pf2_rem[3] = p2*ctet2;
550 lorab(gamfis,etfis,masse2+t2,pf2_rem,&e2_rem,pfis_trav);
551 rotab(R,pfis_trav,pf2_rem);
553 bil_e = remmass - efis_rem - bil_e;
554 bil_px = bil_px + pfis_rem[1];
555 bil_py = bil_py + pfis_rem[2];
556 bil_pz = bil_pz + pfis_rem[3];
564 if((lma_pf1-lmi_pf1) != 0) {
565 G4double bil_e_pf1 = e1_rem - epf1_out;
569 for(
G4int ipf1 = lmi_pf1; ipf1 <= lma_pf1; ipf1++) {
570 if(varntp->
enerj[ipf1] <= 0.0)
continue;
571 bil_e_pf1 = bil_e_pf1 - (std::pow(varntp->
plab[ipf1],2) + std::pow(varntp->
enerj[ipf1],2))/(2.0*(varntp->
enerj[ipf1]));
572 cst = std::cos(varntp->
tetlab[ipf1]/57.2957795);
573 sst = std::sin(varntp->
tetlab[ipf1]/57.2957795);
574 csf = std::cos(varntp->
philab[ipf1]/57.2957795);
575 ssf = std::sin(varntp->
philab[ipf1]/57.2957795);
576 bil_px_pf1 = bil_px_pf1 - varntp->
plab[ipf1]*sst*csf;
577 bil_py_pf1 = bil_py_pf1 - varntp->
plab[ipf1]*sst*ssf;
578 bil_pz_pf1 = bil_pz_pf1 - varntp->
plab[ipf1]*cst;
582 if((lma_pf2-lmi_pf2) != 0) {
583 G4double bil_e_pf2 = e2_rem - epf2_out;
587 for(
G4int ipf2 = lmi_pf2; ipf2 <= lma_pf2; ipf2++) {
588 if(varntp->
enerj[ipf2] <= 0.0)
continue;
589 bil_e_pf2 = bil_e_pf2 - (std::pow(varntp->
plab[ipf2],2) + std::pow(varntp->
enerj[ipf2],2))/(2.0*(varntp->
enerj[ipf2]));
590 cst = std::cos(varntp->
tetlab[ipf2]/57.2957795);
591 sst = std::sin(varntp->
tetlab[ipf2]/57.2957795);
592 csf = std::cos(varntp->
philab[ipf2]/57.2957795);
593 ssf = std::sin(varntp->
philab[ipf2]/57.2957795);
594 bil_px_pf2 = bil_px_pf2 - varntp->
plab[ipf2]*sst*csf;
595 bil_py_pf2 = bil_py_pf2 - varntp->
plab[ipf2]*sst*ssf;
596 bil_pz_pf2 = bil_pz_pf2 - varntp->
plab[ipf2]*cst;
603 translab(gamrem,etrem,csrem,mempaw,memiv);
605 if(verboseLevel > 2) {
616 if(verboseLevel > 2) {
619 volant->
iv = volant->
iv + 1;
620 volant->
acv[volant->
iv] = af;
621 volant->
zpcv[volant->
iv] = zf;
623 G4double peva = std::sqrt(std::pow(pxeva,2)+std::pow(pyeva,2)+std::pow(pleva,2));
624 volant->
pcv[volant->
iv] = peva;
626 volant->
xcv[volant->
iv] = pxeva/peva;
627 volant->
ycv[volant->
iv] = pyeva/peva;
628 volant->
zcv[volant->
iv] = pleva/peva;
631 volant->
xcv[volant->
iv] = 1.0;
632 volant->
ycv[volant->
iv] = 0.0;
633 volant->
zcv[volant->
iv] = 0.0;
639 trem = double(erecrem);
651 for(
G4int j = 1; j <= volant->
iv; j++) {
652 if(volant->
acv[j] == 0) {
653 if(verboseLevel > 2) {
658 if(volant->
acv[j] > 0) {
660 fmcv = volant->
zpcv[j]*fmp + (volant->
acv[j] - volant->
zpcv[j])*fmn + el;
661 e_evapo = e_evapo + std::sqrt(std::pow(volant->
pcv[j],2) + std::pow(fmcv,2));
670 G4double gamrem = std::sqrt(std::pow(pcorem,2)+std::pow(remmass,2))/remmass;
673 nopart = varntp->
ntrack - 1;
674 translab(gamrem,etrem,csrem,nopart,1);
864 #ifdef ABLAXX_IN_GEANT4_MODE
869 if(dataInterface->
readData() ==
true) {
870 if(verboseLevel > 0) {
878 for(
int z = 0;
z < 99;
z++) {
879 for(
int n = 0;
n < 154;
n++) {
889 for(
int z = 0;
z < 500;
z++) {
890 for(
int a = 0;
a < 500;
a++) {
895 delete dataInterface;
902 G4double ponq = 0.0, dn = 0.0,
n = 0.0, dz = 0.0;
904 if(((std::fabs(bet)-1.15) < 0) || ((std::fabs(bet)-1.15) == 0)) {
908 if((std::fabs(bet)-1.15) > 0) {
914 dz = std::fabs(z - 82.0);
916 dn = std::fabs(
n-126.e0);
919 dn = std::fabs(
n - 82.0);
922 bet = 0.022 + 0.003*dn + 0.005*dz;
924 sig = 25.0*std::pow(bet,2) * sig;
927 ponq = (u - ucr)/dcr;
935 (*qr) = 1.0/(1.0 + std::exp(ponq)) * (sig - 1.0) + 1.0;
949 G4double xv = 0.0, xs = 0.0, xc = 0.0, xa = 0.0;
951 if ((a <= 0.01) || (z < 0.01)) {
956 xs = 17.23*std::pow(a,(2.0/3.0));
959 xc = 0.7*z*(z-1.0)*std::pow((a-1.0),(-1.e0/3.e0));
966 xa = 23.6*(std::pow((a-2.0*z),2)/
a);
994 if ( (a1 <= 0) || (z1 <= 0) || ((a1-z1) <= 0) ) {
1003 (*el) =
eflmac(a1,z1,0,refopt4);
1006 (*el) = (*el) + ec2sub->
ecnz[a1-z1][z1];
1027 const G4int alpha2Size = 37;
1029 G4double alpha2[alpha2Size] = {0.0, 2.5464e0, 2.4944e0, 2.4410e0, 2.3915e0, 2.3482e0,
1030 2.3014e0, 2.2479e0, 2.1982e0, 2.1432e0, 2.0807e0, 2.0142e0, 1.9419e0,
1031 1.8714e0, 1.8010e0, 1.7272e0, 1.6473e0, 1.5601e0, 1.4526e0, 1.3164e0,
1032 1.1391e0, 0.9662e0, 0.8295e0, 0.7231e0, 0.6360e0, 0.5615e0, 0.4953e0,
1033 0.4354e0, 0.3799e0, 0.3274e0, 0.2779e0, 0.2298e0, 0.1827e0, 0.1373e0,
1034 0.0901e0, 0.0430e0, 0.0000e0};
1047 v = (x - 0.3)/dx + 1.0;
1058 return(alpha2[index] + (alpha2[index+1] - alpha2[index]) / dx * ( x - (0.3e0 + dx*(index-1))));
1073 G4double aa = 0.0, zz = 0.0, i = 0.0;
1078 i = double(a-2*z) / aa;
1082 fissilityResult = std::pow(zz,2) / aa /50.8830e0 / (1.0e0 - 1.7826e0 * std::pow(i,2));
1087 fissilityResult = std::pow(zz,2) / aa * std::pow((49.22e0*(1.e0 - 0.3803e0*std::pow(i,2) - 20.489e0*std::pow(i,4))),(-1));
1092 fissilityResult = std::pow(zz,2) / aa /(48.e0*(1.e0 - 17.22e0*std::pow(i,4)));
1095 return fissilityResult;
1110 G4int ff = (*ff_par);
1111 G4int inttype = (*inttype_par);
1112 G4int inum = (*inum_par);
1207 static G4ThreadLocal G4double epsiln = 0.0, probp = 0.0, probn = 0.0, proba = 0.0, ptotl = 0.0, e = 0.0;
1209 G4double ecn = 0.0, ecp = 0.0,eca = 0.0,
bp = 0.0, ba = 0.0;
1247 direct(zf,af,ee,jprf,&probp,&probn,&proba,&probf,&ptotl,
1248 &sn,&sbp,&sba,&ecn,&ecp,&eca,&
bp,&ba,inttype,inum,itest);
1276 barfit(k,k+j,il,&sbfis,&segs,&selmax);
1289 if ((sortie == 1) || (ptotl == 0.e0)) {
1290 e =
dmin1(sn,sbp,sba);
1292 if(verboseLevel > 2) {
1303 else if (sbp == e) {
1307 else if (sba == e) {
1340 pc = std::sqrt(std::pow((1.0 + (eca+ba)/3.72834e3),2) - 1.0) * 3.72834e3;
1344 volant->
iv = volant->
iv + 1;
1345 volant->
acv[volant->
iv] = 4.;
1346 volant->
zpcv[volant->
iv] = 2.;
1349 else if (
x < proba+probp) {
1357 pc = std::sqrt(std::pow((1.0 + (ecp +
bp)/9.3827e2),2) - 1.0) * 9.3827e2;
1360 volant->
iv = volant->
iv + 1;
1361 volant->
acv[volant->
iv] = 1.0;
1362 volant->
zpcv[volant->
iv] = 1.;
1365 else if (
x < proba+probp+probn) {
1373 pc = std::sqrt(std::pow((1.0 + (ecn)/9.3956e2),2) - 1.0) * 9.3956e2;
1380 volant->
iv = volant->
iv + 1;
1381 volant->
acv[volant->
iv] = 1.;
1382 volant->
zpcv[volant->
iv] = 0.;
1420 mtota = mtota + malpha;
1424 ctet1 = 2.0*rnd - 1.0;
1426 phi1 = rnd*2.0*3.141592654;
1427 stet1 = std::sqrt(1.0 - std::pow(ctet1,2));
1428 volant->
xcv[volant->
iv] = stet1*std::cos(phi1);
1429 volant->
ycv[volant->
iv] = stet1*std::sin(phi1);
1430 volant->
zcv[volant->
iv] = ctet1;
1431 pxeva = pxeva - pc * volant->
xcv[volant->
iv];
1432 pyeva = pyeva - pc * volant->
ycv[volant->
iv];
1433 pleva = pleva - pc * ctet1;
1437 if ((af < 2.5) || (ff == 1)) {
1446 (*mtota_par) = mtota;
1447 (*pleva_par) = pleva;
1448 (*pxeva_par) = pxeva;
1449 (*pyeva_par) = pyeva;
1451 (*inttype_par) = inttype;
1616 if (fiss->
bet <= 1.0e-16) {
1639 mglw(a-1.0,zprf,&ma1z);
1640 mglw(a-1.0,zprf-1.0,&ma1z1);
1641 mglw(a-4.0,zprf-2.0,&ma4z2);
1647 sa = ma4z2 - maz - 28.29688;
1656 bp = 1.44*(zprf - 1.0)/(2.1*std::pow((a - 1.0),(1.0/3.0)) + 0.0);
1667 ba = 2.88*(zprf - 2.0)/(2.2*std::pow((a - 4.0),(1.0/3.0)) + 0.0);
1674 if (fiss->
ifis > 0) {
1683 barfit(k,k+j,il,&sbfis,&segs,&selmax);
1687 fb->
efa[j][k] = double(sbfis) - ecld->
ecgnz[j][k];
1691 fb->
efa[j][k] = double(sbfis);
1701 if (fb->
efa[j][k] < 0.0) {
1702 if(verboseLevel > 2) {
1705 fb->
efa[j][k] = 0.0;
1737 bshell = ecld->
ecfnz[in][iz];
1757 densniv(a,zprf,ee,ef,&densf,bshell,bs,bk,&temp,
int(fiss->
optshp),
int(fiss->
optcol),defbet);
1762 bshell = ecld->
ecgnz[in][iz-1] - ecld->
vgsld[in][iz-1];
1763 defbet = 1.5 * (ecld->
alpha[in][iz-1]);
1766 densniv(a-1.0,zprf-1.0e0,ee,sbp,&densp, bshell,1.e0,1.e0,&temp,
int(fiss->
optshp),
int(fiss->
optcol),defbet);
1768 if (imaxwell == 1) {
1783 ecp=std::sqrt(rnd)*(eer-sbp);
1786 if((ecp+sbp) > eer) {
1805 bshell = ecld->
ecgnz[in-1][iz] - ecld->
vgsld[in-1][iz];
1806 defbet = 1.5e0 * (ecld->
alpha[in-1][iz]);
1809 densniv(a-1.0,zprf,ee,sn,&densn,bshell, 1.e0,1.e0,&temp,
int(fiss->
optshp),
int(fiss->
optcol),defbet);
1812 if (imaxwell == 1) {
1825 if(verboseLevel > 2) {
1832 ecn = std::sqrt(rnd)*(eer-sn);
1835 if((ecn+sn) > eer) {
1856 if ((in >= 3) && (iz >= 3)) {
1857 bshell = ecld->
ecgnz[in-2][iz-2] - ecld->
vgsld[in-2][iz-2];
1858 defbet = 1.5 * (ecld->
alpha[in-2][iz-2]);
1868 densniv(a-4.0,zprf-2.0e0,ee,sba,&densa,bshell,1.e0,1.e0,&temp,
int(fiss->
optshp),
int(fiss->
optcol),defbet);
1874 if (imaxwell == 1) {
1888 eca=std::sqrt(rnd)*(eer-sba);
1891 if((eca+sba) > eer) {
1925 if ((a < 50.e0) || (ee > edyn)) {
1930 bshell = ecld->
ecgnz[in][iz] - ecld->
vgsld[in][iz];
1931 defbet = 1.5e0 * (ecld->
alpha[in][iz]);
1934 densniv(a,zprf,ee,0.0e0,&densg,bshell,1.e0,1.e0,&temp,
int(fiss->
optshp),
int(fiss->
optcol),defbet);
1936 if ( densg > 0.e0) {
1939 gp = (std::pow(a,(2.0/3.0))/fiss->
akap)*densp/densg/pi*std::pow(pt,2);
1940 gn = (std::pow(a,(2.0/3.0))/fiss->
akap)*densn/densg/pi*std::pow(nt,2);
1941 ga = (std::pow(a,(2.0/3.0))/fiss->
akap)*densa/densg/pi*2.0*std::pow(at,2);
1942 gf = densf/densg/pi/2.0*ft;
1949 if(verboseLevel > 2) {
1954 gsum = ga + gp + gn;
1991 ra = densa*2.0/densn*std::pow((at/nt),2);
1997 rn = densn/densp*std::pow((nt/pt),2);
1998 ra = densa*2.0/densp*std::pow((at/pt),2);
2007 if (fiss->
bet <= 1.0e-16) {
2011 else if (sbf > 0.0e0) {
2026 wfex = (tauc - tsum)/ts1;
2032 wf = std::exp( -wfex);
2040 if(verboseLevel > 2) {
2048 dconst = 12.0/std::sqrt(a);
2053 dconst = dconst*parc;
2058 if ((ee <= 17.e0) && (fiss->
optles == 1) && (iz >= 90) && (in >= 134)) {
2060 gngf = std::pow(a,(2.0/3.0))*tconst/10.0*std::exp((ef-sn+dconst)/tconst);
2084 denomi = rp+rn+ra+rf;
2101 probp = probp * (wf + (1.e0-wf)/(1.e0-probf));
2102 probn = probn * (wf + (1.e0-wf)/(1.e0-probf));
2103 proba = proba * (wf + (1.e0-wf)/(1.e0-probf));
2106 ptotl = probp+probn+proba+probf;
2112 (*probp_par) = probp;
2113 (*probn_par) = probn;
2114 (*proba_par) = proba;
2115 (*probf_par) = probf;
2116 (*ptotl_par) = ptotl;
2202 G4double pi6 = std::pow(3.1415926535,2) / 6.0;
2207 pa = (ald->
av)*a + (ald->
as)*std::pow(a,(2.e0/3.e0)) + (ald->
ak)*std::pow(a,(1.e0/3.e0));
2210 pa = (ald->
av)*a + (ald->
as)*bs*std::pow(a,(2.e0/3.e0)) + (ald->
ak)*bk*std::pow(a,(1.e0/3.e0));
2213 fp = 0.01377937231e0 * std::pow(a,(5.e0/3.e0)) * (1.e0 + defbet/3.e0);
2223 if (esous > 1.0e30) {
2246 deltpp = -0.25e0* std::pow((delta0/std::sqrt(a)),2) * pa /pi6 + 2.e0*delta0/std::sqrt(a);
2250 e = e - delta0/std::sqrt(a);
2254 e = e - 2.0*delta0/std::sqrt(a);
2270 ponfe = -2.5*pa*e*std::pow(a,(-4.0/3.0));
2272 if (ponfe < -700.0) {
2275 fe = 1.0 - std::exp(ponfe);
2278 he = 1.0 - std::pow((1.0 - e/ecr),2);
2286 ecor = e + deltau*fe + deltpp*he;
2297 y1 = std::sqrt(pa*ecor);
2298 for(
int j = 0; j < 5; j++) {
2299 y2 = pa*ecor*(1.e0-std::exp(-y1));
2305 (*dens) = std::exp(y0*ecor)/ (std::pow((std::pow(ecor,3)*y0),0.5)*std::pow((1.0-0.5*y0*ecor*std::exp(-y1)),0.5))* std::exp(y1)*(1.0-std::exp(-y1))*0.1477045;
2308 y11 = std::sqrt(pa*ecor1);
2309 for(
int j = 0; j < 7; j++) {
2310 y21 = pa*ecor1*(1.0-std::exp(-y11));
2311 y11 = std::sqrt(y21);
2315 (*dens) = (*dens)*std::pow((y01/y0),1.5);
2316 (*temp) = (*temp)*std::pow((y01/y0),1.5);
2320 ponniv = 2.0*std::sqrt(pa*ecor);
2321 if (ponniv > 700.0) {
2326 (*dens) = std::pow(pa,(-0.25e0))*std::pow(ecor,(-1.25e0))*std::exp(ponniv) * 0.1477045e0;
2327 (*temp) = std::sqrt(ecor/pa);
2336 qrot(z,a,defbet,sig,ecor,&qr);
2342 (*dens) = (*dens) * qr;
2343 if(verboseLevel > 2) {
2357 G4double nms = 0.0, ims = 0.0, ksims = 0.0, xms = 0.0, ums = 0.0;
2360 ims = (nms-zms)/ams;
2361 ksims= 50.15e0 * (1.- 1.78 * std::pow(ims,2));
2362 xms = std::pow(zms,2) / (ams * ksims);
2363 ums = 0.368e0-5.057e0*xms+8.93e0*std::pow(xms,2)-8.71*std::pow(xms,3);
2364 return(0.7322e0*std::pow(zms,2)/std::pow(ams,(0.333333e0))*std::pow(10.e0,ums));
2380 for(
int i = 2; i <
n; i++) {
2381 pl[i] = ((2*double(i+1) - 3.0)*x*pl[i-1] - (double(i+1) - 2.0)*pl[i-2])/(
double(i+1)-1.0);
2407 G4double z = 0.0,
n = 0.0,
a = 0.0, av = 0.0, as = 0.0;
2408 G4double a0 = 0.0,
c1 = 0.0, c4 = 0.0, b1 = 0.0, b3 = 0.0;
2409 G4double ff = 0.0, ca = 0.0, w = 0.0, dp = 0.0, dn = 0.0, dpn = 0.0, efl = 0.0;
2410 G4double rmac = 0.0, bs = 0.0, h = 0.0, r0 = 0.0, kf = 0.0, ks = 0.0;
2411 G4double kv = 0.0, rp = 0.0, ay = 0.0, aden = 0.0, x0 = 0.0, y0 = 0.0;
2412 G4double esq = 0.0, ael = 0.0, i = 0.0;
2472 dn = rmac*bs/std::pow(
n,(1.0/3.0));
2473 dp = rmac*bs/std::pow(z,(1.0/3.0));
2474 dpn = h/bs/std::pow(
a,(2.0/3.0));
2476 c1 = 3.0/5.0*esq/r0;
2477 c4 = 5.0/4.0*std::pow((3.0/(2.0*pi)),(2.0/3.0)) *
c1;
2478 kf = std::pow((9.0*pi*z/(4.0*
a)),(1.0/3.0))/r0;
2480 ff = -1.0/8.0*rp*rp*esq/std::pow(r0,3) * (145.0/48.0 - 327.0/2880.0*std::pow(kf,2) * std::pow(rp,2) + 1527.0/1209600.0*std::pow(kf,4) * std::pow(rp,4));
2483 x0 = r0 * std::pow(
a,(1.0/3.0)) / ay;
2484 y0 = r0 * std::pow(
a,(1.0/3.0)) / aden;
2486 b1 = 1.0 - 3.0/(std::pow(x0,2)) + (1.0 + x0) * (2.0 + 3.0/x0 + 3.0/std::pow(x0,2)) * std::exp(-2.0*x0);
2488 b3 = 1.0 - 5.0/std::pow(y0,2) * (1.0 - 15.0/(8.0*y0) + 21.0/(8.0 * std::pow(y0,3))
2489 - 3.0/4.0 * (1.0 + 9.0/(2.0*y0) + 7.0/std::pow(y0,2)
2490 + 7.0/(2.0 * std::pow(y0,3))) * std::exp(-2.0*y0));
2494 efl = -1.0 * av*(1.0 - kv*i*i)*
a + as*(1.0 - ks*i*i)*b1 * std::pow(
a,(2.0/3.0)) + a0
2495 +
c1*z*z*b3/std::pow(
a,(1.0/3.0)) - c4*std::pow(z,(4.0/3.0))/std::pow(
a,(1.e0/3.e0))
2496 + ff*std::pow(z,2)/
a -ca*(
n-
z) - ael * std::pow(z,(2.39e0));
2498 if ((in == iz) && (
mod(in,2) == 1) && (
mod(iz,2) == 1)) {
2509 if ((
mod(in,2) == 1) && (
mod(iz,2) == 1)) {
2512 if (
mod(in,2) == 1) {
2515 if (
mod(iz,2) == 1) {
2522 eflmacResult = (0.5*(dn + dp) - 0.5*dpn);
2528 return eflmacResult;
2538 double para = 0.0, parz = 0.0;
2553 (*del) = -12.0/std::sqrt(a);
2556 (*del) = 12.0/std::sqrt(a);
2568 G4double n1 = 0.0, n2 = 0.0, n3 = 0.0;
2605 if (bet/(std::sqrt(2.0)*10.0*(homega/6.582122)) <= 1.0) {
2606 tauResult = std::log(10.0*ef/t)/(bet*1.0e21);
2609 tauResult = std::log(10.0*ef/t)/ (2.0*std::pow((10.0*homega/6.582122),2))*(bet*1.0e-21);
2621 G4double rel = bet/(20.0*homega/6.582122);
2622 G4double cramResult = std::sqrt(1.0 + std::pow(rel,2)) - rel;
2625 if (cramResult > 1.0) {
2647 const int bsbkSize = 54;
2649 G4double bk[bsbkSize] = {0.0, 1.00000,1.00087,1.00352,1.00799,1.01433,1.02265,1.03306,
2650 1.04576,1.06099,1.07910,1.10056,1.12603,1.15651,1.19348,
2651 1.23915,1.29590,1.35951,1.41013,1.44103,1.46026,1.47339,
2652 1.48308,1.49068,1.49692,1.50226,1.50694,1.51114,1.51502,
2653 1.51864,1.52208,1.52539,1.52861,1.53177,1.53490,1.53803,
2654 1.54117,1.54473,1.54762,1.55096,1.55440,1.55798,1.56173,
2655 1.56567,1.56980,1.57413,1.57860,1.58301,1.58688,1.58688,
2656 1.58688,1.58740,1.58740, 0.0};
2658 G4double bs[bsbkSize] = {0.0, 1.00000,1.00086,1.00338,1.00750,1.01319,
2659 1.02044,1.02927,1.03974,
2660 1.05195,1.06604,1.08224,1.10085,1.12229,1.14717,1.17623,1.20963,
2661 1.24296,1.26532,1.27619,1.28126,1.28362,1.28458,1.28477,1.28450,
2662 1.28394,1.28320,1.28235,1.28141,1.28042,1.27941,1.27837,1.27732,
2663 1.27627,1.27522,1.27418,1.27314,1.27210,1.27108,1.27006,1.26906,
2664 1.26806,1.26707,1.26610,1.26514,1.26418,1.26325,1.26233,1.26147,
2665 1.26147,1.26147,1.25992,1.25992, 0.0};
2667 i =
idint(y/(2.0e-02)) + 1;
2669 if((i + 1) >= bsbkSize) {
2670 if(verboseLevel > 2) {
2677 bipolResult = bs[i] + (bs[i+1] - bs[i])/2.0e-02 * (y - 2.0e-02*(i - 1));
2680 bipolResult = bk[i] + (bk[i+1] - bk[i])/2.0e-02 * (y - 2.0e-02*(i - 1));
2756 for(
G4int init_i = 0; init_i < 7; init_i++) {
2760 for(
G4int init_i = 0; init_i < 10; init_i++) {
2764 G4double a = 0.0,
z = 0.0, amin = 0.0, amax = 0.0, amin2 = 0.0;
2765 G4double amax2 = 0.0, aa = 0.0, zz = 0.0, bfis = 0.0;
2766 G4double bfis0 = 0.0, ell = 0.0, el = 0.0, egs = 0.0, el80 = 0.0, el20 = 0.0;
2767 G4double elmax = 0.0, sel80 = 0.0, sel20 = 0.0,
x = 0.0, y = 0.0, q = 0.0, qa = 0.0, qb = 0.0;
2768 G4double aj = 0.0, ak = 0.0, a1 = 0.0, a2 = 0.0;
2770 G4int i = 0, j = 0, k = 0,
m = 0;
2773 G4double emncof[4][5] = {{-9.01100e+2,-1.40818e+3, 2.77000e+3,-7.06695e+2, 8.89867e+2},
2774 {1.35355e+4,-2.03847e+4, 1.09384e+4,-4.86297e+3,-6.18603e+2},
2775 {-3.26367e+3, 1.62447e+3, 1.36856e+3, 1.31731e+3, 1.53372e+2},
2776 {7.48863e+3,-1.21581e+4, 5.50281e+3,-1.33630e+3, 5.05367e-2}};
2778 G4double elmcof[4][5] = {{1.84542e+3,-5.64002e+3, 5.66730e+3,-3.15150e+3, 9.54160e+2},
2779 {-2.24577e+3, 8.56133e+3,-9.67348e+3, 5.81744e+3,-1.86997e+3},
2780 {2.79772e+3,-8.73073e+3, 9.19706e+3,-4.91900e+3, 1.37283e+3},
2781 {-3.01866e+1, 1.41161e+3,-2.85919e+3, 2.13016e+3,-6.49072e+2}};
2783 G4double emxcof[4][6] = {{9.43596e4,-2.241997e5,2.223237e5,-1.324408e5,4.68922e4,-8.83568e3},
2784 {-1.655827e5,4.062365e5,-4.236128e5,2.66837e5,-9.93242e4,1.90644e4},
2785 {1.705447e5,-4.032e5,3.970312e5,-2.313704e5,7.81147e4,-1.322775e4},
2786 {-9.274555e4,2.278093e5,-2.422225e5,1.55431e5,-5.78742e4,9.97505e3}};
2788 G4double elzcof[7][7] = {{5.11819909e+5,-1.30303186e+6, 1.90119870e+6,-1.20628242e+6, 5.68208488e+5, 5.48346483e+4,-2.45883052e+4},
2789 {-1.13269453e+6, 2.97764590e+6,-4.54326326e+6, 3.00464870e+6, -1.44989274e+6,-1.02026610e+5, 6.27959815e+4},
2790 {1.37543304e+6,-3.65808988e+6, 5.47798999e+6,-3.78109283e+6, 1.84131765e+6, 1.53669695e+4,-6.96817834e+4},
2791 {-8.56559835e+5, 2.48872266e+6,-4.07349128e+6, 3.12835899e+6, -1.62394090e+6, 1.19797378e+5, 4.25737058e+4},
2792 {3.28723311e+5,-1.09892175e+6, 2.03997269e+6,-1.77185718e+6, 9.96051545e+5,-1.53305699e+5,-1.12982954e+4},
2793 {4.15850238e+4, 7.29653408e+4,-4.93776346e+5, 6.01254680e+5, -4.01308292e+5, 9.65968391e+4,-3.49596027e+3},
2794 {-1.82751044e+5, 3.91386300e+5,-3.03639248e+5, 1.15782417e+5, -4.24399280e+3,-6.11477247e+3, 3.66982647e+2}};
2796 const G4int sizex = 5;
2797 const G4int sizey = 6;
2798 const G4int sizez = 4;
2800 G4double egscof[sizey][sizey][sizez];
2802 G4double egs1[sizey][sizex] = {{1.927813e5, 7.666859e5, 6.628436e5, 1.586504e5,-7.786476e3},
2803 {-4.499687e5,-1.784644e6,-1.546968e6,-4.020658e5,-3.929522e3},
2804 {4.667741e5, 1.849838e6, 1.641313e6, 5.229787e5, 5.928137e4},
2805 {-3.017927e5,-1.206483e6,-1.124685e6,-4.478641e5,-8.682323e4},
2806 {1.226517e5, 5.015667e5, 5.032605e5, 2.404477e5, 5.603301e4},
2807 {-1.752824e4,-7.411621e4,-7.989019e4,-4.175486e4,-1.024194e4}};
2809 G4double egs2[sizey][sizex] = {{-6.459162e5,-2.903581e6,-3.048551e6,-1.004411e6,-6.558220e4},
2810 {1.469853e6, 6.564615e6, 6.843078e6, 2.280839e6, 1.802023e5},
2811 {-1.435116e6,-6.322470e6,-6.531834e6,-2.298744e6,-2.639612e5},
2812 {8.665296e5, 3.769159e6, 3.899685e6, 1.520520e6, 2.498728e5},
2813 {-3.302885e5,-1.429313e6,-1.512075e6,-6.744828e5,-1.398771e5},
2814 {4.958167e4, 2.178202e5, 2.400617e5, 1.167815e5, 2.663901e4}};
2816 G4double egs3[sizey][sizex] = {{3.117030e5, 1.195474e6, 9.036289e5, 6.876190e4,-6.814556e4},
2817 {-7.394913e5,-2.826468e6,-2.152757e6,-2.459553e5, 1.101414e5},
2818 {7.918994e5, 3.030439e6, 2.412611e6, 5.228065e5, 8.542465e3},
2819 {-5.421004e5,-2.102672e6,-1.813959e6,-6.251700e5,-1.184348e5},
2820 {2.370771e5, 9.459043e5, 9.026235e5, 4.116799e5, 1.001348e5},
2821 {-4.227664e4,-1.738756e5,-1.795906e5,-9.292141e4,-2.397528e4}};
2823 G4double egs4[sizey][sizex] = {{-1.072763e5,-5.973532e5,-6.151814e5, 7.371898e4, 1.255490e5},
2824 {2.298769e5, 1.265001e6, 1.252798e6,-2.306276e5,-2.845824e5},
2825 {-2.093664e5,-1.100874e6,-1.009313e6, 2.705945e5, 2.506562e5},
2826 {1.274613e5, 6.190307e5, 5.262822e5,-1.336039e5,-1.115865e5},
2827 {-5.715764e4,-2.560989e5,-2.228781e5,-3.222789e3, 1.575670e4},
2828 {1.189447e4, 5.161815e4, 4.870290e4, 1.266808e4, 2.069603e3}};
2830 for(i = 0; i < sizey; i++) {
2831 for(j = 0; j < sizex; j++) {
2836 egscof[i][j][0] = egs1[i][j];
2837 egscof[i][j][1] = egs2[i][j];
2838 egscof[i][j][2] = egs3[i][j];
2839 egscof[i][j][3] = egs4[i][j];
2844 if (iz < 19 || iz > 111) {
2848 if(iz > 102 && il > 0) {
2855 amin= 1.2e0*
z + 0.01e0*
z*
z;
2856 amax= 5.8e0*z - 0.024e0*z*
z;
2858 if(a < amin || a > amax) {
2870 for(i = 0; i < 7; i++) {
2871 for(j = 0; j < 7; j++) {
2872 bfis0=bfis0+elzcof[j][i]*pz[i]*pa[j];
2885 amin2 = 1.4e0*z + 0.009e0*z*
z;
2886 amax2 = 20.e0 + 3.0e0*
z;
2888 if((a < amin2-5.e0 || a > amax2+10.e0) && il > 0) {
2898 for(i = 0; i < 4; i++) {
2899 for(j = 0; j < 5; j++) {
2902 el80 = el80 + elmcof[i][j]*pz[j]*pa[i];
2903 el20 = el20 + emncof[i][j]*pz[j]*pa[i];
2914 for(i = 0; i < 4; i++) {
2915 for(j = 0; j < 6; j++) {
2918 elmax = elmax + emxcof[i][j]*pz[j]*pa[i];
2929 x = sel20/(*selmax);
2930 y = sel80/(*selmax);
2934 q = 0.2/(std::pow(sel20,2)*std::pow(sel80,2)*(sel20-sel80));
2935 qa = q*(4.0*std::pow(sel80,3) - std::pow(sel20,3));
2936 qb = -q*(4.0*std::pow(sel80,2) - std::pow(sel20,2));
2937 bfis = bfis*(1.0 + qa*std::pow(el,2) + qb*std::pow(el,3));
2941 aj = (-20.0*std::pow(
x,5) + 25.e0*std::pow(
x,4) - 4.0)*std::pow((y-1.0),2)*y*y;
2942 ak = (-20.0*std::pow(y,5) + 25.0*std::pow(y,4) - 1.0) * std::pow((
x-1.0),2)*
x*
x;
2943 q = 0.2/(std::pow((y-x)*((1.0-x)*(1.0-y)*x*y),2));
2944 qa = q*(aj*y - ak*
x);
2945 qb = -q*(aj*(2.0*y + 1.0) - ak*(2.0*x + 1.0));
2947 a1 = 4.0*std::pow(z,5) - 5.0*std::pow(z,4) + 1.0;
2948 a2 = qa*(2.e0*z + 1.e0);
2949 bfis=bfis*(a1 + (z - 1.e0)*(a2 + qb*z)*z*z*(z - 1.e0));
2956 if(el > (*selmax)) {
2962 if(el > (*selmax)) {
2966 for(k = 0; k < 4; k++) {
2967 for(l = 0; l < 6; l++) {
2968 for(
m = 0;
m < 5;
m++) {
2970 egs = egs + egscof[l][
m][k]*pz[l]*pa[k]*pl[2*
m];
3016 return (-1.0*T*std::log(
haz(k)));
3023 return (E*std::exp(-E));
3029 return (1.0 - (E + 1.0) * std::exp(-E));
3040 const int pSize = 101;
3058 for(i = 1; i <= 99; i++) {
3060 x1 = x - (
f(x) - double(i)/100.0)/
fd(x);
3062 if (std::fabs(
f(x) -
double(i)/100.0) < 1e-5) {
3087 x = (p[i] - p[i-1])*(y*100 - i) + p[i];
3104 if(ii <= 0 || jj < 0) {
3113 fpace2=pace->
dm[ii][jj];
3115 fpace2=fpace2/1000.;
3117 if(pace->
dm[ii][jj] == 0.) {
3122 guet(&a, &z, &fpace2);
3123 fpace2=fpace2-ii*931.5;
3124 fpace2=fpace2/1000.;
3143 const G4int qrows = 50;
3144 const G4int qcols = 70;
3146 for(
G4int init_i = 0; init_i < qrows; init_i++) {
3147 for(
G4int init_j = 0; init_j < qcols; init_j++) {
3148 q[init_i][init_j] = 0.0;
3189 G4double aux=1.+(9.*xjj/4./qq/x13);
3191 G4double ee4=avol*xx+asur*(std::pow(xx,.666))+ac*x13+azer;
3192 G4double tota = ee1 + ee2 + ee3 + ee4;
3193 find = 939.55*xneu+938.77*zz - tota;
3231 G4double avv = 0.0, zvv = 0.0, enerj = 0.0, plab = 0.0, tetlab = 0.0, philab = 0.0;
3232 G4double sitet = std::sqrt(std::pow(csrem[1],2)+std::pow(csrem[2],2));
3233 G4double cstet = 0.0, siphi = 0.0, csphi = 0.0;
3235 for(
G4int init_i = 0; init_i < 4; init_i++) {
3236 for(
G4int init_j = 0; init_j < 4; init_j++) {
3237 R[init_i][init_j] = 0.0;
3240 if(sitet > 1.0e-6) {
3242 siphi = csrem[2]/sitet;
3243 csphi = csrem[1]/sitet;
3245 R[1][1] = cstet*csphi;
3247 R[1][3] = sitet*csphi;
3248 R[2][1] = cstet*siphi;
3250 R[2][3] = sitet*siphi;
3274 for(
G4int init_i = 0; init_i < 4; init_i++) {
3275 plabi[init_i] = 0.0;
3276 plabf[init_i] = 0.0;
3279 for(
G4int i = ndec; i <= volant->
iv; i++) {
3280 if(volant->
copied[i])
continue;
3281 #ifdef USE_LEGACY_CODE
3285 if(verboseLevel > -1) {
3291 if(verboseLevel > 2) {
3295 #ifdef USE_LEGACY_CODE
3304 #ifdef USE_LEGACY_CODE
3305 if (varntp->
avv[intp] == -1) {
3314 mglms(
double(volant->
acv[i]),
double(volant->
zpcv[i]),0, &el);
3315 masse = volant->
zpcv[i]*938.27 + (volant->
acv[i] - volant->
zpcv[i])*939.56 + el;
3318 er = std::sqrt(std::pow(volant->
pcv[i],2) + std::pow(masse,2));
3319 plabi[1] = volant->
pcv[i]*(volant->
xcv[i]);
3320 plabi[2] = volant->
pcv[i]*(volant->
ycv[i]);
3321 plabi[3] = er*etrem + gamrem*(volant->
pcv[i])*(volant->
zcv[i]);
3323 ptrav2 = std::pow(plabi[1],2) + std::pow(plabi[2],2) + std::pow(plabi[3],2);
3324 #ifdef USE_LEGACY_CODE
3325 varntp->
plab[intp] = std::sqrt(ptrav2);
3327 plab = std::sqrt(ptrav2);
3329 #ifdef USE_LEGACY_CODE
3330 if(std::abs(varntp->
plab[intp] - 122.009) < 1.0e-3) {
3345 #ifdef USE_LEGACY_CODE
3346 varntp->
enerj[intp] = std::sqrt(ptrav2 + std::pow(masse,2)) - masse;
3348 enerj = std::sqrt(ptrav2 + std::pow(masse,2)) - masse;
3351 for(
G4int j = 1; j <= 3; j++) {
3353 for(
G4int k = 1; k <= 3; k++) {
3355 plabf[j] = plabf[j] + R[j][k]*plabi[k];
3359 #ifdef USE_LEGACY_CODE
3360 volant->
pcv[i] = varntp->
plab[intp];
3362 volant->
pcv[i] = plab;
3364 ptrav2 = std::sqrt(std::pow(plabf[1],2) + std::pow(plabf[2],2) + std::pow(plabf[3],2));
3365 if(ptrav2 >= 1.0e-6) {
3366 volant->
xcv[i] = plabf[1]/ptrav2;
3367 volant->
ycv[i] = plabf[2]/ptrav2;
3368 volant->
zcv[i] = plabf[3]/ptrav2;
3371 volant->
xcv[i] = 1.0;
3372 volant->
ycv[i] = 0.0;
3373 volant->
zcv[i] = 0.0;
3376 #ifdef USE_LEGACY_CODE
3377 if(varntp->
plab[intp] >= 1.0e-6) {
3379 if(plab >= 1.0e-6) {
3381 #ifdef USE_LEGACY_CODE
3382 bidon = plabf[3]/(varntp->
plab[intp]);
3384 bidon = plabf[3]/plab;
3392 #ifdef USE_LEGACY_CODE
3393 varntp->
tetlab[intp] = std::acos(bidon);
3394 sitet = std::sin(varntp->
tetlab[intp]);
3395 varntp->
philab[intp] = std::atan2(plabf[2],plabf[1]);
3396 varntp->
tetlab[intp] = varntp->
tetlab[intp]*57.2957795;
3397 varntp->
philab[intp] = varntp->
philab[intp]*57.2957795;
3399 tetlab = std::acos(bidon);
3400 sitet = std::sin(tetlab);
3401 philab = std::atan2(plabf[2],plabf[1]);
3402 tetlab = tetlab*57.2957795;
3403 philab = philab*57.2957795;
3407 #ifdef USE_LEGACY_CODE
3408 varntp->
tetlab[intp] = 90.0;
3409 varntp->
philab[intp] = 0.0;
3415 volant->
copied[i] =
true;
3416 #ifndef USE_LEGACY_CODE
3417 varntp->
addParticle(avv, zvv, enerj, plab, tetlab, philab);
3447 G4double sitet = std::sqrt(1.0 - std::pow(ctet1,2));
3451 for(
G4int init_i = 0; init_i < 4; init_i++) {
3452 plabi[init_i] = 0.0;
3453 plabf[init_i] = 0.0;
3457 plabi[1] = p1*sitet*std::cos(phi1);
3458 plabi[2] = p1*sitet*std::sin(phi1);
3459 plabi[3] = er*etrem + gamrem*p1*ctet1;
3462 for(
G4int j = 1; j <= 3; j++) {
3464 for(
G4int k = 1; k <= 3; k++) {
3465 plabf[j] = plabf[j] + R[j][k]*plabi[k];
3471 (*plab1) = std::pow(plabf[1],2) + std::pow(plabf[2],2) + std::pow(plabf[3],2);
3472 (*gam1) = std::sqrt(std::pow(masse1,2) + (*plab1))/masse1;
3473 (*plab1) = std::sqrt((*plab1));
3474 (*eta1) = (*plab1)/masse1;
3476 if((*plab1) <= 1.0e-6) {
3482 for(
G4int i = 1; i <= 3; i++) {
3483 csdir[i] = plabf[i]/(*plab1);
3500 (*eout) = gam*ein + eta*pin[3];
3501 pout[3] = eta*ein + gam*pin[3];
3511 for(
G4int i = 1; i <= 3; i++) {
3513 for(
G4int j = 1; j <= 3; j++) {
3514 pout[i] = pout[i] + R[i][j]*pin[j];
3522 const G4int pSize = 110;
3542 ix =
int(y * 100 + 43543000);
3543 if(
mod(ix,2) == 0) {
3554 for(
G4int iRandom = 0; iRandom < pSize; iRandom++) {
3560 if(nTries > 100)
break;
3561 }
while(p[iRandom] <= 0.0 || p[iRandom] >= 1.0);
3568 if(nTries > 100)
break;
3569 }
while(a <= 0.0 || a >= 1.0);
3581 if(nTries > 100)
break;
3582 }
while(a <= 0.0 || a >= 1.0);
3635 fractpart = std::modf(number, &intpart);
3640 if(fractpart < 0.5) {
3641 return int(std::floor(number));
3644 return int(std::ceil(number));
3648 if(fractpart < -0.5) {
3649 return int(std::floor(number));
3652 return int(std::ceil(number));
3656 return int(std::floor(number));
3665 mylocaltime = localtime(&mytime);
3668 return(mylocaltime->tm_hour*60*60 + mylocaltime->tm_min*60 + mylocaltime->tm_sec);
3690 value = double(std::ceil(a));
3693 value = double(std::floor(a));
3704 value =
int(std::ceil(a));
3707 value =
int(std::floor(a));
3715 if(value > 0.0)
return (
int (std::ceil(value)));
3716 else return (
int (std::floor(value)));
3721 if(a < b && a < c) {
3724 if(b < a && b < c) {
3727 if(c < a && c < b) {
void parite(G4double n, G4double *par)
G4double eflmac(G4int ia, G4int iz, G4int flag, G4int optshp)
void setVerboseLevel(G4int level)
static c2_factory< G4double > c2
G4Abla(G4Volant *aVolant, G4VarNtp *aVarntp)
void lorab(G4double gam, G4double eta, G4double ein, G4double pin[], G4double *eout, G4double pout[])
G4int nint(G4double number)
G4double dm[PACESIZEROWS][PACESIZECOLS]
G4double utilabs(G4double a)
std::vector< ExP01TrackerHit * > a
G4double plab[VARNTPSIZE]
void setVerboseLevel(G4int level)
void translabpf(G4double masse1, G4double t1, G4double p1, G4double ctet1, G4double phi1, G4double gamrem, G4double etrem, G4double R[][4], G4double *plab1, G4double *gam1, G4double *eta1, G4double csdir[])
void mglms(G4double a, G4double z, G4int refopt4, G4double *el)
static constexpr double pc
G4bool copied[VOLANTSIZE]
G4double fmaxhaz(G4double T)
void lpoly(G4double x, G4int n, G4double pl[])
G4double fissility(int a, int z, int optxfis)
G4double cram(G4double bet, G4double homega)
G4double getVgsld(G4int A, G4int Z)
G4double getAlpha(G4int A, G4int Z)
G4double vgsld[ECLDROWS][ECLDCOLS]
void direct(G4double zprf, G4double a, G4double ee, G4double jprf, G4double *probp_par, G4double *probn_par, G4double *proba_par, G4double *probf_par, G4double *ptotl_par, G4double *sn_par, G4double *sbp_par, G4double *sba_par, G4double *ecn_par, G4double *ecp_par, G4double *eca_par, G4double *bp_par, G4double *ba_par, G4int, G4int inum, G4int itest)
G4double ecnz[EC2SUBROWS][EC2SUBCOLS]
G4double enerj[VARNTPSIZE]
void mglw(G4double a, G4double z, G4double *el)
G4int mod(G4int a, G4int b)
void evapora(G4double zprf, G4double aprf, G4double *ee_par, G4double jprf, G4double *zf_par, G4double *af_par, G4double *mtota_par, G4double *pleva_par, G4double *pxeva_par, G4double *pyeva_par, G4int *ff_par, G4int *inttype_par, G4int *inum_par)
void densniv(G4double a, G4double z, G4double ee, G4double esous, G4double *dens, G4double bshell, G4double bs, G4double bk, G4double *temp, G4int optshp, G4int optcol, G4double defbet)
G4double spdef(G4int a, G4int z, G4int optxfis)
void breakItUp(G4int nucleusA, G4int nucleusZ, G4double nucleusMass, G4double excitationEnergy, G4double angularMomentum, G4double recoilEnergy, G4double momX, G4double momY, G4double momZ, G4int eventnumber)
static constexpr double m
const XML_Char int const XML_Char * value
G4double zpcv[VOLANTSIZE]
G4double alpha[ECLDROWS][ECLDCOLS]
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
G4int idnint(G4double value)
G4double tetlab[VARNTPSIZE]
G4int itypcasc[VARNTPSIZE]
G4double bipol(int iflag, G4double y)
void translab(G4double gamrem, G4double etrem, G4double csrem[4], G4int nopart, G4int ndec)
G4double efa[FBCOLS][FBROWS]
G4double dmin1(G4double a, G4double b, G4double c)
G4double pace2(G4double a, G4double z)
G4double ecgnz[ECLDROWS][ECLDCOLS]
G4int max(G4int a, G4int b)
G4double tau(G4double bet, G4double homega, G4double ef, G4double t)
G4double ecfnz[ECLDROWS][ECLDCOLS]
G4double bfms67(G4double zms, G4double ams)
G4double philab[VARNTPSIZE]
static constexpr double pi
void guet(G4double *x_par, G4double *z_par, G4double *find_par)
void addParticle(G4double A, G4double Z, G4double E, G4double P, G4double theta, G4double phi)
G4double expohaz(G4int k, G4double T)
G4double getEcnz(G4int A, G4int Z)
virtual void doFission(G4double &A, G4double &Z, G4double &E, G4double &A1, G4double &Z1, G4double &E1, G4double &K1, G4double &A2, G4double &Z2, G4double &E2, G4double &K2)=0
void barfit(G4int iz, G4int ia, G4int il, G4double *sbfis, G4double *segs, G4double *selmax)
void appariem(G4double a, G4double z, G4double *del)
void qrot(G4double z, G4double a, G4double bet, G4double sig, G4double u, G4double *qr)
G4int min(G4int a, G4int b)
void rotab(G4double R[4][4], G4double pin[4], G4double pout[4])
G4double dint(G4double a)
G4double getPace2(G4int A, G4int Z)