9 #include "Pythia8/SigmaQCD.h"
22 void Sigma0AB2AB::setIdColAcol() {
25 setId( idA, idB, idA, idB);
26 setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
38 void Sigma0AB2XB::setIdColAcol() {
41 int idX = 10* (abs(idA) / 10) + 9900000;
42 if (idA < 0) idX = -idX;
43 setId( idA, idB, idX, idB);
44 setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
57 void Sigma0AB2AX::setIdColAcol() {
60 int idX = 10* (abs(idB) / 10) + 9900000;
61 if (idB < 0) idX = -idX;
62 setId( idA, idB, idA, idX);
63 setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
76 void Sigma0AB2XX::setIdColAcol() {
79 int idX1 = 10* (abs(idA) / 10) + 9900000;
80 if (idA < 0) idX1 = -idX1;
81 int idX2 = 10* (abs(idB) / 10) + 9900000;
82 if (idB < 0) idX2 = -idX2;
83 setId( idA, idB, idX1, idX2);
84 setColAcol( 0, 0, 0, 0, 0, 0, 0, 0);
97 void Sigma0AB2AXB::setIdColAcol() {
101 setId( idA, idB, idA, idB,idX);
102 setColAcol( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
115 void Sigma2gg2gg::sigmaKin() {
118 sigTS = (9./4.) * (tH2 / sH2 + 2. * tH / sH + 3. + 2. * sH / tH
120 sigUS = (9./4.) * (uH2 / sH2 + 2. * uH / sH + 3. + 2. * sH / uH
122 sigTU = (9./4.) * (tH2 / uH2 + 2. * tH / uH + 3. + 2. * uH / tH
124 sigSum = sigTS + sigUS + sigTU;
127 sigma = (M_PI / sH2) * pow2(alpS) * 0.5 * sigSum;
135 void Sigma2gg2gg::setIdColAcol() {
138 setId( id1, id2, 21, 21);
141 double sigRand = sigSum * rndmPtr->flat();
142 if (sigRand < sigTS) setColAcol( 1, 2, 2, 3, 1, 4, 4, 3);
143 else if (sigRand < sigTS + sigUS)
144 setColAcol( 1, 2, 3, 1, 3, 4, 4, 2);
145 else setColAcol( 1, 2, 3, 4, 1, 4, 3, 2);
146 if (rndmPtr->flat() > 0.5) swapColAcol();
159 void Sigma2gg2qqbar::initProc() {
162 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
170 void Sigma2gg2qqbar::sigmaKin() {
173 idNew = 1 + int( nQuarkNew * rndmPtr->flat() );
174 mNew = particleDataPtr->m0(idNew);
180 if (sH > 4. * m2New) {
181 sigTS = (1./6.) * uH / tH - (3./8.) * uH2 / sH2;
182 sigUS = (1./6.) * tH / uH - (3./8.) * tH2 / sH2;
184 sigSum = sigTS + sigUS;
187 sigma = (M_PI / sH2) * pow2(alpS) * nQuarkNew * sigSum;
195 void Sigma2gg2qqbar::setIdColAcol() {
198 setId( id1, id2, idNew, -idNew);
201 double sigRand = sigSum * rndmPtr->flat();
202 if (sigRand < sigTS) setColAcol( 1, 2, 2, 3, 1, 0, 0, 3);
203 else setColAcol( 1, 2, 3, 1, 3, 0, 0, 2);
216 void Sigma2qg2qg::sigmaKin() {
219 sigTS = uH2 / tH2 - (4./9.) * uH / sH;
220 sigTU = sH2 / tH2 - (4./9.) * sH / uH;
221 sigSum = sigTS + sigTU;
224 sigma = (M_PI / sH2) * pow2(alpS) * sigSum;
232 void Sigma2qg2qg::setIdColAcol() {
235 setId( id1, id2, id1, id2);
238 double sigRand = sigSum * rndmPtr->flat();
239 if (sigRand < sigTS) setColAcol( 1, 0, 2, 1, 3, 0, 2, 3);
240 else setColAcol( 1, 0, 2, 3, 2, 0, 1, 3);
241 if (id1 == 21) swapCol1234();
242 if (id1 < 0 || id2 < 0) swapColAcol();
257 void Sigma2qq2qq::sigmaKin() {
260 sigT = (4./9.) * (sH2 + uH2) / tH2;
261 sigU = (4./9.) * (sH2 + tH2) / uH2;
262 sigTU = - (8./27.) * sH2 / (tH * uH);
263 sigST = - (8./27.) * uH2 / (sH * tH);
272 double Sigma2qq2qq::sigmaHat() {
275 if (id2 == id1) sigSum = 0.5 * (sigT + sigU + sigTU);
276 else if (id2 == -id1) sigSum = sigT + sigST;
284 return (M_PI/sH2) * pow2(alpS) * sigSum;
292 void Sigma2qq2qq::setIdColAcol() {
295 setId( id1, id2, id1, id2);
298 if (id1 * id2 > 0) setColAcol( 1, 0, 2, 0, 2, 0, 1, 0);
299 else setColAcol( 1, 0, 0, 1, 2, 0, 0, 2);
300 if (id2 == id1 && (sigT + sigU) * rndmPtr->flat() > sigT)
301 setColAcol( 1, 0, 2, 0, 1, 0, 2, 0);
302 if (id1 < 0) swapColAcol();
315 void Sigma2qqbar2gg::sigmaKin() {
318 sigTS = (32./27.) * uH / tH - (8./3.) * uH2 / sH2;
319 sigUS = (32./27.) * tH / uH - (8./3.) * tH2 / sH2;
320 sigSum = sigTS + sigUS;
323 sigma = (M_PI / sH2) * pow2(alpS) * 0.5 * sigSum;
331 void Sigma2qqbar2gg::setIdColAcol() {
334 setId( id1, id2, 21, 21);
337 double sigRand = sigSum * rndmPtr->flat();
338 if (sigRand < sigTS) setColAcol( 1, 0, 0, 2, 1, 3, 3, 2);
339 else setColAcol( 1, 0, 0, 2, 3, 2, 1, 3);
340 if (id1 < 0) swapColAcol();
353 void Sigma2qqbar2qqbarNew::initProc() {
356 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
364 void Sigma2qqbar2qqbarNew::sigmaKin() {
367 idNew = 1 + int( nQuarkNew * rndmPtr->flat() );
368 mNew = particleDataPtr->m0(idNew);
373 if (sH > 4. * m2New) sigS = (4./9.) * (tH2 + uH2) / sH2;
376 sigma = (M_PI / sH2) * pow2(alpS) * nQuarkNew * sigS;
384 void Sigma2qqbar2qqbarNew::setIdColAcol() {
387 id3 = (id1 > 0) ? idNew : -idNew;
388 setId( id1, id2, id3, -id3);
391 setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
392 if (id1 < 0) swapColAcol();
410 void Sigma2gg2QQbar::initProc() {
413 nameSave =
"g g -> Q Qbar";
414 if (idNew == 4) nameSave =
"g g -> c cbar";
415 if (idNew == 5) nameSave =
"g g -> b bbar";
416 if (idNew == 6) nameSave =
"g g -> t tbar";
417 if (idNew == 7) nameSave =
"g g -> b' b'bar";
418 if (idNew == 8) nameSave =
"g g -> t' t'bar";
421 openFracPair = particleDataPtr->resOpenFrac(idNew, -idNew);
429 void Sigma2gg2QQbar::sigmaKin() {
432 double s34Avg = 0.5 * (s3 + s4) - 0.25 * pow2(s3 - s4) / sH;
433 double tHQ = -0.5 * (sH - tH + uH);
434 double uHQ = -0.5 * (sH + tH - uH);
435 double tHQ2 = tHQ * tHQ;
436 double uHQ2 = uHQ * uHQ;
439 double tumHQ = tHQ * uHQ - s34Avg * sH;
440 sigTS = ( uHQ / tHQ - 2.25 * uHQ2 / sH2 + 4.5 * s34Avg * tumHQ
441 / ( sH * tHQ2) + 0.5 * s34Avg * (tHQ + s34Avg) / tHQ2
442 - s34Avg*s34Avg / (sH * tHQ) ) / 6.;
443 sigUS = ( tHQ / uHQ - 2.25 * tHQ2 / sH2 + 4.5 * s34Avg * tumHQ
444 / ( sH * uHQ2) + 0.5 * s34Avg * (uHQ + s34Avg) / uHQ2
445 - s34Avg*s34Avg / (sH * uHQ) ) / 6.;
446 sigSum = sigTS + sigUS;
449 sigma = (M_PI / sH2) * pow2(alpS) * sigSum * openFracPair;
457 void Sigma2gg2QQbar::setIdColAcol() {
460 setId( id1, id2, idNew, -idNew);
463 double sigRand = sigSum * rndmPtr->flat();
464 if (sigRand < sigTS) setColAcol( 1, 2, 2, 3, 1, 0, 0, 3);
465 else setColAcol( 1, 2, 3, 1, 3, 0, 0, 2);
473 double Sigma2gg2QQbar::weightDecay(
Event& process,
int iResBeg,
477 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
478 return weightTopDecay( process, iResBeg, iResEnd);
497 void Sigma2qqbar2QQbar::initProc() {
500 nameSave =
"q qbar -> Q Qbar";
501 if (idNew == 4) nameSave =
"q qbar -> c cbar";
502 if (idNew == 5) nameSave =
"q qbar -> b bbar";
503 if (idNew == 6) nameSave =
"q qbar -> t tbar";
504 if (idNew == 7) nameSave =
"q qbar -> b' b'bar";
505 if (idNew == 8) nameSave =
"q qbar -> t' t'bar";
508 openFracPair = particleDataPtr->resOpenFrac(idNew, -idNew);
516 void Sigma2qqbar2QQbar::sigmaKin() {
519 double s34Avg = 0.5 * (s3 + s4) - 0.25 * pow2(s3 - s4) / sH;
520 double tHQ = -0.5 * (sH - tH + uH);
521 double uHQ = -0.5 * (sH + tH - uH);
522 double tHQ2 = tHQ * tHQ;
523 double uHQ2 = uHQ * uHQ;
526 double sigS = (4./9.) * ((tHQ2 + uHQ2) / sH2 + 2. * s34Avg / sH);
529 sigma = (M_PI / sH2) * pow2(alpS) * sigS * openFracPair;
537 void Sigma2qqbar2QQbar::setIdColAcol() {
540 id3 = (id1 > 0) ? idNew : -idNew;
541 setId( id1, id2, id3, -id3);
544 setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
545 if (id1 < 0) swapColAcol();
553 double Sigma2qqbar2QQbar::weightDecay(
Event& process,
int iResBeg,
557 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
558 return weightTopDecay( process, iResBeg, iResEnd);
573 void Sigma3gg2ggg::sigmaKin() {
576 Vec4 p1cm( 0., 0., 0.5 * mH, 0.5 * mH);
577 Vec4 p2cm( 0., 0., -0.5 * mH, 0.5 * mH);
578 pp[1][2] = p1cm * p2cm;
579 pp[1][3] = p1cm * p3cm;
580 pp[1][4] = p1cm * p4cm;
581 pp[1][5] = p1cm * p5cm;
582 pp[2][3] = p2cm * p3cm;
583 pp[2][4] = p2cm * p4cm;
584 pp[2][5] = p2cm * p5cm;
585 pp[3][4] = p3cm * p4cm;
586 pp[3][5] = p3cm * p5cm;
587 pp[4][5] = p4cm * p5cm;
588 for (
int i = 1; i < 5; ++i)
589 for (
int j = i + 1; j < 6; ++j) pp[j][i] = pp[i][j];
592 double num1 = cycle(1,2,3,4,5) + cycle(1,2,3,5,4) + cycle(1,2,4,3,5)
593 + cycle(1,2,4,5,3) + cycle(1,2,5,3,4) + cycle(1,2,5,4,3)
594 + cycle(1,3,2,4,5) + cycle(1,3,2,5,4) + cycle(1,3,4,2,5)
595 + cycle(1,3,5,2,4) + cycle(1,4,2,3,5) + cycle(1,4,3,2,5);
596 double num2 = pow4(pp[1][2]) + pow4(pp[1][3]) + pow4(pp[1][4])
597 + pow4(pp[1][5]) + pow4(pp[2][3]) + pow4(pp[2][4])
598 + pow4(pp[2][5]) + pow4(pp[3][4]) + pow4(pp[3][5])
600 double den = pp[1][2] * pp[1][3] * pp[1][4] * pp[1][5] * pp[2][3]
601 * pp[2][4] * pp[2][5] * pp[3][4] * pp[3][5] * pp[4][5];
605 sigma = pow3(4. * M_PI * alpS) * (27./16.) * num1 * num2 / den;
613 void Sigma3gg2ggg::setIdColAcol() {
616 setId( id1, id2, 21, 21, 21);
629 setColAcol( 1, 2, 2, 3, 1, 4, 4, 5, 5, 3);
641 void Sigma3qqbar2ggg::sigmaKin() {
644 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
645 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
661 inline double Sigma3qqbar2ggg::m2Calc() {
664 double sHnow = (pCM[0] + pCM[1]).m2Calc();
665 double sHhalf = sH / 2.;
670 a[0] = pCM[0] * pCM[2];
671 a[1] = pCM[0] * pCM[3];
672 a[2] = pCM[0] * pCM[4];
673 b[0] = pCM[1] * pCM[2];
674 b[1] = pCM[1] * pCM[3];
675 b[2] = pCM[1] * pCM[4];
677 pp[0][1] = pCM[2] * pCM[3];
678 pp[1][2] = pCM[3] * pCM[4];
679 pp[2][0] = pCM[4] * pCM[2];
682 ab[0][1] = a[0] * b[1] + a[1] * b[0];
683 ab[1][2] = a[1] * b[2] + a[2] * b[1];
684 ab[2][0] = a[2] * b[0] + a[0] * b[2];
687 double num1 = a[0] * b[0] * (a[0] * a[0] + b[0] * b[0]) +
688 a[1] * b[1] * (a[1] * a[1] + b[1] * b[1]) +
689 a[2] * b[2] * (a[2] * a[2] + b[2] * b[2]);
690 double den1 = a[0] * a[1] * a[2] * b[0] * b[1] * b[2];
691 double num2 = - ( ab[0][1] / pp[0][1] )
692 - ( ab[1][2] / pp[1][2] )
693 - ( ab[2][0] / pp[2][0] );
694 double num3 = a[2] * b[2] * ab[0][1] / (pp[1][2] * pp[2][0] ) +
695 a[0] * b[0] * ab[1][2] / (pp[2][0] * pp[0][1] ) +
696 a[1] * b[1] * ab[2][0] / (pp[0][1] * pp[1][2] );
699 return pow3(4. * M_PI * alpS) * (8. / 324.) * (num1 / den1) *
700 ( sHhalf + 9. * (sHhalf + num2) + (2. * 81. / sHnow) * num3 );
708 void Sigma3qqbar2ggg::setIdColAcol(){
711 setId( id1, id2, 21, 21, 21);
714 setColAcol( 1, 0, 0, 2, 1, 3, 3, 4, 4, 2);
715 if (id1 < 0) swapColAcol();
722 inline void Sigma3qqbar2ggg::mapFinal() {
724 case 0: pCM[2] = p3cm; pCM[3] = p4cm; pCM[4] = p5cm;
break;
725 case 1: pCM[2] = p3cm; pCM[3] = p5cm; pCM[4] = p4cm;
break;
726 case 2: pCM[2] = p4cm; pCM[3] = p3cm; pCM[4] = p5cm;
break;
727 case 3: pCM[2] = p4cm; pCM[3] = p5cm; pCM[4] = p3cm;
break;
728 case 4: pCM[2] = p5cm; pCM[3] = p3cm; pCM[4] = p4cm;
break;
729 case 5: pCM[2] = p5cm; pCM[3] = p4cm; pCM[4] = p3cm;
break;
745 void Sigma3qg2qgg::sigmaKin() {
751 for (
int i = 0; i < 2; i++) {
754 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
755 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
759 swap(pCM[i], pCM[2]);
766 sigma[i] = 3. * (3. / 8.) * m2Calc();
777 double Sigma3qg2qgg::sigmaHat() {
779 return (id1 == 21) ? sigma[0] : sigma[1];
786 void Sigma3qg2qgg::setIdColAcol(){
788 int qIdx = config / 2;
789 int idTmp[3] = { 21, 21, 21 };
790 idTmp[qIdx] = (id1 == 21) ? id2 : id1;
791 setId( id1, id2, idTmp[0], idTmp[1], idTmp[2]);
794 if (qIdx == 0) setColAcol(1, 0, 2, 1, 4, 0, 3, 4, 2, 3);
795 else if (qIdx == 1) setColAcol(1, 0, 2, 1, 3, 4, 4, 0, 2, 3);
796 else setColAcol(1, 0, 2, 1, 3, 4, 2, 3, 4, 0);
799 swap( colSave[1], colSave[2]);
800 swap(acolSave[1], acolSave[2]);
803 if (id1 < 0 || id2 < 0) swapColAcol();
817 void Sigma3gg2qqbarg::initProc() {
820 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
828 void Sigma3gg2qqbarg::sigmaKin() {
831 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
832 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
839 swap(pCM[0], pCM[2]);
840 swap(pCM[1], pCM[3]);
846 sigma = 6. * nQuarkNew * (3. / 8.) * (3. / 8.) * m2Calc();
854 void Sigma3gg2qqbarg::setIdColAcol(){
857 int idNew = 1 + int( nQuarkNew * rndmPtr->flat() );
861 case 0: id3 = idNew; id4 = -idNew; id5 = 21;
break;
862 case 1: id3 = idNew; id4 = 21; id5 = -idNew;
break;
863 case 2: id3 = -idNew; id4 = idNew; id5 = 21;
break;
864 case 3: id3 = 21; id4 = idNew; id5 = -idNew;
break;
865 case 4: id3 = -idNew; id4 = 21; id5 = idNew;
break;
866 case 5: id3 = 21; id4 = -idNew; id5 = idNew;
break;
868 setId(id1, id2, id3, id4, id5);
872 case 0: setColAcol( 1, 2, 2, 3, 4, 0, 0, 3, 1, 4 );
break;
873 case 1: setColAcol( 1, 2, 2, 3, 4, 0, 1, 4, 0, 3 );
break;
874 case 2: setColAcol( 1, 2, 2, 3, 0, 3, 4, 0, 1, 4 );
break;
875 case 3: setColAcol( 1, 2, 2, 3, 1, 4, 4, 0, 0, 3 );
break;
876 case 4: setColAcol( 1, 2, 2, 3, 0, 3, 1, 4, 4, 0 );
break;
877 case 5: setColAcol( 1, 2, 2, 3, 1, 4, 0, 3, 4, 0 );
break;
891 void Sigma3qq2qqgDiff::sigmaKin() {
896 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
897 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
904 sigma = 6. * m2Calc();
911 inline double Sigma3qq2qqgDiff::m2Calc() {
914 s = (pCM[0] + pCM[1]).m2Calc();
915 t = (pCM[0] - pCM[2]).m2Calc();
916 u = (pCM[0] - pCM[3]).m2Calc();
917 up = (pCM[1] - pCM[2]).m2Calc();
918 sp = (pCM[2] + pCM[3]).m2Calc();
919 tp = (pCM[1] - pCM[3]).m2Calc();
922 double num1 = (s * s + sp * sp + u * u + up * up) / (t * tp);
923 double den1 = (pCM[0] * pCM[4]) * (pCM[1] * pCM[4]) *
924 (pCM[2] * pCM[4]) * (pCM[3] * pCM[4]);
925 double num2 = (u + up) * (s * sp + t * tp - u * up) +
926 u * (s * t + sp * tp) + up * (s * tp + sp * t);
927 double num3 = (s + sp) * (s * sp - t * tp - u * up) +
928 2. * t * tp * (u + up) + 2. * u * up * (t + tp);
932 return (1. / 8.) * pow3(4. * M_PI * alpS) * num1 / den1 *
933 ( (16. / 27.) * num2 - (2. / 27.) * num3 );
941 double Sigma3qq2qqgDiff::sigmaHat() {
943 if (abs(id1) == abs(id2))
return 0.;
951 void Sigma3qq2qqgDiff::setIdColAcol(){
955 case 0: id3 = id1; id4 = id2; id5 = 21;
break;
956 case 1: id3 = id1; id4 = 21; id5 = id2;
break;
957 case 2: id3 = id2; id4 = id1; id5 = 21;
break;
958 case 3: id3 = 21; id4 = id1; id5 = id2;
break;
959 case 4: id3 = id2; id4 = 21; id5 = id1;
break;
960 case 5: id3 = 21; id4 = id2; id5 = id1;
break;
962 setId(id1, id2, id3, id4, id5);
967 cols[0][0] = 1; cols[0][1] = 0;
968 cols[2][0] = 1; cols[2][1] = 0;
970 cols[0][0] = 0; cols[0][1] = 1;
971 cols[2][0] = 0; cols[2][1] = 1;
974 cols[1][0] = 2; cols[1][1] = 0;
975 cols[3][0] = 3; cols[3][1] = 0;
976 cols[4][0] = 2; cols[4][1] = 3;
978 cols[1][0] = 0; cols[1][1] = 2;
979 cols[3][0] = 0; cols[3][1] = 3;
980 cols[4][0] = 3; cols[4][1] = 2;
983 int i3 = 0, i4 = 0, i5 = 0;
985 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
986 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
987 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
988 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
989 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
990 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
993 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
994 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
995 cols[i5][0], cols[i5][1]);
1003 inline void Sigma3qq2qqgDiff::mapFinal() {
1005 case 0: pCM[2] = p3cm; pCM[3] = p4cm; pCM[4] = p5cm;
break;
1006 case 1: pCM[2] = p3cm; pCM[3] = p5cm; pCM[4] = p4cm;
break;
1007 case 2: pCM[2] = p4cm; pCM[3] = p3cm; pCM[4] = p5cm;
break;
1008 case 3: pCM[2] = p4cm; pCM[3] = p5cm; pCM[4] = p3cm;
break;
1009 case 4: pCM[2] = p5cm; pCM[3] = p3cm; pCM[4] = p4cm;
break;
1010 case 5: pCM[2] = p5cm; pCM[3] = p4cm; pCM[4] = p3cm;
break;
1025 void Sigma3qqbar2qqbargDiff::initProc() {
1028 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
1036 void Sigma3qqbar2qqbargDiff::sigmaKin() {
1046 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1047 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1053 swap(pCM[1], pCM[2]);
1061 sigma = 6. * (nQuarkNew - 1) * 2. * m2Calc();
1069 void Sigma3qqbar2qqbargDiff::setIdColAcol(){
1072 int idNew = 1 + int( (nQuarkNew - 1) * rndmPtr->flat() );
1073 if (idNew >= abs(id1)) ++idNew;
1076 if (id1 > 0) idNew = -idNew;
1080 case 0: id3 = idNew; id4 = -idNew; id5 = 21;
break;
1081 case 1: id3 = idNew; id4 = 21; id5 = -idNew;
break;
1082 case 2: id3 = -idNew; id4 = idNew; id5 = 21;
break;
1083 case 3: id3 = 21; id4 = idNew; id5 = -idNew;
break;
1084 case 4: id3 = -idNew; id4 = 21; id5 = idNew;
break;
1085 case 5: id3 = 21; id4 = -idNew; id5 = idNew;
break;
1087 setId(id1, id2, id3, id4, id5);
1091 cols[0][0] = 1; cols[0][1] = 0;
1092 cols[1][0] = 0; cols[1][1] = 2;
1093 cols[2][0] = 0; cols[2][1] = 3;
1094 cols[3][0] = 1; cols[3][1] = 0;
1095 cols[4][0] = 3; cols[4][1] = 2;
1097 int i3 = 0, i4 = 0, i5 = 0;
1099 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1100 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1101 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1102 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1103 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1104 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1106 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1107 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1108 cols[i5][0], cols[i5][1]);
1110 if (id1 < 0) swapColAcol();
1125 void Sigma3qg2qqqbarDiff::initProc() {
1128 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
1136 void Sigma3qg2qqqbarDiff::sigmaKin() {
1142 for (
int i = 0; i < 2; i++) {
1145 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1146 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1150 swap(pCM[i], pCM[4]);
1158 sigma[i] = -6. * (3. / 8.) * (nQuarkNew - 1) * m2Calc();
1168 double Sigma3qg2qqqbarDiff::sigmaHat() {
1170 return (id1 == 21) ? sigma[0] : sigma[1];
1177 void Sigma3qg2qqqbarDiff::setIdColAcol(){
1179 int sigmaIdx = (id1 == 21) ? 0 : 1;
1180 int idIn = (id1 == 21) ? id2 : id1;
1181 int idNew = 1 + int( (nQuarkNew - 1) * rndmPtr->flat() );
1182 if (idNew >= abs(idIn)) ++idNew;
1185 int id3Tmp = idIn, id4Tmp = idNew, id5Tmp = -idNew;
1186 if (idIn < 0) swap(id4Tmp, id5Tmp);
1189 if (sigmaIdx == 0) swap(id3Tmp, id4Tmp);
1192 case 0: id3 = id3Tmp; id4 = id4Tmp; id5 = id5Tmp;
break;
1193 case 1: id3 = id3Tmp; id4 = id5Tmp; id5 = id4Tmp;
break;
1194 case 2: id3 = id4Tmp; id4 = id3Tmp; id5 = id5Tmp;
break;
1195 case 3: id3 = id5Tmp; id4 = id3Tmp; id5 = id4Tmp;
break;
1196 case 4: id3 = id4Tmp; id4 = id5Tmp; id5 = id3Tmp;
break;
1197 case 5: id3 = id5Tmp; id4 = id4Tmp; id5 = id3Tmp;
break;
1199 setId(id1, id2, id3, id4, id5);
1205 cols[0][0] = 1; cols[0][1] = 2;
1207 cols[1][0] = 3; cols[1][1] = 0;
1208 cols[2][0] = 1; cols[2][1] = 0;
1209 cols[3][0] = 3; cols[3][1] = 0;
1210 cols[4][0] = 0; cols[4][1] = 2;
1212 cols[1][0] = 0; cols[1][1] = 3;
1213 cols[2][0] = 0; cols[2][1] = 2;
1214 cols[3][0] = 0; cols[3][1] = 3;
1215 cols[4][0] = 1; cols[4][1] = 0;
1219 swap(cols[0][0], cols[1][0]);
1220 swap(cols[0][1], cols[1][1]);
1223 int i3 = 0, i4 = 0, i5 = 0;
1224 if (sigmaIdx == 0) {
1226 case 0: i3 = 3; i4 = 2; i5 = 4;
break;
1227 case 1: i3 = 3; i4 = 4; i5 = 2;
break;
1228 case 2: i3 = 2; i4 = 3; i5 = 4;
break;
1229 case 3: i3 = 4; i4 = 3; i5 = 2;
break;
1230 case 4: i3 = 2; i4 = 4; i5 = 3;
break;
1231 case 5: i3 = 4; i4 = 2; i5 = 3;
break;
1235 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1236 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1237 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1238 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1239 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1240 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1243 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1244 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1245 cols[i5][0], cols[i5][1]);
1257 void Sigma3qq2qqgSame::sigmaKin() {
1261 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1262 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1271 sigma = 3. * m2Calc();
1279 inline double Sigma3qq2qqgSame::m2Calc() {
1282 s = (pCM[0] + pCM[1]).m2Calc();
1283 t = (pCM[0] - pCM[2]).m2Calc();
1284 u = (pCM[0] - pCM[3]).m2Calc();
1285 sp = (pCM[2] + pCM[3]).m2Calc();
1286 tp = (pCM[1] - pCM[3]).m2Calc();
1287 up = (pCM[1] - pCM[2]).m2Calc();
1297 double den1 = (pCM[0] * pCM[4]) * (pCM[1] * pCM[4]) *
1298 (pCM[2] * pCM[4]) * (pCM[3] * pCM[4]);
1300 double fac1 = s * (t * u + tp * up) + sp * (t * up + tp * u);
1301 double fac2 = ssp - ttp - uup;
1302 double fac3 = 2. * (ttp * u_up + uup * t_tp);
1304 double num1 = u_up * (ssp + ttp - uup) + fac1;
1305 double num2 = s_sp * fac2 + fac3;
1306 double num3 = (s * s + sp * sp + u * u + up * up) / (t * tp);
1308 double num4 = t_tp * (ssp - ttp + uup) + fac1;
1309 double num5 = (s * s + sp * sp + t * t + tp * tp) / (u * up);
1311 double num6 = s_sp * fac2 - fac3 - 2. * fac1;
1312 double num7 = (s * s + sp * sp) * fac2;
1313 double den7 = (ttp * uup);
1319 return (1. / 8.) * pow3(4. * M_PI * alpS) *
1320 ( ( (16. / 27.) * num1 - (2. / 27.) * num2 ) * num3 +
1321 ( (16. / 27.) * num4 - (2. / 27.) * num2 ) * num5 +
1322 ( (10. / 81.) * num2 + (8. / 81.) * num6 ) *
1323 ( num7 / den7 ) ) / den1;
1331 double Sigma3qq2qqgSame::sigmaHat() {
1333 if (id1 != id2)
return 0.;
1341 void Sigma3qq2qqgSame::setIdColAcol(){
1346 case 3:
case 5: gIdx = 0;
break;
1347 case 1:
case 4: gIdx = 1;
break;
1348 case 0:
case 2: gIdx = 2;
break;
1352 int idTmp[3] = { id1, id1, id1 };
1354 setId(id1, id2, idTmp[0], idTmp[1], idTmp[2]);
1357 setColAcol(1, 0, 2, 0, 1, 0, 3, 0, 2, 3);
1359 swap( colSave[5], colSave[gIdx + 3]);
1360 swap(acolSave[5], acolSave[gIdx + 3]);
1362 if (id1 < 0) swapColAcol();
1369 inline void Sigma3qq2qqgSame::mapFinal() {
1371 case 0: pCM[2] = p3cm; pCM[3] = p4cm; pCM[4] = p5cm;
break;
1372 case 1: pCM[2] = p3cm; pCM[3] = p5cm; pCM[4] = p4cm;
break;
1373 case 2: pCM[2] = p4cm; pCM[3] = p3cm; pCM[4] = p5cm;
break;
1374 case 3: pCM[2] = p4cm; pCM[3] = p5cm; pCM[4] = p3cm;
break;
1375 case 4: pCM[2] = p5cm; pCM[3] = p3cm; pCM[4] = p4cm;
break;
1376 case 5: pCM[2] = p5cm; pCM[3] = p4cm; pCM[4] = p3cm;
break;
1390 void Sigma3qqbar2qqbargSame::sigmaKin() {
1393 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1394 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1401 swap(pCM[1], pCM[3]);
1407 sigma = 6. * m2Calc();
1415 void Sigma3qqbar2qqbargSame::setIdColAcol(){
1418 case 0: id3 = id1; id4 = id2; id5 = 21;
break;
1419 case 1: id3 = id1; id4 = 21; id5 = id2;
break;
1420 case 2: id3 = id2; id4 = id1; id5 = 21;
break;
1421 case 3: id3 = 21; id4 = id1; id5 = id2;
break;
1422 case 4: id3 = id2; id4 = 21; id5 = id1;
break;
1423 case 5: id3 = 21; id4 = id2; id5 = id1;
break;
1425 setId(id1, id2, id3, id4, id5);
1429 cols[0][0] = 1; cols[0][1] = 0;
1430 cols[1][0] = 0; cols[1][1] = 2;
1431 cols[2][0] = 1; cols[2][1] = 0;
1432 cols[3][0] = 0; cols[3][1] = 3;
1433 cols[4][0] = 3; cols[4][1] = 2;
1435 int i3 = 0, i4 = 0, i5 = 0;
1437 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1438 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1439 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1440 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1441 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1442 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1444 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1445 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1446 cols[i5][0], cols[i5][1]);
1448 if (id1 < 0) swapColAcol();
1462 void Sigma3qg2qqqbarSame::sigmaKin() {
1468 for (
int i = 0; i < 2; i++) {
1471 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1472 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1476 swap(pCM[i], pCM[4]);
1483 sigma[i] = -3. * (3. / 8.) * m2Calc();
1493 double Sigma3qg2qqqbarSame::sigmaHat() {
1495 return (id1 == 21) ? sigma[0] : sigma[1];
1502 void Sigma3qg2qqqbarSame::setIdColAcol(){
1505 int idIn = (id1 == 21) ? id2 : id1;
1509 case 0: id3 = idIn; id4 = idIn; id5 = -idIn;
break;
1510 case 1: id3 = idIn; id4 = -idIn; id5 = idIn;
break;
1511 case 2: id3 = idIn; id4 = idIn; id5 = -idIn;
break;
1512 case 3: id3 = -idIn; id4 = idIn; id5 = idIn;
break;
1513 case 4: id3 = idIn; id4 = -idIn; id5 = idIn;
break;
1514 case 5: id3 = -idIn; id4 = idIn; id5 = idIn;
break;
1516 setId(id1, id2, id3, id4, id5);
1522 cols[0][0] = 1; cols[0][1] = 2;
1524 cols[1][0] = 3; cols[1][1] = 0;
1525 cols[2][0] = 1; cols[2][1] = 0;
1526 cols[3][0] = 3; cols[3][1] = 0;
1527 cols[4][0] = 0; cols[4][1] = 2;
1529 cols[1][0] = 0; cols[1][1] = 3;
1530 cols[2][0] = 0; cols[2][1] = 2;
1531 cols[3][0] = 0; cols[3][1] = 3;
1532 cols[4][0] = 1; cols[4][1] = 0;
1536 swap(cols[0][0], cols[1][0]);
1537 swap(cols[0][1], cols[1][1]);
1540 int i3 = 0, i4 = 0, i5 = 0;
1542 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1543 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1544 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1545 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1546 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1547 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1549 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1550 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1551 cols[i5][0], cols[i5][1]);