8 #include "Pythia8/SigmaTotal.h"
40 const double SigmaTotal::MMIN = 2.;
44 const double SigmaTotal::EPSILON = 0.0808;
45 const double SigmaTotal::ETA = -0.4525;
46 const double SigmaTotal::X[] = { 21.70, 21.70, 13.63, 13.63, 13.63,
47 10.01, 0.970, 8.56, 6.29, 0.609, 4.62, 0.447, 0.0434};
48 const double SigmaTotal::Y[] = { 56.08, 98.39, 27.56, 36.02, 31.79,
49 1.51, -0.146, 13.08, -0.62, -0.060, 0.030, -0.0028, 0.00028};
53 const int SigmaTotal::IHADATABLE[] = { 0, 0, 1, 1, 1, 2, 3, 1, 1,
55 const int SigmaTotal::IHADBTABLE[] = { 0, 0, 0, 0, 0, 0, 0, 1, 2,
59 const double SigmaTotal::BETA0[] = { 4.658, 2.926, 2.149, 0.208};
60 const double SigmaTotal::BHAD[] = { 2.3, 1.4, 1.4, 0.23};
63 const double SigmaTotal::ALPHAPRIME = 0.25;
67 const double SigmaTotal::CONVERTEL = 0.0510925;
68 const double SigmaTotal::CONVERTSD = 0.0336;
69 const double SigmaTotal::CONVERTDD = 0.0084;
73 const double SigmaTotal::MMIN0 = 0.28;
74 const double SigmaTotal::CRES = 2.0;
75 const double SigmaTotal::MRES0 = 1.062;
78 const int SigmaTotal::ISDTABLE[] = { 0, 0, 1, 1, 1, 2, 3, 4, 5,
80 const double SigmaTotal::CSD[10][8] = {
81 { 0.213, 0.0, -0.47, 150., 0.213, 0.0, -0.47, 150., } ,
82 { 0.213, 0.0, -0.47, 150., 0.267, 0.0, -0.47, 100., } ,
83 { 0.213, 0.0, -0.47, 150., 0.232, 0.0, -0.47, 110., } ,
84 { 0.213, 7.0, -0.55, 800., 0.115, 0.0, -0.47, 110., } ,
85 { 0.267, 0.0, -0.46, 75., 0.267, 0.0, -0.46, 75., } ,
86 { 0.232, 0.0, -0.46, 85., 0.267, 0.0, -0.48, 100., } ,
87 { 0.115, 0.0, -0.50, 90., 0.267, 6.0, -0.56, 420., } ,
88 { 0.232, 0.0, -0.48, 110., 0.232, 0.0, -0.48, 110., } ,
89 { 0.115, 0.0, -0.52, 120., 0.232, 6.0, -0.56, 470., } ,
90 { 0.115, 5.5, -0.58, 570., 0.115, 5.5, -0.58, 570. } };
93 const int SigmaTotal::IDDTABLE[] = { 0, 0, 1, 1, 1, 2, 3, 4, 5,
95 const double SigmaTotal::CDD[10][9] = {
96 { 3.11, -7.34, 9.71, 0.068, -0.42, 1.31, -1.37, 35.0, 118., } ,
97 { 3.11, -7.10, 10.6, 0.073, -0.41, 1.17, -1.41, 31.6, 95., } ,
98 { 3.12, -7.43, 9.21, 0.067, -0.44, 1.41, -1.35, 36.5, 132., } ,
99 { 3.13, -8.18, -4.20, 0.056, -0.71, 3.12, -1.12, 55.2, 1298., } ,
100 { 3.11, -6.90, 11.4, 0.078, -0.40, 1.05, -1.40, 28.4, 78., } ,
101 { 3.11, -7.13, 10.0, 0.071, -0.41, 1.23, -1.34, 33.1, 105., } ,
102 { 3.12, -7.90, -1.49, 0.054, -0.64, 2.72, -1.13, 53.1, 995., } ,
103 { 3.11, -7.39, 8.22, 0.065, -0.44, 1.45, -1.36, 38.1, 148., } ,
104 { 3.18, -8.95, -3.37, 0.057, -0.76, 3.32, -1.12, 55.6, 1472., } ,
105 { 4.18, -29.2, 56.2, 0.074, -1.36, 6.67, -1.14, 116.2, 6532. } };
106 const double SigmaTotal::SPROTON = 0.880;
109 const int SigmaTotal::NINTEG = 1000;
110 const int SigmaTotal::NINTEG2 = 40;
111 const double SigmaTotal::HBARC2 = 0.38938;
113 const double SigmaTotal::FFA1 = 0.9;
114 const double SigmaTotal::FFA2 = 0.1;
115 const double SigmaTotal::FFB1 = 4.6;
116 const double SigmaTotal::FFB2 = 0.6;
122 void SigmaTotal::init(Info* infoPtrIn, Settings& settings,
123 ParticleData* particleDataPtrIn) {
127 particleDataPtr = particleDataPtrIn;
130 zeroAXB = settings.flag(
"SigmaTotal:zeroAXB");
131 sigAXB2TeV = settings.parm(
"SigmaTotal:sigmaAXB2TeV");
134 setTotal = settings.flag(
"SigmaTotal:setOwn");
135 sigTotOwn = settings.parm(
"SigmaTotal:sigmaTot");
136 sigElOwn = settings.parm(
"SigmaTotal:sigmaEl");
137 sigXBOwn = settings.parm(
"SigmaTotal:sigmaXB");
138 sigAXOwn = settings.parm(
"SigmaTotal:sigmaAX");
139 sigXXOwn = settings.parm(
"SigmaTotal:sigmaXX");
140 sigAXBOwn = settings.parm(
"SigmaTotal:sigmaAXB");
143 doDampen = settings.flag(
"SigmaDiffractive:dampen");
144 maxXBOwn = settings.parm(
"SigmaDiffractive:maxXB");
145 maxAXOwn = settings.parm(
"SigmaDiffractive:maxAX");
146 maxXXOwn = settings.parm(
"SigmaDiffractive:maxXX");
147 maxAXBOwn = settings.parm(
"SigmaDiffractive:maxAXB");
150 setElastic = settings.flag(
"SigmaElastic:setOwn");
151 bSlope = settings.parm(
"SigmaElastic:bSlope");
152 rho = settings.parm(
"SigmaElastic:rho");
153 lambda = settings.parm(
"SigmaElastic:lambda");
154 tAbsMin = settings.parm(
"SigmaElastic:tAbsMin");
155 alphaEM0 = settings.parm(
"StandardModel:alphaEM0");
158 sigmaPomP = settings.parm(
"Diffraction:sigmaRefPomP");
159 mPomP = settings.parm(
"Diffraction:mRefPomP");
160 pPomP = settings.parm(
"Diffraction:mPowPomP");
163 PomFlux = settings.mode(
"Diffraction:PomFlux");
164 MBReps = settings.parm(
"Diffraction:MBRepsilon");
165 MBRalpha = settings.parm(
"Diffraction:MBRalpha");
166 MBRbeta0 = settings.parm(
"Diffraction:MBRbeta0");
167 MBRsigma0 = settings.parm(
"Diffraction:MBRsigma0");
168 m2min = settings.parm(
"Diffraction:MBRm2Min");
169 dyminSDflux = settings.parm(
"Diffraction:MBRdyminSDflux");
170 dyminDDflux = settings.parm(
"Diffraction:MBRdyminDDflux");
171 dyminCDflux = settings.parm(
"Diffraction:MBRdyminCDflux");
172 dyminSD = settings.parm(
"Diffraction:MBRdyminSD");
173 dyminDD = settings.parm(
"Diffraction:MBRdyminDD");
174 dyminCD = settings.parm(
"Diffraction:MBRdyminCD");
175 dyminSigSD = settings.parm(
"Diffraction:MBRdyminSigSD");
176 dyminSigDD = settings.parm(
"Diffraction:MBRdyminSigDD");
177 dyminSigCD = settings.parm(
"Diffraction:MBRdyminSigCD");
185 bool SigmaTotal::calc(
int idA,
int idB,
double eCM) {
188 alP2 = 2. * ALPHAPRIME;
189 s0 = 1. / ALPHAPRIME;
193 sigTot = sigEl = sigXB = sigAX = sigXX = sigAXB = sigND = bEl = s
197 int idAbsA = abs(idA);
198 int idAbsB = abs(idB);
199 bool swapped =
false;
200 if (idAbsA > idAbsB) {
201 swap( idAbsA, idAbsB);
204 double sameSign = (idA * idB > 0);
209 iProc = (sameSign) ? 0 : 1;
210 }
else if (idAbsA > 100 && idAbsB > 1000) {
211 iProc = (sameSign) ? 2 : 3;
212 if (idAbsA/10 == 11 || idAbsA/10 == 22) iProc = 4;
213 if (idAbsA > 300) iProc = 5;
214 if (idAbsA > 400) iProc = 6;
215 if (idAbsA > 900) iProc = 13;
216 }
else if (idAbsA > 100) {
218 if (idAbsB > 300) iProc = 8;
219 if (idAbsB > 400) iProc = 9;
220 if (idAbsA > 300) iProc = 10;
221 if (idAbsA > 300 && idAbsB > 400) iProc = 11;
222 if (idAbsA > 400) iProc = 12;
224 if (iProc == -1)
return false;
229 sigTot = sigmaPomP * pow( eCM / mPomP, pPomP);
237 int idModA = (idAbsA > 1000) ? idAbsA : 10 * (idAbsA/10) + 3;
238 int idModB = (idAbsB > 1000) ? idAbsB : 10 * (idAbsB/10) + 3;
239 double mA = particleDataPtr->m0(idModA);
240 double mB = particleDataPtr->m0(idModB);
241 if (eCM < mA + mB + MMIN) {
242 infoPtr->errorMsg(
"Error in SigmaTotal::calc: too low energy");
248 double sEps = pow( s, EPSILON);
249 double sEta = pow( s, ETA);
250 sigTot = X[iProc] * sEps + Y[iProc] * sEta;
253 int iHadA = IHADATABLE[iProc];
254 int iHadB = IHADBTABLE[iProc];
259 bEl = 2.*bA + 2.*bB + 4.*sEps - 4.2;
260 sigEl = CONVERTEL * pow2(sigTot) / bEl;
263 int iSD = ISDTABLE[iProc];
264 int iDD = IDDTABLE[iProc];
265 double sum1, sum2, sum3, sum4;
268 mMinXBsave = mA + MMIN0;
269 double sMinXB = pow2(mMinXBsave);
270 mResXBsave = mA + MRES0;
271 double sResXB = pow2(mResXBsave);
272 double sRMavgXB = mResXBsave * mMinXBsave;
273 double sRMlogXB = log(1. + sResXB/sMinXB);
274 double sMaxXB = CSD[iSD][0] * s + CSD[iSD][1];
275 double BcorrXB = CSD[iSD][2] + CSD[iSD][3] / s;
276 sum1 = log( (2.*bB + alP2 * log(s/sMinXB))
277 / (2.*bB + alP2 * log(s/sMaxXB)) ) / alP2;
278 sum2 = CRES * sRMlogXB / (2.*bB + alP2 * log(s/sRMavgXB) + BcorrXB) ;
279 sigXB = CONVERTSD * X[iProc] * BETA0[iHadB] * max( 0., sum1 + sum2);
282 mMinAXsave = mB + MMIN0;
283 double sMinAX = pow2(mMinAXsave);
284 mResAXsave = mB + MRES0;
285 double sResAX = pow2(mResAXsave);
286 double sRMavgAX = mResAXsave * mMinAXsave;
287 double sRMlogAX = log(1. + sResAX/sMinAX);
288 double sMaxAX = CSD[iSD][4] * s + CSD[iSD][5];
289 double BcorrAX = CSD[iSD][6] + CSD[iSD][7] / s;
290 sum1 = log( (2.*bA + alP2 * log(s/sMinAX))
291 / (2.*bA + alP2 * log(s/sMaxAX)) ) / alP2;
292 sum2 = CRES * sRMlogAX / (2.*bA + alP2 * log(s/sRMavgAX) + BcorrAX) ;
293 sigAX = CONVERTSD * X[iProc] * BETA0[iHadA] * max( 0., sum1 + sum2);
299 swap( mMinXBsave, mMinAXsave);
300 swap( mResXBsave, mResAXsave);
304 double y0min = log( s * SPROTON / (sMinXB * sMinAX) ) ;
305 double sLog = log(s);
306 double Delta0 = CDD[iDD][0] + CDD[iDD][1] / sLog
307 + CDD[iDD][2] / pow2(sLog);
308 sum1 = (y0min * (log( max( 1e-10, y0min/Delta0) ) - 1.) + Delta0)/ alP2;
309 if (y0min < 0.) sum1 = 0.;
310 double sMaxXX = s * ( CDD[iDD][3] + CDD[iDD][4] / sLog
311 + CDD[iDD][5] / pow2(sLog) );
312 double sLogUp = log( max( 1.1, s * s0 / (sMinXB * sRMavgAX) ));
313 double sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgAX) ));
314 sum2 = CRES * log( sLogUp / sLogDn ) * sRMlogAX / alP2;
315 sLogUp = log( max( 1.1, s * s0 / (sMinAX * sRMavgXB) ));
316 sLogDn = log( max( 1.1, s * s0 / (sMaxXX * sRMavgXB) ));
317 sum3 = CRES * log(sLogUp / sLogDn) * sRMlogXB / alP2;
318 double BcorrXX = CDD[iDD][6] + CDD[iDD][7] / eCM + CDD[iDD][8] / s;
319 sum4 = pow2(CRES) * sRMlogAX * sRMlogXB
320 / max( 0.1, alP2 * log( s * s0 / (sRMavgAX * sRMavgXB) ) + BcorrXX);
321 sigXX = CONVERTDD * X[iProc] * max( 0., sum1 + sum2 + sum3 + sum4);
325 if ( (idAbsA == 2212 || idAbsA == 2112)
326 && (idAbsB == 2212 || idAbsB == 2112) && !zeroAXB) {
327 double sMinAXB = pow2(mMinAXBsave);
328 double sRefAXB = pow2(2000.);
329 sigAXB = sigAXB2TeV * pow( log(0.06 * s / sMinAXB), 1.5 )
330 / pow( log(0.06 * sRefAXB / sMinAXB), 1.5 );
335 sigXB = sigXB * maxXBOwn / (sigXB + maxXBOwn);
336 sigAX = sigAX * maxAXOwn / (sigAX + maxAXOwn);
337 sigXX = sigXX * maxXXOwn / (sigXX + maxXXOwn);
338 sigAXB = sigAXB * maxAXBOwn / (sigAXB + maxAXBOwn);
342 if (PomFlux == 5) calcMBRxsecs(idA, idB, eCM);
346 double sigNDOwn = sigTotOwn - sigElOwn - sigXBOwn - sigAXOwn - sigXXOwn
348 double sigElMax = sigEl;
349 if (setTotal && sigNDOwn > 0.) {
361 sigEl = CONVERTEL * pow2(sigTot) * (1. + rho*rho) / bSlope;
362 sigElMax = 2. * (sigEl * exp(-bSlope * tAbsMin)
363 + alphaEM0 * alphaEM0 / (4. * CONVERTEL * tAbsMin) );
368 sigND = sigTot - sigEl - sigXB - sigAX - sigXX - sigAXB;
369 if (sigND < 0.) infoPtr->errorMsg(
"Error in SigmaTotal::init: "
371 else if (sigND < 0.4 * sigTot) infoPtr->errorMsg(
"Warning in "
372 "SigmaTotal::init: sigND suspiciously low");
387 bool SigmaTotal::calcMBRxsecs(
int idA,
int idB,
double eCM) {
390 double sigtot, sigel, sigsd, sigdd, sigdpe;
394 double alph = MBRalpha;
395 double beta0gev = MBRbeta0;
396 double beta0mb = beta0gev * sqrt(HBARC2);
397 double sigma0mb = MBRsigma0;
398 double sigma0gev = sigma0mb/HBARC2;
407 double sign = (idA * idB > 0);
408 sigtot = 16.79 * pow(s, 0.104) + 60.81 * pow(s, -0.32)
409 - sign * 31.68 * pow(s, -0.54);
410 ratio = 0.100 * pow(s, 0.06) + 0.421 * pow(s, -0.52)
411 + sign * 0.160 * pow(s, -0.6);
413 double sigCDF = 80.03;
414 double sCDF = pow2(1800.);
415 double sF = pow2(22.);
416 sigtot = sigCDF + ( pow2( log(s / sF)) - pow2( log(sCDF / sF)) )
417 * M_PI / (3.7 / HBARC2);
418 ratio = 0.066 + 0.0119 * log(s);
425 double cflux, csig, c1, step, f;
429 double dymaxSD = log(s / m2min);
430 cflux = pow2(beta0gev) / (16. * M_PI);
431 csig = cflux * sigma0mb;
436 step = (dymaxSD - dyminSDflux) / NINTEG;
437 for (
int i = 0; i < NINTEG; ++i) {
438 double dy = dyminSDflux + (i + 0.5) * step;
439 f = exp(2. * eps * dy) * ( (a1 / (b1 + 2. * alph * dy))
440 + (a2 / (b2 + 2. * alph * dy)) );
441 f *= 0.5 * (1. + erf( (dy - dyminSD) / dyminSigSD));
442 fluxsd = fluxsd + step * c1 * f;
444 if (fluxsd < 1.) fluxsd = 1.;
447 c1 = csig * pow(s, eps);
450 step = (dymaxSD - dymin0) / NINTEG;
451 for (
int i = 0; i < NINTEG; ++i) {
452 double dy = dymin0 + (i + 0.5) * step;
453 f = exp(eps * dy) * ( (a1 / (b1 + 2. * alph * dy))
454 + (a2 / (b2 + 2. * alph * dy)) );
455 f *= 0.5 * (1. + erf( (dy - dyminSD) / dyminSigSD));
456 if (f > sdpmax) sdpmax = f;
457 sigsd = sigsd + step * c1 * f;
464 double dymaxDD = log(s / pow2(m2min));
465 cflux = sigma0gev / (16. * M_PI);
466 csig = cflux * sigma0mb;
469 c1 = cflux / (2. * alph);
471 step = (dymaxDD - dyminDDflux) / NINTEG;
472 for (
int i = 0; i < NINTEG; ++i) {
473 double dy = dyminDDflux + (i + 0.5) * step;
474 f = (dymaxDD - dy) * exp(2. * eps * dy)
475 * ( exp(-2. * alph * dy * exp(-dy))
476 - exp(-2. * alph * dy * exp(dy)) ) / dy;
477 f *= 0.5 * (1. + erf( (dy - dyminDD) / dyminSigDD));
478 fluxdd = fluxdd + step * c1 * f;
480 if (fluxdd < 1.) fluxdd = 1.;
483 c1 = csig * pow(s, eps) / (2. * alph);
486 step = (dymaxDD - dymin0) / NINTEG;
487 for (
int i = 0; i < NINTEG; ++i) {
488 double dy = dymin0 + (i + 0.5) * step;
489 f = (dymaxDD - dy) * exp(eps * dy)
490 * ( exp(-2. * alph * dy * exp(-dy))
491 - exp(-2. * alph * dy * exp(dy)) ) / dy;
492 f *= 0.5 * (1. + erf( (dy - dyminDD) / dyminSigDD));
493 if (f > ddpmax) ddpmax = f;
494 sigdd = sigdd + step * c1 * f;
500 double dymaxCD = log(s / m2min);
501 cflux = pow4(beta0gev) / pow2(16. * M_PI);
502 csig = cflux * pow2(sigma0mb / beta0mb);
503 double dy1, dy2, f1, f2, step2;
508 step = (dymaxCD - dyminCDflux) / NINTEG;
509 for (
int i = 0; i < NINTEG; ++i) {
510 double dy = dyminCDflux + (i + 0.5) * step;
512 step2 = (dy - dyminCDflux) / NINTEG2;
513 for (
int j = 0; j < NINTEG2; ++j) {
514 double yc = -0.5 * (dy - dyminCDflux) + (j + 0.5) * step2;
517 f1 = exp(2. * eps * dy1) * ( (a1 / (b1 + 2. * alph * dy1))
518 + (a2 / (b2 + 2. * alph * dy1)) );
519 f2 = exp(2. * eps * dy2) * ( (a1 / (b1 + 2. * alph * dy2))
520 + (a2 / (b2 + 2. * alph * dy2)) );
521 f1 *= 0.5 * (1. + erf( (dy1 - 0.5 * dyminCD)
522 / (dyminSigCD / sqrt(2.))) );
523 f2 *= 0.5 * (1. + erf( (dy2 - 0.5 *dyminCD)
524 / (dyminSigCD / sqrt(2.))) );
525 f += f1 * f2 * step2;
527 fluxdpe += step * c1 * f;
529 if (fluxdpe < 1.) fluxdpe = 1.;
532 c1 = csig * pow(s, eps);
535 step = (dymaxCD - dymin0) / NINTEG;
536 for (
int i = 0; i < NINTEG; ++i) {
537 double dy = dymin0 + (i + 0.5) * step;
539 step2 = (dy - dymin0) / NINTEG2;
540 for (
int j = 0; j < NINTEG2; ++j) {
541 double yc = -0.5 * (dy - dymin0) + (j + 0.5) * step2;
544 f1 = exp(eps * dy1) * ( (a1 / (b1 + 2. * alph * dy1))
545 + (a2 / (b2 + 2. * alph * dy1)) );
546 f2 = exp(eps * dy2) * ( (a1 / (b1 + 2. * alph * dy2))
547 + (a2 / (b2 + 2. * alph * dy2)) );
548 f1 *= 0.5 * (1. + erf( (dy1 - 0.5 * dyminCD)
549 / (dyminSigCD / sqrt(2.))) );
550 f2 *= 0.5 * (1. + erf( (dy2 - 0.5 * dyminCD)
551 /(dyminSigCD / sqrt(2.))) );
552 f += f1 * f2 * step2;
554 sigdpe += step * c1 * f;
555 if ( f > dpepmax) dpepmax = f;
561 sigND = sigtot - (2. * sigsd + sigdd + sigel + sigdpe);