9 #include "Pythia8/SigmaProcess.h"
24 const double SigmaProcess::CONVERT2MB = 0.389380;
27 const double SigmaProcess::MASSMARGIN = 0.1;
31 const double SigmaProcess::COMPRELERR = 1e-10;
32 const int SigmaProcess::NCOMPSTEP = 10;
38 void SigmaProcess::init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
39 SLHAinterface* slhaInterfacePtrIn) {
42 beamAPtr = beamAPtrIn;
43 beamBPtr = beamBPtrIn;
47 slhaPtr = (slhaInterfacePtrIn != 0) ? &slhaInterfacePtrIn->slha : 0;
50 idA = (beamAPtr != 0) ? beamAPtr->id() : 0;
51 idB = (beamBPtr != 0) ? beamBPtr->id() : 0;
52 mA = (beamAPtr != 0) ? beamAPtr->m() : 0.;
53 mB = (beamBPtr != 0) ? beamBPtr->m() : 0.;
54 isLeptonA = (beamAPtr != 0) ? beamAPtr->isLepton() :
false;
55 isLeptonB = (beamBPtr != 0) ? beamBPtr->isLepton() :
false;
56 hasLeptonBeams = isLeptonA || isLeptonB;
59 beamA2gamma = (beamAPtr != 0) ? flag(
"PDF:beamA2gamma") :
false;
60 beamB2gamma = (beamBPtr != 0) ? flag(
"PDF:beamB2gamma") :
false;
61 hasGamma = beamA2gamma || beamB2gamma || idA == 22 || idB == 22;
64 Kfactor = parm(
"SigmaProcess:Kfactor");
67 nQuarkIn = mode(
"PDFinProcess:nQuarkIn");
70 mcME = (flag(
"SigmaProcess:cMassiveME"))
71 ? particleDataPtr->m0(4) : 0.;
72 mbME = (flag(
"SigmaProcess:bMassiveME"))
73 ? particleDataPtr->m0(5) : 0.;
74 mmuME = (flag(
"SigmaProcess:muMassiveME"))
75 ? particleDataPtr->m0(13) : 0.;
76 mtauME = (flag(
"SigmaProcess:tauMassiveME"))
77 ? particleDataPtr->m0(15) : 0.;
80 renormScale1 = mode(
"SigmaProcess:renormScale1");
81 renormScale2 = mode(
"SigmaProcess:renormScale2");
82 renormScale3 = mode(
"SigmaProcess:renormScale3");
83 renormScale3VV = mode(
"SigmaProcess:renormScale3VV");
84 renormMultFac = parm(
"SigmaProcess:renormMultFac");
85 renormFixScale = parm(
"SigmaProcess:renormFixScale");
88 factorScale1 = mode(
"SigmaProcess:factorScale1");
89 factorScale2 = mode(
"SigmaProcess:factorScale2");
90 factorScale3 = mode(
"SigmaProcess:factorScale3");
91 factorScale3VV = mode(
"SigmaProcess:factorScale3VV");
92 factorMultFac = parm(
"SigmaProcess:factorMultFac");
93 factorFixScale = parm(
"SigmaProcess:factorFixScale");
96 higgsH1parity = mode(
"HiggsH1:parity");
97 higgsH1eta = parm(
"HiggsH1:etaParity");
98 higgsH1phi = parm(
"HiggsH1:phiParity");
99 higgsH2parity = mode(
"HiggsH2:parity");
100 higgsH2eta = parm(
"HiggsH2:etaParity");
101 higgsH2phi = parm(
"HiggsH2:phiParity");
102 higgsA3parity = mode(
"HiggsA3:parity");
103 higgsA3eta = parm(
"HiggsA3:etaParity");
104 higgsA3phi = parm(
"HiggsA3:phiParity");
107 if (!flag(
"Higgs:useBSM")){
110 higgsH1phi = M_PI / 2.;
121 bool SigmaProcess::initFlux() {
129 string fluxType = inFlux();
132 if (fluxType ==
"gg") {
139 else if (fluxType ==
"qg") {
140 for (
int i = -nQuarkIn; i <= nQuarkIn; ++i) {
141 int idNow = (i == 0) ? 21 : i;
145 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
153 else if (fluxType ==
"qq") {
154 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
159 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
161 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
163 addPair(id1Now, id2Now);
167 else if (fluxType ==
"qqbar") {
168 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
173 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
175 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
176 if (id2Now != 0 && id1Now * id2Now < 0)
177 addPair(id1Now, id2Now);
181 else if (fluxType ==
"qqbarSame") {
182 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
187 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
189 addPair(idNow, -idNow);
193 else if (fluxType ==
"ff") {
196 if ( isLeptonA && isLeptonB && !beamA2gamma && !beamB2gamma ) {
201 }
else if ( isLeptonA && !beamA2gamma ) {
203 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
209 }
else if ( isLeptonB && !beamB2gamma ) {
211 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
218 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
223 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
225 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
227 addPair(id1Now, id2Now);
232 else if (fluxType ==
"ffbar") {
235 if (isLeptonA && isLeptonB && idA * idB < 0
236 && !beamA2gamma && !beamB2gamma) {
242 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
247 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
249 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
250 if (id2Now != 0 && id1Now * id2Now < 0)
251 addPair(id1Now, id2Now);
256 else if (fluxType ==
"ffbarSame") {
259 if ( idA + idB == 0 && isLeptonA && !beamA2gamma && !beamB2gamma) {
265 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
270 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
272 addPair(idNow, -idNow);
277 else if (fluxType ==
"ffbarChg") {
280 if ( isLeptonA && isLeptonB && !beamA2gamma && !beamB2gamma
281 && abs( particleDataPtr->chargeType(idA)
282 + particleDataPtr->chargeType(idB) ) == 3 ) {
288 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
293 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
295 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
296 if (id2Now != 0 && id1Now * id2Now < 0
297 && (abs(id1Now) + abs(id2Now))%2 == 1) addPair(id1Now, id2Now);
302 else if (fluxType ==
"fgm") {
304 if ( isLeptonA && !beamA2gamma ) {
308 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
315 if ( isLeptonB && !beamB2gamma ) {
319 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
331 else if (fluxType ==
"qgm") {
332 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
339 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
354 else if (fluxType ==
"gmq") {
355 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
365 else if (fluxType ==
"ggm") {
381 else if (fluxType ==
"gmg") {
388 else if (fluxType ==
"gmgm") {
396 infoPtr->errorMsg(
"Error in SigmaProcess::initFlux: "
397 "unrecognized inFlux type", fluxType);
412 double SigmaProcess::sigmaPDF(
bool initPS,
bool samexGamma,
413 bool useNewXvalues,
double x1New,
double x2New) {
416 for (
int j = 0; j < sizeBeamA(); ++j) {
418 inBeamA[j].pdf = beamAPtr->xfMax( inBeamA[j].
id, x1Save, Q2FacSave);
419 else if ( samexGamma)
420 inBeamA[j].pdf = beamAPtr->xfSame( inBeamA[j].
id, x1Save, Q2FacSave);
421 else if ( useNewXvalues && x1New > 0.)
422 inBeamA[j].pdf = beamAPtr->xfGamma( inBeamA[j].
id, x1New, Q2FacSave);
424 inBeamA[j].pdf = beamAPtr->xfHard( inBeamA[j].
id, x1Save, Q2FacSave);
426 for (
int j = 0; j < sizeBeamB(); ++j){
428 inBeamB[j].pdf = beamBPtr->xfMax( inBeamB[j].
id, x2Save, Q2FacSave);
429 else if ( samexGamma)
430 inBeamB[j].pdf = beamBPtr->xfSame( inBeamB[j].
id, x2Save, Q2FacSave);
431 else if ( useNewXvalues && x2New > 0.)
432 inBeamB[j].pdf = beamBPtr->xfGamma( inBeamB[j].
id, x2New, Q2FacSave);
434 inBeamB[j].pdf = beamBPtr->xfHard( inBeamB[j].
id, x2Save, Q2FacSave);
439 if ( !useNewXvalues && !samexGamma && beamAPtr->hasResGamma() )
440 beamAPtr->xGammaPDF();
441 if ( !useNewXvalues && !samexGamma && beamBPtr->hasResGamma() )
442 beamBPtr->xGammaPDF();
446 for (
int i = 0; i < sizePair(); ++i) {
449 inPair[i].pdfSigma = Kfactor
450 * sigmaHatWrap(inPair[i].idA, inPair[i].idB);
453 for (
int j = 0; j < sizeBeamA(); ++j)
454 if (inPair[i].idA == inBeamA[j].
id) {
455 inPair[i].pdfA = inBeamA[j].pdf;
456 inPair[i].pdfSigma *= inBeamA[j].pdf;
459 for (
int j = 0; j < sizeBeamB(); ++j)
460 if (inPair[i].idB == inBeamB[j].
id) {
461 inPair[i].pdfB = inBeamB[j].pdf;
462 inPair[i].pdfSigma *= inBeamB[j].pdf;
467 sigmaSumSave += inPair[i].pdfSigma;
479 void SigmaProcess::pickInState(
int id1in,
int id2in) {
482 if (id1in != 0 && id2in != 0) {
489 double sigmaRand = sigmaSumSave * rndmPtr->flat();
490 for (
int i = 0; i < sizePair(); ++i) {
491 sigmaRand -= inPair[i].pdfSigma;
492 if (sigmaRand <= 0.) {
495 pdf1Save = inPair[i].pdfA;
496 pdf2Save = inPair[i].pdfB;
507 bool SigmaProcess::setupForMEin() {
514 int id1Tmp = abs(id1);
515 if (id1Tmp == 4) mME[0] = mcME;
516 if (id1Tmp == 5) mME[0] = mbME;
517 if (id1Tmp == 13) mME[0] = mmuME;
518 if (id1Tmp == 15) mME[0] = mtauME;
520 int id2Tmp = abs(id2);
521 if (id2Tmp == 4) mME[1] = mcME;
522 if (id2Tmp == 5) mME[1] = mbME;
523 if (id2Tmp == 13) mME[1] = mmuME;
524 if (id2Tmp == 15) mME[1] = mtauME;
527 if (mME[0] + mME[1] >= mH) {
534 if (mME[0] == 0. && mME[1] == 0.) {
535 pME[0] = 0.5 * mH * Vec4( 0., 0., 1., 1.);
536 pME[1] = 0.5 * mH * Vec4( 0., 0., -1., 1.);
538 double e0 = 0.5 * (mH * mH + mME[0] * mME[0] - mME[1] * mME[1]) / mH;
539 double pz0 = sqrtpos(e0 * e0 - mME[0] * mME[0]);
540 pME[0] = Vec4( 0., 0., pz0, e0);
541 pME[1] = Vec4( 0., 0., -pz0, mH - e0);
553 double SigmaProcess::weightTopDecay(
Event& process,
int iResBeg,
557 if (iResEnd - iResBeg != 1)
return 1.;
559 int iB2 = iResBeg + 1;
560 int idW1 = process[iW1].idAbs();
561 int idB2 = process[iB2].idAbs();
566 if (idW1 != 24 || (idB2 != 1 && idB2 != 3 && idB2 != 5))
return 1.;
567 int iT = process[iW1].mother1();
568 if (iT <= 0 || process[iT].idAbs() != 6)
return 1.;
571 int iF = process[iW1].daughter1();
572 int iFbar = process[iW1].daughter2();
573 if (iFbar - iF != 1)
return 1.;
574 if (process[iT].
id() * process[iF].
id() < 0) swap(iF, iFbar);
577 double wt = (process[iT].p() * process[iFbar].p())
578 * (process[iF].p() * process[iB2].p());
579 double wtMax = ( pow4(process[iT].m()) - pow4(process[iW1].m()) ) / 8.;
591 double SigmaProcess::weightHiggsDecay(
Event& process,
int iResBeg,
595 if (iResEnd - iResBeg != 1)
return 1.;
597 int iZW2 = iResBeg + 1;
598 int idZW1 = process[iZW1].id();
599 int idZW2 = process[iZW2].id();
600 if (idZW1 < 0 || idZW2 == 22) {
604 if ( (idZW1 != 23 || idZW2 != 23) && (idZW1 != 24 || idZW2 != -24)
605 && (idZW1 != 22 || idZW2 != 23) )
return 1.;
608 int iH = process[iZW1].mother1();
609 if (iH <= 0)
return 1.;
610 int idH = process[iH].id();
611 if (idH != 25 && idH != 35 && idH !=36)
return 1.;
615 int i5 = process[iZW2].daughter1();
616 int i6 = process[iZW2].daughter2();
617 double pgmZ = process[iZW1].p() * process[iZW2].p();
618 double pgm5 = process[iZW1].p() * process[i5].p();
619 double pgm6 = process[iZW1].p() * process[i6].p();
620 return (pow2(pgm5) + pow2(pgm6)) / pow2(pgmZ);
624 int higgsParity = higgsH1parity;
625 double higgsEta = higgsH1eta;
627 higgsParity = higgsH2parity;
628 higgsEta = higgsH2eta;
629 }
else if (idH == 36) {
630 higgsParity = higgsA3parity;
631 higgsEta = higgsA3eta;
635 if (higgsParity == 0 || higgsParity > 3)
return 1.;
638 double wtMax = pow4(process[iH].m());
642 int i3 = process[iZW1].daughter1();
643 int i4 = process[iZW1].daughter2();
644 if (process[i3].
id() < 0) swap( i3, i4);
645 int i5 = process[iZW2].daughter1();
646 int i6 = process[iZW2].daughter2();
647 if (process[i5].
id() < 0) swap( i5, i6);
650 double p35 = 2. * process[i3].p() * process[i5].p();
651 double p36 = 2. * process[i3].p() * process[i6].p();
652 double p45 = 2. * process[i4].p() * process[i5].p();
653 double p46 = 2. * process[i4].p() * process[i6].p();
654 double p34 = 2. * process[i3].p() * process[i4].p();
655 double p56 = 2. * process[i5].p() * process[i6].p();
656 double mZW1 = process[iZW1].m();
657 double mZW2 = process[iZW2].m();
660 double epsilonProd = 0.;
661 if (higgsParity == 3) {
663 for (
int i = 0; i < 4; ++i) {
668 p[i][0] = process[ii].e();
669 p[i][1] = process[ii].px();
670 p[i][2] = process[ii].py();
671 p[i][3] = process[ii].pz();
674 = p[0][0]*p[1][1]*p[2][2]*p[3][3] - p[0][0]*p[1][1]*p[2][3]*p[3][2]
675 - p[0][0]*p[1][2]*p[2][1]*p[3][3] + p[0][0]*p[1][2]*p[2][3]*p[3][1]
676 + p[0][0]*p[1][3]*p[2][1]*p[3][2] - p[0][0]*p[1][3]*p[2][2]*p[3][1]
677 - p[0][1]*p[1][0]*p[2][2]*p[3][3] + p[0][1]*p[1][0]*p[2][3]*p[3][2]
678 + p[0][1]*p[1][2]*p[2][0]*p[3][3] - p[0][1]*p[1][2]*p[2][3]*p[3][0]
679 - p[0][1]*p[1][3]*p[2][0]*p[3][2] + p[0][1]*p[1][3]*p[2][2]*p[3][0]
680 + p[0][2]*p[1][0]*p[2][1]*p[3][3] - p[0][2]*p[1][0]*p[2][3]*p[3][1]
681 - p[0][2]*p[1][1]*p[2][0]*p[3][3] + p[0][2]*p[1][1]*p[2][3]*p[3][0]
682 + p[0][2]*p[1][3]*p[2][0]*p[3][1] - p[0][2]*p[1][3]*p[2][1]*p[3][0]
683 - p[0][3]*p[1][0]*p[2][1]*p[3][2] + p[0][3]*p[1][0]*p[2][2]*p[3][1]
684 + p[0][3]*p[1][1]*p[2][0]*p[3][2] - p[0][3]*p[1][1]*p[2][2]*p[3][0]
685 - p[0][3]*p[1][2]*p[2][0]*p[3][1] + p[0][3]*p[1][2]*p[2][1]*p[3][0];
690 double vf1 = coupSMPtr->vf(process[i3].idAbs());
691 double af1 = coupSMPtr->af(process[i3].idAbs());
692 double vf2 = coupSMPtr->vf(process[i5].idAbs());
693 double af2 = coupSMPtr->af(process[i5].idAbs());
694 double va12asym = 4. * vf1 * af1 * vf2 * af2
695 / ( (vf1*vf1 + af1*af1) * (vf2*vf2 + af2*af2) );
697 double ah = higgsEta / pow2( particleDataPtr->m0(23) );
700 if (higgsParity == 1) wt = 8. * (1. + va12asym) * p35 * p46
701 + 8. * (1. - va12asym) * p36 * p45;
704 else if (higgsParity == 2) wt = ( pow2(p35 + p46)
705 + pow2(p36 + p45) - 2. * p34 * p56
706 - 2. * pow2(p35 * p46 - p36 * p45) / (p34 * p56)
707 + va12asym * (p35 + p36 - p45 - p46) * (p35 + p45 - p36 - p46) )
711 else wt = 32. * ( 0.25 * pow2(vh) * ( (1. + va12asym) * p35 * p46
712 + (1. - va12asym) * p36 * p45 ) - 0.5 * vh * ah * epsilonProd
713 * ( (1. + va12asym) * (p35 + p46) - (1. - va12asym) * (p36 + p45) )
714 + 0.0625 * pow2(ah) * (-2. * pow2(p34 * p56)
715 - 2. * pow2(p35 * p46 - p36 * p45)
716 + p34 * p56 * (pow2(p35 + p46) + pow2(p36 + p45))
717 + va12asym * p34 * p56 * (p35 + p36 - p45 - p46)
718 * (p35 + p45 - p36 - p46) ) )
719 / ( pow2(vh) + 2. * abs(vh * ah) * mZW1 * mZW2
720 + 2. * pow2(ah * mZW1 * mZW2) * (1. + va12asym) );
723 }
else if (idZW1 == 24) {
725 double ah = higgsEta / pow2( particleDataPtr->m0(24) );
728 if (higgsParity == 1) wt = 16. * p35 * p46;
731 else if (higgsParity == 2) wt = 0.5 * ( pow2(p35 + p46)
732 + pow2(p36 + p45) - 2. * p34 * p56
733 - 2. * pow2(p35 * p46 - p36 * p45) / (p34 * p56)
734 + (p35 + p36 - p45 - p46) * (p35 + p45 - p36 - p46) );
737 else wt = 32. * ( 0.25 * pow2(vh) * 2. * p35 * p46
738 - 0.5 * vh * ah * epsilonProd * 2. * (p35 + p46)
739 + 0.0625 * pow2(ah) * (-2. * pow2(p34 * p56)
740 - 2. * pow2(p35 * p46 - p36 * p45)
741 + p34 * p56 * (pow2(p35 + p46) + pow2(p36 + p45))
742 + p34 * p56 * (p35 + p36 - p45 - p46) * (p35 + p45 - p36 - p46) ) )
743 / ( pow2(vh) + 2. * abs(vh * ah) * mZW1 * mZW2
744 + 2. * pow2(ah * mZW1 * mZW2) );
763 double Sigma1Process::sigmaHatWrap(
int id1in,
int id2in) {
767 double sigmaTmp = sigmaHat();
771 int idTmp = resonanceA();
772 double mTmp = particleDataPtr->m0(idTmp);
773 double GamTmp = particleDataPtr->mWidth(idTmp);
774 sigmaTmp *= 2. * mTmp * GamTmp / ( pow2(sH - mTmp * mTmp)
775 + pow2(mTmp * GamTmp) );
777 if (convert2mb()) sigmaTmp *= CONVERT2MB;
786 void Sigma1Process::store1Kin(
double x1in,
double x2in,
double sHin) {
799 Q2RenSave = renormMultFac * sH;
800 if (renormScale1 == 2) Q2RenSave = renormFixScale;
803 Q2FacSave = factorMultFac * sH;
804 if (factorScale1 == 2) Q2FacSave = factorFixScale;
807 alpS = coupSMPtr->alphaS(Q2RenSave);
808 alpEM = coupSMPtr->alphaEM(Q2RenSave);
816 bool Sigma1Process::setupForME() {
819 bool allowME = setupForMEin();
823 pME[2] = Vec4( 0., 0., 0., mH);
839 void Sigma2Process::store2Kin(
double x1in,
double x2in,
double sHin,
840 double tHin,
double m3in,
double m4in,
double runBW3in,
double runBW4in) {
850 bool masslessKin = (id3Mass() == 0) && (id4Mass() == 0);
866 uH = (masslessKin) ? -(sH + tH) : s3 + s4 - (sH + tH);
877 pT2 = (masslessKin) ? tH * uH / sH : (tH * uH - s3 * s4) / sH;
883 Q2RenSave = renormMultFac * sH;
884 if (renormScale1 == 2) Q2RenSave = renormFixScale;
887 Q2FacSave = factorMultFac * sH;
888 if (factorScale1 == 2) Q2FacSave = factorFixScale;
894 if (masslessKin) Q2RenSave = (renormScale2 < 4) ? pT2 : sH;
895 else if (renormScale2 == 1) Q2RenSave = pT2 + min(s3, s4);
896 else if (renormScale2 == 2) Q2RenSave = sqrt((pT2 + s3) * (pT2 + s4));
897 else if (renormScale2 == 3) Q2RenSave = pT2 + 0.5 * (s3 + s4);
899 Q2RenSave *= renormMultFac;
900 if (renormScale2 == 5) Q2RenSave = renormFixScale;
901 if (renormScale2 == 6) Q2RenSave = -tH * renormMultFac;
904 if (masslessKin) Q2FacSave = (factorScale2 < 4) ? pT2 : sH;
905 else if (factorScale2 == 1) Q2FacSave = pT2 + min(s3, s4);
906 else if (factorScale2 == 2) Q2FacSave = sqrt((pT2 + s3) * (pT2 + s4));
907 else if (factorScale2 == 3) Q2FacSave = pT2 + 0.5 * (s3 + s4);
909 Q2FacSave *= factorMultFac;
910 if (factorScale2 == 5) Q2FacSave = factorFixScale;
911 if (factorScale2 == 6) Q2FacSave = -tH * factorMultFac;
915 alpS = coupSMPtr->alphaS(Q2RenSave);
916 alpEM = coupSMPtr->alphaEM(Q2RenSave);
924 void Sigma2Process::store2KinMPI(
double x1in,
double x2in,
925 double sHin,
double tHin,
double uHin,
double alpSin,
double alpEMin,
926 bool needMasses,
double m3in,
double m4in) {
956 cosTheta = (tH - uH) / sH;
957 sinTheta = 2. * sqrtpos( tH * uH ) / sH;
965 sHMass = sH - s3 - s4;
966 sHBeta = sqrtpos(sHMass*sHMass - 4. * s3 * s4);
967 tH = -0.5 * (sHMass - sHBeta * cosTheta);
968 uH = -0.5 * (sHMass + sHBeta * cosTheta);
974 pT2Mass = 0.25 * sHBeta * pow2(sinTheta);
982 bool Sigma2Process::final2KinMPI(
int i1Res,
int i2Res, Vec4 p1Res, Vec4 p2Res,
983 double m1Res,
double m2Res) {
989 if (m3 == 0.) m3 = particleDataPtr->m0(idSave[3]);
990 if (m4 == 0.) m4 = particleDataPtr->m0(idSave[4]);
992 if (m3 + m4 + MASSMARGIN > mH)
return false;
997 double e1In = 0.5 * mH;
1000 if (i1Res > 0 || i2Res > 0) {
1001 double s1 = m1Res * m1Res;
1002 double s2 = m2Res * m2Res;
1003 e1In = 0.5 * (sH + s1 - s2) / mH;
1004 e2In = 0.5 * (sH + s2 - s1) / mH;
1005 pzIn = sqrtpos( e1In*e1In - s1 );
1009 double e3 = 0.5 * (sH + s3 - s4) / mH;
1010 double e4 = 0.5 * (sH + s4 - s3) / mH;
1011 double pAbs = sqrtpos( e3*e3 - s3 );
1012 phi = 2. * M_PI * rndmPtr->flat();
1013 double pZ = pAbs * cosTheta;
1014 pTFin = pAbs * sinTheta;
1015 double pX = pTFin * sin(phi);
1016 double pY = pTFin * cos(phi);
1017 double scale = 0.5 * mH * sinTheta;
1018 if (swappedTU()) pZ = -pZ;
1021 int status1 = (i1Res == 0) ? -31 : -34;
1022 int status2 = (i2Res == 0) ? -31 : -34;
1023 parton[1] = Particle( idSave[1], status1, 0, 0, 3, 4,
1024 colSave[1], acolSave[1], 0., 0., pzIn, e1In, m1Res, scale);
1025 parton[2] = Particle( idSave[2], status2, 0, 0, 3, 4,
1026 colSave[2], acolSave[2], 0., 0., -pzIn, e2In, m2Res, scale);
1027 parton[3] = Particle( idSave[3], 33, 1, 2, 0, 0,
1028 colSave[3], acolSave[3], pX, pY, pZ, e3, m3, scale);
1029 parton[4] = Particle( idSave[4], 33, 1, 2, 0, 0,
1030 colSave[4], acolSave[4], -pX, -pY, -pZ, e4, m4, scale);
1034 if (i1Res == 0 && i2Res == 0) {
1035 double betaZ = (x1Save - x2Save) / (x1Save + x2Save);
1036 for (
int i = 1; i <= 4; ++i) parton[i].bst(0., 0., betaZ);
1040 M.fromCMframe( p1Res, p2Res);
1041 for (
int i = 1; i <= 4; ++i) parton[i].rotbst(M);
1053 bool Sigma2Process::setupForME() {
1056 bool allowME = setupForMEin();
1060 int id3Tmp = abs(id3Mass());
1061 if (id3Tmp == 4) mME[2] = mcME;
1062 if (id3Tmp == 5) mME[2] = mbME;
1063 if (id3Tmp == 13) mME[2] = mmuME;
1064 if (id3Tmp == 15) mME[2] = mtauME;
1066 int id4Tmp = abs(id4Mass());
1067 if (id4Tmp == 4) mME[3] = mcME;
1068 if (id4Tmp == 5) mME[3] = mbME;
1069 if (id4Tmp == 13) mME[3] = mmuME;
1070 if (id4Tmp == 15) mME[3] = mtauME;
1073 if (mME[2] + mME[3] >= mH) {
1080 double sH34 = sqrtpos( pow2(sH - s3 - s4) - 4. * s3 * s4);
1081 double cThe = (tH - uH) / sH34;
1082 double sThe = sqrtpos(1. - cThe * cThe);
1085 double s3ME = pow2(mME[2]);
1086 double s4ME = pow2(mME[3]);
1087 double sH34ME = sqrtpos( pow2(sH - s3ME - s4ME) - 4. * s3ME * s4ME);
1088 double pAbsME = 0.5 * sH34ME / mH;
1091 if (id3Tmp == 0 || id3Tmp != id4Tmp) {
1092 pME[2] = Vec4( pAbsME * sThe, 0., pAbsME * cThe,
1093 0.5 * (sH + s3ME - s4ME) / mH);
1094 pME[3] = Vec4( -pAbsME * sThe, 0., -pAbsME * cThe,
1095 0.5 * (sH + s4ME - s3ME) / mH);
1099 mME[2] = sqrtpos(0.5 * (s3ME + s4ME) - 0.25 * pow2(s3ME - s4ME) / sH);
1101 pME[2] = Vec4( pAbsME * sThe, 0., pAbsME * cThe, 0.5 * mH);
1102 pME[3] = Vec4( -pAbsME * sThe, 0., -pAbsME * cThe, 0.5 * mH);
1119 void Sigma3Process::store3Kin(
double x1in,
double x2in,
double sHin,
1120 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
1121 double m5in,
double runBW3in,
double runBW4in,
double runBW5in) {
1131 if (id3Mass() == 0 && id4Mass() == 0 && id5Mass() == 0) {
1164 Q2RenSave = renormMultFac * sH;
1165 if (renormScale1 == 2) Q2RenSave = renormFixScale;
1168 Q2FacSave = factorMultFac * sH;
1169 if (factorScale1 == 2) Q2RenSave = factorFixScale;
1172 }
else if ( idTchan1() != 23 && idTchan1() != 24 && idTchan2() != 23
1173 && idTchan2() != 24 ) {
1174 double mT3S = s3 + p3cm.pT2();
1175 double mT4S = s4 + p4cm.pT2();
1176 double mT5S = s5 + p5cm.pT2();
1179 if (renormScale3 == 1) Q2RenSave = min( mT3S, min(mT4S, mT5S) );
1180 else if (renormScale3 == 2) Q2RenSave = sqrt( mT3S * mT4S * mT5S
1181 / max( mT3S, max(mT4S, mT5S) ) );
1182 else if (renormScale3 == 3) Q2RenSave = pow( mT3S * mT4S * mT5S,
1184 else if (renormScale3 == 4) Q2RenSave = (mT3S + mT4S + mT5S) / 3.;
1185 else Q2RenSave = sH;
1186 Q2RenSave *= renormMultFac;
1187 if (renormScale3 == 6) Q2RenSave = renormFixScale;
1190 if (factorScale3 == 1) Q2FacSave = min( mT3S, min(mT4S, mT5S) );
1191 else if (factorScale3 == 2) Q2FacSave = sqrt( mT3S * mT4S * mT5S
1192 / max( mT3S, max(mT4S, mT5S) ) );
1193 else if (factorScale3 == 3) Q2FacSave = pow( mT3S * mT4S * mT5S,
1195 else if (factorScale3 == 4) Q2FacSave = (mT3S + mT4S + mT5S) / 3.;
1196 else Q2FacSave = sH;
1197 Q2FacSave *= factorMultFac;
1198 if (factorScale3 == 6) Q2FacSave = factorFixScale;
1202 double sV4 = pow2( particleDataPtr->m0(idTchan1()) );
1203 double sV5 = pow2( particleDataPtr->m0(idTchan2()) );
1204 double mT3S = s3 + p3cm.pT2();
1205 double mTV4S = sV4 + p4cm.pT2();
1206 double mTV5S = sV5 + p5cm.pT2();
1209 if (renormScale3VV == 1) Q2RenSave = max( sV4, sV5);
1210 else if (renormScale3VV == 2) Q2RenSave = sqrt( mTV4S * mTV5S );
1211 else if (renormScale3VV == 3) Q2RenSave = pow( mT3S * mTV4S * mTV5S,
1213 else if (renormScale3VV == 4) Q2RenSave = (mT3S * mTV4S * mTV5S) / 3.;
1214 else Q2RenSave = sH;
1215 Q2RenSave *= renormMultFac;
1216 if (renormScale3VV == 6) Q2RenSave = renormFixScale;
1219 if (factorScale3VV == 1) Q2FacSave = max( sV4, sV5);
1220 else if (factorScale3VV == 2) Q2FacSave = sqrt( mTV4S * mTV5S );
1221 else if (factorScale3VV == 3) Q2FacSave = pow( mT3S * mTV4S * mTV5S,
1223 else if (factorScale3VV == 4) Q2FacSave = (mT3S * mTV4S * mTV5S) / 3.;
1224 else Q2FacSave = sH;
1225 Q2FacSave *= factorMultFac;
1226 if (factorScale3VV == 6) Q2FacSave = factorFixScale;
1230 alpS = coupSMPtr->alphaS(Q2RenSave);
1231 alpEM = coupSMPtr->alphaEM(Q2RenSave);
1239 bool Sigma3Process::setupForME() {
1242 bool allowME = setupForMEin();
1246 int id3Tmp = abs(id3Mass());
1247 if (id3Tmp == 4) mME[2] = mcME;
1248 if (id3Tmp == 5) mME[2] = mbME;
1249 if (id3Tmp == 13) mME[2] = mmuME;
1250 if (id3Tmp == 15) mME[2] = mtauME;
1252 int id4Tmp = abs(id4Mass());
1253 if (id4Tmp == 4) mME[3] = mcME;
1254 if (id4Tmp == 5) mME[3] = mbME;
1255 if (id4Tmp == 13) mME[3] = mmuME;
1256 if (id4Tmp == 15) mME[3] = mtauME;
1258 int id5Tmp = abs(id5Mass());
1259 if (id5Tmp == 4) mME[4] = mcME;
1260 if (id5Tmp == 5) mME[4] = mbME;
1261 if (id5Tmp == 13) mME[4] = mmuME;
1262 if (id5Tmp == 15) mME[4] = mtauME;
1265 if (mME[2] + mME[3] + mME[4] >= mH) {
1273 if (id3Tmp != 0 && id4Tmp == id3Tmp && id5Tmp == id3Tmp) {
1274 double mAvg = (mME[2] + mME[3] + mME[4]) / 3.;
1278 }
else if (id3Tmp != 0 && id4Tmp == id3Tmp) {
1279 mME[2] = sqrtpos(0.5 * (pow2(mME[2]) + pow2(mME[3]))
1280 - 0.25 * pow2(pow2(mME[2]) - pow2(mME[3])) / sH);
1282 }
else if (id3Tmp != 0 && id5Tmp == id3Tmp) {
1283 mME[2] = sqrtpos(0.5 * (pow2(mME[2]) + pow2(mME[4]))
1284 - 0.25 * pow2(pow2(mME[2]) - pow2(mME[4])) / sH);
1286 }
else if (id4Tmp != 0 && id5Tmp == id4Tmp) {
1287 mME[3] = sqrtpos(0.5 * (pow2(mME[3]) + pow2(mME[4]))
1288 - 0.25 * pow2(pow2(mME[3]) - pow2(mME[4])) / sH);
1293 double m2ME3 = pow2(mME[2]);
1294 double m2ME4 = pow2(mME[3]);
1295 double m2ME5 = pow2(mME[4]);
1296 double p2ME3 = p3cm.pAbs2();
1297 double p2ME4 = p4cm.pAbs2();
1298 double p2ME5 = p5cm.pAbs2();
1299 double p2sum = p2ME3 + p2ME4 + p2ME5;
1300 double eME3 = sqrt(m2ME3 + p2ME3);
1301 double eME4 = sqrt(m2ME4 + p2ME4);
1302 double eME5 = sqrt(m2ME5 + p2ME5);
1303 double esum = eME3 + eME4 + eME5;
1304 double p2rat = p2ME3 / eME3 + p2ME4 / eME4 + p2ME5 / eME5;
1306 while ( abs(esum - mH) > COMPRELERR * mH && iStep < NCOMPSTEP ) {
1308 double compFac = 1. + 2. * (mH - esum) / p2rat;
1312 eME3 = sqrt(m2ME3 + p2ME3);
1313 eME4 = sqrt(m2ME4 + p2ME4);
1314 eME5 = sqrt(m2ME5 + p2ME5);
1315 esum = eME3 + eME4 + eME5;
1316 p2rat = p2ME3 / eME3 + p2ME4 / eME4 + p2ME5 / eME5;
1320 if (abs(esum - mH) > COMPRELERR * mH) allowME =
false;
1323 double totFac = sqrt( (p2ME3 + p2ME4 + p2ME5) / p2sum);
1324 pME[2] = totFac * p3cm;
1326 pME[3] = totFac * p4cm;
1328 pME[4] = totFac * p5cm;
1346 double SigmaLHAProcess::weightDecay(
Event& process,
int iResBeg,
1350 if (iResBeg < process.savedSizeValue())
return 1.;
1353 int idMother = process[process[iResBeg].mother1()].idAbs();
1356 if (idMother == 25 || idMother == 35 || idMother == 36)
1357 return weightHiggsDecay( process, iResBeg, iResEnd);
1361 return weightTopDecay( process, iResBeg, iResEnd);
1372 void SigmaLHAProcess::setScale() {
1375 double scaleLHA = lhaUpPtr->scale();
1376 if (scaleLHA < 0.) {
1381 for (
int i = 3; i < lhaUpPtr->sizePart(); ++i)
1382 if (lhaUpPtr->mother1(i) == 1) {
1384 pFinSum += Vec4( lhaUpPtr->px(i), lhaUpPtr->py(i),
1385 lhaUpPtr->pz(i), lhaUpPtr->e(i) );
1387 int nFin = iFin.size();
1388 sH = pFinSum * pFinSum;
1394 Q2RenSave = renormMultFac * sH;
1395 if (renormScale1 == 2) Q2RenSave = renormFixScale;
1396 Q2FacSave = factorMultFac * sH;
1397 if (factorScale1 == 2) Q2FacSave = factorFixScale;
1400 }
else if (nFin == 2) {
1401 double s3 = pow2(lhaUpPtr->m(iFin[0]));
1402 double s4 = pow2(lhaUpPtr->m(iFin[1]));
1403 double pT2 = pow2(lhaUpPtr->px(iFin[0])) + pow2(lhaUpPtr->py(iFin[0]));
1404 if (renormScale2 == 1) Q2RenSave = pT2 + min(s3, s4);
1405 else if (renormScale2 == 2) Q2RenSave = sqrt((pT2 + s3) * (pT2 + s4));
1406 else if (renormScale2 == 3) Q2RenSave = pT2 + 0.5 * (s3 + s4);
1407 else Q2RenSave = sH;
1408 Q2RenSave *= renormMultFac;
1409 if (renormScale2 == 5) Q2RenSave = renormFixScale;
1410 if (factorScale2 == 1) Q2FacSave = pT2 + min(s3, s4);
1411 else if (factorScale2 == 2) Q2FacSave = sqrt((pT2 + s3) * (pT2 + s4));
1412 else if (factorScale2 == 3) Q2FacSave = pT2 + 0.5 * (s3 + s4);
1413 else Q2FacSave = sH;
1414 Q2FacSave *= factorMultFac;
1415 if (factorScale2 == 5) Q2FacSave = factorFixScale;
1421 double mTSprod = 1.;
1423 for (
int i = 0; i < nFin; ++i) {
1424 double mTSnow = pow2(lhaUpPtr->m(iFin[i]))
1425 + pow2(lhaUpPtr->px(iFin[i])) + pow2(lhaUpPtr->py(iFin[i]));
1426 if (mTSnow < mTSlow) {mTSmed = mTSlow; mTSlow = mTSnow;}
1427 else if (mTSnow < mTSmed) mTSmed = mTSnow;
1431 if (renormScale3 == 1) Q2RenSave = mTSlow;
1432 else if (renormScale3 == 2) Q2RenSave = sqrt(mTSlow * mTSmed);
1433 else if (renormScale3 == 3) Q2RenSave = pow(mTSprod, 1. / nFin);
1434 else if (renormScale3 == 4) Q2RenSave = mTSsum / nFin;
1435 else Q2RenSave = sH;
1436 Q2RenSave *= renormMultFac;
1437 if (renormScale3 == 6) Q2RenSave = renormFixScale;
1438 if (factorScale3 == 1) Q2FacSave = mTSlow;
1439 else if (factorScale3 == 2) Q2FacSave = sqrt(mTSlow * mTSmed);
1440 else if (factorScale3 == 3) Q2FacSave = pow(mTSprod, 1. / nFin);
1441 else if (factorScale3 == 4) Q2FacSave = mTSsum / nFin;
1442 else Q2FacSave = sH;
1443 Q2FacSave *= factorMultFac;
1444 if (factorScale3 == 6) Q2FacSave = factorFixScale;
1449 if (lhaUpPtr->alphaQCD() < 0.001) {
1450 double Q2RenNow = (scaleLHA < 0.) ? Q2RenSave : pow2(scaleLHA);
1451 alpS = coupSMPtr->alphaS(Q2RenNow);
1453 if (lhaUpPtr->alphaQED() < 0.001) {
1454 double Q2RenNow = (scaleLHA < 0.) ? Q2RenSave : pow2(scaleLHA);
1455 alpEM = coupSMPtr->alphaEM(Q2RenNow);
1464 int SigmaLHAProcess::nFinal()
const {
1467 if (lhaUpPtr->sizePart() <= 0)
return 0;
1471 for (
int i = 3; i < lhaUpPtr->sizePart(); ++i)
1472 if (lhaUpPtr->mother1(i) == 1) ++nFin;