34 #define INCLXX_IN_GEANT4_MODE 1
51 const G4double xrat=ekin*oneOverThreshold;
72 s11pzHC(-2.228000000000294018,8.7560000000005723725,-0.61000000000023239325,-5.4139999999999780324,3.3338333333333348023,-0.75835000000000022049,0.060623611111111114688),
73 s01ppHC(2.0570000000126518344,-6.029000000012135826,36.768500000002462784,-45.275666666666553533,25.112666666666611953,-7.2174166666666639187,1.0478875000000000275,-0.060804365079365080846),
74 s01pzHC(0.18030000000000441851,7.8700999999999953598,-4.0548999999999990425,0.555199999999999959),
75 s11pmHC(0.20590000000000031866,3.3450999999999993936,-1.4401999999999997825,0.17076666666666664973),
76 s12pmHC(-0.77235999999999901328,4.2626599999999991117,-1.9008899999999997323,0.30192266666666663379,-0.012270833333333331986),
77 s12ppHC(-0.75724999999999975664,2.0934399999999998565,-0.3803099999999999814),
78 s12zzHC(-0.89599999999996965072,7.882999999999978632,-7.1049999999999961928,1.884333333333333089),
79 s02pzHC(-1.0579999999999967036,11.113999999999994089,-8.5259999999999990196,2.0051666666666666525),
80 s02pmHC(2.4009000000012553286,-7.7680000000013376183,20.619000000000433505,-16.429666666666723928,5.2525708333333363472,-0.58969166666666670206),
81 s12mzHC(-0.21858699999999976269,1.9148999999999999722,-0.31727500000000001065,-0.027695000000000000486)
104 return 34.*std::pow(plab/0.4, (-2.104));
106 else if (plab < 0.800) {
107 return 23.5+1000.*std::pow(plab-0.7, 4);
109 else if (plab <= 2.0) {
110 return 1250./(50.+plab)-4.*std::pow(plab-1.3, 2);
113 return 77./(plab+1.5);
129 sigma = 6.3555*std::exp(-3.2481*alp-0.377*alp*alp);
131 else if (plab < 0.851) {
132 sigma = 33.+196.*std::pow(std::fabs(plab-0.95),2.5);
134 else if (plab <= 2.0) {
135 sigma = 31./std::sqrt(plab);
138 sigma = 77./(plab+1.5);
146 return 34.*std::pow(plab/0.4, (-2.104));
148 else if (plab < 0.8067) {
149 return 23.5+1000.*std::pow(plab-0.7, 4);
151 else if (plab <= 2.0) {
152 return 1250./(50.+plab)-4.*std::pow(plab-1.3, 2);
154 else if (plab <= 3.0956) {
155 return 77./(plab+1.5);
159 return 11.2+25.5*std::pow(plab, -1.12)+0.151*std::pow(alp, 2)-1.62*alp;
191 return 6.3555*std::exp(-3.2481*alp-0.377*std::pow(alp, 2));
193 else if (plab < 1.0) {
194 return 33.+196.*std::sqrt(std::pow(std::fabs(plab-0.95),5));
196 else if (plab < 1.924) {
197 return 24.2+8.9*plab;
201 return 48.9-33.7*std::pow(plab, -3.08)+0.619*std::pow(alp, 2)-5.12*alp;
206 return 34.*std::pow(plab/0.4, (-2.104));
208 else if (plab < 0.8734) {
209 return 23.5+1000.*std::pow(plab-0.7, 4);
211 else if (plab < 1.5) {
212 return 23.5+24.6/(1.+std::exp(-10.*(plab-1.2)));
214 else if (plab < 3.0044) {
215 return 41.+60.*(plab-0.9)*std::exp(-1.2*plab);
219 return 45.6+219.*std::pow(plab, -4.23)+0.41*std::pow(alp, 2)-3.41*alp;
230 if(s>=4074595.287720512986) {
237 if(s>=4074595.287720512986) {
244 if (sincl < 0.) sincl = 0.;
271 if ((iso != 0) && (plab < 2.1989)) {
272 snnpit = xsiso -
NNTwoPi(ener, iso, xsiso);
273 if (snnpit < 1.
e-8) snnpit=0.;
276 else if ((iso == 0) && (plab < 1.7369)) {
278 if (snnpit < 1.
e-8) snnpit=0.;
284 s11pz=55.185/std::pow((0.1412*plab+5),2);
286 else if (plab > 13.9) {
288 s11pz=6.67-13.3*std::pow(plab, -6.18)+0.456*alp*alp-3.29*alp;
290 else if (plab >= 0.7765) {
295 if (plab >= 0.79624) {
302 if (snnpit1 < 1.
e-8) snnpit1=0.;
309 s01pz=15289.4/std::pow((11.573*plab+5),2);
311 else if (plab >= 0.777) {
317 s11pm=46.68/std::pow((0.2231*plab+5),2);
319 else if (plab >= 0.788) {
326 snnpit = 2*(s01pz+2*s11pm)-snnpit1;
327 if (snnpit < 1.
e-8) snnpit=0.;
354 if (iso==0 && plab<3.33) {
356 if (snn2pit < 1.
e-8) snn2pit=0.;
365 else if (plab >= 1.3817) {
371 s12pp=141.505/std::pow((-0.1016*plab-7),2);
373 else if (plab >= 1.5739) {
380 s12zz=97.355/std::pow((1.1579*plab+5),2);
382 else if (plab >= 1.72207) {
388 s02pz=178.082/std::pow((0.2014*plab+5),2);
390 else if (plab >= 1.5656) {
397 snn2pit=s12pm+s12pp+s12zz+s02pz;
398 if (snn2pit < 1.
e-8) snn2pit=0.;
404 s02pm=135.826/std::pow(plab,2);
406 else if (plab >= 1.21925) {
411 if (plab >= 1.29269) {
418 snn2pit=3*(s02pm+0.5*s12mz-0.5*s02pz-s12zz);
419 if (snn2pit < 1.
e-8) snn2pit=0.;
433 return 46.72/std::pow((plab - 5.8821),2);
436 snn3pit=xsiso-xs1pi-xs2pi;
437 if (snn3pit < 1.
e-8) snn3pit=0.;
444 return 5592.92/std::pow((plab+14.9764),2);
446 else if (plab > 2.1989){
447 snn3pit=xsiso-xs1pi-xs2pi;
448 if (snn3pit < 1.
e-8) snn3pit=0.;
493 return NNTwoPi(ener, 2, xsiso2);
515 return NNThreePi(ener, 2, xsiso2, xs1pi2, xs2pi2);
520 return 0.5*(
NNThreePi(ener, 0, xsiso0, xs1pi0, xs2pi0)+
NNThreePi(ener, 2, xsiso2, xs1pi2, xs2pi2));
529 return ((sigma>1.
e-9) ? sigma : 0.);
540 return NNOnePi(particle1, particle2);
542 return NNTwoPi(particle1, particle2);
546 return NNFourPi(particle1, particle2);
559 q2=(y-std::pow(1076.0, 2))*(y-std::pow(800.0, 2))/(4.0*y);
564 sdel=326.5/(std::pow((x-1215.0-ramass)*2.0/110.0,2)+1.0);
565 return sdel*f3*(1.0-5.0*ramass/1215.0);
572 return -2.33730e-06*std::pow(x, 3)+1.13819e-02*std::pow(x,2)
573 -1.83993e+01*x+9893.4;
574 }
else if (x <= 2150.0) {
575 return 1.13531e-06*std::pow(x, 3)-6.91694e-03*std::pow(x, 2)
576 +1.39907e+01*x-9360.76;
578 return -3.18087*std::log(x)+52.9784;
589 q2=(y-std::pow(1076.0, 2))*(y-std::pow(800.0, 2))/(4.0*y);
594 sdel=326.5/(std::pow((x-1215.0-ramass)*2.0/110.0,2)+1.0);
595 return sdel*f3*(1.0-5.0*ramass/1215.0)/3.;
602 return 0.00120683*(x-1372.52)*(x-1372.52)+26.2058;
603 }
else if(x <= 1578.0) {
604 return 1.15873e-05*x*x+49965.6/((x-1519.59)*(x-1519.59)+2372.55);
605 }
else if(x <= 2028.4) {
606 return 34.0248+43262.2/((x-1681.65)*(x-1681.65)+1689.35);
607 }
else if(x <= 7500.0) {
608 return 3.3e-7*(x-7500.0)*(x-7500.0)+24.5;
617 return NNTot(p1, p2);
628 return inelastic +
elastic(p1, p2);
649 if(pLab>212677. || pLab<296.367)
654 const G4int cg = 4 + ind2t3*ipit3;
676 return 0.5*(xpipp+xpimp);
683 if(x>20000.)
return 0.0;
692 }
else if(particle2->
isPion()) {
698 const G4double q2=(y-1076.0*1076.0)*(y-800.0*800.0)/y/4.0;
702 const G4double q3 = std::pow(std::sqrt(q2),3);
704 G4double sdelResult = 326.5/(std::pow((x-1215.0-ramass)*2.0/(110.0-ramass), 2)+1.0);
705 sdelResult = sdelResult*(1.0-5.0*ramass/1215.0);
706 const G4int cg = 4 + ind2t3*ipit3;
707 sdelResult = sdelResult*f3*cg/6.0;
729 }
else if(particle2->
isPion()) {
737 if((ind2t3 == 1 && ipit3 == 2) || (ind2t3 == -1 && ipit3 == -2))
739 else if((ind2t3 == 1 && ipit3 == -2) || (ind2t3 == -1 && ipit3 == 2))
751 if(isospin==4 || isospin==-4)
return 0.0;
765 if(Ecm <= 938.3 + deltaMass) {
769 if(Ecm < 938.3 + deltaMass + 2.0) {
770 Ecm = 938.3 + deltaMass + 2.0;
788 G4double result = 0.5 * x * y * sDelta;
793 result *= 3.*(32.0 + isospin * isospin * (deltaIsospin * deltaIsospin - 5))/64.0;
794 result /= 1.0 + 0.25 * (isospin * isospin);
831 return 5.5e-6 * x/(7.7 +
x);
833 return (5.34 + 0.67*(x - 2.0)) * 1.0
e-6;
838 return b/(1.0 + std::exp(-(x - 0.45)/0.05));
839 }
else if(pl < 1100.0) {
840 return (9.87 - 4.88 * x) * 1.0e-6;
842 return (3.68 + 0.76*x) * 1.0e-6;
867 if (OnePi < 1.
e-09) OnePi = 0.;
872 if (TwoPi < 1.
e-09) TwoPi = 0.;
877 if (piNThreePi < 1.
e-09 || plab < 2000.) piNThreePi = 0.;
903 const G4int cg = 4 + ind2*ipi;
915 if(tamp6 >= elas && pLab < 410.) tamp6 = elas;
922 if (tamp2 < 0.0) tamp2=0;
929 if(s1pin >= elas && pLab < 410.) s1pin = 0.;
930 if (s1pin > inelastic)
962 const G4int cg = 4 + ind2*ipi;
972 if(tamp6 >= elas && pLab < 410.) tamp6 = 0.;
982 const G4double s2pin=0.5*(tamp6+tamp2);
1004 if(pLab>212677. || pLab<296.367)
1018 xpipp=17.965*std::pow(p1, 5.4606);
1020 xpipp=24.3-12.3*std::pow(p1, -1.91)+0.324*p2*p2-2.44*p2;
1032 nucleon = particle1;
1036 nucleon = particle2;
1043 if(pLab>212677. || pLab<296.367)
1059 xpimp=26.6-7.18*std::pow(p1, -1.86)+0.327*p2*p2-2.81*p2;
1072 nucleon = particle1;
1076 nucleon = particle2;
1098 tamp6=0.204+18.2*std::pow(p1, -1.72)+6.33*std::pow(p1, -1.13);
1109 nucleon = particle1;
1113 nucleon = particle2;
1135 tamp2=9.04*std::pow(p1, -1.17)+18.*std::pow(p1, -1.21);
1136 if (tamp2 < 0.0) tamp2=0;
1151 nucleon = particle1;
1155 nucleon = particle2;
1177 tamp6=1.59+25.5*std::pow(p1, -1.04);
1192 nucleon = particle1;
1196 nucleon = particle2;
1218 tamp2=2.457794117647+18.066176470588*std::pow(p1, -0.92);