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();
256 void Sigma2qq2qq::sigmaKin() {
259 sigT = (4./9.) * (sH2 + uH2) / tH2;
260 sigU = (4./9.) * (sH2 + tH2) / uH2;
261 sigTU = - (8./27.) * sH2 / (tH * uH);
262 sigST = - (8./27.) * uH2 / (sH * tH);
271 double Sigma2qq2qq::sigmaHat() {
274 if (id2 == id1) sigSum = 0.5 * (sigT + sigU + sigTU);
275 else if (id2 == -id1) sigSum = sigT + sigST;
279 return (M_PI/sH2) * pow2(alpS) * sigSum;
287 void Sigma2qq2qq::setIdColAcol() {
290 setId( id1, id2, id1, id2);
293 if (id1 * id2 > 0) setColAcol( 1, 0, 2, 0, 2, 0, 1, 0);
294 else setColAcol( 1, 0, 0, 1, 2, 0, 0, 2);
295 if (id2 == id1 && (sigT + sigU) * rndmPtr->flat() > sigT)
296 setColAcol( 1, 0, 2, 0, 1, 0, 2, 0);
297 if (id1 < 0) swapColAcol();
310 void Sigma2qqbar2gg::sigmaKin() {
313 sigTS = (32./27.) * uH / tH - (8./3.) * uH2 / sH2;
314 sigUS = (32./27.) * tH / uH - (8./3.) * tH2 / sH2;
315 sigSum = sigTS + sigUS;
318 sigma = (M_PI / sH2) * pow2(alpS) * 0.5 * sigSum;
326 void Sigma2qqbar2gg::setIdColAcol() {
329 setId( id1, id2, 21, 21);
332 double sigRand = sigSum * rndmPtr->flat();
333 if (sigRand < sigTS) setColAcol( 1, 0, 0, 2, 1, 3, 3, 2);
334 else setColAcol( 1, 0, 0, 2, 3, 2, 1, 3);
335 if (id1 < 0) swapColAcol();
348 void Sigma2qqbar2qqbarNew::initProc() {
351 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
359 void Sigma2qqbar2qqbarNew::sigmaKin() {
362 idNew = 1 + int( nQuarkNew * rndmPtr->flat() );
363 mNew = particleDataPtr->m0(idNew);
368 if (sH > 4. * m2New) sigS = (4./9.) * (tH2 + uH2) / sH2;
371 sigma = (M_PI / sH2) * pow2(alpS) * nQuarkNew * sigS;
379 void Sigma2qqbar2qqbarNew::setIdColAcol() {
382 id3 = (id1 > 0) ? idNew : -idNew;
383 setId( id1, id2, id3, -id3);
386 setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
387 if (id1 < 0) swapColAcol();
405 void Sigma2gg2QQbar::initProc() {
408 nameSave =
"g g -> Q Qbar";
409 if (idNew == 4) nameSave =
"g g -> c cbar";
410 if (idNew == 5) nameSave =
"g g -> b bbar";
411 if (idNew == 6) nameSave =
"g g -> t tbar";
412 if (idNew == 7) nameSave =
"g g -> b' b'bar";
413 if (idNew == 8) nameSave =
"g g -> t' t'bar";
416 openFracPair = particleDataPtr->resOpenFrac(idNew, -idNew);
424 void Sigma2gg2QQbar::sigmaKin() {
427 double s34Avg = 0.5 * (s3 + s4) - 0.25 * pow2(s3 - s4) / sH;
428 double tHQ = -0.5 * (sH - tH + uH);
429 double uHQ = -0.5 * (sH + tH - uH);
430 double tHQ2 = tHQ * tHQ;
431 double uHQ2 = uHQ * uHQ;
434 double tumHQ = tHQ * uHQ - s34Avg * sH;
435 sigTS = ( uHQ / tHQ - 2.25 * uHQ2 / sH2 + 4.5 * s34Avg * tumHQ
436 / ( sH * tHQ2) + 0.5 * s34Avg * (tHQ + s34Avg) / tHQ2
437 - s34Avg*s34Avg / (sH * tHQ) ) / 6.;
438 sigUS = ( tHQ / uHQ - 2.25 * tHQ2 / sH2 + 4.5 * s34Avg * tumHQ
439 / ( sH * uHQ2) + 0.5 * s34Avg * (uHQ + s34Avg) / uHQ2
440 - s34Avg*s34Avg / (sH * uHQ) ) / 6.;
441 sigSum = sigTS + sigUS;
444 sigma = (M_PI / sH2) * pow2(alpS) * sigSum * openFracPair;
452 void Sigma2gg2QQbar::setIdColAcol() {
455 setId( id1, id2, idNew, -idNew);
458 double sigRand = sigSum * rndmPtr->flat();
459 if (sigRand < sigTS) setColAcol( 1, 2, 2, 3, 1, 0, 0, 3);
460 else setColAcol( 1, 2, 3, 1, 3, 0, 0, 2);
468 double Sigma2gg2QQbar::weightDecay(
Event& process,
int iResBeg,
472 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
473 return weightTopDecay( process, iResBeg, iResEnd);
492 void Sigma2qqbar2QQbar::initProc() {
495 nameSave =
"q qbar -> Q Qbar";
496 if (idNew == 4) nameSave =
"q qbar -> c cbar";
497 if (idNew == 5) nameSave =
"q qbar -> b bbar";
498 if (idNew == 6) nameSave =
"q qbar -> t tbar";
499 if (idNew == 7) nameSave =
"q qbar -> b' b'bar";
500 if (idNew == 8) nameSave =
"q qbar -> t' t'bar";
503 openFracPair = particleDataPtr->resOpenFrac(idNew, -idNew);
511 void Sigma2qqbar2QQbar::sigmaKin() {
514 double s34Avg = 0.5 * (s3 + s4) - 0.25 * pow2(s3 - s4) / sH;
515 double tHQ = -0.5 * (sH - tH + uH);
516 double uHQ = -0.5 * (sH + tH - uH);
517 double tHQ2 = tHQ * tHQ;
518 double uHQ2 = uHQ * uHQ;
521 double sigS = (4./9.) * ((tHQ2 + uHQ2) / sH2 + 2. * s34Avg / sH);
524 sigma = (M_PI / sH2) * pow2(alpS) * sigS * openFracPair;
532 void Sigma2qqbar2QQbar::setIdColAcol() {
535 id3 = (id1 > 0) ? idNew : -idNew;
536 setId( id1, id2, id3, -id3);
539 setColAcol( 1, 0, 0, 2, 1, 0, 0, 2);
540 if (id1 < 0) swapColAcol();
548 double Sigma2qqbar2QQbar::weightDecay(
Event& process,
int iResBeg,
552 if (idNew == 6 && process[process[iResBeg].mother1()].idAbs() == 6)
553 return weightTopDecay( process, iResBeg, iResEnd);
568 void Sigma3gg2ggg::sigmaKin() {
571 Vec4 p1cm( 0., 0., 0.5 * mH, 0.5 * mH);
572 Vec4 p2cm( 0., 0., -0.5 * mH, 0.5 * mH);
573 pp[1][2] = p1cm * p2cm;
574 pp[1][3] = p1cm * p3cm;
575 pp[1][4] = p1cm * p4cm;
576 pp[1][5] = p1cm * p5cm;
577 pp[2][3] = p2cm * p3cm;
578 pp[2][4] = p2cm * p4cm;
579 pp[2][5] = p2cm * p5cm;
580 pp[3][4] = p3cm * p4cm;
581 pp[3][5] = p3cm * p5cm;
582 pp[4][5] = p4cm * p5cm;
583 for (
int i = 1; i < 5; ++i)
584 for (
int j = i + 1; j < 6; ++j) pp[j][i] = pp[i][j];
587 double num1 = cycle(1,2,3,4,5) + cycle(1,2,3,5,4) + cycle(1,2,4,3,5)
588 + cycle(1,2,4,5,3) + cycle(1,2,5,3,4) + cycle(1,2,5,4,3)
589 + cycle(1,3,2,4,5) + cycle(1,3,2,5,4) + cycle(1,3,4,2,5)
590 + cycle(1,3,5,2,4) + cycle(1,4,2,3,5) + cycle(1,4,3,2,5);
591 double num2 = pow4(pp[1][2]) + pow4(pp[1][3]) + pow4(pp[1][4])
592 + pow4(pp[1][5]) + pow4(pp[2][3]) + pow4(pp[2][4])
593 + pow4(pp[2][5]) + pow4(pp[3][4]) + pow4(pp[3][5])
595 double den = pp[1][2] * pp[1][3] * pp[1][4] * pp[1][5] * pp[2][3]
596 * pp[2][4] * pp[2][5] * pp[3][4] * pp[3][5] * pp[4][5];
600 sigma = pow3(4. * M_PI * alpS) * (27./16.) * num1 * num2 / den;
608 void Sigma3gg2ggg::setIdColAcol() {
611 setId( id1, id2, 21, 21, 21);
624 setColAcol( 1, 2, 2, 3, 1, 4, 4, 5, 5, 3);
636 void Sigma3qqbar2ggg::sigmaKin() {
639 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
640 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
656 inline double Sigma3qqbar2ggg::m2Calc() {
659 double sHnow = (pCM[0] + pCM[1]).m2Calc();
660 double sHhalf = sH / 2.;
665 a[0] = pCM[0] * pCM[2];
666 a[1] = pCM[0] * pCM[3];
667 a[2] = pCM[0] * pCM[4];
668 b[0] = pCM[1] * pCM[2];
669 b[1] = pCM[1] * pCM[3];
670 b[2] = pCM[1] * pCM[4];
672 pp[0][1] = pCM[2] * pCM[3];
673 pp[1][2] = pCM[3] * pCM[4];
674 pp[2][0] = pCM[4] * pCM[2];
677 ab[0][1] = a[0] * b[1] + a[1] * b[0];
678 ab[1][2] = a[1] * b[2] + a[2] * b[1];
679 ab[2][0] = a[2] * b[0] + a[0] * b[2];
682 double num1 = a[0] * b[0] * (a[0] * a[0] + b[0] * b[0]) +
683 a[1] * b[1] * (a[1] * a[1] + b[1] * b[1]) +
684 a[2] * b[2] * (a[2] * a[2] + b[2] * b[2]);
685 double den1 = a[0] * a[1] * a[2] * b[0] * b[1] * b[2];
686 double num2 = - ( ab[0][1] / pp[0][1] )
687 - ( ab[1][2] / pp[1][2] )
688 - ( ab[2][0] / pp[2][0] );
689 double num3 = a[2] * b[2] * ab[0][1] / (pp[1][2] * pp[2][0] ) +
690 a[0] * b[0] * ab[1][2] / (pp[2][0] * pp[0][1] ) +
691 a[1] * b[1] * ab[2][0] / (pp[0][1] * pp[1][2] );
694 return pow3(4. * M_PI * alpS) * (8. / 324.) * (num1 / den1) *
695 ( sHhalf + 9. * (sHhalf + num2) + (2. * 81. / sHnow) * num3 );
703 void Sigma3qqbar2ggg::setIdColAcol(){
706 setId( id1, id2, 21, 21, 21);
709 setColAcol( 1, 0, 0, 2, 1, 3, 3, 4, 4, 2);
710 if (id1 < 0) swapColAcol();
717 inline void Sigma3qqbar2ggg::mapFinal() {
719 case 0: pCM[2] = p3cm; pCM[3] = p4cm; pCM[4] = p5cm;
break;
720 case 1: pCM[2] = p3cm; pCM[3] = p5cm; pCM[4] = p4cm;
break;
721 case 2: pCM[2] = p4cm; pCM[3] = p3cm; pCM[4] = p5cm;
break;
722 case 3: pCM[2] = p4cm; pCM[3] = p5cm; pCM[4] = p3cm;
break;
723 case 4: pCM[2] = p5cm; pCM[3] = p3cm; pCM[4] = p4cm;
break;
724 case 5: pCM[2] = p5cm; pCM[3] = p4cm; pCM[4] = p3cm;
break;
740 void Sigma3qg2qgg::sigmaKin() {
746 for (
int i = 0; i < 2; i++) {
749 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
750 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
754 swap(pCM[i], pCM[2]);
761 sigma[i] = 3. * (3. / 8.) * m2Calc();
772 double Sigma3qg2qgg::sigmaHat() {
774 return (id1 == 21) ? sigma[0] : sigma[1];
781 void Sigma3qg2qgg::setIdColAcol(){
783 int qIdx = config / 2;
784 int idTmp[3] = { 21, 21, 21 };
785 idTmp[qIdx] = (id1 == 21) ? id2 : id1;
786 setId( id1, id2, idTmp[0], idTmp[1], idTmp[2]);
789 if (qIdx == 0) setColAcol(1, 0, 2, 1, 4, 0, 3, 4, 2, 3);
790 else if (qIdx == 1) setColAcol(1, 0, 2, 1, 3, 4, 4, 0, 2, 3);
791 else setColAcol(1, 0, 2, 1, 3, 4, 2, 3, 4, 0);
794 swap( colSave[1], colSave[2]);
795 swap(acolSave[1], acolSave[2]);
798 if (id1 < 0 || id2 < 0) swapColAcol();
812 void Sigma3gg2qqbarg::initProc() {
815 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
823 void Sigma3gg2qqbarg::sigmaKin() {
826 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
827 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
834 swap(pCM[0], pCM[2]);
835 swap(pCM[1], pCM[3]);
841 sigma = 6. * nQuarkNew * (3. / 8.) * (3. / 8.) * m2Calc();
849 void Sigma3gg2qqbarg::setIdColAcol(){
852 int idNew = 1 + int( nQuarkNew * rndmPtr->flat() );
856 case 0: id3 = idNew; id4 = -idNew; id5 = 21;
break;
857 case 1: id3 = idNew; id4 = 21; id5 = -idNew;
break;
858 case 2: id3 = -idNew; id4 = idNew; id5 = 21;
break;
859 case 3: id3 = 21; id4 = idNew; id5 = -idNew;
break;
860 case 4: id3 = -idNew; id4 = 21; id5 = idNew;
break;
861 case 5: id3 = 21; id4 = -idNew; id5 = idNew;
break;
863 setId(id1, id2, id3, id4, id5);
867 case 0: setColAcol( 1, 2, 2, 3, 4, 0, 0, 3, 1, 4 );
break;
868 case 1: setColAcol( 1, 2, 2, 3, 4, 0, 1, 4, 0, 3 );
break;
869 case 2: setColAcol( 1, 2, 2, 3, 0, 3, 4, 0, 1, 4 );
break;
870 case 3: setColAcol( 1, 2, 2, 3, 1, 4, 4, 0, 0, 3 );
break;
871 case 4: setColAcol( 1, 2, 2, 3, 0, 3, 1, 4, 4, 0 );
break;
872 case 5: setColAcol( 1, 2, 2, 3, 1, 4, 0, 3, 4, 0 );
break;
886 void Sigma3qq2qqgDiff::sigmaKin() {
891 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
892 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
899 sigma = 6. * m2Calc();
906 inline double Sigma3qq2qqgDiff::m2Calc() {
909 s = (pCM[0] + pCM[1]).m2Calc();
910 t = (pCM[0] - pCM[2]).m2Calc();
911 u = (pCM[0] - pCM[3]).m2Calc();
912 up = (pCM[1] - pCM[2]).m2Calc();
913 sp = (pCM[2] + pCM[3]).m2Calc();
914 tp = (pCM[1] - pCM[3]).m2Calc();
917 double num1 = (s * s + sp * sp + u * u + up * up) / (t * tp);
918 double den1 = (pCM[0] * pCM[4]) * (pCM[1] * pCM[4]) *
919 (pCM[2] * pCM[4]) * (pCM[3] * pCM[4]);
920 double num2 = (u + up) * (s * sp + t * tp - u * up) +
921 u * (s * t + sp * tp) + up * (s * tp + sp * t);
922 double num3 = (s + sp) * (s * sp - t * tp - u * up) +
923 2. * t * tp * (u + up) + 2. * u * up * (t + tp);
927 return (1. / 8.) * pow3(4. * M_PI * alpS) * num1 / den1 *
928 ( (16. / 27.) * num2 - (2. / 27.) * num3 );
936 double Sigma3qq2qqgDiff::sigmaHat() {
938 if (abs(id1) == abs(id2))
return 0.;
946 void Sigma3qq2qqgDiff::setIdColAcol(){
950 case 0: id3 = id1; id4 = id2; id5 = 21;
break;
951 case 1: id3 = id1; id4 = 21; id5 = id2;
break;
952 case 2: id3 = id2; id4 = id1; id5 = 21;
break;
953 case 3: id3 = 21; id4 = id1; id5 = id2;
break;
954 case 4: id3 = id2; id4 = 21; id5 = id1;
break;
955 case 5: id3 = 21; id4 = id2; id5 = id1;
break;
957 setId(id1, id2, id3, id4, id5);
962 cols[0][0] = 1; cols[0][1] = 0;
963 cols[2][0] = 1; cols[2][1] = 0;
965 cols[0][0] = 0; cols[0][1] = 1;
966 cols[2][0] = 0; cols[2][1] = 1;
969 cols[1][0] = 2; cols[1][1] = 0;
970 cols[3][0] = 3; cols[3][1] = 0;
971 cols[4][0] = 2; cols[4][1] = 3;
973 cols[1][0] = 0; cols[1][1] = 2;
974 cols[3][0] = 0; cols[3][1] = 3;
975 cols[4][0] = 3; cols[4][1] = 2;
978 int i3 = 0, i4 = 0, i5 = 0;
980 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
981 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
982 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
983 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
984 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
985 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
988 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
989 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
990 cols[i5][0], cols[i5][1]);
998 inline void Sigma3qq2qqgDiff::mapFinal() {
1000 case 0: pCM[2] = p3cm; pCM[3] = p4cm; pCM[4] = p5cm;
break;
1001 case 1: pCM[2] = p3cm; pCM[3] = p5cm; pCM[4] = p4cm;
break;
1002 case 2: pCM[2] = p4cm; pCM[3] = p3cm; pCM[4] = p5cm;
break;
1003 case 3: pCM[2] = p4cm; pCM[3] = p5cm; pCM[4] = p3cm;
break;
1004 case 4: pCM[2] = p5cm; pCM[3] = p3cm; pCM[4] = p4cm;
break;
1005 case 5: pCM[2] = p5cm; pCM[3] = p4cm; pCM[4] = p3cm;
break;
1020 void Sigma3qqbar2qqbargDiff::initProc() {
1023 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
1031 void Sigma3qqbar2qqbargDiff::sigmaKin() {
1041 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1042 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1048 swap(pCM[1], pCM[2]);
1056 sigma = 6. * (nQuarkNew - 1) * 2. * m2Calc();
1064 void Sigma3qqbar2qqbargDiff::setIdColAcol(){
1067 int idNew = 1 + int( (nQuarkNew - 1) * rndmPtr->flat() );
1068 if (idNew >= abs(id1)) ++idNew;
1071 if (id1 > 0) idNew = -idNew;
1075 case 0: id3 = idNew; id4 = -idNew; id5 = 21;
break;
1076 case 1: id3 = idNew; id4 = 21; id5 = -idNew;
break;
1077 case 2: id3 = -idNew; id4 = idNew; id5 = 21;
break;
1078 case 3: id3 = 21; id4 = idNew; id5 = -idNew;
break;
1079 case 4: id3 = -idNew; id4 = 21; id5 = idNew;
break;
1080 case 5: id3 = 21; id4 = -idNew; id5 = idNew;
break;
1082 setId(id1, id2, id3, id4, id5);
1086 cols[0][0] = 1; cols[0][1] = 0;
1087 cols[1][0] = 0; cols[1][1] = 2;
1088 cols[2][0] = 0; cols[2][1] = 3;
1089 cols[3][0] = 1; cols[3][1] = 0;
1090 cols[4][0] = 3; cols[4][1] = 2;
1092 int i3 = 0, i4 = 0, i5 = 0;
1094 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1095 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1096 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1097 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1098 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1099 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1101 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1102 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1103 cols[i5][0], cols[i5][1]);
1105 if (id1 < 0) swapColAcol();
1120 void Sigma3qg2qqqbarDiff::initProc() {
1123 nQuarkNew = settingsPtr->mode(
"HardQCD:nQuarkNew");
1131 void Sigma3qg2qqqbarDiff::sigmaKin() {
1137 for (
int i = 0; i < 2; i++) {
1140 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1141 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1145 swap(pCM[i], pCM[4]);
1153 sigma[i] = -6. * (3. / 8.) * (nQuarkNew - 1) * m2Calc();
1163 double Sigma3qg2qqqbarDiff::sigmaHat() {
1165 return (id1 == 21) ? sigma[0] : sigma[1];
1172 void Sigma3qg2qqqbarDiff::setIdColAcol(){
1174 int sigmaIdx = (id1 == 21) ? 0 : 1;
1175 int idIn = (id1 == 21) ? id2 : id1;
1176 int idNew = 1 + int( (nQuarkNew - 1) * rndmPtr->flat() );
1177 if (idNew >= abs(idIn)) ++idNew;
1180 int id3Tmp = idIn, id4Tmp = idNew, id5Tmp = -idNew;
1181 if (idIn < 0) swap(id4Tmp, id5Tmp);
1184 if (sigmaIdx == 0) swap(id3Tmp, id4Tmp);
1187 case 0: id3 = id3Tmp; id4 = id4Tmp; id5 = id5Tmp;
break;
1188 case 1: id3 = id3Tmp; id4 = id5Tmp; id5 = id4Tmp;
break;
1189 case 2: id3 = id4Tmp; id4 = id3Tmp; id5 = id5Tmp;
break;
1190 case 3: id3 = id5Tmp; id4 = id3Tmp; id5 = id4Tmp;
break;
1191 case 4: id3 = id4Tmp; id4 = id5Tmp; id5 = id3Tmp;
break;
1192 case 5: id3 = id5Tmp; id4 = id4Tmp; id5 = id3Tmp;
break;
1194 setId(id1, id2, id3, id4, id5);
1200 cols[0][0] = 1; cols[0][1] = 2;
1202 cols[1][0] = 3; cols[1][1] = 0;
1203 cols[2][0] = 1; cols[2][1] = 0;
1204 cols[3][0] = 3; cols[3][1] = 0;
1205 cols[4][0] = 0; cols[4][1] = 2;
1207 cols[1][0] = 0; cols[1][1] = 3;
1208 cols[2][0] = 0; cols[2][1] = 2;
1209 cols[3][0] = 0; cols[3][1] = 3;
1210 cols[4][0] = 1; cols[4][1] = 0;
1214 swap(cols[0][0], cols[1][0]);
1215 swap(cols[0][1], cols[1][1]);
1218 int i3 = 0, i4 = 0, i5 = 0;
1219 if (sigmaIdx == 0) {
1221 case 0: i3 = 3; i4 = 2; i5 = 4;
break;
1222 case 1: i3 = 3; i4 = 4; i5 = 2;
break;
1223 case 2: i3 = 2; i4 = 3; i5 = 4;
break;
1224 case 3: i3 = 4; i4 = 3; i5 = 2;
break;
1225 case 4: i3 = 2; i4 = 4; i5 = 3;
break;
1226 case 5: i3 = 4; i4 = 2; i5 = 3;
break;
1230 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1231 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1232 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1233 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1234 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1235 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1238 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1239 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1240 cols[i5][0], cols[i5][1]);
1252 void Sigma3qq2qqgSame::sigmaKin() {
1256 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1257 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1266 sigma = 3. * m2Calc();
1274 inline double Sigma3qq2qqgSame::m2Calc() {
1277 s = (pCM[0] + pCM[1]).m2Calc();
1278 t = (pCM[0] - pCM[2]).m2Calc();
1279 u = (pCM[0] - pCM[3]).m2Calc();
1280 sp = (pCM[2] + pCM[3]).m2Calc();
1281 tp = (pCM[1] - pCM[3]).m2Calc();
1282 up = (pCM[1] - pCM[2]).m2Calc();
1292 double den1 = (pCM[0] * pCM[4]) * (pCM[1] * pCM[4]) *
1293 (pCM[2] * pCM[4]) * (pCM[3] * pCM[4]);
1295 double fac1 = s * (t * u + tp * up) + sp * (t * up + tp * u);
1296 double fac2 = ssp - ttp - uup;
1297 double fac3 = 2. * (ttp * u_up + uup * t_tp);
1299 double num1 = u_up * (ssp + ttp - uup) + fac1;
1300 double num2 = s_sp * fac2 + fac3;
1301 double num3 = (s * s + sp * sp + u * u + up * up) / (t * tp);
1303 double num4 = t_tp * (ssp - ttp + uup) + fac1;
1304 double num5 = (s * s + sp * sp + t * t + tp * tp) / (u * up);
1306 double num6 = s_sp * fac2 - fac3 - 2. * fac1;
1307 double num7 = (s * s + sp * sp) * fac2;
1308 double den7 = (ttp * uup);
1314 return (1. / 8.) * pow3(4. * M_PI * alpS) *
1315 ( ( (16. / 27.) * num1 - (2. / 27.) * num2 ) * num3 +
1316 ( (16. / 27.) * num4 - (2. / 27.) * num2 ) * num5 +
1317 ( (10. / 81.) * num2 + (8. / 81.) * num6 ) *
1318 ( num7 / den7 ) ) / den1;
1326 double Sigma3qq2qqgSame::sigmaHat() {
1328 if (id1 != id2)
return 0.;
1336 void Sigma3qq2qqgSame::setIdColAcol(){
1341 case 3:
case 5: gIdx = 0;
break;
1342 case 1:
case 4: gIdx = 1;
break;
1343 case 0:
case 2: gIdx = 2;
break;
1347 int idTmp[3] = { id1, id1, id1 };
1349 setId(id1, id2, idTmp[0], idTmp[1], idTmp[2]);
1352 setColAcol(1, 0, 2, 0, 1, 0, 3, 0, 2, 3);
1354 swap( colSave[5], colSave[gIdx + 3]);
1355 swap(acolSave[5], acolSave[gIdx + 3]);
1357 if (id1 < 0) swapColAcol();
1364 inline void Sigma3qq2qqgSame::mapFinal() {
1366 case 0: pCM[2] = p3cm; pCM[3] = p4cm; pCM[4] = p5cm;
break;
1367 case 1: pCM[2] = p3cm; pCM[3] = p5cm; pCM[4] = p4cm;
break;
1368 case 2: pCM[2] = p4cm; pCM[3] = p3cm; pCM[4] = p5cm;
break;
1369 case 3: pCM[2] = p4cm; pCM[3] = p5cm; pCM[4] = p3cm;
break;
1370 case 4: pCM[2] = p5cm; pCM[3] = p3cm; pCM[4] = p4cm;
break;
1371 case 5: pCM[2] = p5cm; pCM[3] = p4cm; pCM[4] = p3cm;
break;
1385 void Sigma3qqbar2qqbargSame::sigmaKin() {
1388 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1389 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1396 swap(pCM[1], pCM[3]);
1402 sigma = 6. * m2Calc();
1410 void Sigma3qqbar2qqbargSame::setIdColAcol(){
1413 case 0: id3 = id1; id4 = id2; id5 = 21;
break;
1414 case 1: id3 = id1; id4 = 21; id5 = id2;
break;
1415 case 2: id3 = id2; id4 = id1; id5 = 21;
break;
1416 case 3: id3 = 21; id4 = id1; id5 = id2;
break;
1417 case 4: id3 = id2; id4 = 21; id5 = id1;
break;
1418 case 5: id3 = 21; id4 = id2; id5 = id1;
break;
1420 setId(id1, id2, id3, id4, id5);
1424 cols[0][0] = 1; cols[0][1] = 0;
1425 cols[1][0] = 0; cols[1][1] = 2;
1426 cols[2][0] = 1; cols[2][1] = 0;
1427 cols[3][0] = 0; cols[3][1] = 3;
1428 cols[4][0] = 3; cols[4][1] = 2;
1430 int i3 = 0, i4 = 0, i5 = 0;
1432 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1433 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1434 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1435 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1436 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1437 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1439 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1440 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1441 cols[i5][0], cols[i5][1]);
1443 if (id1 < 0) swapColAcol();
1457 void Sigma3qg2qqqbarSame::sigmaKin() {
1463 for (
int i = 0; i < 2; i++) {
1466 pCM[0] = Vec4( 0., 0., 0.5 * mH, 0.5 * mH);
1467 pCM[1] = Vec4( 0., 0., -0.5 * mH, 0.5 * mH);
1471 swap(pCM[i], pCM[4]);
1478 sigma[i] = -3. * (3. / 8.) * m2Calc();
1488 double Sigma3qg2qqqbarSame::sigmaHat() {
1490 return (id1 == 21) ? sigma[0] : sigma[1];
1497 void Sigma3qg2qqqbarSame::setIdColAcol(){
1500 int idIn = (id1 == 21) ? id2 : id1;
1504 case 0: id3 = idIn; id4 = idIn; id5 = -idIn;
break;
1505 case 1: id3 = idIn; id4 = -idIn; id5 = idIn;
break;
1506 case 2: id3 = idIn; id4 = idIn; id5 = -idIn;
break;
1507 case 3: id3 = -idIn; id4 = idIn; id5 = idIn;
break;
1508 case 4: id3 = idIn; id4 = -idIn; id5 = idIn;
break;
1509 case 5: id3 = -idIn; id4 = idIn; id5 = idIn;
break;
1511 setId(id1, id2, id3, id4, id5);
1517 cols[0][0] = 1; cols[0][1] = 2;
1519 cols[1][0] = 3; cols[1][1] = 0;
1520 cols[2][0] = 1; cols[2][1] = 0;
1521 cols[3][0] = 3; cols[3][1] = 0;
1522 cols[4][0] = 0; cols[4][1] = 2;
1524 cols[1][0] = 0; cols[1][1] = 3;
1525 cols[2][0] = 0; cols[2][1] = 2;
1526 cols[3][0] = 0; cols[3][1] = 3;
1527 cols[4][0] = 1; cols[4][1] = 0;
1531 swap(cols[0][0], cols[1][0]);
1532 swap(cols[0][1], cols[1][1]);
1535 int i3 = 0, i4 = 0, i5 = 0;
1537 case 0: i3 = 2; i4 = 3; i5 = 4;
break;
1538 case 1: i3 = 2; i4 = 4; i5 = 3;
break;
1539 case 2: i3 = 3; i4 = 2; i5 = 4;
break;
1540 case 3: i3 = 4; i4 = 2; i5 = 3;
break;
1541 case 4: i3 = 3; i4 = 4; i5 = 2;
break;
1542 case 5: i3 = 4; i4 = 3; i5 = 2;
break;
1544 setColAcol(cols[0][0], cols[0][1], cols[1][0], cols[1][1],
1545 cols[i3][0], cols[i3][1], cols[i4][0], cols[i4][1],
1546 cols[i5][0], cols[i5][1]);