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(Info* infoPtrIn, Settings* settingsPtrIn,
39 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, BeamParticle* beamAPtrIn,
40 BeamParticle* beamBPtrIn, Couplings* couplingsPtrIn,
41 SigmaTotal* sigmaTotPtrIn, SLHAinterface* slhaInterfacePtrIn) {
45 settingsPtr = settingsPtrIn;
46 particleDataPtr = particleDataPtrIn;
48 beamAPtr = beamAPtrIn;
49 beamBPtr = beamBPtrIn;
50 couplingsPtr = couplingsPtrIn;
51 sigmaTotPtr = sigmaTotPtrIn;
54 slhaPtr = (slhaInterfacePtrIn != 0) ? &slhaInterfacePtrIn->slha : 0;
57 idA = (beamAPtr != 0) ? beamAPtr->id() : 0;
58 idB = (beamBPtr != 0) ? beamBPtr->id() : 0;
59 mA = (beamAPtr != 0) ? beamAPtr->m() : 0.;
60 mB = (beamBPtr != 0) ? beamBPtr->m() : 0.;
61 isLeptonA = (beamAPtr != 0) ? beamAPtr->isLepton() :
false;
62 isLeptonB = (beamBPtr != 0) ? beamBPtr->isLepton() :
false;
63 hasLeptonBeams = isLeptonA || isLeptonB;
66 bool isLepton2gamma = settingsPtr->flag(
"PDF:lepton2gamma");
67 lepton2gammaA = (beamAPtr != 0) ?
68 beamAPtr->isLepton() && isLepton2gamma :
false;
69 lepton2gammaB = (beamBPtr != 0) ?
70 beamBPtr->isLepton() && isLepton2gamma :
false;
73 Kfactor = settingsPtr->parm(
"SigmaProcess:Kfactor");
76 nQuarkIn = settingsPtr->mode(
"PDFinProcess:nQuarkIn");
79 mcME = (settingsPtr->flag(
"SigmaProcess:cMassiveME"))
80 ? particleDataPtr->m0(4) : 0.;
81 mbME = (settingsPtr->flag(
"SigmaProcess:bMassiveME"))
82 ? particleDataPtr->m0(5) : 0.;
83 mmuME = (settingsPtr->flag(
"SigmaProcess:muMassiveME"))
84 ? particleDataPtr->m0(13) : 0.;
85 mtauME = (settingsPtr->flag(
"SigmaProcess:tauMassiveME"))
86 ? particleDataPtr->m0(15) : 0.;
89 renormScale1 = settingsPtr->mode(
"SigmaProcess:renormScale1");
90 renormScale2 = settingsPtr->mode(
"SigmaProcess:renormScale2");
91 renormScale3 = settingsPtr->mode(
"SigmaProcess:renormScale3");
92 renormScale3VV = settingsPtr->mode(
"SigmaProcess:renormScale3VV");
93 renormMultFac = settingsPtr->parm(
"SigmaProcess:renormMultFac");
94 renormFixScale = settingsPtr->parm(
"SigmaProcess:renormFixScale");
97 factorScale1 = settingsPtr->mode(
"SigmaProcess:factorScale1");
98 factorScale2 = settingsPtr->mode(
"SigmaProcess:factorScale2");
99 factorScale3 = settingsPtr->mode(
"SigmaProcess:factorScale3");
100 factorScale3VV = settingsPtr->mode(
"SigmaProcess:factorScale3VV");
101 factorMultFac = settingsPtr->parm(
"SigmaProcess:factorMultFac");
102 factorFixScale = settingsPtr->parm(
"SigmaProcess:factorFixScale");
105 higgsH1parity = settingsPtr->mode(
"HiggsH1:parity");
106 higgsH1eta = settingsPtr->parm(
"HiggsH1:etaParity");
107 higgsH1phi = settingsPtr->parm(
"HiggsH1:phiParity");
108 higgsH2parity = settingsPtr->mode(
"HiggsH2:parity");
109 higgsH2eta = settingsPtr->parm(
"HiggsH2:etaParity");
110 higgsH2phi = settingsPtr->parm(
"HiggsH2:phiParity");
111 higgsA3parity = settingsPtr->mode(
"HiggsA3:parity");
112 higgsA3eta = settingsPtr->parm(
"HiggsA3:etaParity");
113 higgsA3phi = settingsPtr->parm(
"HiggsA3:phiParity");
116 if (!settingsPtr->flag(
"Higgs:useBSM")){
119 higgsH1phi = M_PI / 2.;
130 bool SigmaProcess::initFlux() {
138 string fluxType = inFlux();
141 if (fluxType ==
"gg") {
148 else if (fluxType ==
"qg") {
149 for (
int i = -nQuarkIn; i <= nQuarkIn; ++i) {
150 int idNow = (i == 0) ? 21 : i;
154 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
162 else if (fluxType ==
"qq") {
163 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
168 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
170 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
172 addPair(id1Now, id2Now);
176 else if (fluxType ==
"qqbar") {
177 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
182 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
184 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
185 if (id2Now != 0 && id1Now * id2Now < 0)
186 addPair(id1Now, id2Now);
190 else if (fluxType ==
"qqbarSame") {
191 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
196 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
198 addPair(idNow, -idNow);
202 else if (fluxType ==
"ff") {
205 if ( isLeptonA && isLeptonB && !lepton2gammaA && !lepton2gammaB ) {
210 }
else if ( isLeptonA && !lepton2gammaA ) {
212 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
218 }
else if ( isLeptonB && !lepton2gammaB ) {
220 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
227 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
232 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
234 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
236 addPair(id1Now, id2Now);
241 else if (fluxType ==
"ffbar") {
244 if (isLeptonA && isLeptonB && idA * idB < 0
245 && !lepton2gammaA && !lepton2gammaB) {
251 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
256 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
258 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
259 if (id2Now != 0 && id1Now * id2Now < 0)
260 addPair(id1Now, id2Now);
265 else if (fluxType ==
"ffbarSame") {
268 if ( idA + idB == 0 && isLeptonA && !lepton2gammaA && !lepton2gammaB) {
274 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
279 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
281 addPair(idNow, -idNow);
286 else if (fluxType ==
"ffbarChg") {
289 if ( isLeptonA && isLeptonB && !lepton2gammaA && !lepton2gammaB
290 && abs( particleDataPtr->chargeType(idA)
291 + particleDataPtr->chargeType(idB) ) == 3 ) {
297 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
302 for (
int id1Now = -nQuarkIn; id1Now <= nQuarkIn; ++id1Now)
304 for (
int id2Now = -nQuarkIn; id2Now <= nQuarkIn; ++id2Now)
305 if (id2Now != 0 && id1Now * id2Now < 0
306 && (abs(id1Now) + abs(id2Now))%2 == 1) addPair(id1Now, id2Now);
311 else if (fluxType ==
"fgm") {
313 if ( isLeptonA && !lepton2gammaA ) {
317 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
324 if ( isLeptonB && !lepton2gammaB ) {
328 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
340 else if (fluxType ==
"qgm") {
341 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
346 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
359 else if (fluxType ==
"gmq") {
360 for (
int idNow = -nQuarkIn; idNow <= nQuarkIn; ++idNow)
370 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);
411 double SigmaProcess::sigmaPDF(
bool initPS,
bool samexGamma,
412 bool useNewXvalues,
double x1New,
double x2New) {
415 for (
int j = 0; j < sizeBeamA(); ++j) {
417 inBeamA[j].pdf = beamAPtr->xfMax( inBeamA[j].
id, x1Save, Q2FacSave);
418 else if ( samexGamma)
419 inBeamA[j].pdf = beamAPtr->xfSame( inBeamA[j].
id, x1Save, Q2FacSave);
420 else if ( useNewXvalues && x1New > 0.)
421 inBeamA[j].pdf = beamAPtr->xfGamma( inBeamA[j].
id, x1New, Q2FacSave);
423 inBeamA[j].pdf = beamAPtr->xfHard( inBeamA[j].
id, x1Save, Q2FacSave);
425 for (
int j = 0; j < sizeBeamB(); ++j){
427 inBeamB[j].pdf = beamBPtr->xfMax( inBeamB[j].
id, x2Save, Q2FacSave);
428 else if ( samexGamma)
429 inBeamB[j].pdf = beamBPtr->xfSame( inBeamB[j].
id, x2Save, Q2FacSave);
430 else if ( useNewXvalues && x2New > 0.)
431 inBeamB[j].pdf = beamBPtr->xfGamma( inBeamB[j].
id, x2New, Q2FacSave);
433 inBeamB[j].pdf = beamBPtr->xfHard( inBeamB[j].
id, x2Save, Q2FacSave);
438 if ( !useNewXvalues && !samexGamma && beamAPtr->hasResGamma() )
439 beamAPtr->xGammaPDF();
440 if ( !useNewXvalues && !samexGamma && beamBPtr->hasResGamma() )
441 beamBPtr->xGammaPDF();
445 for (
int i = 0; i < sizePair(); ++i) {
448 inPair[i].pdfSigma = Kfactor
449 * sigmaHatWrap(inPair[i].idA, inPair[i].idB);
452 for (
int j = 0; j < sizeBeamA(); ++j)
453 if (inPair[i].idA == inBeamA[j].
id) {
454 inPair[i].pdfA = inBeamA[j].pdf;
455 inPair[i].pdfSigma *= inBeamA[j].pdf;
458 for (
int j = 0; j < sizeBeamB(); ++j)
459 if (inPair[i].idB == inBeamB[j].
id) {
460 inPair[i].pdfB = inBeamB[j].pdf;
461 inPair[i].pdfSigma *= inBeamB[j].pdf;
466 sigmaSumSave += inPair[i].pdfSigma;
478 void SigmaProcess::pickInState(
int id1in,
int id2in) {
481 if (id1in != 0 && id2in != 0) {
488 double sigmaRand = sigmaSumSave * rndmPtr->flat();
489 for (
int i = 0; i < sizePair(); ++i) {
490 sigmaRand -= inPair[i].pdfSigma;
491 if (sigmaRand <= 0.) {
494 pdf1Save = inPair[i].pdfA;
495 pdf2Save = inPair[i].pdfB;
506 bool SigmaProcess::setupForMEin() {
513 int id1Tmp = abs(id1);
514 if (id1Tmp == 4) mME[0] = mcME;
515 if (id1Tmp == 5) mME[0] = mbME;
516 if (id1Tmp == 13) mME[0] = mmuME;
517 if (id1Tmp == 15) mME[0] = mtauME;
519 int id2Tmp = abs(id2);
520 if (id2Tmp == 4) mME[1] = mcME;
521 if (id2Tmp == 5) mME[1] = mbME;
522 if (id2Tmp == 13) mME[1] = mmuME;
523 if (id2Tmp == 15) mME[1] = mtauME;
526 if (mME[0] + mME[1] >= mH) {
533 if (mME[0] == 0. && mME[1] == 0.) {
534 pME[0] = 0.5 * mH * Vec4( 0., 0., 1., 1.);
535 pME[1] = 0.5 * mH * Vec4( 0., 0., -1., 1.);
537 double e0 = 0.5 * (mH * mH + mME[0] * mME[0] - mME[1] * mME[1]) / mH;
538 double pz0 = sqrtpos(e0 * e0 - mME[0] * mME[0]);
539 pME[0] = Vec4( 0., 0., pz0, e0);
540 pME[1] = Vec4( 0., 0., -pz0, mH - e0);
552 double SigmaProcess::weightTopDecay(
Event& process,
int iResBeg,
556 if (iResEnd - iResBeg != 1)
return 1.;
558 int iB2 = iResBeg + 1;
559 int idW1 = process[iW1].idAbs();
560 int idB2 = process[iB2].idAbs();
565 if (idW1 != 24 || (idB2 != 1 && idB2 != 3 && idB2 != 5))
return 1.;
566 int iT = process[iW1].mother1();
567 if (iT <= 0 || process[iT].idAbs() != 6)
return 1.;
570 int iF = process[iW1].daughter1();
571 int iFbar = process[iW1].daughter2();
572 if (iFbar - iF != 1)
return 1.;
573 if (process[iT].
id() * process[iF].
id() < 0) swap(iF, iFbar);
576 double wt = (process[iT].p() * process[iFbar].p())
577 * (process[iF].p() * process[iB2].p());
578 double wtMax = ( pow4(process[iT].m()) - pow4(process[iW1].m()) ) / 8.;
590 double SigmaProcess::weightHiggsDecay(
Event& process,
int iResBeg,
594 if (iResEnd - iResBeg != 1)
return 1.;
596 int iZW2 = iResBeg + 1;
597 int idZW1 = process[iZW1].id();
598 int idZW2 = process[iZW2].id();
599 if (idZW1 < 0 || idZW2 == 22) {
603 if ( (idZW1 != 23 || idZW2 != 23) && (idZW1 != 24 || idZW2 != -24)
604 && (idZW1 != 22 || idZW2 != 23) )
return 1.;
607 int iH = process[iZW1].mother1();
608 if (iH <= 0)
return 1.;
609 int idH = process[iH].id();
610 if (idH != 25 && idH != 35 && idH !=36)
return 1.;
614 int i5 = process[iZW2].daughter1();
615 int i6 = process[iZW2].daughter2();
616 double pgmZ = process[iZW1].p() * process[iZW2].p();
617 double pgm5 = process[iZW1].p() * process[i5].p();
618 double pgm6 = process[iZW1].p() * process[i6].p();
619 return (pow2(pgm5) + pow2(pgm6)) / pow2(pgmZ);
623 int higgsParity = higgsH1parity;
624 double higgsEta = higgsH1eta;
626 higgsParity = higgsH2parity;
627 higgsEta = higgsH2eta;
628 }
else if (idH == 36) {
629 higgsParity = higgsA3parity;
630 higgsEta = higgsA3eta;
634 if (higgsParity == 0 || higgsParity > 3)
return 1.;
637 double wtMax = pow4(process[iH].m());
641 int i3 = process[iZW1].daughter1();
642 int i4 = process[iZW1].daughter2();
643 if (process[i3].
id() < 0) swap( i3, i4);
644 int i5 = process[iZW2].daughter1();
645 int i6 = process[iZW2].daughter2();
646 if (process[i5].
id() < 0) swap( i5, i6);
649 double p35 = 2. * process[i3].p() * process[i5].p();
650 double p36 = 2. * process[i3].p() * process[i6].p();
651 double p45 = 2. * process[i4].p() * process[i5].p();
652 double p46 = 2. * process[i4].p() * process[i6].p();
653 double p34 = 2. * process[i3].p() * process[i4].p();
654 double p56 = 2. * process[i5].p() * process[i6].p();
655 double mZW1 = process[iZW1].m();
656 double mZW2 = process[iZW2].m();
659 double epsilonProd = 0.;
660 if (higgsParity == 3) {
662 for (
int i = 0; i < 4; ++i) {
667 p[i][0] = process[ii].e();
668 p[i][1] = process[ii].px();
669 p[i][2] = process[ii].py();
670 p[i][3] = process[ii].pz();
673 = p[0][0]*p[1][1]*p[2][2]*p[3][3] - p[0][0]*p[1][1]*p[2][3]*p[3][2]
674 - p[0][0]*p[1][2]*p[2][1]*p[3][3] + p[0][0]*p[1][2]*p[2][3]*p[3][1]
675 + p[0][0]*p[1][3]*p[2][1]*p[3][2] - p[0][0]*p[1][3]*p[2][2]*p[3][1]
676 - p[0][1]*p[1][0]*p[2][2]*p[3][3] + p[0][1]*p[1][0]*p[2][3]*p[3][2]
677 + p[0][1]*p[1][2]*p[2][0]*p[3][3] - p[0][1]*p[1][2]*p[2][3]*p[3][0]
678 - p[0][1]*p[1][3]*p[2][0]*p[3][2] + p[0][1]*p[1][3]*p[2][2]*p[3][0]
679 + p[0][2]*p[1][0]*p[2][1]*p[3][3] - p[0][2]*p[1][0]*p[2][3]*p[3][1]
680 - p[0][2]*p[1][1]*p[2][0]*p[3][3] + p[0][2]*p[1][1]*p[2][3]*p[3][0]
681 + p[0][2]*p[1][3]*p[2][0]*p[3][1] - p[0][2]*p[1][3]*p[2][1]*p[3][0]
682 - p[0][3]*p[1][0]*p[2][1]*p[3][2] + p[0][3]*p[1][0]*p[2][2]*p[3][1]
683 + p[0][3]*p[1][1]*p[2][0]*p[3][2] - p[0][3]*p[1][1]*p[2][2]*p[3][0]
684 - p[0][3]*p[1][2]*p[2][0]*p[3][1] + p[0][3]*p[1][2]*p[2][1]*p[3][0];
689 double vf1 = couplingsPtr->vf(process[i3].idAbs());
690 double af1 = couplingsPtr->af(process[i3].idAbs());
691 double vf2 = couplingsPtr->vf(process[i5].idAbs());
692 double af2 = couplingsPtr->af(process[i5].idAbs());
693 double va12asym = 4. * vf1 * af1 * vf2 * af2
694 / ( (vf1*vf1 + af1*af1) * (vf2*vf2 + af2*af2) );
696 double ah = higgsEta / pow2( particleDataPtr->m0(23) );
699 if (higgsParity == 1) wt = 8. * (1. + va12asym) * p35 * p46
700 + 8. * (1. - va12asym) * p36 * p45;
703 else if (higgsParity == 2) wt = ( pow2(p35 + p46)
704 + pow2(p36 + p45) - 2. * p34 * p56
705 - 2. * pow2(p35 * p46 - p36 * p45) / (p34 * p56)
706 + va12asym * (p35 + p36 - p45 - p46) * (p35 + p45 - p36 - p46) )
710 else wt = 32. * ( 0.25 * pow2(vh) * ( (1. + va12asym) * p35 * p46
711 + (1. - va12asym) * p36 * p45 ) - 0.5 * vh * ah * epsilonProd
712 * ( (1. + va12asym) * (p35 + p46) - (1. - va12asym) * (p36 + p45) )
713 + 0.0625 * pow2(ah) * (-2. * pow2(p34 * p56)
714 - 2. * pow2(p35 * p46 - p36 * p45)
715 + p34 * p56 * (pow2(p35 + p46) + pow2(p36 + p45))
716 + va12asym * p34 * p56 * (p35 + p36 - p45 - p46)
717 * (p35 + p45 - p36 - p46) ) )
718 / ( pow2(vh) + 2. * abs(vh * ah) * mZW1 * mZW2
719 + 2. * pow2(ah * mZW1 * mZW2) * (1. + va12asym) );
722 }
else if (idZW1 == 24) {
724 double ah = higgsEta / pow2( particleDataPtr->m0(24) );
727 if (higgsParity == 1) wt = 16. * p35 * p46;
730 else if (higgsParity == 2) wt = 0.5 * ( pow2(p35 + p46)
731 + pow2(p36 + p45) - 2. * p34 * p56
732 - 2. * pow2(p35 * p46 - p36 * p45) / (p34 * p56)
733 + (p35 + p36 - p45 - p46) * (p35 + p45 - p36 - p46) );
736 else wt = 32. * ( 0.25 * pow2(vh) * 2. * p35 * p46
737 - 0.5 * vh * ah * epsilonProd * 2. * (p35 + p46)
738 + 0.0625 * pow2(ah) * (-2. * pow2(p34 * p56)
739 - 2. * pow2(p35 * p46 - p36 * p45)
740 + p34 * p56 * (pow2(p35 + p46) + pow2(p36 + p45))
741 + p34 * p56 * (p35 + p36 - p45 - p46) * (p35 + p45 - p36 - p46) ) )
742 / ( pow2(vh) + 2. * abs(vh * ah) * mZW1 * mZW2
743 + 2. * pow2(ah * mZW1 * mZW2) );
762 double Sigma1Process::sigmaHatWrap(
int id1in,
int id2in) {
766 double sigmaTmp = sigmaHat();
770 int idTmp = resonanceA();
771 double mTmp = particleDataPtr->m0(idTmp);
772 double GamTmp = particleDataPtr->mWidth(idTmp);
773 sigmaTmp *= 2. * mTmp * GamTmp / ( pow2(sH - mTmp * mTmp)
774 + pow2(mTmp * GamTmp) );
776 if (convert2mb()) sigmaTmp *= CONVERT2MB;
785 void Sigma1Process::store1Kin(
double x1in,
double x2in,
double sHin) {
798 Q2RenSave = renormMultFac * sH;
799 if (renormScale1 == 2) Q2RenSave = renormFixScale;
802 Q2FacSave = factorMultFac * sH;
803 if (factorScale1 == 2) Q2FacSave = factorFixScale;
806 alpS = couplingsPtr->alphaS(Q2RenSave);
807 alpEM = couplingsPtr->alphaEM(Q2RenSave);
815 bool Sigma1Process::setupForME() {
818 bool allowME = setupForMEin();
822 pME[2] = Vec4( 0., 0., 0., mH);
838 void Sigma2Process::store2Kin(
double x1in,
double x2in,
double sHin,
839 double tHin,
double m3in,
double m4in,
double runBW3in,
double runBW4in) {
849 bool masslessKin = (id3Mass() == 0) && (id4Mass() == 0);
865 uH = (masslessKin) ? -(sH + tH) : s3 + s4 - (sH + tH);
876 pT2 = (masslessKin) ? tH * uH / sH : (tH * uH - s3 * s4) / sH;
882 Q2RenSave = renormMultFac * sH;
883 if (renormScale1 == 2) Q2RenSave = renormFixScale;
886 Q2FacSave = factorMultFac * sH;
887 if (factorScale1 == 2) Q2FacSave = factorFixScale;
893 if (masslessKin) Q2RenSave = (renormScale2 < 4) ? pT2 : sH;
894 else if (renormScale2 == 1) Q2RenSave = pT2 + min(s3, s4);
895 else if (renormScale2 == 2) Q2RenSave = sqrt((pT2 + s3) * (pT2 + s4));
896 else if (renormScale2 == 3) Q2RenSave = pT2 + 0.5 * (s3 + s4);
898 Q2RenSave *= renormMultFac;
899 if (renormScale2 == 5) Q2RenSave = renormFixScale;
900 if (renormScale2 == 6) Q2RenSave = -tH * renormMultFac;
903 if (masslessKin) Q2FacSave = (factorScale2 < 4) ? pT2 : sH;
904 else if (factorScale2 == 1) Q2FacSave = pT2 + min(s3, s4);
905 else if (factorScale2 == 2) Q2FacSave = sqrt((pT2 + s3) * (pT2 + s4));
906 else if (factorScale2 == 3) Q2FacSave = pT2 + 0.5 * (s3 + s4);
908 Q2FacSave *= factorMultFac;
909 if (factorScale2 == 5) Q2FacSave = factorFixScale;
910 if (factorScale2 == 6) Q2FacSave = -tH * factorMultFac;
914 alpS = couplingsPtr->alphaS(Q2RenSave);
915 alpEM = couplingsPtr->alphaEM(Q2RenSave);
923 void Sigma2Process::store2KinMPI(
double x1in,
double x2in,
924 double sHin,
double tHin,
double uHin,
double alpSin,
double alpEMin,
925 bool needMasses,
double m3in,
double m4in) {
955 cosTheta = (tH - uH) / sH;
956 sinTheta = 2. * sqrtpos( tH * uH ) / sH;
964 sHMass = sH - s3 - s4;
965 sHBeta = sqrtpos(sHMass*sHMass - 4. * s3 * s4);
966 tH = -0.5 * (sHMass - sHBeta * cosTheta);
967 uH = -0.5 * (sHMass + sHBeta * cosTheta);
973 pT2Mass = 0.25 * sHBeta * pow2(sinTheta);
981 bool Sigma2Process::final2KinMPI(
int i1Res,
int i2Res, Vec4 p1Res, Vec4 p2Res,
982 double m1Res,
double m2Res) {
988 m3 = particleDataPtr->m0(idSave[3]);
989 m4 = particleDataPtr->m0(idSave[4]);
991 if (m3 + m4 + MASSMARGIN > mH)
return false;
996 double e1In = 0.5 * mH;
999 if (i1Res > 0 || i2Res > 0) {
1000 double s1 = m1Res * m1Res;
1001 double s2 = m2Res * m2Res;
1002 e1In = 0.5 * (sH + s1 - s2) / mH;
1003 e2In = 0.5 * (sH + s2 - s1) / mH;
1004 pzIn = sqrtpos( e1In*e1In - s1 );
1008 double e3 = 0.5 * (sH + s3 - s4) / mH;
1009 double e4 = 0.5 * (sH + s4 - s3) / mH;
1010 double pAbs = sqrtpos( e3*e3 - s3 );
1011 phi = 2. * M_PI * rndmPtr->flat();
1012 double pZ = pAbs * cosTheta;
1013 pTFin = pAbs * sinTheta;
1014 double pX = pTFin * sin(phi);
1015 double pY = pTFin * cos(phi);
1016 double scale = 0.5 * mH * sinTheta;
1017 if (swappedTU()) pZ = -pZ;
1020 int status1 = (i1Res == 0) ? -31 : -34;
1021 int status2 = (i2Res == 0) ? -31 : -34;
1022 parton[1] = Particle( idSave[1], status1, 0, 0, 3, 4,
1023 colSave[1], acolSave[1], 0., 0., pzIn, e1In, m1Res, scale);
1024 parton[2] = Particle( idSave[2], status2, 0, 0, 3, 4,
1025 colSave[2], acolSave[2], 0., 0., -pzIn, e2In, m2Res, scale);
1026 parton[3] = Particle( idSave[3], 33, 1, 2, 0, 0,
1027 colSave[3], acolSave[3], pX, pY, pZ, e3, m3, scale);
1028 parton[4] = Particle( idSave[4], 33, 1, 2, 0, 0,
1029 colSave[4], acolSave[4], -pX, -pY, -pZ, e4, m4, scale);
1033 if (i1Res == 0 && i2Res == 0) {
1034 double betaZ = (x1Save - x2Save) / (x1Save + x2Save);
1035 for (
int i = 1; i <= 4; ++i) parton[i].bst(0., 0., betaZ);
1039 M.fromCMframe( p1Res, p2Res);
1040 for (
int i = 1; i <= 4; ++i) parton[i].rotbst(M);
1052 bool Sigma2Process::setupForME() {
1055 bool allowME = setupForMEin();
1059 int id3Tmp = abs(id3Mass());
1060 if (id3Tmp == 4) mME[2] = mcME;
1061 if (id3Tmp == 5) mME[2] = mbME;
1062 if (id3Tmp == 13) mME[2] = mmuME;
1063 if (id3Tmp == 15) mME[2] = mtauME;
1065 int id4Tmp = abs(id4Mass());
1066 if (id4Tmp == 4) mME[3] = mcME;
1067 if (id4Tmp == 5) mME[3] = mbME;
1068 if (id4Tmp == 13) mME[3] = mmuME;
1069 if (id4Tmp == 15) mME[3] = mtauME;
1072 if (mME[2] + mME[3] >= mH) {
1079 double sH34 = sqrtpos( pow2(sH - s3 - s4) - 4. * s3 * s4);
1080 double cThe = (tH - uH) / sH34;
1081 double sThe = sqrtpos(1. - cThe * cThe);
1084 double s3ME = pow2(mME[2]);
1085 double s4ME = pow2(mME[3]);
1086 double sH34ME = sqrtpos( pow2(sH - s3ME - s4ME) - 4. * s3ME * s4ME);
1087 double pAbsME = 0.5 * sH34ME / mH;
1090 if (id3Tmp == 0 || id3Tmp != id4Tmp) {
1091 pME[2] = Vec4( pAbsME * sThe, 0., pAbsME * cThe,
1092 0.5 * (sH + s3ME - s4ME) / mH);
1093 pME[3] = Vec4( -pAbsME * sThe, 0., -pAbsME * cThe,
1094 0.5 * (sH + s4ME - s3ME) / mH);
1098 mME[2] = sqrtpos(0.5 * (s3ME + s4ME) - 0.25 * pow2(s3ME - s4ME) / sH);
1100 pME[2] = Vec4( pAbsME * sThe, 0., pAbsME * cThe, 0.5 * mH);
1101 pME[3] = Vec4( -pAbsME * sThe, 0., -pAbsME * cThe, 0.5 * mH);
1118 void Sigma3Process::store3Kin(
double x1in,
double x2in,
double sHin,
1119 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
1120 double m5in,
double runBW3in,
double runBW4in,
double runBW5in) {
1130 if (id3Mass() == 0 && id4Mass() == 0 && id5Mass() == 0) {
1163 Q2RenSave = renormMultFac * sH;
1164 if (renormScale1 == 2) Q2RenSave = renormFixScale;
1167 Q2FacSave = factorMultFac * sH;
1168 if (factorScale1 == 2) Q2RenSave = factorFixScale;
1171 }
else if ( idTchan1() != 23 && idTchan1() != 24 && idTchan2() != 23
1172 && idTchan2() != 24 ) {
1173 double mT3S = s3 + p3cm.pT2();
1174 double mT4S = s4 + p4cm.pT2();
1175 double mT5S = s5 + p5cm.pT2();
1178 if (renormScale3 == 1) Q2RenSave = min( mT3S, min(mT4S, mT5S) );
1179 else if (renormScale3 == 2) Q2RenSave = sqrt( mT3S * mT4S * mT5S
1180 / max( mT3S, max(mT4S, mT5S) ) );
1181 else if (renormScale3 == 3) Q2RenSave = pow( mT3S * mT4S * mT5S,
1183 else if (renormScale3 == 4) Q2RenSave = (mT3S + mT4S + mT5S) / 3.;
1184 else Q2RenSave = sH;
1185 Q2RenSave *= renormMultFac;
1186 if (renormScale3 == 6) Q2RenSave = renormFixScale;
1189 if (factorScale3 == 1) Q2FacSave = min( mT3S, min(mT4S, mT5S) );
1190 else if (factorScale3 == 2) Q2FacSave = sqrt( mT3S * mT4S * mT5S
1191 / max( mT3S, max(mT4S, mT5S) ) );
1192 else if (factorScale3 == 3) Q2FacSave = pow( mT3S * mT4S * mT5S,
1194 else if (factorScale3 == 4) Q2FacSave = (mT3S + mT4S + mT5S) / 3.;
1195 else Q2FacSave = sH;
1196 Q2FacSave *= factorMultFac;
1197 if (factorScale3 == 6) Q2FacSave = factorFixScale;
1201 double sV4 = pow2( particleDataPtr->m0(idTchan1()) );
1202 double sV5 = pow2( particleDataPtr->m0(idTchan2()) );
1203 double mT3S = s3 + p3cm.pT2();
1204 double mTV4S = sV4 + p4cm.pT2();
1205 double mTV5S = sV5 + p5cm.pT2();
1208 if (renormScale3VV == 1) Q2RenSave = max( sV4, sV5);
1209 else if (renormScale3VV == 2) Q2RenSave = sqrt( mTV4S * mTV5S );
1210 else if (renormScale3VV == 3) Q2RenSave = pow( mT3S * mTV4S * mTV5S,
1212 else if (renormScale3VV == 4) Q2RenSave = (mT3S * mTV4S * mTV5S) / 3.;
1213 else Q2RenSave = sH;
1214 Q2RenSave *= renormMultFac;
1215 if (renormScale3VV == 6) Q2RenSave = renormFixScale;
1218 if (factorScale3VV == 1) Q2FacSave = max( sV4, sV5);
1219 else if (factorScale3VV == 2) Q2FacSave = sqrt( mTV4S * mTV5S );
1220 else if (factorScale3VV == 3) Q2FacSave = pow( mT3S * mTV4S * mTV5S,
1222 else if (factorScale3VV == 4) Q2FacSave = (mT3S * mTV4S * mTV5S) / 3.;
1223 else Q2FacSave = sH;
1224 Q2FacSave *= factorMultFac;
1225 if (factorScale3VV == 6) Q2FacSave = factorFixScale;
1229 alpS = couplingsPtr->alphaS(Q2RenSave);
1230 alpEM = couplingsPtr->alphaEM(Q2RenSave);
1238 bool Sigma3Process::setupForME() {
1241 bool allowME = setupForMEin();
1245 int id3Tmp = abs(id3Mass());
1246 if (id3Tmp == 4) mME[2] = mcME;
1247 if (id3Tmp == 5) mME[2] = mbME;
1248 if (id3Tmp == 13) mME[2] = mmuME;
1249 if (id3Tmp == 15) mME[2] = mtauME;
1251 int id4Tmp = abs(id4Mass());
1252 if (id4Tmp == 4) mME[3] = mcME;
1253 if (id4Tmp == 5) mME[3] = mbME;
1254 if (id4Tmp == 13) mME[3] = mmuME;
1255 if (id4Tmp == 15) mME[3] = mtauME;
1257 int id5Tmp = abs(id5Mass());
1258 if (id5Tmp == 4) mME[4] = mcME;
1259 if (id5Tmp == 5) mME[4] = mbME;
1260 if (id5Tmp == 13) mME[4] = mmuME;
1261 if (id5Tmp == 15) mME[4] = mtauME;
1264 if (mME[2] + mME[3] + mME[4] >= mH) {
1272 if (id3Tmp != 0 && id4Tmp == id3Tmp && id5Tmp == id3Tmp) {
1273 double mAvg = (mME[2] + mME[3] + mME[4]) / 3.;
1277 }
else if (id3Tmp != 0 && id4Tmp == id3Tmp) {
1278 mME[2] = sqrtpos(0.5 * (pow2(mME[2]) + pow2(mME[3]))
1279 - 0.25 * pow2(pow2(mME[2]) - pow2(mME[3])) / sH);
1281 }
else if (id3Tmp != 0 && id5Tmp == id3Tmp) {
1282 mME[2] = sqrtpos(0.5 * (pow2(mME[2]) + pow2(mME[4]))
1283 - 0.25 * pow2(pow2(mME[2]) - pow2(mME[4])) / sH);
1285 }
else if (id4Tmp != 0 && id5Tmp == id4Tmp) {
1286 mME[3] = sqrtpos(0.5 * (pow2(mME[3]) + pow2(mME[4]))
1287 - 0.25 * pow2(pow2(mME[3]) - pow2(mME[4])) / sH);
1292 double m2ME3 = pow2(mME[2]);
1293 double m2ME4 = pow2(mME[3]);
1294 double m2ME5 = pow2(mME[4]);
1295 double p2ME3 = p3cm.pAbs2();
1296 double p2ME4 = p4cm.pAbs2();
1297 double p2ME5 = p5cm.pAbs2();
1298 double p2sum = p2ME3 + p2ME4 + p2ME5;
1299 double eME3 = sqrt(m2ME3 + p2ME3);
1300 double eME4 = sqrt(m2ME4 + p2ME4);
1301 double eME5 = sqrt(m2ME5 + p2ME5);
1302 double esum = eME3 + eME4 + eME5;
1303 double p2rat = p2ME3 / eME3 + p2ME4 / eME4 + p2ME5 / eME5;
1305 while ( abs(esum - mH) > COMPRELERR * mH && iStep < NCOMPSTEP ) {
1307 double compFac = 1. + 2. * (mH - esum) / p2rat;
1311 eME3 = sqrt(m2ME3 + p2ME3);
1312 eME4 = sqrt(m2ME4 + p2ME4);
1313 eME5 = sqrt(m2ME5 + p2ME5);
1314 esum = eME3 + eME4 + eME5;
1315 p2rat = p2ME3 / eME3 + p2ME4 / eME4 + p2ME5 / eME5;
1319 if (abs(esum - mH) > COMPRELERR * mH) allowME =
false;
1322 double totFac = sqrt( (p2ME3 + p2ME4 + p2ME5) / p2sum);
1323 pME[2] = totFac * p3cm;
1325 pME[3] = totFac * p4cm;
1327 pME[4] = totFac * p5cm;
1345 double SigmaLHAProcess::weightDecay(
Event& process,
int iResBeg,
1349 if (iResBeg < process.savedSizeValue())
return 1.;
1352 int idMother = process[process[iResBeg].mother1()].idAbs();
1355 if (idMother == 25 || idMother == 35 || idMother == 36)
1356 return weightHiggsDecay( process, iResBeg, iResEnd);
1360 return weightTopDecay( process, iResBeg, iResEnd);
1371 void SigmaLHAProcess::setScale() {
1374 double scaleLHA = lhaUpPtr->scale();
1375 if (scaleLHA < 0.) {
1380 for (
int i = 3; i < lhaUpPtr->sizePart(); ++i)
1381 if (lhaUpPtr->mother1(i) == 1) {
1383 pFinSum += Vec4( lhaUpPtr->px(i), lhaUpPtr->py(i),
1384 lhaUpPtr->pz(i), lhaUpPtr->e(i) );
1386 int nFin = iFin.size();
1387 sH = pFinSum * pFinSum;
1393 Q2RenSave = renormMultFac * sH;
1394 if (renormScale1 == 2) Q2RenSave = renormFixScale;
1395 Q2FacSave = factorMultFac * sH;
1396 if (factorScale1 == 2) Q2FacSave = factorFixScale;
1399 }
else if (nFin == 2) {
1400 double s3 = pow2(lhaUpPtr->m(iFin[0]));
1401 double s4 = pow2(lhaUpPtr->m(iFin[1]));
1402 double pT2 = pow2(lhaUpPtr->px(iFin[0])) + pow2(lhaUpPtr->py(iFin[0]));
1403 if (renormScale2 == 1) Q2RenSave = pT2 + min(s3, s4);
1404 else if (renormScale2 == 2) Q2RenSave = sqrt((pT2 + s3) * (pT2 + s4));
1405 else if (renormScale2 == 3) Q2RenSave = pT2 + 0.5 * (s3 + s4);
1406 else Q2RenSave = sH;
1407 Q2RenSave *= renormMultFac;
1408 if (renormScale2 == 5) Q2RenSave = renormFixScale;
1409 if (factorScale2 == 1) Q2FacSave = pT2 + min(s3, s4);
1410 else if (factorScale2 == 2) Q2FacSave = sqrt((pT2 + s3) * (pT2 + s4));
1411 else if (factorScale2 == 3) Q2FacSave = pT2 + 0.5 * (s3 + s4);
1412 else Q2FacSave = sH;
1413 Q2FacSave *= factorMultFac;
1414 if (factorScale2 == 5) Q2FacSave = factorFixScale;
1420 double mTSprod = 1.;
1422 for (
int i = 0; i < nFin; ++i) {
1423 double mTSnow = pow2(lhaUpPtr->m(iFin[i]))
1424 + pow2(lhaUpPtr->px(iFin[i])) + pow2(lhaUpPtr->py(iFin[i]));
1425 if (mTSnow < mTSlow) {mTSmed = mTSlow; mTSlow = mTSnow;}
1426 else if (mTSnow < mTSmed) mTSmed = mTSnow;
1430 if (renormScale3 == 1) Q2RenSave = mTSlow;
1431 else if (renormScale3 == 2) Q2RenSave = sqrt(mTSlow * mTSmed);
1432 else if (renormScale3 == 3) Q2RenSave = pow(mTSprod, 1. / nFin);
1433 else if (renormScale3 == 4) Q2RenSave = mTSsum / nFin;
1434 else Q2RenSave = sH;
1435 Q2RenSave *= renormMultFac;
1436 if (renormScale3 == 6) Q2RenSave = renormFixScale;
1437 if (factorScale3 == 1) Q2FacSave = mTSlow;
1438 else if (factorScale3 == 2) Q2FacSave = sqrt(mTSlow * mTSmed);
1439 else if (factorScale3 == 3) Q2FacSave = pow(mTSprod, 1. / nFin);
1440 else if (factorScale3 == 4) Q2FacSave = mTSsum / nFin;
1441 else Q2FacSave = sH;
1442 Q2FacSave *= factorMultFac;
1443 if (factorScale3 == 6) Q2FacSave = factorFixScale;
1448 if (lhaUpPtr->alphaQCD() < 0.001) {
1449 double Q2RenNow = (scaleLHA < 0.) ? Q2RenSave : pow2(scaleLHA);
1450 alpS = couplingsPtr->alphaS(Q2RenNow);
1452 if (lhaUpPtr->alphaQED() < 0.001) {
1453 double Q2RenNow = (scaleLHA < 0.) ? Q2RenSave : pow2(scaleLHA);
1454 alpEM = couplingsPtr->alphaEM(Q2RenNow);
1463 int SigmaLHAProcess::nFinal()
const {
1466 if (lhaUpPtr->sizePart() <= 0)
return 0;
1470 for (
int i = 3; i < lhaUpPtr->sizePart(); ++i)
1471 if (lhaUpPtr->mother1(i) == 1) ++nFin;