33 #define INCLXX_IN_GEANT4_MODE 1
72 if(x>10000.)
return 0.0;
80 }
else if(particle2->
isPion()) {
91 G4double q2=(y-1076.0*1076.0)*(y-800.0*800.0)/y/4.0;
95 G4double q3 = std::pow(std::sqrt(q2),3);
97 G4double spnResult = 326.5/(std::pow((x-1215.0-ramass)*2.0/(110.0-ramass), 2)+1.0);
98 spnResult = spnResult*(1.0-5.0*ramass/1215.0);
100 spnResult = spnResult*f3*cg/6.0;
102 if(x < 1200.0 && spnResult < 5.0) {
108 if((ind2t3 == 1 && ipit3 == 2) || (ind2t3 == -1 && ipit3 == -2))
109 spnResult=CrossSections::spnPiPlusPHE(x);
110 else if((ind2t3 == 1 && ipit3 == -2) || (ind2t3 == -1 && ipit3 == 2))
111 spnResult=CrossSections::spnPiMinusPHE(x);
112 else if(ipit3 == 0) spnResult = (CrossSections::spnPiPlusPHE(x) + CrossSections::spnPiMinusPHE(x))/2.0;
114 ERROR(
"Unknown configuration!" << std::endl);
124 return -2.33730e-06*std::pow(x, 3)+1.13819e-02*std::pow(x,2)
125 -1.83993e+01*x+9893.4;
126 }
else if(x > 1750.0 && x <= 2175.0) {
127 return 1.13531e-06*std::pow(x, 3)-6.91694e-03*std::pow(x, 2)
128 +1.39907e+01*x-9360.76;
130 return -3.18087*std::log(x)+52.9784;
137 return 0.00120683*(x-1372.52)*(x-1372.52)+26.2058;
138 }
else if(x > 1475.0 && x <= 1565.0) {
139 return 1.15873e-05*x*x+49965.6/((x-1519.59)*(x-1519.59)+2372.55);
140 }
else if(x > 1565.0 && x <= 2400.0) {
141 return 34.0248+43262.2/((x-1681.65)*(x-1681.65)+1689.35);
142 }
else if(x > 2400.0 && x <= 7500.0) {
143 return 3.3e-7*(x-7500.0)*(x-7500.0)+24.5;
151 if(isospin==4 || isospin==-4)
return 0.0;
165 if(Ecm <= 938.3 + deltaMass) {
169 if(Ecm < 938.3 + deltaMass + 2.0) {
170 Ecm = 938.3 + deltaMass + 2.0;
182 result *= 3.*(32.0 + isospin * isospin * (deltaIsospin * deltaIsospin - 5))/64.0;
183 result /= 1.0 + 0.25 * isospin * isospin;
203 const G4double momentumGeV = 0.001 * pLab;
208 if(isospin==2 || isospin==-2) {
210 xs = (41.0 + (60.0*momentumGeV - 54.0)*std::exp(-1.2*momentumGeV) - 77.0/(momentumGeV + 1.5));
211 }
else if(pLab >= 1500.0 && pLab < 2000.0) {
212 xs = (41.0 + 60.0*(momentumGeV - 0.9)*std::exp(-1.2*momentumGeV) - 1250.0/(momentumGeV+50.0)+ 4.0*std::pow(momentumGeV - 1.3, 2));
213 }
else if(pLab < 1500.0) {
214 xs = (23.5 + 24.6/(1.0 + std::exp(-10.0*momentumGeV + 12.0))
215 -1250.0/(momentumGeV +50.0)+4.0*std::pow(momentumGeV - 1.3,2));
217 }
else if(isospin==0) {
219 xs = (42.0 - 77.0/(momentumGeV + 1.5));
220 }
else if(pLab >= 1000.0 && pLab < 2000.0) {
221 xs = (24.2 + 8.9*momentumGeV - 31.1/std::sqrt(momentumGeV));
222 }
else if(pLab < 1000.0) {
223 xs = (33.0 + 196.0*std::sqrt(std::pow(std::abs(momentumGeV - 0.95),5))
224 -31.1/std::sqrt(momentumGeV));
228 if(xs < 0.0)
return 0.0;
233 return 77.0/(momentum + 1.5);
237 if(momentum < 0.450) {
238 const G4double alp = std::log(momentum);
239 return 6.3555*std::exp(-3.2481*alp-0.377*alp*alp);
240 }
else if(momentum >= 0.450 && momentum < 0.8) {
241 return (33.0 + 196.0 * std::sqrt(std::pow(std::abs(momentum - 0.95), 5)));
242 }
else if(momentum > 2.0) {
243 return CrossSections::elasticNNHighEnergy(momentum);
245 return 31.0/std::sqrt(momentum);
249 G4double CrossSections::elasticProtonProtonOrNeutronNeutron(
const G4double momentum)
251 if(momentum < 0.440) {
252 return 34.0*std::pow(momentum/0.4, -2.104);
253 }
else if(momentum < 0.8 && momentum >= 0.440) {
254 return (23.5 + 1000.0*std::pow(momentum-0.7, 4));
255 }
else if(momentum < 2.0) {
256 return (1250.0/(50.0 + momentum) - 4.0*std::pow(momentum-1.3, 2));
258 return CrossSections::elasticNNHighEnergy(momentum);
262 G4double CrossSections::elasticNN(Particle
const *
const p1, Particle
const *
const p2) {
265 if((p1->getType() ==
Proton && p2->getType() ==
Proton) ||
267 return CrossSections::elasticProtonProtonOrNeutronNeutron(momentum);
268 }
else if((p1->getType() ==
Proton && p2->getType() ==
Neutron) ||
270 return CrossSections::elasticProtonNeutron(momentum);
272 ERROR(
"G4INCL::CrossSections::elasticNN: Bad input!" << std::endl
273 << p1->print() << p2->print() << std::endl);
278 G4double CrossSections::elasticNNLegacy(Particle
const *
const part1, Particle
const *
const part2) {
297 if(plab > 2000.)
goto sel13;
298 if(part1->isNucleon() && part2->isNucleon())
302 sel1:
if (i == 0)
goto sel2;
303 sel3:
if (plab < 800.)
goto sel4;
304 if (plab > 2000.)
goto sel13;
305 sel=(1250./(50.+p1)-4.*std::pow(p1-1.3, 2))*scale;
308 sel4:
if (plab < 440.) {
309 sel=34.*std::pow(p1/0.4, (-2.104))*
scale;
311 sel=(23.5+1000.*std::pow(p1-0.7, 4))*scale;
315 sel13: sel=77./(p1+1.5)*
scale;
318 sel2:
if (plab < 800.)
goto sel11;
319 if (plab > 2000.)
goto sel13;
320 sel=31./std::sqrt(p1)*
scale;
323 sel11:
if (plab < 450.) {
325 sel=6.3555*std::exp(-3.2481*alp-0.377*alp*alp)*
scale;
327 sel=(33.+196.*std::sqrt(std::pow(std::abs(p1-0.95),5)))*scale;
336 return elasticNNLegacy(p1, p2);
346 return 5.5e-6 * x/(7.7 +
x);
348 return (5.34 + 0.67*(x - 2.0)) * 1.0
e-6;
353 return b/(1.0 + std::exp(-(x - 0.45)/0.05));
354 }
else if(pl < 1100.0) {
355 return (9.87 - 4.88 * x) * 1.0e-6;
357 return (3.68 + 0.76*x) * 1.0e-6;
368 protonProjectile.
setEnergy(protonProjectile.
getMass()+projectileKineticEnergy);
371 neutronProjectile.
setEnergy(neutronProjectile.
getMass()+projectileKineticEnergy);
376 const G4double sigmapp =
total(&protonProjectile, &protonTarget);
377 const G4double sigmapn =
total(&protonProjectile, &neutronTarget);
378 const G4double sigmanp =
total(&neutronProjectile, &protonTarget);
379 const G4double sigmann =
total(&neutronProjectile, &neutronTarget);
385 const G4double largestSigma = std::max(sigmapp, std::max(sigmapn, std::max(sigmanp,sigmann)));
388 return interactionDistance;
396 piPlusProjectile.
setEnergy(piPlusProjectile.
getMass()+projectileKineticEnergy);
399 piZeroProjectile.
setEnergy(piZeroProjectile.
getMass()+projectileKineticEnergy);
402 piMinusProjectile.
setEnergy(piMinusProjectile.
getMass()+projectileKineticEnergy);
407 const G4double sigmapipp =
total(&piPlusProjectile, &protonTarget);
408 const G4double sigmapipn =
total(&piPlusProjectile, &neutronTarget);
409 const G4double sigmapi0p =
total(&piZeroProjectile, &protonTarget);
410 const G4double sigmapi0n =
total(&piZeroProjectile, &neutronTarget);
411 const G4double sigmapimp =
total(&piMinusProjectile, &protonTarget);
412 const G4double sigmapimn =
total(&piMinusProjectile, &neutronTarget);
418 const G4double largestSigma = std::max(sigmapipp, std::max(sigmapipn, std::max(sigmapi0p, std::max(sigmapi0n, std::max(sigmapimp,sigmapimn)))));
421 return interactionDistance;