10 #include "Pythia8/SigmaTotal.h"
22 const double SigmaTotAux::ALPHAEM = 0.00729353;
25 const double SigmaTotAux::CONVERTEL = 0.0510925;
28 const double SigmaTotAux::MPROTON = 0.9382720;
29 const double SigmaTotAux::SPROTON = 0.8803544;
30 const double SigmaTotAux::MPION = 0.1349766;
31 const double SigmaTotAux::SPION = 0.0182187;
32 const double SigmaTotAux::GAMMAEUL = 0.577215665;
35 const double SigmaTotAux::TABSREF = 2e-3;
38 const int SigmaTotAux::NPOINTS = 1000;
39 const double SigmaTotAux::TABSMAX = 1.;
40 const double SigmaTotAux::MINSLOPEEL = 10.;
46 bool SigmaTotAux::initCoulomb(Settings& settings,
47 ParticleData* particleDataPtrIn) {
50 particleDataPtr = particleDataPtrIn,
53 tryCoulomb = settings.flag(
"SigmaElastic:Coulomb");
54 rhoOwn = settings.parm(
"SigmaElastic:rho");
55 tAbsMin = settings.parm(
"SigmaElastic:tAbsMin");
56 lambda = settings.parm(
"SigmaElastic:lambda");
57 phaseCst = settings.parm(
"SigmaElastic:phaseConst");
67 bool SigmaTotAux::addCoulomb() {
75 int iChA = particleDataPtr->chargeType(idA);
76 int iChB = particleDataPtr->chargeType(idB);
78 if (iChA * iChB > 0) chgSgn = 1.;
79 if (iChA * iChB < 0) chgSgn = -1.;
82 if (!tryCoulomb || iChA * iChB == 0)
return false;
85 sigElCou = sigEl * exp( - bEl * tAbsMin);
86 if (tAbsMin < 0.9 * TABSMAX) {
91 double xRel, tAbs, form2, phase;
92 for (
int i = 0; i < NPOINTS; ++i) {
93 xRel = (i + 0.5) / NPOINTS;
94 tAbs = tAbsMin * TABSMAX / (tAbsMin + xRel * (TABSMAX - tAbsMin));
97 form2 = pow4(lambda/(lambda + tAbs));
98 sigCou += pow2(form2);
99 phase = chgSgn * ALPHAEM * (-phaseCst - log(0.5 * bEl * tAbs));
100 sigInt += form2 * exp(-0.5 * bEl * tAbs) * tAbs
101 * (rhoOwn * cos(phase) + sin(phase));
105 sigCou *= pow2(ALPHAEM) / (4. * CONVERTEL * tAbsMin) ;
106 sigInt *= - chgSgn * ALPHAEM * sigTot / tAbsMin;
107 sigElCou += (sigCou + sigInt) / NPOINTS;
110 sigTotCou = sigTot - sigEl + sigElCou;
121 double SigmaTotAux::dsigmaElCoulomb(
double t) {
124 double form2 = pow4(lambda/(lambda - t));
125 double phase = chgSgn * ALPHAEM * (-phaseCst - log(-0.5 * bEl * t));
126 return pow2(chgSgn * ALPHAEM * form2) / (4. * CONVERTEL * t*t)
127 - chgSgn * ALPHAEM * form2 * sigTot * exp(0.5 * bEl * t)
128 * (rhoOwn * cos(phase) + sin(phase)) / (-t);
143 const double SigmaTotal::MMIN = 2.;
149 void SigmaTotal::init() {
152 modeTotEl = mode(
"SigmaTotal:mode");
153 modeDiff = mode(
"SigmaDiffractive:mode");
161 bool SigmaTotal::calc(
int idA,
int idB,
double eCM) {
164 isCalc = ispp =
false;
171 int idModA = (idAbsA < 100 || idAbsA > 1000) ? idAbsA : 10 * (idAbsA/10) + 3;
172 int idModB = (idAbsB < 100 || idAbsB > 1000) ? idAbsB : 10 * (idAbsB/10) + 3;
173 if (idAbsA == 22) idModA = 113;
174 if (idAbsB == 22) idModB = 113;
175 if (idAbsA == 990) idModA = idAbsA;
176 if (idAbsB == 990) idModB = idAbsB;
177 double mA = particleDataPtr->m0(idModA);
178 double mB = particleDataPtr->m0(idModB);
179 if (eCM < mA + mB + MMIN) {
180 infoPtr->errorMsg(
"Error in SigmaTotal::calc: too low energy");
186 modeTotElNow = modeTotEl;
187 modeDiffNow = modeDiff;
188 if (idAbsA == 2112) idAbsA = 2212;
189 if (idAbsB == 2112) idAbsB = 2212;
190 if (idAbsA != 2212 || idAbsB != 2212) {
191 modeTotElNow = min(1, modeTotEl);
192 modeDiffNow = min(1, modeDiff);
194 ispp = (idAbsA == 2212 && idAbsB == 2212 && idA * idB > 0);
197 if (sigTotElPtr)
delete sigTotElPtr;
198 if (modeTotElNow == 0) sigTotElPtr =
new SigmaTotOwn();
199 else if (modeTotElNow == 1) sigTotElPtr =
new SigmaSaSDL();
200 else if (modeTotElNow == 2) sigTotElPtr =
new SigmaMBR();
201 else if (modeTotElNow == 3) sigTotElPtr =
new SigmaABMST();
202 else sigTotElPtr =
new SigmaRPP();
205 sigTotElPtr->init(infoPtr);
206 if ( !sigTotElPtr->calcTotEl( idA, idB, s, mA, mB) )
return false;
209 if (sigDiffPtr)
delete sigDiffPtr;
210 if (modeDiffNow == 0) sigDiffPtr =
new SigmaTotOwn();
211 else if (modeDiffNow == 1) sigDiffPtr =
new SigmaSaSDL();
212 else if (modeDiffNow == 2) sigDiffPtr =
new SigmaMBR();
213 else sigDiffPtr =
new SigmaABMST();
216 sigDiffPtr->init(infoPtr);
217 if ( !sigDiffPtr->calcDiff( idA, idB, s, mA, mB) )
return false;
220 double sigTotTmp = sigTotElPtr->sigTot;
221 sigND = sigTotTmp - sigTotElPtr->sigEl - sigDiffPtr->sigXB
222 - sigDiffPtr->sigAX - sigDiffPtr->sigXX - sigDiffPtr->sigAXB;
224 infoPtr->errorMsg(
"Error in SigmaTotal::init: sigND < 0");
226 }
else if (sigND < 0.4 * sigTotTmp) infoPtr->errorMsg(
"Warning in "
227 "SigmaTotal::init: sigND suspiciously low");
239 void SigmaTotal::chooseVMDstates(
int idA,
int idB,
double eCM,
243 double gammaFac[4] = {2.2, 23.6, 18.4, 11.5};
244 double alphaEM = 0.00729353;
245 double idVMD[4] = {113, 223, 333, 443};
246 double pVP[4] = {0.};
247 double pVV[4][4] = {{0.}};
252 pair<int, int> idAB = make_pair(idA, idB);
255 if (idA == 22 && idB == 22) {
256 for (
int i = 0; i < nVMD; ++i)
257 for (
int j = 0; j < nVMD; ++j) {
259 calc(idVMD[i], idVMD[j], eCM);
260 pVV[i][j] = pow2(alphaEM) / (gammaFac[i] * gammaFac[j]);
261 if (processCode == 101) pVV[i][j] *= sigmaND();
262 else if (processCode == 102) pVV[i][j] *= sigmaEl();
263 else if (processCode == 103) pVV[i][j] *= sigmaXB();
264 else if (processCode == 104) pVV[i][j] *= sigmaAX();
265 else if (processCode == 105) pVV[i][j] *= sigmaXX();
270 double pickMode = rndmPtr->flat() * pSum;
271 bool pairFound =
false;
272 for (
int i = 0; i < nVMD; ++i) {
273 for (
int j = 0; j < nVMD; ++j) {
274 pickMode -= pVV[i][j];
276 idAB = make_pair(113 + 110 * i, 113 + 110 * j);
281 if (pairFound)
break;
285 }
else if (idA == 22 && idB == 2212) {
286 for (
int i = 0; i < nVMD; ++i) {
288 calc(idVMD[i], 2212, eCM);
289 pVP[i] = alphaEM / gammaFac[i];
290 if (processCode == 101) pVP[i] *= sigmaND();
291 else if (processCode == 102) pVP[i] *= sigmaEl();
292 else if (processCode == 103) pVP[i] *= sigmaXB();
293 else if (processCode == 104) pVP[i] *= sigmaAX();
294 else if (processCode == 105) pVP[i] *= sigmaXX();
299 double pickMode = rndmPtr->flat() * pSum;
300 for (
int i = 0; i < nVMD; ++i){
303 idAB = make_pair(113 + 110 * i, 2212);
309 }
else if (idA == 2212 && idB == 22) {
310 for (
int i = 0; i < nVMD; ++i) {
312 calc(2212, idVMD[i], eCM);
313 pVP[i] = alphaEM / gammaFac[i];
314 if (processCode == 101) pVP[i] *= sigmaND();
315 else if (processCode == 102) pVP[i] *= sigmaEl();
316 else if (processCode == 103) pVP[i] *= sigmaXB();
317 else if (processCode == 104) pVP[i] *= sigmaAX();
318 else if (processCode == 105) pVP[i] *= sigmaXX();
323 double pickMode = rndmPtr->flat() * pSum;
324 for (
int i = 0; i < nVMD; ++i){
327 idAB = make_pair(2212, 113 + 110 * i);
337 if (idAB.first == 113 || idAB.first == 223 || idAB.first == 333
338 || idAB.first == 443) {
339 double mA = particleDataPtr->mSel(idAB.first);
340 double scA = alphaEM / gammaFac[idAB.first/100 - 1];
341 infoPtr->setVMDstateA(
true, idAB.first, mA, scA);
343 if (idAB.second == 113 || idAB.second == 223 || idAB.second == 333
344 || idAB.second == 443) {
345 double mB = particleDataPtr->mSel(idAB.second);
346 double scB = alphaEM / gammaFac[idAB.second/100 - 1];
347 infoPtr->setVMDstateB(
true, idAB.second, mB, scB);
361 void SigmaTotOwn::init(Info* infoPtrIn) {
364 Settings& settings = *infoPtrIn->settingsPtr;
367 sigTot = settings.parm(
"SigmaTotal:sigmaTot");
368 sigEl = settings.parm(
"SigmaTotal:sigmaEl");
369 bEl = settings.parm(
"SigmaElastic:bSlope");
372 initCoulomb( settings, infoPtrIn->particleDataPtr);
375 sigXB = settings.parm(
"SigmaTotal:sigmaXB");
376 sigAX = settings.parm(
"SigmaTotal:sigmaAX");
377 sigXX = settings.parm(
"SigmaTotal:sigmaXX");
378 sigAXB = settings.parm(
"SigmaTotal:sigmaAXB");
381 pomFlux = settings.mode(
"SigmaDiffractive:PomFlux");
384 a0 = 1. + settings.parm(
"SigmaDiffractive:PomFluxEpsilon");
385 ap = settings.parm(
"SigmaDiffractive:PomFluxAlphaPrime");
392 }
else if (pomFlux == 2) {
399 }
else if (pomFlux == 3) {
403 }
else if (pomFlux == 4) {
412 }
else if (pomFlux == 5) {
417 a0 = 1. + settings.parm(
"SigmaDiffractive:MBRepsilon");
418 ap = settings.parm(
"SigmaDiffractive:MBRalpha");
421 }
else if (pomFlux == 6 || pomFlux == 7) {
424 a0 = (pomFlux == 6) ? 1.1182 : 1.1110;
428 bMinDD = settings.parm(
"SigmaDiffractive:OwnbMinDD");
429 dampenGap = settings.flag(
"SigmaDiffractive:OwndampenGap");
430 ygap = settings.parm(
"SigmaDiffractive:Ownygap");
431 ypow = settings.parm(
"SigmaDiffractive:Ownypow");
432 expPygap = exp(ypow * ygap);
433 mMinCDnow = settings.parm(
"SigmaDiffractive:OwnmMinCD");
441 bool SigmaTotOwn::calcTotEl(
int idAin,
int idBin,
double ,
double ,
double) {
460 double SigmaTotOwn::dsigmaEl(
double t,
bool useCoulomb,
bool ) {
463 double dsig = CONVERTEL * pow2(sigTot) * (1. + pow2(rhoOwn)) * exp(bEl * t);
466 if (useCoulomb && hasCou) dsig += dsigmaElCoulomb(t);
478 double SigmaTotOwn::dsigmaSD(
double xi,
double t,
bool ,
int ) {
486 b = 2. * b0 + 2. * ap * yNow;
490 }
else if (pomFlux == 2) {
491 wtNow = A1 * exp(a1 * t) + A2 * exp(a2 * t);
494 }
else if (pomFlux == 3) {
495 b = a1 + 2. * ap * yNow;
496 wtNow = pow( xi, 2. - 2. * a0) * exp(b * t);
499 }
else if (pomFlux == 4) {
501 wtNow = pow( xi, 2. - 2. * a0) * ( A1 * exp((Q + a1) * t)
502 + A2 * exp((Q + a2) * t) + A3 * exp((Q + a3) * t) );
505 }
else if (pomFlux == 5) {
507 wtNow = pow( xi, 2. - 2. * a0)
508 * (A1 * exp((Q + a1) * t) + A2 * exp((Q + a2) * t) );
511 }
else if (pomFlux == 6 || pomFlux == 7) {
512 b = b0 + 2. * ap * yNow;
513 wtNow = pow( xi, 2. - 2. * a0) * exp(b * t);
516 if (dampenGap) wtNow /= 1. + expPygap * pow( xi, ypow);
528 double SigmaTotOwn::dsigmaDD(
double xi1,
double xi2,
double t,
int ) {
532 yNow = - log(xi1 * xi2 * s / SPROTON);
536 b = max( bMinDD, 2. * ap * yNow);
540 }
else if (pomFlux == 2) {
541 wtNow = A1 * exp(a1 * t) + A2 * exp(a2 * t);
544 }
else if (pomFlux == 3) {
545 b = max( bMinDD, 2. * ap * yNow);
546 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * exp(b * t);
549 }
else if (pomFlux == 4) {
550 Q = max( bMinDD, 2. * ap * yNow);
551 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * exp(Q * t);
554 }
else if (pomFlux == 5) {
555 Q = max( bMinDD, 2. * ap * yNow);
556 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * exp(Q * t);
559 }
else if (pomFlux == 6 || pomFlux == 7) {
560 b = max( bMinDD, 2. * ap * yNow);
561 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * exp(b * t);
565 if (dampenGap) wtNow /= 1. + expPygap * pow( xi1 * xi2 * s / SPROTON, ypow);
577 double SigmaTotOwn::dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
587 b1 = 2. * b0 + 2. * ap * yNow1;
588 b2 = 2. * b0 + 2. * ap * yNow2;
589 wtNow = exp(b1 * t1 + b2 * t2);
592 }
else if (pomFlux == 2) {
593 wtNow = (A1 * exp(a1 * t1) + A2 * exp(a2 * t1))
594 * (A1 * exp(a1 * t2) + A2 * exp(a2 * t2));
597 }
else if (pomFlux == 3) {
598 b1 = a1 + 2. * ap * yNow1;
599 b2 = a1 + 2. * ap * yNow2;
600 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * exp(b1 * t1 + b2 * t2);
603 }
else if (pomFlux == 4) {
604 Q1 = 2. * ap * yNow1;
605 Q2 = 2. * ap * yNow2;
606 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * ( A1 * exp((Q1 + a1) * t1)
607 + A2 * exp((Q1 + a2) * t1) + A3 * exp((Q1 + a3) * t1) )
608 * ( A1 * exp((Q2 + a1) * t2) + A2 * exp((Q2 + a2) * t2)
609 + A3 * exp((Q2 + a3) * t2) );
612 }
else if (pomFlux == 5) {
613 Q1 = 2. * ap * yNow1;
614 Q2 = 2. * ap * yNow2;
615 wtNow = pow( xi1 * xi2, 2. - 2. * a0)
616 * (A1 * exp((Q1 + a1) * t1) + A2 * exp((Q1 + a2) * t1) )
617 * (A1 * exp((Q2 + a1) * t2) + A2 * exp((Q2 + a2) * t2) );
620 }
else if (pomFlux == 6 || pomFlux == 7) {
621 b1 = b0 + 2. * ap * yNow1;
622 b2 = b0 + 2. * ap * yNow2;
623 wtNow = pow( xi1 * xi2, 2. - 2. * a0) * exp(b1 * t1 + b2 * t2);
627 if (dampenGap) wtNow /= (1. + expPygap * pow( xi1, ypow))
628 * (1. + expPygap * pow( xi2, ypow));
665 const double SigmaSaSDL::EPSILON = 0.0808;
666 const double SigmaSaSDL::ETA = -0.4525;
667 const double SigmaSaSDL::X[] = { 21.70, 21.70, 13.63, 13.63, 13.63,
668 10.01, 0.970, 8.56, 6.29, 0.609, 4.62, 0.447, 0.0434, 67.7e-3, 211e-6};
669 const double SigmaSaSDL::Y[] = { 56.08, 98.39, 27.56, 36.02, 31.79,
670 1.51, -0.146, 13.08, -0.62, -0.060, 0.030, -0.0028, 0.00028, 129e-3,
675 const int SigmaSaSDL::IHADATABLE[] = { 0, 0, 1, 1, 1, 2, 3, 1, 1,
677 const int SigmaSaSDL::IHADBTABLE[] = { 0, 0, 0, 0, 0, 0, 0, 1, 2,
682 const double SigmaSaSDL::BETA0[] = { 4.658, 2.926, 2.149, 0.208};
683 const double SigmaSaSDL::BHAD[] = { 2.3, 1.4, 1.4, 0.23};
686 const double SigmaSaSDL::ALPHAPRIME = 0.25;
690 const double SigmaSaSDL::CONVERTSD = 0.0336;
691 const double SigmaSaSDL::CONVERTDD = 0.0084;
695 const int SigmaSaSDL::NVMD = 4;
696 const double SigmaSaSDL::GAMMAFAC[4] = {2.2, 23.6, 18.4, 11.5};
697 const double SigmaSaSDL::VMDMASS[4] = {0.77549, 0.78265, 1.01946,
701 const int SigmaSaSDL::ISDTABLE[] = { 0, 0, 1, 1, 1, 2, 3, 4, 5,
703 const double SigmaSaSDL::CSD[10][8] = {
704 { 0.213, 0.0, -0.47, 150., 0.213, 0.0, -0.47, 150., } ,
705 { 0.213, 0.0, -0.47, 150., 0.267, 0.0, -0.47, 100., } ,
706 { 0.213, 0.0, -0.47, 150., 0.232, 0.0, -0.47, 110., } ,
707 { 0.213, 7.0, -0.55, 800., 0.115, 0.0, -0.47, 110., } ,
708 { 0.267, 0.0, -0.46, 75., 0.267, 0.0, -0.46, 75., } ,
709 { 0.232, 0.0, -0.46, 85., 0.267, 0.0, -0.48, 100., } ,
710 { 0.115, 0.0, -0.50, 90., 0.267, 6.0, -0.56, 420., } ,
711 { 0.232, 0.0, -0.48, 110., 0.232, 0.0, -0.48, 110., } ,
712 { 0.115, 0.0, -0.52, 120., 0.232, 6.0, -0.56, 470., } ,
713 { 0.115, 5.5, -0.58, 570., 0.115, 5.5, -0.58, 570. } };
716 const int SigmaSaSDL::IDDTABLE[] = { 0, 0, 1, 1, 1, 2, 3, 4, 5,
718 const double SigmaSaSDL::CDD[10][9] = {
719 { 3.11, -7.34, 9.71, 0.068, -0.42, 1.31, -1.37, 35.0, 118., } ,
720 { 3.11, -7.10, 10.6, 0.073, -0.41, 1.17, -1.41, 31.6, 95., } ,
721 { 3.12, -7.43, 9.21, 0.067, -0.44, 1.41, -1.35, 36.5, 132., } ,
722 { 3.13, -8.18, -4.20, 0.056, -0.71, 3.12, -1.12, 55.2, 1298., } ,
723 { 3.11, -6.90, 11.4, 0.078, -0.40, 1.05, -1.40, 28.4, 78., } ,
724 { 3.11, -7.13, 10.0, 0.071, -0.41, 1.23, -1.34, 33.1, 105., } ,
725 { 3.12, -7.90, -1.49, 0.054, -0.64, 2.72, -1.13, 53.1, 995., } ,
726 { 3.11, -7.39, 8.22, 0.065, -0.44, 1.45, -1.36, 38.1, 148., } ,
727 { 3.18, -8.95, -3.37, 0.057, -0.76, 3.32, -1.12, 55.6, 1472., } ,
728 { 4.18, -29.2, 56.2, 0.074, -1.36, 6.67, -1.14, 116.2, 6532. } };
734 void SigmaSaSDL::init(Info* infoPtrIn) {
740 Settings& settings = *infoPtrIn->settingsPtr;
743 initCoulomb( settings, infoPtrIn->particleDataPtr);
746 doDampen = settings.flag(
"SigmaDiffractive:dampen");
747 maxXBOwn = settings.parm(
"SigmaDiffractive:maxXB");
748 maxAXOwn = settings.parm(
"SigmaDiffractive:maxAX");
749 maxXXOwn = settings.parm(
"SigmaDiffractive:maxXX");
750 maxAXBOwn = settings.parm(
"SigmaDiffractive:maxAXB");
753 epsSaS = settings.parm(
"SigmaDiffractive:SaSepsilon");
754 sigmaPomP = settings.parm(
"Diffraction:sigmaRefPomP");
755 mPomP = settings.parm(
"Diffraction:mRefPomP");
756 pPomP = settings.parm(
"Diffraction:mPowPomP");
757 zeroAXB = settings.flag(
"SigmaTotal:zeroAXB");
758 sigAXB2TeV = settings.parm(
"SigmaTotal:sigmaAXB2TeV");
762 mMin0 = settings.parm(
"SigmaDiffractive:mMin");
763 cRes = settings.parm(
"SigmaDiffractive:lowMEnhance");
764 mRes0 = settings.parm(
"SigmaDiffractive:mResMax");
765 mMinCDnow = settings.parm(
"SigmaDiffractive:mMinCD");
768 alP2 = 2. * ALPHAPRIME;
769 s0 = 1. / ALPHAPRIME;
777 bool SigmaSaSDL::calcTotEl(
int idAin,
int idBin,
double sIn,
double mAin,
785 if (!findBeamComb( idA, idB, mAin, mBin))
return false;
786 double sEps = pow( s, EPSILON);
787 double sEta = pow( s, ETA);
791 sigTot = X[iProc] * sEps + Y[iProc] * sEta;
794 bEl = 2. * bA + 2. * bB + 4. * sEps - 4.2;
795 sigEl = CONVERTEL * pow2(sigTot) * (1. + pow2(rhoOwn)) / bEl;
798 }
else if (iProc == 13){
799 sigTot = X[iProc] * sEps + Y[iProc] * sEta;
800 double sigElNow = 0.;
803 for (
int iA = 0; iA < NVMD; ++iA){
804 double bANow = BHAD[iHadAtmp[iA]];
805 double bBNow = BHAD[iHadBtmp[iA]];
806 double bElNow = 2. * bANow + 2. * bBNow + 4. * sEps - 4.2;
807 double tmpTot = X[iProcVP[iA]] * sEps
808 + Y[iProcVP[iA]] * sEta;
809 sigElNow += multVP[iA] * CONVERTEL * pow2(tmpTot)
810 * (1. + pow2(rhoOwn)) / bElNow;
815 }
else if (iProc == 14){
816 sigTot = X[iProc] * sEps + Y[iProc] * sEta;
817 double sigElNow = 0.;
820 for (
int iA = 0; iA < NVMD; ++iA)
821 for (
int iB = 0; iB < NVMD; ++iB) {
822 double bANow = BHAD[iHadAtmp[iA]];
823 double bBNow = BHAD[iHadBtmp[iB]];
824 double bElNow = 2. * bANow + 2. * bBNow + 4. * sEps - 4.2;
825 double tmpTot = X[iProcVV[iA][iB]] * sEps
826 + Y[iProcVV[iA][iB]] * sEta;
827 sigElNow += multVV[iA][iB] * CONVERTEL * pow2(tmpTot)
828 * (1. + pow2(rhoOwn)) / bElNow;
833 }
else if (iProc == 15) {
834 sigTot = sigmaPomP * pow( sqrt(s) / mPomP, pPomP);
850 double SigmaSaSDL::dsigmaEl(
double t,
bool useCoulomb,
bool ) {
855 dsig = CONVERTEL * pow2(sigTot) * (1. + pow2(rhoOwn)) * exp(bEl * t);
858 }
else if (iProc == 13) {
859 double sEps = pow( s, EPSILON);
860 double sEta = pow( s, ETA);
862 for (
int iA = 0; iA < NVMD; ++iA){
864 double bANow = BHAD[iHadAtmp[iA]];
865 double bBNow = BHAD[iHadBtmp[iA]];
866 double bElNow = 2. * bANow + 2. * bBNow + 4. * sEps - 4.2;
867 double tmpTot = X[iProcVP[iA]] * sEps
868 + Y[iProcVP[iA]] * sEta;
870 dsigNow += multVP[iA] * CONVERTEL * pow2(tmpTot)
871 * (1. + pow2(rhoOwn)) * exp(bElNow * t);
876 }
else if (iProc == 14) {
877 double sEps = pow( s, EPSILON);
878 double sEta = pow( s, ETA);
880 for (
int iA = 0; iA < NVMD; ++iA)
881 for (
int iB = 0; iB < NVMD; ++iB){
883 double bANow = BHAD[iHadAtmp[iA]];
884 double bBNow = BHAD[iHadBtmp[iB]];
885 double bElNow = 2. * bANow + 2. * bBNow + 4. * sEps - 4.2;
886 double tmpTot = X[iProcVV[iA][iB]] * sEps
887 + Y[iProcVV[iA][iB]] * sEta;
889 dsigNow += multVV[iA][iB] * CONVERTEL * pow2(tmpTot)
890 * (1. + pow2(rhoOwn)) * exp(bElNow * t);
898 if (useCoulomb && hasCou) dsig += dsigmaElCoulomb(t);
909 bool SigmaSaSDL::calcDiff(
int idAin,
int idBin,
double sIn,
double mAin,
918 if (!findBeamComb( idAin, idBin, mAin, mBin))
return false;
919 sigXB = sigAX = sigXX = sigAXB = 0.;
924 int iSD = ISDTABLE[iProc];
925 int iDD = IDDTABLE[iProc];
926 double eCM = sqrt(s);
927 double sum1, sum2, sum3, sum4;
931 double sMinXB = pow2(mMinXB);
933 sResXB = pow2(mResXB);
934 double sRMavgXB = mResXB * mMinXB;
935 double sRMlogXB = log(1. + sResXB/sMinXB);
936 double sMaxXB = CSD[iSD][0] * s + CSD[iSD][1];
937 double BcorrXB = CSD[iSD][2] + CSD[iSD][3] / s;
938 sum1 = log( (2.*bB + alP2 * log(s/sMinXB))
939 / (2.*bB + alP2 * log(s/sMaxXB)) ) / alP2;
940 sum2 = cRes * sRMlogXB / (2.*bB + alP2 * log(s/sRMavgXB) + BcorrXB) ;
941 sigXB = CONVERTSD * X[iProc] * BETA0[iHadB] * max( 0., sum1 + sum2);
945 double sMinAX = pow2(mMinAX);
947 sResAX = pow2(mResAX);
948 double sRMavgAX = mResAX * mMinAX;
949 double sRMlogAX = log(1. + sResAX/sMinAX);
950 double sMaxAX = CSD[iSD][4] * s + CSD[iSD][5];
951 double BcorrAX = CSD[iSD][6] + CSD[iSD][7] / s;
952 sum1 = log( (2.*bA + alP2 * log(s/sMinAX))
953 / (2.*bA + alP2 * log(s/sMaxAX)) ) / alP2;
954 sum2 = cRes * sRMlogAX / (2.*bA + alP2 * log(s/sRMavgAX) + BcorrAX) ;
955 sigAX = CONVERTSD * X[iProc] * BETA0[iHadA] * max( 0., sum1 + sum2);
961 swap( mMinXB, mMinAX);
962 swap( mResXB, mResAX);
967 double y0min = log( s * SPROTON / (sMinXB * sMinAX) ) ;
968 double sLog = log(s);
969 double Delta0 = CDD[iDD][0] + CDD[iDD][1] / sLog
970 + CDD[iDD][2] / pow2(sLog);
971 sum1 = (y0min * (log( max( 1e-10, y0min/Delta0) ) - 1.) + Delta0)/ alP2;
972 if (y0min < 0.) sum1 = 0.;
973 double sMaxXX = s * ( CDD[iDD][3] + CDD[iDD][4] / sLog
974 + CDD[iDD][5] / pow2(sLog) );
975 double sLogUp = log( max( 1.1, s * s0 / (sMinXB * sRMavgAX) ));
976 double sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgAX) ));
977 sum2 = cRes * log( sLogUp / sLogDn ) * sRMlogAX / alP2;
978 sLogUp = log( max( 1.1, s * s0 / (sMinAX * sRMavgXB) ));
979 sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgXB) ));
980 sum3 = cRes * log(sLogUp / sLogDn) * sRMlogXB / alP2;
981 double BcorrXX = CDD[iDD][6] + CDD[iDD][7] / eCM + CDD[iDD][8] / s;
982 sum4 = pow2(cRes) * sRMlogAX * sRMlogXB
983 / max( 0.1, alP2 * log( s * s0 / (sRMavgAX * sRMavgXB) ) + BcorrXX);
984 sigXX = CONVERTDD * X[iProc] * max( 0., sum1 + sum2 + sum3 + sum4);
988 if ( (idAbsA == 2212 || idAbsA == 2112)
989 && (idAbsB == 2212 || idAbsB == 2112) && !zeroAXB) {
990 double sMinAXB = pow2(mMinAXB);
991 double sRefAXB = pow2(2000.);
992 sigAXB = sigAXB2TeV * pow( log(0.06 * s / sMinAXB), 1.5 )
993 / pow( log(0.06 * sRefAXB / sMinAXB), 1.5 );
998 sigXB = sigXB * maxXBOwn / (sigXB + maxXBOwn);
999 sigAX = sigAX * maxAXOwn / (sigAX + maxAXOwn);
1000 sigXX = sigXX * maxXXOwn / (sigXX + maxXXOwn);
1001 sigAXB = (maxAXBOwn > 0.) ? sigAXB * maxAXBOwn / (sigAXB + maxAXBOwn)
1006 }
else if (iProc == 13) {
1007 double sigAXNow = 0.;
1008 double sigXBNow = 0.;
1009 double sigXXNow = 0.;
1011 for (
int iA = 0; iA < NVMD; ++iA){
1014 int iSD = ISDTABLE[iProcVP[iA]];
1015 int iDD = IDDTABLE[iProcVP[iA]];
1016 double eCM = sqrt(s);
1017 double sum1, sum2, sum3, sum4;
1020 mMinXB = mAtmp[iA] + mMin0;
1021 double sMinXB = pow2(mMinXB);
1022 mResXB = mAtmp[iA] + mRes0;
1023 sResXB = pow2(mResXB);
1024 double sRMavgXB = mResXB * mMinXB;
1025 double sRMlogXB = log(1. + sResXB/sMinXB);
1026 double sMaxXB = CSD[iSD][0] * s + CSD[iSD][1];
1027 double BcorrXB = CSD[iSD][2] + CSD[iSD][3] / s;
1028 double bBNow = BHAD[iHadBtmp[iA]];
1029 sum1 = log( (2.*bBNow + alP2 * log(s/sMinXB))
1030 / (2.*bBNow + alP2 * log(s/sMaxXB)) ) / alP2;
1031 sum2 = cRes * sRMlogXB
1032 / (2.*bBNow + alP2 * log(s/sRMavgXB) + BcorrXB) ;
1033 sigXBNow += multVP[iA] * CONVERTSD * X[iProcVP[iA]]
1034 * BETA0[iHadBtmp[iA]] * max( 0., sum1 + sum2);
1037 mMinAX = mBtmp[iA] + mMin0;
1038 double sMinAX = pow2(mMinAX);
1039 mResAX = mBtmp[iA] + mRes0;
1040 sResAX = pow2(mResAX);
1041 double sRMavgAX = mResAX * mMinAX;
1042 double sRMlogAX = log(1. + sResAX/sMinAX);
1043 double sMaxAX = CSD[iSD][4] * s + CSD[iSD][5];
1044 double BcorrAX = CSD[iSD][6] + CSD[iSD][7] / s;
1045 double bANow = BHAD[iHadAtmp[iA]];
1046 sum1 = log( (2.*bANow + alP2 * log(s/sMinAX))
1047 / (2.*bANow + alP2 * log(s/sMaxAX)) ) / alP2;
1048 sum2 = cRes * sRMlogAX
1049 / (2.*bANow + alP2 * log(s/sRMavgAX) + BcorrAX) ;
1050 sigAXNow += multVP[iA] * CONVERTSD * X[iProcVP[iA]]
1051 * BETA0[iHadAtmp[iA]] * max( 0., sum1 + sum2);
1054 double y0min = log( s * SPROTON / (sMinXB * sMinAX) ) ;
1055 double sLog = log(s);
1056 double Delta0 = CDD[iDD][0] + CDD[iDD][1] / sLog
1057 + CDD[iDD][2] / pow2(sLog);
1058 sum1 = (y0min * (log( max( 1e-10, y0min/Delta0) ) - 1.) + Delta0)/ alP2;
1059 if (y0min < 0.) sum1 = 0.;
1060 double sMaxXX = s * ( CDD[iDD][3] + CDD[iDD][4] / sLog
1061 + CDD[iDD][5] / pow2(sLog) );
1062 double sLogUp = log( max( 1.1, s * s0 / (sMinXB * sRMavgAX) ));
1063 double sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgAX) ));
1064 sum2 = cRes * log( sLogUp / sLogDn ) * sRMlogAX / alP2;
1065 sLogUp = log( max( 1.1, s * s0 / (sMinAX * sRMavgXB) ));
1066 sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgXB) ));
1067 sum3 = cRes * log(sLogUp / sLogDn) * sRMlogXB / alP2;
1068 double BcorrXX = CDD[iDD][6] + CDD[iDD][7] / eCM + CDD[iDD][8] / s;
1069 sum4 = pow2(cRes) * sRMlogAX * sRMlogXB
1070 /max( 0.1, alP2 * log( s * s0 / (sRMavgAX * sRMavgXB) ) + BcorrXX);
1071 sigXXNow += multVP[iA] * CONVERTDD * X[iProcVP[iA]]
1072 * max( 0., sum1 + sum2 + sum3 + sum4);
1080 swap( sigXB, sigAX);
1081 swap( mMinXB, mMinAX);
1082 swap( mResXB, mResAX);
1083 swap( iHadA, iHadB);
1084 swap( sigXBNow, sigAXNow);
1085 for (
int i = 0; i < NVMD; ++i){
1086 swap( iHadAtmp[i], iHadBtmp[i]);
1087 swap( mAtmp[i], mBtmp[i]);
1093 sigXBNow = sigXBNow * maxXBOwn / (sigXBNow + maxXBOwn);
1094 sigAXNow = sigAXNow * maxAXOwn / (sigAXNow + maxAXOwn);
1095 sigXXNow = sigXXNow * maxXXOwn / (sigXXNow + maxXXOwn);
1103 }
else if (iProc == 14) {
1104 double sigAXNow = 0.;
1105 double sigXBNow = 0.;
1106 double sigXXNow = 0.;
1107 for (
int iA = 0; iA < NVMD; ++iA)
1108 for (
int iB = 0; iB < NVMD; ++iB){
1111 int iSD = ISDTABLE[iProcVV[iA][iB]];
1112 int iDD = IDDTABLE[iProcVV[iA][iB]];
1113 double eCM = sqrt(s);
1114 double sum1, sum2, sum3, sum4;
1117 mMinXB = mAtmp[iA] + mMin0;
1118 double sMinXB = pow2(mMinXB);
1119 mResXB = mAtmp[iA] + mRes0;
1120 sResXB = pow2(mResXB);
1121 double sRMavgXB = mResXB * mMinXB;
1122 double sRMlogXB = log(1. + sResXB/sMinXB);
1123 double sMaxXB = CSD[iSD][0] * s + CSD[iSD][1];
1124 double BcorrXB = CSD[iSD][2] + CSD[iSD][3] / s;
1125 double bBNow = BHAD[iHadBtmp[iB]];
1126 sum1 = log( (2.*bBNow + alP2 * log(s/sMinXB))
1127 / (2.*bBNow + alP2 * log(s/sMaxXB)) ) / alP2;
1128 sum2 = cRes * sRMlogXB
1129 / (2.*bBNow + alP2 * log(s/sRMavgXB) + BcorrXB) ;
1130 sigXBNow += multVV[iA][iB] * CONVERTSD * X[iProcVV[iA][iB]]
1131 * BETA0[iHadBtmp[iB]] * max( 0., sum1 + sum2);
1134 mMinAX = mBtmp[iB] + mMin0;
1135 double sMinAX = pow2(mMinAX);
1136 mResAX = mBtmp[iB] + mRes0;
1137 sResAX = pow2(mResAX);
1138 double sRMavgAX = mResAX * mMinAX;
1139 double sRMlogAX = log(1. + sResAX/sMinAX);
1140 double sMaxAX = CSD[iSD][4] * s + CSD[iSD][5];
1141 double BcorrAX = CSD[iSD][6] + CSD[iSD][7] / s;
1142 double bANow = BHAD[iHadAtmp[iA]];
1143 sum1 = log( (2.*bANow + alP2 * log(s/sMinAX))
1144 / (2.*bANow + alP2 * log(s/sMaxAX)) ) / alP2;
1145 sum2 = cRes * sRMlogAX
1146 / (2.*bANow + alP2 * log(s/sRMavgAX) + BcorrAX) ;
1147 sigAXNow += multVV[iA][iB] * CONVERTSD * X[iProcVV[iA][iB]]
1148 * BETA0[iHadAtmp[iA]] * max( 0., sum1 + sum2);
1151 double y0min = log( s * SPROTON / (sMinXB * sMinAX) ) ;
1152 double sLog = log(s);
1153 double Delta0 = CDD[iDD][0] + CDD[iDD][1] / sLog
1154 + CDD[iDD][2] / pow2(sLog);
1155 sum1 = (y0min * (log( max( 1e-10, y0min/Delta0) ) - 1.) + Delta0)/ alP2;
1156 if (y0min < 0.) sum1 = 0.;
1157 double sMaxXX = s * ( CDD[iDD][3] + CDD[iDD][4] / sLog
1158 + CDD[iDD][5] / pow2(sLog) );
1159 double sLogUp = log( max( 1.1, s * s0 / (sMinXB * sRMavgAX) ));
1160 double sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgAX) ));
1161 sum2 = cRes * log( sLogUp / sLogDn ) * sRMlogAX / alP2;
1162 sLogUp = log( max( 1.1, s * s0 / (sMinAX * sRMavgXB) ));
1163 sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgXB) ));
1164 sum3 = cRes * log(sLogUp / sLogDn) * sRMlogXB / alP2;
1165 double BcorrXX = CDD[iDD][6] + CDD[iDD][7] / eCM + CDD[iDD][8] / s;
1166 sum4 = pow2(cRes) * sRMlogAX * sRMlogXB
1167 /max( 0.1, alP2 * log( s * s0 / (sRMavgAX * sRMavgXB) ) + BcorrXX);
1168 sigXXNow += multVV[iA][iB] * CONVERTDD * X[iProcVV[iA][iB]]
1169 * max( 0., sum1 + sum2 + sum3 + sum4);
1176 sigXBNow = sigXBNow * maxXBOwn / (sigXBNow + maxXBOwn);
1177 sigAXNow = sigAXNow * maxAXOwn / (sigAXNow + maxAXOwn);
1178 sigXXNow = sigXXNow * maxXXOwn / (sigXXNow + maxXXOwn);
1186 }
else return false;
1197 double SigmaSaSDL::dsigmaSD(
double xi,
double t,
bool isXB,
int ) {
1200 double m2X = xi * s;
1201 double mX = sqrt(m2X);
1202 double epsWt = pow( m2X, -epsSaS);
1209 if (mX < mMinXB || pow2(mX + mMinAX) > s)
return 0.;
1212 double bXB = 2. * bB + alP2 * log(1. / xi) ;
1213 return CONVERTSD * X[iProc] * BETA0[iHadB] * exp(bXB * t) * (1. - xi)
1214 * ( 1. + cRes * sResXB / (sResXB + m2X) ) * epsWt;
1217 if (mX < mMinAX || pow2(mX + mMinXB) > s)
return 0.;
1220 double bAX = 2. * bA + alP2 * log(1. / xi) ;
1221 return CONVERTSD * X[iProc] * BETA0[iHadA] * exp(bAX * t) * (1. - xi)
1222 * ( 1. + cRes * sResAX / (sResAX + m2X) ) * epsWt;
1226 }
else if (iProc == 13) {
1228 for (
int iA = 0; iA < NVMD; ++iA){
1231 mMinXB = mAtmp[iA] + mMin0;
1232 mResXB = mAtmp[iA] + mRes0;
1233 sResXB = pow2(mResXB);
1234 mMinAX = mBtmp[iA] + mMin0;
1235 mResAX = mBtmp[iA] + mRes0;
1236 sResAX = pow2(mResAX);
1239 if (isXB && mX > mMinXB && pow2(mX + mMinAX) < s) {
1240 double bBNow = BHAD[iHadBtmp[iA]];
1241 double bXBNow = 2. * bBNow + alP2 * log(1. / xi) ;
1242 sigNow += multVP[iA] * CONVERTSD * X[iProcVP[iA]]
1243 * BETA0[iHadBtmp[iA]] * exp(bXBNow * t) * (1. - xi)
1244 * ( 1. + cRes * sResXB / (sResXB + m2X) );
1247 }
else if (!isXB && mX > mMinAX && pow2(mX + mMinXB) < s) {
1248 double bANow = BHAD[iHadAtmp[iA]];
1249 double bAXNow = 2. * bANow + alP2 * log(1. / xi) ;
1250 sigNow += multVP[iA] * CONVERTSD * X[iProcVP[iA]]
1251 * BETA0[iHadAtmp[iA]] * exp(bAXNow * t) * (1. - xi)
1252 * ( 1. + cRes * sResAX / (sResAX + m2X) );
1255 return sigNow * epsWt;
1258 }
else if (iProc == 14) {
1260 for (
int iA = 0; iA < NVMD; ++iA)
1261 for (
int iB = 0; iB < NVMD; ++iB){
1264 mMinXB = mAtmp[iA] + mMin0;
1265 mResXB = mAtmp[iA] + mRes0;
1266 sResXB = pow2(mResXB);
1267 mMinAX = mBtmp[iB] + mMin0;
1268 mResAX = mBtmp[iB] + mRes0;
1269 sResAX = pow2(mResAX);
1272 if (isXB && mX > mMinXB && pow2(mX + mMinAX) < s) {
1273 double bBNow = BHAD[iHadBtmp[iB]];
1274 double bXBNow = 2. * bBNow + alP2 * log(1. / xi) ;
1275 sigNow += multVV[iA][iB] * CONVERTSD * X[iProcVV[iA][iB]]
1276 * BETA0[iHadBtmp[iB]] * exp(bXBNow * t) * (1. - xi)
1277 * ( 1. + cRes * sResXB / (sResXB + m2X) );
1280 }
else if (!isXB && mX > mMinAX && pow2(mX + mMinXB) < s) {
1281 double bANow = BHAD[iHadAtmp[iA]];
1282 double bAXNow = 2. * bANow + alP2 * log(1. / xi) ;
1283 sigNow += multVV[iA][iB] * CONVERTSD * X[iProcVV[iA][iB]]
1284 * BETA0[iHadAtmp[iA]] * exp(bAXNow * t) * (1. - xi)
1285 * ( 1. + cRes * sResAX / (sResAX + m2X) );
1288 return sigNow * epsWt;
1299 double SigmaSaSDL::dsigmaDD(
double xi1,
double xi2,
double t,
int ) {
1302 double m2X1 = xi1 * s;
1303 double mX1 = sqrt(m2X1);
1304 double m2X2 = xi2 * s;
1305 double mX2 = sqrt(m2X2);
1306 double epsWt = pow( m2X1 * m2X2, -epsSaS);
1310 if (mX1 < mMinXB || mX2 < mMinAX)
return 0.;
1313 double bXX = alP2 * log( exp(4.) + s * s0 / (m2X1 * m2X2) );
1314 return CONVERTDD * BETA0[iHadA] * BETA0[iHadB] * exp(bXX * t)
1315 * (1. - pow2(mX1 + mX2) / s)
1316 * (s * SPROTON / (s * SPROTON + m2X1 * m2X2))
1317 * ( 1. + cRes * sResXB / (sResXB + m2X1) )
1318 * ( 1. + cRes * sResAX / (sResAX + m2X2) ) * epsWt;
1321 }
else if (iProc == 13){
1323 for (
int iA = 0; iA < NVMD; ++iA){
1326 mMinXB = mAtmp[iA] + mMin0;
1327 mResXB = mAtmp[iA] + mRes0;
1328 sResXB = pow2(mResXB);
1329 mMinAX = mBtmp[iA] + mMin0;
1330 mResAX = mBtmp[iA] + mRes0;
1331 sResAX = pow2(mResAX);
1334 if (mX1 > mMinXB && mX2 > mMinAX) {
1335 double bXX = alP2 * log( exp(4.) + s * s0 / (m2X1 * m2X2) );
1336 sigNow += multVP[iA] * CONVERTDD * BETA0[iHadAtmp[iA]]
1337 * BETA0[iHadBtmp[iA]] * exp(bXX * t)
1338 * (1. - pow2(mX1 + mX2) / s)
1339 * (s * SPROTON / (s * SPROTON + m2X1 * m2X2))
1340 * ( 1. + cRes * sResXB / (sResXB + m2X1) )
1341 * ( 1. + cRes * sResAX / (sResAX + m2X2) );
1344 return sigNow * epsWt;
1347 }
else if (iProc == 14){
1349 for (
int iA = 0; iA < NVMD; ++iA)
1350 for (
int iB = 0; iB < NVMD; ++iB){
1353 mMinXB = mAtmp[iA] + mMin0;
1354 mResXB = mAtmp[iA] + mRes0;
1355 sResXB = pow2(mResXB);
1356 mMinAX = mBtmp[iB] + mMin0;
1357 mResAX = mBtmp[iB] + mRes0;
1358 sResAX = pow2(mResAX);
1361 if (mX1 > mMinXB && mX2 > mMinAX) {
1362 double bXX = alP2 * log( exp(4.) + s * s0 / (m2X1 * m2X2) );
1363 sigNow += multVV[iA][iB] * CONVERTDD * BETA0[iHadAtmp[iA]]
1364 * BETA0[iHadBtmp[iB]] * exp(bXX * t)
1365 * (1. - pow2(mX1 + mX2) / s)
1366 * (s * SPROTON / (s * SPROTON + m2X1 * m2X2))
1367 * ( 1. + cRes * sResXB / (sResXB + m2X1) )
1368 * ( 1. + cRes * sResAX / (sResAX + m2X2) );
1371 return sigNow * epsWt;
1383 double SigmaSaSDL::dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
1390 double m2X = xi1 * xi2 * s;
1391 double mX = sqrt(m2X);
1392 if (mX < mMinCDnow || pow2(mX + mA + mB) > s)
return 0.;
1396 double bAX = 2. * bA + alP2 * log(1. / xi1) ;
1397 wtNow *= CONVERTSD * X[iProc] * BETA0[iHadA] * exp(bAX * t1)
1401 double bXB = 2. * bB + alP2 * log(1. / xi2) ;
1402 wtNow *= CONVERTSD * X[iProc] * BETA0[iHadB] * exp(bXB * t2)
1406 wtNow *= pow( m2X, -epsSaS);
1420 bool SigmaSaSDL::findBeamComb(
int idAin,
int idBin,
double mAin,
1424 idAbsA = abs(idAin);
1425 idAbsB = abs(idBin);
1429 if (idAbsA > idAbsB) {
1430 swap( idAbsA, idAbsB);
1434 sameSign = (idAin * idBin > 0);
1438 if (idAbsA > 1000) {
1439 iProc = (sameSign) ? 0 : 1;
1440 }
else if (idAbsA > 100 && idAbsB > 1000) {
1441 iProc = (sameSign) ? 2 : 3;
1442 if (idAbsA/10 == 11 || idAbsA/10 == 22) iProc = 4;
1443 if (idAbsA > 300) iProc = 5;
1444 if (idAbsA > 400) iProc = 6;
1445 if (idAbsA > 900) iProc = 15;
1446 }
else if (idAbsA > 100) {
1448 if (idAbsB > 300) iProc = 8;
1449 if (idAbsB > 400) iProc = 9;
1450 if (idAbsA > 300) iProc = 10;
1451 if (idAbsA > 300 && idAbsB > 400) iProc = 11;
1452 if (idAbsA > 400) iProc = 12;
1453 }
else if (idAbsA == 22 || idAbsB == 22) {
1454 if (idAbsA == idAbsB) iProc = 14;
1455 if (idAbsB > 1000) iProc = 13;
1457 if (iProc == -1)
return false;
1461 iHadA = IHADATABLE[iProc];
1462 iHadB = IHADBTABLE[iProc];
1467 }
else if (iProc == 13){
1468 for (
int i = 0; i < NVMD; ++i){
1470 mAtmp[i] = VMDMASS[i];
1472 iHadAtmp[i] = (i < 2) ? 1 : i;
1474 multVP[i] = ALPHAEM / GAMMAFAC[i];
1475 if (i < 2) iProcVP[i] = 4;
1476 else if (i == 2) iProcVP[i] = 5;
1477 else if (i == 3) iProcVP[i] = 6;
1481 }
else if (iProc == 14){
1482 for (
int i = 0; i < NVMD; ++i){
1483 mAtmp[i] = VMDMASS[i];
1484 mBtmp[i] = VMDMASS[i];
1485 iHadAtmp[i] = (i < 2) ? 1 : i;
1486 iHadBtmp[i] = (i < 2) ? 1 : i;
1487 for (
int j = 0; j < NVMD; ++j){
1488 multVV[i][j] = pow2(ALPHAEM) / (GAMMAFAC[i] * GAMMAFAC[j]);
1490 if ( j < 2) iProcVV[i][j] = 7;
1491 else if ( j == 2) iProcVV[i][j] = 8;
1492 else if ( j == 3) iProcVV[i][j] = 9;
1493 }
else if (i == 2) {
1494 if ( j < 2) iProcVV[i][j] = 8;
1495 else if ( j == 2) iProcVV[i][j] = 10;
1496 else if ( j == 3) iProcVV[i][j] = 11;
1497 }
else if ( i == 3) {
1498 if ( j < 2) iProcVV[i][j] = 9;
1499 else if ( j == 2) iProcVV[i][j] = 11;
1500 else if ( j == 3) iProcVV[i][j] = 12;
1518 const int SigmaMBR::NINTEG = 1000;
1519 const int SigmaMBR::NINTEG2 = 40;
1523 const double SigmaMBR::FFA1 = 0.9;
1524 const double SigmaMBR::FFA2 = 0.1;
1525 const double SigmaMBR::FFB1 = 4.6;
1526 const double SigmaMBR::FFB2 = 0.6;
1532 void SigmaMBR::init(Info* infoPtrIn) {
1535 Settings& settings = *infoPtrIn->settingsPtr;
1539 eps = settings.parm(
"SigmaDiffractive:MBRepsilon");
1540 alph = settings.parm(
"SigmaDiffractive:MBRalpha");
1541 beta0gev = settings.parm(
"SigmaDiffractive:MBRbeta0");
1542 beta0mb = beta0gev * sqrt(HBARCSQ);
1543 sigma0mb = settings.parm(
"SigmaDiffractive:MBRsigma0");
1544 sigma0gev = sigma0mb/HBARCSQ;
1545 m2min = settings.parm(
"SigmaDiffractive:MBRm2Min");
1546 dyminSDflux = settings.parm(
"SigmaDiffractive:MBRdyminSDflux");
1547 dyminDDflux = settings.parm(
"SigmaDiffractive:MBRdyminDDflux");
1548 dyminCDflux = settings.parm(
"SigmaDiffractive:MBRdyminCDflux");
1549 dyminSD = settings.parm(
"SigmaDiffractive:MBRdyminSD");
1550 dyminDD = settings.parm(
"SigmaDiffractive:MBRdyminDD");
1551 dyminCD = settings.parm(
"SigmaDiffractive:MBRdyminCD") / 2.;
1552 dyminSigSD = settings.parm(
"SigmaDiffractive:MBRdyminSigSD");
1553 dyminSigDD = settings.parm(
"SigmaDiffractive:MBRdyminSigDD");
1554 dyminSigCD = settings.parm(
"SigmaDiffractive:MBRdyminSigCD") / sqrt(2.);
1561 initCoulomb( settings, infoPtrIn->particleDataPtr);
1572 bool SigmaMBR::calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double) {
1581 double sCDF = pow2(1800.);
1584 double sign = (idA * idB > 0) ? 1. : -1.;
1585 sigTot = 16.79 * pow(s, 0.104) + 60.81 * pow(s, -0.32)
1586 - sign * 31.68 * pow(s, -0.54);
1587 ratio = 0.100 * pow(s, 0.06) + 0.421 * pow(s, -0.52)
1588 + sign * 0.160 * pow(s, -0.6);
1590 double sigCDF = 80.03;
1591 double sF = pow2(22.);
1592 sigTot = sigCDF + ( pow2( log(s / sF)) - pow2( log(sCDF / sF)) )
1593 * M_PI / (3.7 / HBARCSQ);
1594 ratio = 0.066 + 0.0119 * log(s);
1596 sigEl = sigTot * ratio;
1597 bEl = CONVERTEL * pow2(sigTot) / sigEl;
1611 double SigmaMBR::dsigmaEl(
double t,
bool useCoulomb,
bool ) {
1614 double dsig = sigEl * bEl * exp(bEl * t);
1617 if (useCoulomb && hasCou) dsig += dsigmaElCoulomb(t);
1629 bool SigmaMBR::calcDiff(
int ,
int ,
double sIn,
double ,
double ) {
1633 double cflux, csig, c1, step, f;
1637 double dymaxSD = log(s / m2min);
1638 cflux = pow2(beta0gev) / (16. * M_PI);
1639 csig = cflux * sigma0mb;
1644 step = (dymaxSD - dyminSDflux) / NINTEG;
1645 for (
int i = 0; i < NINTEG; ++i) {
1646 double dy = dyminSDflux + (i + 0.5) * step;
1647 f = exp(2. * eps * dy) * ( (a1 / (b1 + 2. * alph * dy))
1648 + (a2 / (b2 + 2. * alph * dy)) );
1649 f *= 0.5 * (1. + erf( (dy - dyminSD) / dyminSigSD));
1650 fluxsd = fluxsd + step * c1 * f;
1652 if (fluxsd < 1.) fluxsd = 1.;
1655 c1 = csig * pow(s, eps);
1658 step = (dymaxSD - dymin0) / NINTEG;
1659 for (
int i = 0; i < NINTEG; ++i) {
1660 double dy = dymin0 + (i + 0.5) * step;
1661 f = exp(eps * dy) * ( (a1 / (b1 + 2. * alph * dy))
1662 + (a2 / (b2 + 2. * alph * dy)) );
1663 f *= 0.5 * (1. + erf( (dy - dyminSD) / dyminSigSD));
1664 if (f > sdpmax) sdpmax = f;
1665 sigSD = sigSD + step * c1 * f;
1672 double dymaxDD = log(s / pow2(m2min));
1673 cflux = sigma0gev / (16. * M_PI);
1674 csig = cflux * sigma0mb;
1677 c1 = cflux / (2. * alph);
1679 step = (dymaxDD - dyminDDflux) / NINTEG;
1680 for (
int i = 0; i < NINTEG; ++i) {
1681 double dy = dyminDDflux + (i + 0.5) * step;
1682 f = (dymaxDD - dy) * exp(2. * eps * dy)
1683 * ( exp(-2. * alph * dy * exp(-dy))
1684 - exp(-2. * alph * dy * exp(dy)) ) / dy;
1685 f *= 0.5 * (1. + erf( (dy - dyminDD) / dyminSigDD));
1686 fluxdd = fluxdd + step * c1 * f;
1688 if (fluxdd < 1.) fluxdd = 1.;
1691 c1 = csig * pow(s, eps) / (2. * alph);
1694 step = (dymaxDD - dymin0) / NINTEG;
1695 for (
int i = 0; i < NINTEG; ++i) {
1696 double dy = dymin0 + (i + 0.5) * step;
1697 f = (dymaxDD - dy) * exp(eps * dy)
1698 * ( exp(-2. * alph * dy * exp(-dy))
1699 - exp(-2. * alph * dy * exp(dy)) ) / dy;
1700 f *= 0.5 * (1. + erf( (dy - dyminDD) / dyminSigDD));
1701 if (f > ddpmax) ddpmax = f;
1702 sigDD = sigDD + step * c1 * f;
1708 double dymaxCD = log(s / m2min);
1709 cflux = pow4(beta0gev) / pow2(16. * M_PI);
1710 csig = cflux * pow2(sigma0mb / beta0mb);
1711 double dy1, dy2, f1, f2, step2;
1715 double fluxdpe = 0.;
1716 step = (dymaxCD - dyminCDflux) / NINTEG;
1717 for (
int i = 0; i < NINTEG; ++i) {
1718 double dy = dyminCDflux + (i + 0.5) * step;
1720 step2 = (dy - dyminCDflux) / NINTEG2;
1721 for (
int j = 0; j < NINTEG2; ++j) {
1722 double yc = -0.5 * (dy - dyminCDflux) + (j + 0.5) * step2;
1723 dy1 = 0.5 * dy - yc;
1724 dy2 = 0.5 * dy + yc;
1725 f1 = exp(2. * eps * dy1) * ( (a1 / (b1 + 2. * alph * dy1))
1726 + (a2 / (b2 + 2. * alph * dy1)) );
1727 f2 = exp(2. * eps * dy2) * ( (a1 / (b1 + 2. * alph * dy2))
1728 + (a2 / (b2 + 2. * alph * dy2)) );
1729 f1 *= 0.5 * (1. + erf( (dy1 - dyminCD) / dyminSigCD) );
1730 f2 *= 0.5 * (1. + erf( (dy2 - dyminCD) / dyminSigCD) );
1731 f += f1 * f2 * step2;
1733 fluxdpe += step * c1 * f;
1735 if (fluxdpe < 1.) fluxdpe = 1.;
1738 c1 = csig * pow(s, eps);
1741 step = (dymaxCD - dymin0) / NINTEG;
1742 for (
int i = 0; i < NINTEG; ++i) {
1743 double dy = dymin0 + (i + 0.5) * step;
1745 step2 = (dy - dymin0) / NINTEG2;
1746 for (
int j = 0; j < NINTEG2; ++j) {
1747 double yc = -0.5 * (dy - dymin0) + (j + 0.5) * step2;
1748 dy1 = 0.5 * dy - yc;
1749 dy2 = 0.5 * dy + yc;
1750 f1 = exp(eps * dy1) * ( (a1 / (b1 + 2. * alph * dy1))
1751 + (a2 / (b2 + 2. * alph * dy1)) );
1752 f2 = exp(eps * dy2) * ( (a1 / (b1 + 2. * alph * dy2))
1753 + (a2 / (b2 + 2. * alph * dy2)) );
1754 f1 *= 0.5 * (1. + erf( (dy1 - dyminCD) / dyminSigCD) );
1755 f2 *= 0.5 * (1. + erf( (dy2 - dyminCD) / dyminSigCD) );
1756 f += f1 * f2 * step2;
1758 sigCD += step * c1 * f;
1759 if ( f > dpepmax) dpepmax = f;
1777 double SigmaMBR::dsigmaSD(
double xi,
double t,
bool ,
int step) {
1780 double dy = -log(xi);
1784 if (xi * s < m2min)
return 0.;
1785 return exp(eps * dy)
1786 * ( (a1 / (b1 + 2. * alph * dy)) + (a2 / (b2 + 2. * alph * dy)) )
1787 * 0.5 * (1. + erf( (dy - dyminSD) / dyminSigSD));
1790 }
else if (step == 2) {
1791 return pow2(pFormFac(t)) * exp(2. * alph * dy * t);
1803 double SigmaMBR::dsigmaDD(
double xi1,
double xi2,
double t,
int step) {
1806 double dy = - log(xi1 * xi2 * s);
1810 if (xi1 * s < m2min || xi2 * s < m2min || dy < 0.)
return 0.;
1811 return exp(eps * dy) * ( exp(-2. * alph * dy * exp(-dy))
1812 - exp(-2. * alph * dy * exp(dy)) ) / dy
1813 * 0.5 * (1. + erf( (dy - dyminDD) / dyminSigDD));
1816 }
else if (step == 2) {
1817 if ( t < -exp(dy) || t > -exp(-dy) )
return 0.;
1818 return exp(2. * alph * dy * t);
1830 double SigmaMBR::dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
1834 double dy1 = -log(xi1);
1835 double dy2 = -log(xi2);
1839 if (xi1 * xi2 * s < m2min)
return 0.;
1840 double wt1 = exp(eps * dy1)
1841 * ( (a1 / (b1 + 2. * alph * dy1)) + (a2 / (b2 + 2. * alph * dy1)) )
1842 * 0.5 * (1. + erf( (dy1 - dyminCD) / dyminSigCD));
1843 double wt2 = exp(eps * dy2)
1844 * ( (a1 / (b1 + 2. * alph * dy2)) + (a2 / (b2 + 2. * alph * dy2)) )
1845 * 0.5 * (1. + erf( (dy2 - dyminCD) / dyminSigCD));
1849 }
else if (step == 2) {
1850 return pow2(pFormFac(t1) * pFormFac(t2))
1851 * exp(2. * alph * (dy1 * t1 + dy2 * t2));
1870 const double SigmaABMST::EPSI[] = {0.106231, 0.0972043, -0.510662, -0.302082};
1871 const double SigmaABMST::ALPP[] = { 0.0449029, 0.278037, 0.821595, 0.904556};
1872 const double SigmaABMST::NORM[] = { 228.359, 193.811, 518.686, 10.7843};
1873 const double SigmaABMST::SLOPE[] = { 8.38, 3.78, 1.36};
1874 const double SigmaABMST::FRACS[] = { 0.26, 0.56, 0.18};
1875 const double SigmaABMST::TRIG[] = { 0.3, 5.03};
1876 const double SigmaABMST::LAM2P = 0.521223;
1877 const double SigmaABMST::BAPPR[] = { 8.5, 1.086};
1878 const double SigmaABMST::LAM2FF = 0.71;
1881 const double SigmaABMST::MRES[4] = {1.44, 1.52, 1.68, 2.19};
1882 const double SigmaABMST::WRES[4] = {0.325, 0.13, 0.14, 0.45};
1883 const double SigmaABMST::CRES[4] = {3.07, 0.4149, 1.108, 0.9515};
1884 const double SigmaABMST::AFAC[4] = {0.624529, 3.09088, 4.0, 177.217};
1885 const double SigmaABMST::BFAC[4] = {2.5835, 4.51487, 3.03392, 5.86474};
1886 const double SigmaABMST::CFAC[4] = {0., 0.186211, 10.0, 21.0029};
1887 const double SigmaABMST::PPP[4] = {0.4, 0.5, 0.4597, 5.7575};
1888 const double SigmaABMST::EPS[2] = {0.08, -0.4525};
1889 const double SigmaABMST::APR[2] = {0.25, 0.93};
1890 const double SigmaABMST::CPI[6] = {13.63, 0.0808, 31.79, -0.4525, 0.93, 14.4};
1891 const double SigmaABMST::CNST[5] = {1., -0.05, -0.25, -1.15, 13.5};
1894 const int SigmaABMST::NPOINTSTSD = 200;
1895 const double SigmaABMST::XIDIVSD = 0.1;
1896 const double SigmaABMST::DXIRAWSD = 0.01;
1897 const double SigmaABMST::DLNXIRAWSD = 0.1;
1899 const bool SigmaABMST::MCINTDD =
true;
1900 const int SigmaABMST::NPOINTSTDD = 20;
1901 const double SigmaABMST::XIDIVDD = 0.1;
1902 const double SigmaABMST::DXIRAWDD = 0.02;
1903 const double SigmaABMST::DLNXIRAWDD = 0.1;
1904 const double SigmaABMST::BMCINTDD = 2.;
1905 const int SigmaABMST::NPOINTMCDD = 200000;
1907 const double SigmaABMST::BMCINTCD = 2.;
1908 const int SigmaABMST::NPOINTMCCD = 200000;
1914 void SigmaABMST::init(Info* infoPtrIn) {
1917 Settings& settings = *infoPtrIn->settingsPtr;
1920 rndmPtr = infoPtrIn->rndmPtr;
1923 m2minp = pow2(MPROTON + MPION);
1924 m2minm = pow2(MPROTON - MPION);
1927 tryCoulomb = settings.flag(
"SigmaElastic:Coulomb");
1928 tAbsMin = settings.parm(
"SigmaElastic:tAbsMin");
1931 modeSD = settings.mode(
"SigmaDiffractive:ABMSTmodeSD");
1932 multSD = settings.parm(
"SigmaDiffractive:ABMSTmultSD");
1933 powSD = settings.parm(
"SigmaDiffractive:ABMSTpowSD");
1934 s0 = (modeSD % 2 == 0) ? 4000. : 100.;
1935 c0 = (modeSD % 2 == 0) ? 0.6 : 0.012;
1938 modeDD = settings.mode(
"SigmaDiffractive:ABMSTmodeDD");
1939 multDD = settings.parm(
"SigmaDiffractive:ABMSTmultDD");
1940 powDD = settings.parm(
"SigmaDiffractive:ABMSTpowDD");
1943 modeCD = settings.mode(
"SigmaDiffractive:ABMSTmodeCD");
1944 multCD = settings.parm(
"SigmaDiffractive:ABMSTmultCD");
1945 powCD = settings.parm(
"SigmaDiffractive:ABMSTpowCD");
1946 mMinCDnow = settings.parm(
"SigmaDiffractive:ABMSTmMinCD");
1949 dampenGap = settings.flag(
"SigmaDiffractive:ABMSTdampenGap");
1950 ygap = settings.parm(
"SigmaDiffractive:ABMSTygap");
1951 ypow = settings.parm(
"SigmaDiffractive:ABMSTypow");
1952 expPygap = exp(ypow * ygap);
1955 useBMin = settings.flag(
"SigmaDiffractive:ABMSTuseBMin");
1956 bMinSD = settings.parm(
"SigmaDiffractive:ABMSTbMinSD");
1957 bMinDD = settings.parm(
"SigmaDiffractive:ABMSTbMinDD");
1958 bMinCD = settings.parm(
"SigmaDiffractive:ABMSTbMinCD");
1966 bool SigmaABMST::calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
1972 ispp = (idA * idB > 0);
1974 facEl = HBARCSQ / (16. * M_PI);
1978 complex amp = amplitude( 0.,
false,
false);
1979 sigTot = HBARCSQ * imag(amp);
1980 rhoOwn = real(amp) / imag(amp);
1984 for (
int i = 0; i < NPOINTS; ++i) {
1985 double y = (i + 0.5) / NPOINTS;
1986 double t = log(y) / MINSLOPEEL;
1987 sigEl += dsigmaEl( t,
false) / y;
1989 sigEl /= NPOINTS * MINSLOPEEL;
1992 bEl = log( dsigmaEl( -TABSREF,
false) / dsigmaEl( 0.,
false) ) / (-TABSREF);
1995 hasCou = tryCoulomb;
1996 if (abs(idAin) == 2112 || abs(idBin) == 2112) hasCou =
false;
1999 if (!hasCou)
return true;
2002 sigElCou = sigEl * exp( - bEl * tAbsMin);
2003 if (tAbsMin < 0.9 * TABSMAX) {
2008 for (
int i = 0; i < NPOINTS; ++i) {
2009 xRel = (i + 0.5) / NPOINTS;
2010 tAbs = tAbsMin * TABSMAX / (tAbsMin + xRel * (TABSMAX - tAbsMin));
2013 sumCou += pow2(tAbs) * (dsigmaEl( -tAbs,
true)
2014 - dsigmaEl( -tAbs,
false));
2018 sigElCou += sumCou * (TABSMAX - tAbsMin)/ (tAbsMin * TABSMAX * NPOINTS);
2020 sigTotCou = sigTot - sigEl + sigElCou;
2031 complex SigmaABMST::amplitude(
double t,
bool useCoulomb,
2032 bool onlyPomerons) {
2035 double snu = s - 2. * SPROTON + 0.5 * t;
2036 double ampt = FRACS[0] * exp(SLOPE[0] * t) + FRACS[1] * exp(SLOPE[1] * t)
2037 + FRACS[2] * exp(SLOPE[2] * t);
2038 complex amp[6], l2p[4], ll2p[4], d2p[4][3];
2041 for (
int i = 0; i < 4; ++i)
2042 amp[i] = ((i < 3) ? complex(-NORM[i], 0.) : complex( 0., NORM[i]))
2043 * ampt * sModAlp( ALPP[i] * snu, 1. + EPSI[i] + ALPP[i] * t);
2046 amp[4] = complex(0., 0.);
2047 for (
int i = 0; i < 4; ++i) {
2048 l2p[i] = ALPP[i] * complex( log(ALPP[i] * snu), -0.5 * M_PI);
2049 ll2p[i] = (1. + EPSI[i]) * l2p[i] / ALPP[i];
2050 for (
int k = 0; k < 3; ++k) d2p[i][k] = SLOPE[k] + l2p[i];
2052 for (
int i = 0; i < 4; ++i)
2053 for (
int j = 0; j < 4; ++j)
2054 for (
int k = 0; k < 3; ++k)
2055 for (
int l = 0; l < 3; ++l) {
2056 complex part = NORM[i] * NORM[j] * exp( ll2p[i] + ll2p[j] )
2057 * exp( t * d2p[i][k] * d2p[j][l] / (d2p[i][k] + d2p[j][l]) )
2058 * FRACS[k] * FRACS[l] / (d2p[i][k] + d2p[j][l]);
2059 if (i == 3) part *= complex( 0., 1.);
2060 if (j == 3) part *= complex( 0., 1.);
2063 amp[4] *= LAM2P * complex( 0., 1.) / (16. * M_PI * snu);
2066 amp[5] = sqrt(16. * M_PI / HBARCSQ) * TRIG[0] * ((t < -TRIG[1])
2067 ? 1. / pow4(t) : exp(4. + 4. * t / TRIG[1]) / pow4(TRIG[1]));
2070 complex ampSum = 0.;
2071 if (onlyPomerons) ampSum = (amp[0] + amp[1]) / snu;
2072 else ampSum = (amp[0] + amp[1] + amp[2] + ((ispp) ? -amp[3] : amp[3])
2073 + amp[4]) / snu + ((ispp) ? amp[5] : -amp[5]);
2076 if (useCoulomb && t < 0.) {
2077 double bApp = BAPPR[0] + BAPPR[1] * 0.5 * log(s);
2078 double phase = (GAMMAEUL + log( -0.5 * t * (bApp + 8. / LAM2FF)) +
2079 - 4. * t / LAM2FF * log(- 4. * t / LAM2FF)
2080 - 2. * t / LAM2FF) * (ispp ? 1. : -1.);
2081 complex ampCou = exp( complex( 0., -ALPHAEM * phase) ) * 8. * M_PI
2082 * ALPHAEM * ampt / t;
2083 ampSum += (ispp) ? ampCou : -ampCou;
2095 bool SigmaABMST::calcDiff(
int idAin ,
int idBin,
double sIn,
double ,
2101 ispp = (idA * idB > 0);
2103 facEl = HBARCSQ / (16. * M_PI);
2106 complex amp = amplitude( 0.,
false,
true);
2107 sigTot = HBARCSQ * imag(amp);
2110 sigXB = dsigmaSDintXiT( 0., 1., -100., 0.);
2114 if (MCINTDD) sigXX = dsigmaDDintMC();
2115 else sigXX = dsigmaDDintXi1Xi2T( 0., 1., 0., 1., -100., 0.);
2118 sigAXB = dsigmaCDintMC();
2129 double SigmaABMST::dsigmaSD(
double xi,
double t,
bool,
int) {
2132 double dSigSD = dsigmaSDcore( xi, t);
2135 if (useBMin && bMinSD > 0.) {
2136 double dSigSDmx = dsigmaSDcore( xi, -SPION) * exp(bMinSD * t);
2137 if (dSigSD > dSigSDmx) dSigSD = dSigSDmx;
2141 if (dampenGap) dSigSD /= 1. + expPygap * pow( xi, ypow);
2144 if (modeSD > 1) dSigSD *= multSD * pow( s / SPROTON, powSD);
2155 double SigmaABMST::dsigmaSDcore(
double xi,
double t) {
2158 double m2X = xi * s;
2159 if (m2X < m2minp)
return 0.;
2160 double tAbs = abs(t);
2161 if (modeSD % 2 == 0 && tAbs > 4.)
return 0.;
2164 double tmp = 3. + c0 * pow2( log( s / s0) );
2165 double scaleFac = (s < s0) ? 1. : 3. / tmp;
2166 double mCut = (s < s0) ? 3 : tmp;
2167 if (modeSD % 2 == 0) {
2169 mCut = (s < s0) ? 3. : 3. + c0 * log(s/s0);
2171 double m2Cut = pow2(mCut);
2172 double xiCut = m2Cut / s;
2173 double xiThr = m2minp / s;
2174 bool isHighM = (m2X > m2Cut);
2175 double xiNow = (isHighM) ? xi : xiCut;
2176 double m2XNow = xiNow * s;
2179 for (
int i = 0; i < 2; ++i) {
2180 alp0[i] = 1. + EPS[i];
2181 alpt[i] = alp0[i] + APR[i] * t;
2183 alpt[2] = CPI[4] * (t - SPION);
2186 double ampPPP = pow(xiNow, alp0[0] - 2. * alpt[0]) * pow(s/CNST[0], EPS[0]);
2187 if (t > CNST[2]) ampPPP *= (PPP[0] + PPP[1] * t);
2188 else ampPPP *= (AFAC[0] * exp(BFAC[0] * t) + CFAC[0]) * t / (t + CNST[1]);
2189 if (t < CNST[3]) ampPPP *= (1. + PPP[2] * (tAbs + CNST[3])
2190 + PPP[3] * pow2(tAbs + CNST[3]));
2191 double ampPPR = pow(xiNow, alp0[1] - 2. * alpt[0]) * pow(s/CNST[0], EPS[1]);
2192 double ampRRP = pow(xiNow, alp0[0] - 2. * alpt[1]) * pow(s/CNST[0], EPS[0]);
2193 double ampRRR = pow(xiNow, alp0[1] - 2. * alpt[1]) * pow(s/CNST[0], EPS[1]);
2196 if (modeSD % 2 == 0) {
2197 ampPPR *= (AFAC[1] * exp(BFAC[1] * t) + CFAC[1]);
2198 ampRRP *= (AFAC[2] * exp(BFAC[2] * t) + CFAC[2]);
2199 ampRRR *= (AFAC[3] * exp(BFAC[3] * t) + CFAC[3]);
2203 double modX[2], modX2[2], expX[2], sumX[2];
2204 double modY[3], modY2[3], expY[3], sumY[3];
2205 double den[3], modB[3], apC[3];
2206 for (
int ia = 0; ia < 2; ++ia) {
2207 modX[ia] = -2. * APR[ia] * log(xiNow);
2208 modX2[ia] = pow2(modX[ia]);
2209 expX[ia] = exp(-4. * modX[ia]);
2210 sumX[ia] = 4. * modX[ia] + 1.;
2212 for (
int ib = 0; ib < 3; ++ib) {
2213 int ix = (ib == 0) ? 0 : 1;
2214 modY[ib] = BFAC[ib+1] + modX[ix];
2215 modY2[ib] = pow2(modY[ib]);
2216 expY[ib] = exp(-4. * modY[ib]);
2217 sumY[ib] = 4. * modY[ib] + 1.;
2218 den[ib] = AFAC[ib+1] * modX2[ix] * (1. - expY[ib] * sumY[ib])
2219 + CFAC[ib+1] * modY2[ib] * (1. - expX[ix] * sumX[ix]);
2220 modB[ib] = (AFAC[ib+1] * modX2[ix] * modY[ib] * (1. - expY[ib])
2221 + CFAC[ib+1] * modY2[ib] * modX[ix] * (1. - expX[ix]))
2222 / den[ib] - modX[ix];
2223 apC[ib] = pow2( AFAC[ib+1] * modX[ix] * (1. - expY[ib])
2224 + CFAC[ib+1] * modY[ib] * (1. - expX[ix]) ) / den[ib];
2226 ampPPR *= apC[0] * exp(modB[0] * t);
2227 ampRRP *= apC[1] * exp(modB[1] * t);
2228 ampRRR *= apC[2] * exp(modB[2] * t);
2232 double fFac = pFormFac(t);
2233 double cnstPi = CPI[5]/(4. * M_PI) * tAbs/pow2(t - SPION) * pow2(fFac);
2234 double sigPi = CPI[0] * pow(m2XNow, CPI[1])
2235 + CPI[2] * pow(m2XNow, CPI[3]);
2236 double ampPi = cnstPi * sigPi * pow(xiNow, 1. - 2. * alpt[2]);
2239 double ampHM = scaleFac * (ampPPP + ampPPR + ampRRP + ampRRR + ampPi);
2240 if (isHighM)
return xi * ampHM;
2245 double ampMatch = 0.;
2249 double qRef = sqrt( (m2X - m2minp) * (m2X - m2minm) / (4. * m2X) );
2250 for (
int i = 0; i < 4; ++i) {
2251 double m2Res = pow2(MRES[i]);
2252 double qRes = sqrt( (m2Res - m2minp) * (m2Res - m2minm) / (4. * m2Res) );
2253 double mGam = MRES[i] * WRES[i] * pow( qRef / qRes, 2. * i + 3.)
2254 * pow( (1. + 5. * qRes) / (1. + 5. * qRef), i + 1.);
2255 ampRes += CRES[i] * mGam / (pow2(m2X - m2Res) + pow2(mGam));
2256 ampMatch += CRES[i] * mGam / (pow2(m2Cut - m2Res) + pow2(mGam));
2258 ampRes *= exp( CNST[4] * (t - CNST[1]) ) / xi;
2259 ampMatch *= exp( CNST[4] * (t - CNST[1]) ) / xiNow
2260 * (xi - xiThr) / (xiNow - xiThr);
2263 double dAmpPPP = ampPPP * (alp0[0] - 2. * alpt[0]) / xiNow;
2264 double dAmpPPR = ampPPR * (alp0[1] - 2. * alpt[0]) / xiNow;
2265 double dAmpRRP = ampRRP * (alp0[0] - 2. * alpt[1]) / xiNow;
2266 double dAmpRRR = ampRRR * (alp0[1] - 2. * alpt[1]) / xiNow;
2267 double dSigPi = CPI[0] * CPI[1] * pow(m2XNow, CPI[1] - 1.)
2268 + CPI[2] * CPI[3] * pow(m2XNow, CPI[3] - 1.);
2269 double dAmpPi = cnstPi * (sigPi * (1. - 2. * alpt[2])
2270 * pow(xiNow, -2. * alpt[2])
2271 + dSigPi * pow(xiNow, 1. - 2. * alpt[2]) );
2272 double dAmpHM = scaleFac * (dAmpPPP + dAmpPPR + dAmpRRP + dAmpRRR
2276 if (modeSD % 2 == 0) {
2277 double coeff1 = (dAmpHM * (xiCut - xiThr) - ampHM) / pow2(xiCut - xiThr);
2278 double coeff2 = 2. * ampHM / (xiCut - xiThr) - dAmpHM;
2279 ampBkg = coeff1 * pow2(xi - xiThr) + coeff2 * (xi - xiThr);
2283 double xiAtM3 = 9. / s;
2284 double coeff1 = dAmpHM;
2285 double coeff2 = ampHM - coeff1 * (xiCut - xiThr);
2286 double coeff3 = - coeff2 / pow2(xiAtM3 - xiThr);
2287 double coeff4 = (2. * coeff1 * (xiAtM3 - xiThr) + 2. * coeff2)
2288 / (xiAtM3 - xiThr) - coeff1;
2289 ampBkg = (xi < xiAtM3) ? coeff3 * pow2(xi - xiThr)
2290 + coeff4 * (xi - xiThr) : coeff1 * (xi - xiThr) + coeff2;
2294 ampLM = ampRes - ampMatch + ampBkg;
2303 double SigmaABMST::dsigmaSDintT(
double xi,
double tMinIn,
double tMaxIn) {
2306 double mu1 = SPROTON / s;
2308 double rootv = (1. - 4. * mu1) * (pow2(1. - mu1 - mu3) - 4. * mu1 * mu3);
2309 if (rootv <= 0.)
return 0.;
2310 double tMin = -0.5 * s * (1. - 3. * mu1 - mu3 + sqrt(rootv));
2311 double tMax = s * s * mu1 * pow2(mu3 - mu1) / tMin;
2312 tMin = max( tMin, tMinIn);
2313 tMax = min( tMax, tMaxIn);
2314 if (tMin >= tMax)
return 0.;
2317 double slope = -0.5 * log(xi);
2318 double etMin = exp(slope * tMin);
2319 double etMax = exp(slope * tMax);
2324 for (
int i = 0; i < NPOINTSTSD; ++i) {
2325 etNow = etMin + (i + 0.5) * (etMax - etMin) / NPOINTSTSD;
2326 tNow = log(etNow) / slope;
2327 dsig += dsigmaSD( xi, tNow,
true, 0) / etNow;
2331 dsig *= (etMax - etMin) / (NPOINTSTSD * slope);
2341 double SigmaABMST::dsigmaSDintXiT(
double xiMinIn,
double xiMaxIn,
2342 double tMinIn,
double tMaxIn) {
2346 double xiMin = max(xiMinIn, m2minp / s);
2347 double xiMax = min(xiMaxIn, 1.);
2348 if (xiMin >= xiMax)
return 0.;
2352 if (xiMax > XIDIVSD) {
2353 double xiMinRng = max( XIDIVSD, xiMin);
2354 int nxi = 2 + (xiMax - xiMinRng) / DXIRAWSD;
2355 double dxi = (xiMax - xiMinRng) / nxi;
2356 for (
int ixi = 0; ixi < nxi; ++ixi) {
2357 xiNow = xiMinRng + (ixi + 0.5) * dxi;
2358 sig += dxi * dsigmaSDintT( xiNow, tMinIn, tMaxIn) / xiNow;
2363 if (xiMin < XIDIVSD) {
2364 double xiMaxRng = min( XIDIVSD, xiMax);
2365 int nlnxi = 2 + log( xiMaxRng / xiMin) / DLNXIRAWSD;
2366 double dlnxi = log( xiMaxRng / xiMin) / nlnxi;
2367 for (
int ilnxi = 0; ilnxi < nlnxi; ++ilnxi) {
2368 xiNow = xiMin * exp( dlnxi * (ilnxi + 0.5));
2369 sig += dlnxi * dsigmaSDintT( xiNow, tMinIn, tMaxIn);
2382 double SigmaABMST::dsigmaDD(
double xi1,
double xi2,
double t,
int ) {
2385 double m2X1 = xi1 * s;
2386 double m2X2 = xi2 * s;
2387 if (m2X1 < m2minp || m2X2 < m2minp)
return 0.;
2388 if (modeSD % 2 == 0 && abs(t) > 4.)
return 0.;
2392 double dSigDD = dsigmaSDcore( xi1, t) * dsigmaSDcore( xi2, t)
2393 / dsigmaEl( t,
false,
true);
2396 if (useBMin && bMinDD > 0.) {
2397 double dSigDDmx = dsigmaSDcore( xi1, -SPION) * dsigmaSDcore( xi2, -SPION)
2398 * exp(bMinDD * t) / dsigmaEl( 0.,
false,
true);
2399 if (dSigDD > dSigDDmx) dSigDD = dSigDDmx;
2403 if (dampenGap) dSigDD /= 1. + expPygap * pow( xi1 * xi2 * s / SPROTON, ypow);
2406 if (modeDD == 1) dSigDD *= multDD * pow( s / SPROTON, powDD);
2417 double SigmaABMST::dsigmaDDintMC() {
2421 double xiMin = m2minp / s;
2422 double mu1 = SPROTON / s;
2426 for (
int iPoint = 0; iPoint < NPOINTMCDD; ++iPoint) {
2427 xi1 = pow( xiMin, rndmPtr->flat() );
2428 xi2 = pow( xiMin, rndmPtr->flat() );
2429 t = log( rndmPtr->flat() ) / BMCINTDD;
2432 if (sqrt(xi1) + sqrt(xi2) > 1.)
continue;
2433 if (!tInRange( t/s, 1., mu1, mu1, xi1, xi2))
continue;
2436 sigSum += dsigmaDD( xi1, xi2, t) * exp(-BMCINTDD * t);
2440 sigSum *= pow2(log(xiMin)) / (BMCINTDD * NPOINTMCDD);
2449 double SigmaABMST::dsigmaDDintT(
double xi1,
double xi2,
double tMinIn,
2453 double mu1 = SPROTON / s;
2454 pair<double,double> tRng = tRange(1., mu1, mu1, xi1, xi2);
2455 double tMin = max( s * tRng.first, tMinIn);
2456 double tMax = min( s * tRng.second, tMaxIn);
2457 if (tMin >= tMax)
return 0.;
2460 double slope = BMCINTDD;
2461 double etMin = exp(slope * tMin);
2462 double etMax = exp(slope * tMax);
2467 for (
int i = 0; i < NPOINTSTDD; ++i) {
2468 etNow = etMin + (i + 0.5) * (etMax - etMin) / NPOINTSTDD;
2469 tNow = log(etNow) / slope;
2470 dsig += dsigmaDD( xi1, xi2, tNow) / etNow;
2474 dsig *= (etMax - etMin) / (NPOINTSTDD * slope);
2484 double SigmaABMST::dsigmaDDintXi2T(
double xi1,
double xi2MinIn,
2485 double xi2MaxIn,
double tMinIn,
double tMaxIn) {
2489 double xi2Min = max( xi2MinIn, m2minp / s);
2490 double xi2Max = min( xi2MaxIn, 1. + xi1 - 2. * sqrt(xi1));
2491 if (xi2Min >= xi2Max)
return 0.;
2495 if (xi2Max > XIDIVDD) {
2496 double xi2MinRng = max( XIDIVDD, xi2Min);
2497 int nxi2 = 2 + (xi2Max - xi2MinRng) / DXIRAWDD;
2498 double dxi2 = (xi2Max - xi2MinRng) / nxi2;
2499 for (
int ixi2 = 0; ixi2 < nxi2; ++ixi2) {
2500 xi2Now = xi2MinRng + (ixi2 + 0.5) * dxi2;
2501 dsig += dxi2 * dsigmaDDintT( xi1, xi2Now, tMinIn, tMaxIn)
2507 if (xi2Min < XIDIVDD) {
2508 double xi2MaxRng = min( XIDIVDD, xi2Max);
2509 int nlnxi2 = 2 + log( xi2MaxRng / xi2Min) / DLNXIRAWDD;
2510 double dlnxi2 = log( xi2MaxRng / xi2Min) / nlnxi2;
2511 for (
int ilnxi2 = 0; ilnxi2 < nlnxi2; ++ilnxi2) {
2512 xi2Now = xi2Min * exp( dlnxi2 * (ilnxi2 + 0.5));
2513 dsig += dlnxi2 * dsigmaDDintT( xi1, xi2Now, tMinIn, tMaxIn);
2527 double SigmaABMST::dsigmaDDintXi1Xi2T(
double xi1MinIn,
double xi1MaxIn,
2528 double xi2MinIn,
double xi2MaxIn,
double tMinIn,
double tMaxIn) {
2532 double xi1Min = max( xi1MinIn, m2minp / s);
2533 double xi1Max = min( xi1MaxIn, 1.);
2534 if (xi1Min >= xi1Max)
return 0.;
2538 if (xi1Max > XIDIVDD) {
2539 double xi1MinRng = max( XIDIVDD, xi1Min);
2540 int nxi1 = 2 + (xi1Max - xi1MinRng) / DXIRAWDD;
2541 double dxi1 = (xi1Max - xi1MinRng) / nxi1;
2542 for (
int ixi1 = 0; ixi1 < nxi1; ++ixi1) {
2543 xi1Now = xi1MinRng + (ixi1 + 0.5) * dxi1;
2544 dsig += dxi1 * dsigmaDDintXi2T( xi1Now, xi2MinIn, xi2MaxIn,
2545 tMinIn, tMaxIn) / xi1Now;
2550 if (xi1Min < XIDIVDD) {
2551 double xi1MaxRng = min( XIDIVDD, xi1Max);
2552 int nlnxi1 = 2 + log( xi1MaxRng / xi1Min) / DLNXIRAWDD;
2553 double dlnxi1 = log( xi1MaxRng / xi1Min) / nlnxi1;
2554 for (
int ilnxi1 = 0; ilnxi1 < nlnxi1; ++ilnxi1) {
2555 xi1Now = xi1Min * exp( dlnxi1 * (ilnxi1 + 0.5));
2556 dsig += dlnxi1 * dsigmaDDintXi2T( xi1Now, xi2MinIn, xi2MaxIn,
2570 double SigmaABMST::dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
2574 if (modeSD % 2 == 0 && max( abs(t1), abs(t2)) > 4.)
return 0.;
2578 double dSigCD = dsigmaSDcore( xi1, t1) * dsigmaSDcore( xi2, t2) / sigTot;
2581 if (useBMin && bMinCD > 0.) {
2582 double dSigCDmx = dsigmaSDcore( xi1, -SPION) * dsigmaSDcore( xi2, -SPION)
2583 * exp(bMinCD * (t1 + t2)) / sigTot;
2584 if (dSigCD > dSigCDmx) dSigCD = dSigCDmx;
2588 if (dampenGap) dSigCD /= (1. + expPygap * pow( xi1, ypow))
2589 * (1. + expPygap * pow( xi2, ypow));
2592 if (modeCD == 1) dSigCD *= multCD * pow( s / SPROTON, powCD);
2603 double SigmaABMST::dsigmaCDintMC() {
2607 double xiMin = m2minp / s;
2608 double xi1, xi2, t1, t2;
2611 for (
int iPoint = 0; iPoint < NPOINTMCCD; ++iPoint) {
2612 xi1 = pow( xiMin, rndmPtr->flat() );
2613 xi2 = pow( xiMin, rndmPtr->flat() );
2614 t1 = log( rndmPtr->flat() ) / BMCINTCD;
2615 t2 = log( rndmPtr->flat() ) / BMCINTCD;
2618 if (xi1 * xi2 < xiMin)
continue;
2619 if (xi1 * xi2 + 2. * xiMin > 1.)
continue;
2620 if (!tInRange( t1, s, SPROTON, SPROTON, SPROTON, SPROTON + xi1 * s))
2622 if (!tInRange( t1, s, SPROTON, SPROTON, SPROTON, SPROTON + xi2 * s))
2626 sigSum += dsigmaCD( xi1, xi2, t1, t2) * exp(-BMCINTCD * (t1 + t2));
2630 sigSum *= pow2(log(xiMin) / BMCINTCD) / NPOINTMCCD;
2646 const double SigmaRPP::EPS1[] = { 1., 0.614, 0.444, 1., 1., 1.};
2647 const double SigmaRPP::ALPP[] = { 0.151, 0.8, 0.8, 0.947};
2648 const double SigmaRPP::NORM[] = { 0.2478, 0.0078, 11.22, -0.150, 148.4, -26.6,
2649 -1.5, -0.0441, 0., 0.686, -3.82, -8.60, 64.1, 99.1, -58.0, 9.5};
2650 const double SigmaRPP::BRPP[] = { 3.592, 0.622, 5.44, 0.205, 5.643, 1.92,
2651 0.41, 0., 0., 3.013, 2.572, 12.25, 2.611, 11.28, 1.27};
2652 const double SigmaRPP::KRPP[] = { 0.3076, 0.0998, 1.678, 0.190, -26.1};
2653 const double SigmaRPP::LAM2FF = 0.71;
2659 bool SigmaRPP::calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
2665 ispp = (idA * idB > 0);
2667 facEl = CONVERTEL / (s * (s - 4. * SPROTON));
2671 complex amp = amplitude( 0.,
false);
2672 sigTot = imag(amp) / sqrt(s * ( s - 4. * SPROTON));
2673 rhoOwn = real(amp) / imag(amp);
2677 for (
int i = 0; i < NPOINTS; ++i) {
2678 double y = (i + 0.5) / NPOINTS;
2679 double t = log(y) / MINSLOPEEL;
2680 sigEl += dsigmaEl( t,
false) / y;
2682 sigEl /= NPOINTS * MINSLOPEEL;
2685 bEl = log( dsigmaEl( -TABSREF,
false) / dsigmaEl( 0.,
false) ) / (-TABSREF);
2688 hasCou = tryCoulomb;
2689 if (abs(idAin) == 2112 || abs(idBin) == 2112) hasCou =
false;
2692 if (!hasCou)
return true;
2695 sigElCou = sigEl * exp( - bEl * tAbsMin);
2696 if (tAbsMin < 0.9 * TABSMAX) {
2701 for (
int i = 0; i < NPOINTS; ++i) {
2702 xRel = (i + 0.5) / NPOINTS;
2703 tAbs = tAbsMin * TABSMAX / (tAbsMin + xRel * (TABSMAX - tAbsMin));
2706 sumCou += pow2(tAbs) * (dsigmaEl( -tAbs,
true)
2707 - dsigmaEl( -tAbs,
false));
2711 sigElCou += sumCou * (TABSMAX - tAbsMin)/ (tAbsMin * TABSMAX * NPOINTS);
2713 sigTotCou = sigTot - sigEl + sigElCou;
2724 complex SigmaRPP::amplitude(
double t,
bool useCoulomb) {
2727 double shat = s - 2. * SPROTON + 0.5 * t;
2728 complex stlog = complex( log(shat), -0.5 * M_PI);
2729 complex taut = sqrt(abs(t)) * stlog;
2732 double aP = EPS1[0] + ALPP[0] * t;
2733 double aRpos = EPS1[1] + ALPP[1] * t;
2734 double aRneg = EPS1[2] + ALPP[2] * t;
2735 double aO = EPS1[3] + ALPP[3] * t;
2736 double aOP = EPS1[4] + ALPP[0] * ALPP[3] * t / (ALPP[0] + ALPP[3]);
2737 double aPP = EPS1[5] + 0.5 * ALPP[0] * t;
2738 double aRPpos = EPS1[1] + ALPP[0] * ALPP[1] * t / (ALPP[0] + ALPP[1]);
2739 double aRPneg = EPS1[2] + ALPP[0] * ALPP[2] * t / (ALPP[0] + ALPP[2]);
2742 complex besArg = KRPP[0] * taut;
2743 complex besJ0n = besJ0(besArg);
2744 complex besJ1n = besJ1(besArg);
2745 complex besRat = (abs(besArg) < 0.01) ? 1. : 2. * besJ1n / besArg;
2746 complex fPosH = complex( 0., shat) * (NORM[0] * besRat
2747 * exp(BRPP[0] * t) * stlog * stlog
2748 + NORM[1] * besJ0n * exp(BRPP[1] * t) * stlog
2749 + NORM[2] * (besJ0n - besArg * besJ1n) * exp(BRPP[2] * t));
2750 complex fPosP = -NORM[3] * exp(BRPP[3] * t) * sModAlp( shat, aP);
2751 complex fPosPP = (-NORM[4] / stlog) * exp(BRPP[4] * t) * sModAlp( shat, aPP);
2752 complex fPosR = -NORM[5] * exp(BRPP[5] * t) * sModAlp( shat, aRpos);
2753 complex fPosRP = t * (NORM[6] / stlog) * exp(BRPP[6] * t)
2754 * sModAlp( shat, aRPpos);
2755 complex nPos = complex( 0., -shat) * NORM[7] * stlog * t
2756 * pow( 1. - t / KRPP[2], -5.);
2757 complex fPos = fPosH + fPosP + fPosPP + fPosR + fPosRP + nPos;
2760 complex fNegMO = shat * (NORM[9] * cos(KRPP[1] * taut) * exp(BRPP[9] * t)
2761 * stlog + NORM[10] * exp(BRPP[10] * t));
2762 complex fNegO = complex( 0., NORM[11]) * exp(BRPP[11] * t)
2763 * sModAlp( shat, aO) * (1. + KRPP[4] * t);
2764 complex fNegOP = (complex( 0., NORM[12]) / stlog) * exp(BRPP[12] * t)
2765 * sModAlp( shat, aOP);
2766 complex fNegR = complex( 0., -NORM[13]) * exp(BRPP[13] * t)
2767 * sModAlp( shat, aRneg);
2768 complex fNegRP = t * (complex( 0., -NORM[14]) / stlog) * exp(BRPP[14] * t)
2769 * sModAlp( shat, aRPneg);
2770 complex nNeg = -shat * NORM[15] * stlog * t * pow( 1. - t / KRPP[3], -5.);
2771 complex fNeg = fNegMO + fNegO + fNegOP + fNegR + fNegRP + nNeg;
2774 complex ampSum = ispp ? fPos + fNeg : fPos - fNeg;
2777 complex ampCou = 0.;
2778 if (useCoulomb && t < 0.) {
2779 double bAppr = imag(ampSum) / ( sqrt(s * ( s - 4. * SPROTON))
2780 * 4. * M_PI * HBARCSQ );
2781 double phase = (log( -0.5 * t * (bAppr + 8. / LAM2FF)) + GAMMAEUL
2782 - 4. * t / LAM2FF * log(- 4. * t / LAM2FF)
2783 - 2. * t / LAM2FF) * (ispp ? -1. : 1.);
2784 ampCou = exp( complex( 0., ALPHAEM * phase) ) * 8. * M_PI * HBARCSQ
2785 * ALPHAEM * s / t * pow(1 - t / LAM2FF, -4.);
2789 return ispp ? ampSum + ampCou : ampSum - ampCou;
2797 complex SigmaRPP::besJ0( complex x) {
2798 int mMax = 5. + 5. * abs(x);
2799 complex z = 0.25 * x * x;
2802 for (
int m = 1; m < mMax; ++m) {
2803 term *= - z / double(m * m);
2809 complex SigmaRPP::besJ1( complex x) {
2810 int mMax = 5. + 5. * abs(x);
2811 complex z = 0.25 * x * x;
2812 complex term = 0.5 * x;
2814 for (
int m = 1; m < mMax; ++m) {
2815 term *= - z / double(m * (m+1));