9 #include "Pythia8/ProcessContainer.h"
12 #include "Pythia8/SigmaCompositeness.h"
13 #include "Pythia8/SigmaEW.h"
14 #include "Pythia8/SigmaExtraDim.h"
15 #include "Pythia8/SigmaGeneric.h"
16 #include "Pythia8/SigmaHiggs.h"
17 #include "Pythia8/SigmaLeftRightSym.h"
18 #include "Pythia8/SigmaLeptoquark.h"
19 #include "Pythia8/SigmaNewGaugeBosons.h"
20 #include "Pythia8/SigmaQCD.h"
21 #include "Pythia8/SigmaSUSY.h"
22 #include "Pythia8/SigmaDM.h"
37 const int ProcessContainer::N12SAMPLE = 100;
40 const int ProcessContainer::N3SAMPLE = 1000;
47 bool ProcessContainer::init(
bool isFirst, Info* infoPtrIn,
48 Settings& settings, ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
49 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn, Couplings* couplingsPtr,
50 SigmaTotal* sigmaTotPtrIn, ResonanceDecays* resDecaysPtrIn,
51 SLHAinterface* slhaInterfacePtr, UserHooks* userHooksPtrIn,
52 GammaKinematics* gammaKinPtrIn) {
55 isLHA = sigmaProcessPtr->isLHA();
56 isNonDiff = sigmaProcessPtr->isNonDiff();
57 isResolved = sigmaProcessPtr->isResolved();
58 isDiffA = sigmaProcessPtr->isDiffA();
59 isDiffB = sigmaProcessPtr->isDiffB();
60 isDiffC = sigmaProcessPtr->isDiffC();
61 isCentralDiff = isDiffC;
62 isDoubleDiff = isDiffA && isDiffB;
63 isSingleDiff = isDiff && !isDoubleDiff && !isCentralDiff;
64 isQCD3body = sigmaProcessPtr->isQCD3body();
65 int nFin = sigmaProcessPtr->nFinal();
66 lhaStrat = (isLHA) ? lhaUpPtr->strategy() : 0;
67 lhaStratAbs = abs(lhaStrat);
68 allowNegSig = sigmaProcessPtr->allowNegativeSigma();
72 useStrictLHEFscales = settings.flag(
"Beams:strictLHEFscale");
76 nTryRequested = settings.mode(
"Main:numberOfTriedEvents");
77 nSelRequested = settings.mode(
"Main:numberOfSelectedEvents");
78 nAccRequested = settings.mode(
"Main:numberOfAcceptedEvents");
81 increaseMaximum = settings.flag(
"PhaseSpace:increaseMaximum");
84 beamAPtr = beamAPtrIn;
85 beamBPtr = beamBPtrIn;
86 gammaKinPtr = gammaKinPtrIn;
87 beamHasGamma = settings.flag(
"PDF:lepton2gamma");
88 int gammaMode = settings.mode(
"Photon:ProcessType");
89 bool resolvedGamma = beamHasGamma && (gammaMode < 2);
92 externalFlux = (settings.mode(
"PDF:lepton2gammaSet") == 2);
95 if (phaseSpacePtr != 0) ;
96 else if (isLHA) phaseSpacePtr =
new PhaseSpaceLHA();
97 else if (isNonDiff && !beamHasGamma)
98 phaseSpacePtr =
new PhaseSpace2to2nondiffractive();
99 else if (isNonDiff && resolvedGamma)
100 phaseSpacePtr =
new PhaseSpace2to2nondiffractiveGamma();
101 else if (!isResolved && !isDiffA && !isDiffB && !isDiffC )
102 phaseSpacePtr =
new PhaseSpace2to2elastic();
103 else if (!isResolved && !isDiffA && !isDiffB && isDiffC)
104 phaseSpacePtr =
new PhaseSpace2to3diffractive();
105 else if (!isResolved) phaseSpacePtr =
new PhaseSpace2to2diffractive(
107 else if (nFin == 1) phaseSpacePtr =
new PhaseSpace2to1tauy();
108 else if (nFin == 2) phaseSpacePtr =
new PhaseSpace2to2tauyz();
109 else if (isQCD3body) phaseSpacePtr =
new PhaseSpace2to3yyycyl();
110 else phaseSpacePtr =
new PhaseSpace2to3tauycyl();
114 particleDataPtr = particleDataPtrIn;
116 resDecaysPtr = resDecaysPtrIn;
117 sigmaTotPtr = sigmaTotPtrIn;
118 userHooksPtr = userHooksPtrIn;
119 canVetoResDecay = (userHooksPtr != 0)
120 ? userHooksPtr->canVetoResonanceDecays() :
false;
122 sigmaProcessPtr->setLHAPtr(lhaUpPtr);
123 phaseSpacePtr->setLHAPtr(lhaUpPtr);
125 sigmaProcessPtr->init(infoPtr, &settings, particleDataPtr, rndmPtr,
126 beamAPtr, beamBPtr, couplingsPtr, sigmaTotPtr, slhaInterfacePtr);
130 string inState = sigmaProcessPtr->inFlux();
134 if ( beamAPtr->isGamma() || (beamHasGamma && beamAPtr->isLepton() ) ) {
135 if ( inState ==
"gmg" || inState ==
"gmq" || inState ==
"gmgm" )
137 else if ( !(beamAPtr->isHadron()) ) beamAgammaMode = 1;
139 if ( beamBPtr->isGamma() || (beamHasGamma && beamBPtr->isLepton() ) ) {
140 if ( inState ==
"ggm" || inState ==
"qgm" || inState ==
"gmgm" )
142 else if ( !(beamBPtr->isHadron()) ) beamBgammaMode = 1;
146 if ( ( beamAPtr->isGamma() || beamBPtr->isGamma() ) || beamHasGamma )
150 beamAhasResGamma = beamAPtr->hasResGamma();
151 beamBhasResGamma = beamBPtr->hasResGamma();
152 beamHasResGamma = beamAhasResGamma || beamBhasResGamma;
155 phaseSpacePtr->init( isFirst, sigmaProcessPtr, infoPtr, &settings,
156 particleDataPtr, rndmPtr, beamAPtr, beamBPtr, couplingsPtr, sigmaTotPtr,
160 if ( (beamAhasResGamma || beamBhasResGamma) && isNonDiffractive() )
161 phaseSpacePtr->setGammaKinPtr( gammaKinPtr);
182 sigmaProcessPtr->initProc();
183 if (!sigmaProcessPtr->initFlux())
return false;
186 bool physical = phaseSpacePtr->setupSampling();
187 sigmaMx = phaseSpacePtr->sigmaMax();
188 double sigmaHalfWay = sigmaMx;
191 sigmaSgn = phaseSpacePtr->sigmaSumSigned();
194 if (physical & !isLHA) {
195 int nSample = (nFin < 3) ? N12SAMPLE : N3SAMPLE;
196 for (
int iSample = 0; iSample < nSample; ++iSample) {
198 while (!test) test = phaseSpacePtr->trialKin(
false);
199 if (iSample == nSample/2) sigmaHalfWay = phaseSpacePtr->sigmaMax();
201 double sigmaFullWay = phaseSpacePtr->sigmaMax();
202 sigmaMx = (sigmaHalfWay > 0.) ? pow2(sigmaFullWay) / sigmaHalfWay
204 phaseSpacePtr->setSigmaMax(sigmaMx);
208 idRenameBeams = settings.mode(
"LesHouches:idRenameBeams");
209 setLifetime = settings.mode(
"LesHouches:setLifetime");
210 setQuarkMass = settings.mode(
"LesHouches:setQuarkMass");
211 setLeptonMass = settings.mode(
"LesHouches:setLeptonMass");
212 mRecalculate = settings.parm(
"LesHouches:mRecalculate");
213 matchInOut = settings.flag(
"LesHouches:matchInOut");
214 for (
int i = 0; i < 6; ++i) idNewM[i] = i;
215 for (
int i = 6; i < 9; ++i) idNewM[i] = 2 * i - 1;
216 for (
int i = 1; i < 9; ++i) mNewM[i] = particleDataPtr->m0(idNewM[i]);
226 bool ProcessContainer::trialProcess() {
233 if ( beamAPtr->isGamma() || beamBPtr->isGamma() || beamHasGamma )
237 for (
int iTry = 0; ; ++iTry) {
240 if (sigmaMx == 0.)
return false;
241 infoPtr->setEndOfFile(
false);
242 bool repeatSame = (iTry > 0);
243 bool physical = phaseSpacePtr->trialKin(
true, repeatSame);
246 if ( physical && !isNonDiffractive() && beamHasGamma ) {
249 if ( !beamAhasResGamma ) beamAPtr->xGamma( x1());
250 if ( !beamBhasResGamma ) beamBPtr->xGamma( x2());
253 if ( !gammaKinPtr->sampleKTgamma() ) physical =
false;
256 if ( physical && !(beamAhasResGamma && beamBhasResGamma) ) {
257 double sHatNew = gammaKinPtr->calcNewSHat( phaseSpacePtr->sHat() );
258 phaseSpacePtr->rescaleSigma( sHatNew);
259 phaseSpacePtr->rescaleMomenta( sHatNew);
263 if ( beamHasGamma && externalFlux ) {
264 wtPDF = phaseSpacePtr->weightGammaPDFApprox();
265 wtFlux = gammaKinPtr->fluxWeight();
271 bool doTryNext =
true;
274 if (isLHA && !physical) infoPtr->setEndOfFile(
true);
278 if (nSelRequested > 0) doTryNext = (nTry < nSelRequested);
281 if (doTryNext) ++nTry;
285 int codeLHANow = lhaUpPtr->idProcess();
287 for (
int i = 0; i < int(codeLHA.size()); ++i)
288 if (codeLHANow == codeLHA[i]) iFill = i;
291 if (doTryNext) ++nTryLHA[iFill];
293 codeLHA.push_back(codeLHANow);
294 nTryLHA.push_back(1);
295 nSelLHA.push_back(0);
296 nAccLHA.push_back(0);
297 for (
int i =
int(codeLHA.size()) - 1; i > 0; --i) {
298 if (codeLHA[i] < codeLHA[i - 1]) {
299 swap(codeLHA[i], codeLHA[i - 1]);
300 swap(nTryLHA[i], nTryLHA[i - 1]);
301 swap(nSelLHA[i], nSelLHA[i - 1]);
302 swap(nAccLHA[i], nAccLHA[i - 1]);
311 if (isLHA && (abs(lhaUpPtr->id(1)) == 6 || abs(lhaUpPtr->id(2)) == 6)) {
312 infoPtr->errorMsg(
"Error in ProcessContainer::trialProcess(): top not "
313 "allowed incoming beam parton; event skipped");
318 if (!physical)
return false;
319 double sigmaNow = phaseSpacePtr->sigmaNow();
322 if (beamHasGamma && externalFlux) sigmaNow *= wtFlux * wtPDF;
325 double sigmaWeight = 1.;
326 if (!isLHA && !increaseMaximum && sigmaNow > sigmaMx)
327 sigmaWeight = sigmaNow / sigmaMx;
328 if ( lhaStrat < 0 && sigmaNow < 0.) sigmaWeight = -1.;
329 if ( lhaStratAbs == 4) sigmaWeight = sigmaNow;
332 double biasWeight = phaseSpacePtr->biasSelectionWeight();
333 weightNow = sigmaWeight * biasWeight;
336 if (!doTryNext) weightNow = 0.0;
338 infoPtr->setWeight( weightNow, lhaStrat);
342 if (sigmaNow < sigmaNeg) {
343 infoPtr->errorMsg(
"Warning in ProcessContainer::trialProcess: neg"
344 "ative cross section set 0",
"for " + sigmaProcessPtr->name() );
347 if (sigmaNow < 0.) sigmaNow = 0.;
351 double sigmaAdd = sigmaNow * biasWeight;
352 if (lhaStratAbs == 2 || lhaStratAbs == 3) sigmaAdd = sigmaSgn;
364 if (lhaStratAbs >= 3 ) {
365 sigmaTemp = sigmaAdd;
366 sigma2Temp = pow2(sigmaAdd);
368 sigmaTemp += sigmaAdd;
369 sigma2Temp += pow2(sigmaAdd);
373 newSigmaMx = phaseSpacePtr->newSigmaMax();
374 if (newSigmaMx) sigmaMx = phaseSpacePtr->sigmaMax();
378 if (lhaStratAbs < 3) select
379 = (newSigmaMx || rndmPtr->flat() * abs(sigmaMx) < abs(sigmaNow));
382 if (doTryNext) ++nSel;
385 int codeLHANow = lhaUpPtr->idProcess();
387 for (
int i = 0; i < int(codeLHA.size()); ++i)
388 if (codeLHANow == codeLHA[i]) iFill = i;
390 if (iFill >= 0 && doTryNext) ++nSelLHA[iFill];
393 if (select || lhaStratAbs != 2)
return select;
403 void ProcessContainer::accumulate() {
407 double wgtNow = infoPtr->weight();
413 if (lhaStratAbs == 4) wgtNow /= 1e9;
417 int codeLHANow = lhaUpPtr->idProcess();
419 for (
int i = 0; i < int(codeLHA.size()); ++i)
420 if (codeLHANow == codeLHA[i]) iFill = i;
421 if (iFill >= 0) ++nAccLHA[iFill];
431 bool ProcessContainer::constructState() {
434 if (isResolved && !isNonDiff) sigmaProcessPtr->pickInState();
435 sigmaProcessPtr->setIdColAcol();
438 if ( beamAPtr->isResolvedUnresolved() || beamBPtr->isResolvedUnresolved() )
450 void ProcessContainer::setBeamModes() {
453 beamAPtr->setGammaMode(beamAgammaMode);
454 beamBPtr->setGammaMode(beamBgammaMode);
457 if (beamAgammaMode <= 1 && beamBgammaMode <= 1) gammaModeEvent = 1;
458 else if (beamAgammaMode <= 1 && beamBgammaMode == 2) gammaModeEvent = 2;
459 else if (beamAgammaMode == 2 && beamBgammaMode <= 1) gammaModeEvent = 3;
460 else if (beamAgammaMode == 2 && beamBgammaMode == 2) gammaModeEvent = 4;
461 else gammaModeEvent = 0;
464 infoPtr->setGammaMode(gammaModeEvent);
465 if (gammaModeEvent != 4) {
466 double scale[3] = {0.00331524, 0.00030905, 0.00039639};
467 pair<int, int> idAB = chooseVMDstates(beamAPtr->id(), beamBPtr->id());
468 if (idAB.first == 113 || idAB.first == 223 || idAB.first == 333) {
469 double mA = particleDataPtr->mSel(idAB.first);
470 double scA = scale[idAB.first/100 - 1];
471 beamAPtr->setVMDstate(
true, idAB.first, mA, scA,
false);
472 infoPtr->setVMDstateA(
true, idAB.first, mA, scA);
474 if (idAB.second == 113 || idAB.second == 223 || idAB.second == 333) {
475 double mB = particleDataPtr->mSel(idAB.second);
476 double scB = scale[idAB.second/100 - 1];
477 beamBPtr->setVMDstate(
true, idAB.second, mB, scB,
false);
478 infoPtr->setVMDstateB(
true, idAB.second, mB, scB);
488 pair<int, int> ProcessContainer::chooseVMDstates(
int idA,
int idB) {
491 double gammaFac[3] = {2.2, 23.6, 18.4};
492 double alphaEM = 0.00729353;
493 double idVMD[3] = {113, 223, 333};
495 double pVV[3][3] = {};
499 if (idA == 22 && idB == 22) {
500 for (
int i = 0; i < 3; ++i)
501 for (
int j = 0; j < 3; ++j) {
503 sigmaTotPtr->calc(idVMD[i], idVMD[j], infoPtr->eCM());
504 pVV[i][j] = pow2(alphaEM) / (gammaFac[i] * gammaFac[j]);
505 if (isSingleDiff && isDiffA) pVV[i][j] *= sigmaTotPtr->sigmaXB();
506 else if (isSingleDiff && isDiffB) pVV[i][j] *= sigmaTotPtr->sigmaAX();
507 else if (isDoubleDiff) pVV[i][j] *= sigmaTotPtr->sigmaXX();
508 else return make_pair(idA, idB);
512 double pickMode = rndmPtr->flat() * pSum;
513 for (
int i = 0; i < 3; ++i)
514 for (
int j = 0; j < 3; ++j) {
515 pickMode -= pVV[i][j];
516 if (pickMode < 0.)
return make_pair(113 + 110 * i, 113 + 110 * j);
518 return make_pair(113, 113);
521 }
else if (idA == 22 && idB == 2212) {
522 for (
int i = 0; i < 3; ++i) {
524 sigmaTotPtr->calc(idVMD[i], 2212, infoPtr->eCM());
525 pVP[i] = alphaEM / gammaFac[i];
526 if (isSingleDiff && isDiffA) pVP[i] *= sigmaTotPtr->sigmaXB();
527 else if (isSingleDiff && isDiffB) pVP[i] *= sigmaTotPtr->sigmaAX();
528 else if (isDoubleDiff) pVP[i] *= sigmaTotPtr->sigmaXX();
529 else return make_pair(idA, idB);
533 double pickMode = rndmPtr->flat() * pSum;
534 if (pickMode > pVP[1] + pVP[2])
return make_pair(113, 2212);
535 else if (pickMode > pVP[2])
return make_pair(223, 2212);
536 else return make_pair(333, 2212);
539 }
else if (idA == 2212 && idB == 22) {
540 for (
int i = 0; i < 3; ++i) {
542 sigmaTotPtr->calc(2212, idVMD[i], infoPtr->eCM());
543 pVP[i] = alphaEM / gammaFac[i];
544 if (isSingleDiff && isDiffA) pVP[i] *= sigmaTotPtr->sigmaXB();
545 else if (isSingleDiff && isDiffB) pVP[i] *= sigmaTotPtr->sigmaAX();
546 else if (isDoubleDiff) pVP[i] *= sigmaTotPtr->sigmaXX();
547 else return make_pair(idA, idB);
551 double pickMode = rndmPtr->flat() * pSum;
552 if (pickMode > pVP[1] + pVP[2])
return make_pair(2212, 113);
553 else if (pickMode > pVP[2])
return make_pair(2212, 223);
554 else return make_pair(2212, 333);
557 }
else return make_pair(idA, idB);
565 bool ProcessContainer::constructProcess(
Event& process,
bool isHardest) {
568 if (!phaseSpacePtr->finalKin())
return false;
569 int nFin = sigmaProcessPtr->nFinal();
572 if (isHardest) infoPtr->setType( name(), code(), nFin, isNonDiff,
573 isResolved, isDiffA, isDiffB, isDiffC, isLHA);
576 if ( beamHasGamma && !isNonDiffractive() ) gammaKinPtr->finalize();
579 if ( beamHasGamma && !(beamAhasResGamma && beamBhasResGamma) ) {
580 double sHatNew = infoPtr->sHatNew();
581 phaseSpacePtr->rescaleMomenta( sHatNew);
586 int idA = infoPtr->idA();
587 if (abs(idA) == idRenameBeams) idA = 16;
588 int idB = infoPtr->idB();
589 if (abs(idB) == idRenameBeams) idB = -16;
590 process.append( 90, -11, 0, 0, 0, 0, 0, 0,
591 Vec4(0., 0., 0., infoPtr->eCM()), infoPtr->eCM(), 0. );
592 process.append( idA, -12, 0, 0, 0, 0, 0, 0,
593 Vec4(0., 0., infoPtr->pzA(), infoPtr->eA()), infoPtr->mA(), 0. );
594 process.append( idB, -12, 0, 0, 0, 0, 0, 0,
595 Vec4(0., 0., infoPtr->pzB(), infoPtr->eB()), infoPtr->mB(), 0. );
600 int nOffsetGamma = 0;
601 bool isGammaHadronDir = (beamAgammaMode == 2 && beamBgammaMode == 0)
602 || (beamAgammaMode == 0 && beamBgammaMode == 2);
603 if ( beamHasResGamma || (isGammaHadronDir && beamHasGamma) ) {
604 double xGm1 = beamAPtr->xGamma();
605 if ( beamAPtr->isHadron()) {
606 process.append( beamAPtr->id(), -13, 1, 0, 0, 0, 0, 0,
607 Vec4(0., 0., infoPtr->pzA(), infoPtr->eA()), beamAPtr->m(), 0. );
609 process.append( 22, -13, 1, 0, 0, 0, 0, 0,
610 Vec4(0., 0., xGm1*infoPtr->pzA(), xGm1*infoPtr->eA()), 0, 0. );
612 process[1].daughter1(3);
614 double xGm2 = beamBPtr->xGamma();
615 if ( beamBPtr->isHadron()) {
616 process.append( beamBPtr->id(), -13, 2, 0, 0, 0, 0, 0,
617 Vec4(0., 0., infoPtr->pzB(), infoPtr->eB()), beamBPtr->m(), 0. );
619 process.append( 22, -13, 2, 0, 0, 0, 0, 0,
620 Vec4(0., 0., xGm2*infoPtr->pzB(), xGm2*infoPtr->eB()), 0, 0. );
622 process[1 + nOffsetGamma].daughter1(3 + nOffsetGamma);
627 if (isNonDiff)
return true;
631 process[1 + nOffsetGamma].daughter1(3 + nOffsetGamma);
632 process[2 + nOffsetGamma].daughter1(4 + nOffsetGamma);
638 process[1].daughters(3, 5);
639 process[2].daughters(3, 5);
643 int idRes = sigmaProcessPtr->idSChannel();
644 if (isResolved && !isLHA) {
650 int m_D2 = (nFin == 1) ? 0 : 4 + nFin;
659 scale = sqrt(Q2Fac());
660 process.scale( scale );
663 int colOffset = process.lastColTag();
664 for (
int i = 1; i <= 2 + nFin; ++i) {
667 int id = sigmaProcessPtr->id(i);
668 int status = (i <= 2) ? -21 : 23;
669 int mother1 = (i <= 2) ? i : m_M1 ;
670 int mother2 = (i <= 2) ? 0 : m_M2 ;
671 int daughter1 = (i <= 2) ? m_D1 : 0;
672 int daughter2 = (i <= 2) ? m_D2 : 0;
673 int col = sigmaProcessPtr->col(i);
674 if (col > 0) col += colOffset;
675 else if (col < 0) col -= colOffset;
676 int acol = sigmaProcessPtr->acol(i);
677 if (acol > 0) acol += colOffset;
678 else if (acol < 0) acol -= colOffset;
681 if ( beamAhasResGamma || beamBhasResGamma
682 || (beamAgammaMode == 2 && beamBgammaMode == 0)
683 || (beamAgammaMode == 0 && beamBgammaMode == 2) ) {
684 if (mother1 > 0) mother1 += nOffsetGamma;
685 if (mother2 > 0) mother2 += nOffsetGamma;
686 if (daughter1 > 0) daughter1 += nOffsetGamma;
687 if (daughter2 > 0) daughter2 += nOffsetGamma;
691 int iNow = process.append(
id, status, mother1, mother2,
692 daughter1, daughter2, col, acol, phaseSpacePtr->p(i),
693 phaseSpacePtr->m(i), scale);
697 if (i == 2 && idRes != 0) {
700 if (particleDataPtr->hasAnti(idRes)
701 && process[3].chargeType() + process[4].chargeType() < 0)
708 int m_col1 = sigmaProcessPtr->col(1);
709 int m_acol1 = sigmaProcessPtr->acol(1);
710 int m_col2 = sigmaProcessPtr->col(2);
711 int m_acol2 = sigmaProcessPtr->acol(2);
712 if (m_col1 == m_acol2 && m_col2 != m_acol1) {
715 }
else if (m_col2 == m_acol1 && m_col1 != m_acol2) {
719 if ( col > 0) col += colOffset;
720 else if ( col < 0) col -= colOffset;
721 if (acol > 0) acol += colOffset;
722 else if (acol < 0) acol -= colOffset;
725 Vec4 pIntMed = phaseSpacePtr->p(1) + phaseSpacePtr->p(2);
726 process.append( idRes, -22, 3, 4, 6, 5 + nFin, col, acol,
727 pIntMed, pIntMed.mCalc(), scale);
731 if (process[iNow].tau0() > 0.) process[iNow].tau(
732 process[iNow].tau0() * rndmPtr->exp() );
738 int id3 = sigmaProcessPtr->id(3);
739 int status3 = (id3 == process[1].id()) ? 14 : 15;
740 process.append( id3, status3, 1, 0, 0, 0, 0, 0,
741 phaseSpacePtr->p(3), phaseSpacePtr->m(3));
742 int id4 = sigmaProcessPtr->id(4);
743 int status4 = (id4 == process[2].id()) ? 14 : 15;
744 process.append( id4, status4, 2, 0, 0, 0, 0, 0,
745 phaseSpacePtr->p(4), phaseSpacePtr->m(4));
750 process[3].mothers( 1, 2);
751 process[4].mothers( 1, 2);
752 int id5 = sigmaProcessPtr->id(5);
754 process.append( id5, status5, 1, 2, 0, 0, 0, 0,
755 phaseSpacePtr->p(5), phaseSpacePtr->m(5));
765 newPos.reserve(lhaUpPtr->sizePart());
767 for (
int iNew = 0; iNew < lhaUpPtr->sizePart(); ++iNew) {
770 for (
int i = 1; i < lhaUpPtr->sizePart(); ++i)
771 if (lhaUpPtr->mother1(i) == newPos[iNew]) newPos.push_back(i);
772 if (
int(newPos.size()) <= iNew)
break;
776 scalup = lhaUpPtr->scale();
778 double scalePr = (scale < 0.) ? sqrt(Q2Fac()) : scale;
779 process.scale( scalePr);
783 for (
int i = 1; i < lhaUpPtr->sizePart(); ++i) {
784 int iOld = newPos[i];
785 int id = lhaUpPtr->id(iOld);
786 if (i == 1 && abs(
id) == idRenameBeams)
id = 16;
787 if (i == 2 && abs(
id) == idRenameBeams)
id = -16;
791 int lhaStatus = lhaUpPtr->status(iOld);
793 if (lhaStatus == 2 || lhaStatus == 3) status = -22;
794 if (lhaStatus == 1) status = 23;
797 int mother1Old = lhaUpPtr->mother1(iOld);
798 int mother2Old = lhaUpPtr->mother2(iOld);
801 for (
int im = 1; im < i; ++im) {
802 if (mother1Old == newPos[im]) mother1 = im + 2;
803 if (mother2Old == newPos[im]) mother2 = im + 2;
805 if (i <= 2) mother1 = i;
808 if (mother1 > 0 && mother2 == mother1) {
809 int sister1 = process[mother1].daughter1();
810 int sister2 = process[mother1].daughter2();
811 if (sister2 != sister1 && sister2 != 0) mother2 = 0;
818 for (
int im = i + 1; im < lhaUpPtr->sizePart(); ++im) {
819 if (lhaUpPtr->mother1(newPos[im]) == iOld
820 || lhaUpPtr->mother2(newPos[im]) == iOld) {
821 if (daughter1 == 0 || im + 2 < daughter1) daughter1 = im + 2;
822 if (daughter2 == 0 || im + 2 > daughter2) daughter2 = im + 2;
826 if (daughter2 == daughter1) daughter2 = 0;
829 int colType = particleDataPtr->colType(
id);
830 int col1 = (colType == 1 || colType == 2 || abs(colType) == 3)
831 ? lhaUpPtr->col1(iOld) : 0;
832 int col2 = (colType == -1 || colType == 2 || abs(colType) == 3)
833 ? lhaUpPtr->col2(iOld) : 0;
836 double px = lhaUpPtr->px(iOld);
837 double py = lhaUpPtr->py(iOld);
838 double pz = lhaUpPtr->pz(iOld);
839 double e = lhaUpPtr->e(iOld);
840 double m = lhaUpPtr->m(iOld);
841 if (mRecalculate > 0. && m > mRecalculate)
842 m = sqrtpos( e*e - px*px - py*py - pz*pz);
843 else e = sqrt( m*m + px*px + py*py + pz*pz);
846 double pol = lhaUpPtr->spin(iOld);
849 double scaleShow = lhaUpPtr->scale(iOld);
852 double scaleNow = scalePr;
853 if (mother1 > 4 && !useStrictLHEFscales) scaleNow = process[mother1].m();
854 if (scaleShow >= 0.0) scaleNow = scaleShow;
857 int iNow = process.append(
id, status, mother1, mother2, daughter1,
858 daughter2, col1, col2, Vec4(px, py, pz, e), m, scaleNow, pol);
861 double tau = lhaUpPtr->tau(iOld);
862 if ( (setLifetime == 1 && idAbs == 15) || setLifetime == 2)
863 tau = process[iNow].tau0() * rndmPtr->exp();
864 if (tau > 0.) process[iNow].tau(tau);
867 if (status == 23) iFinal.push_back( iNow);
871 int iFinalSz = iFinal.size();
872 for (
int iF = 0; iF < iFinalSz; ++iF) {
873 int iMod = iFinal[iF];
875 double mOld = process[iMod].m();
876 for (
int iQL = 1; iQL < 9; ++iQL)
877 if (process[iMod].idAbs() == idNewM[iQL]) {
878 if ( iQL < 6 && setQuarkMass > 0 && (iQL == 4 || iQL == 5
879 || setQuarkMass == 2) && (mOld < 0.5 * mNewM[iQL]
880 || mOld > 1.5 * mNewM[iQL]) ) iQLmod = iQL;
881 if ( iQL > 5 && setLeptonMass > 0 && (setLeptonMass == 2
882 || mOld < 0.9 * mNewM[iQL] || mOld > 1.1 * mNewM[iQL]) )
885 if (iQLmod == 0)
continue;
886 double mNew = mNewM[iQLmod];
890 if (iFinalSz == 2) iRec = iFinal[1 - iF];
891 else if (process[iMod].mother1() > 2) {
892 int iMother = process[iMod].mother1();
893 int iMDau1 = process[iMother].daughter1();
894 int iMDau2 = process[iMother].daughter2();
895 if (iMDau2 == iMDau1 + 1 && iMod == iMDau1) iRec = iMDau2;
896 if (iMDau2 == iMDau1 + 1 && iMod == iMDau2) iRec = iMDau1;
900 if (iRec == 0 && iQLmod > 5) {
901 for (
int iR = 0; iR < iFinalSz; ++iR)
if (iR != iF) {
902 int iRtmp = iFinal[iR];
903 if (process[iRtmp].idAbs() == idNewM[iQLmod] + 1
904 && process[iRtmp].
id() * process[iMod].
id() < 0) iRec = iRtmp;
907 if (iRec == 0 && iQLmod > 5) {
908 for (
int iR = 0; iR < iFinalSz; ++iR)
if (iR != iF) {
909 int iRtmp = iFinal[iR];
910 if (process[iRtmp].
id() == -process[iMod].
id()) iRec = iRtmp;
915 if (iRec == 0 && iQLmod < 6 && process[iMod].col() != 0) {
916 for (
int iR = 0; iR < iFinalSz; ++iR)
if (iR != iF) {
917 int iRtmp = iFinal[iR];
918 if (process[iRtmp].acol() == process[iMod].col()) iRec = iRtmp;
921 if (iRec == 0 && iQLmod < 6 && process[iMod].acol() != 0) {
922 for (
int iR = 0; iR < iFinalSz; ++iR)
if (iR != iF) {
923 int iRtmp = iFinal[iR];
924 if (process[iRtmp].col() == process[iMod].acol()) iRec = iRtmp;
931 for (
int iR = 0; iR < iFinalSz; ++iR)
if (iR != iF) {
932 int iRtmp = iFinal[iR];
933 double mTmp = m( process[iMod], process[iRtmp]) - process[iRtmp].m();
934 if (mTmp > mMax) { iRec = iRtmp; mMax = mTmp;}
939 bool doneShift =
false;
940 Vec4 pMod = process[iMod].p();
942 Vec4 pRecOld = process[iRec].p();
943 Vec4 pRecNew = pRecOld;
944 double mRec = process[iRec].m();
945 if ( pShift( pMod, pRecNew, mNew, mRec) ) {
946 process[iMod].p( pMod);
947 process[iMod].m( mNew);
948 process[iRec].p( pRecNew);
950 if (!process[iRec].isFinal()) {
951 vector<int> iDauRec = process[iRec].daughterListRecursive();
953 Mdau.bst( pRecOld, pRecNew);
954 for (
int iD = 0; iD < int(iDauRec.size()); ++iD)
955 process[iDauRec[iD]].rotbst( Mdau);
963 pMod.e( sqrtpos( pMod.pAbs2() + mNew * mNew) );
964 process[iMod].p( pMod);
965 process[iMod].m( mNew);
966 infoPtr->errorMsg(
"Warning in ProcessContainer::constructProcess: "
967 "unsuitable recoiler found");
974 for (
int iF = 0; iF < iFinalSz; ++iF)
975 pSumOut += process[iFinal[iF]].p();
976 double e1 = 0.5 * (pSumOut.e() + pSumOut.pz());
977 double e2 = 0.5 * (pSumOut.e() - pSumOut.pz());
984 if (max(e1, e2) > 0.500001 * process[0].e()) {
985 infoPtr->errorMsg(
"Error in ProcessContainer::constructProcess: "
986 "setting mass failed");
993 for (
int i = 3; i < process.size(); ++i) {
994 int iMother = process[i].mother1();
997 if ( process[i - 1].mother1() == iMother && process[i - 1].hasVertex() )
998 process[i].vProd( process[i - 1].vProd() );
1001 else if ( process[iMother].hasVertex() || process[iMother].tau() > 0.)
1002 process[i].vProd( process[iMother].vDec() );
1006 int id1Now = process[3 + nOffsetGamma].id();
1007 int id2Now = process[4 + nOffsetGamma].id();
1021 double x1Now, x2Now, Q2FacNow, alphaEM, alphaS, Q2Ren, sHat;
1027 x1Now = phaseSpacePtr->x1();
1028 x2Now = phaseSpacePtr->x2();
1031 pdf1 = sigmaProcessPtr->pdf1();
1032 pdf2 = sigmaProcessPtr->pdf2();
1033 Q2FacNow = sigmaProcessPtr->Q2Fac();
1034 alphaEM = sigmaProcessPtr->alphaEMRen();
1035 alphaS = sigmaProcessPtr->alphaSRen();
1036 Q2Ren = sigmaProcessPtr->Q2Ren();
1037 sHat = phaseSpacePtr->sHat();
1038 tHat = phaseSpacePtr->tHat();
1039 uHat = phaseSpacePtr->uHat();
1040 pTHatL = phaseSpacePtr->pTHat();
1041 m3 = phaseSpacePtr->m(3);
1042 m4 = phaseSpacePtr->m(4);
1043 theta = phaseSpacePtr->thetaHat();
1044 phi = phaseSpacePtr->phiHat();
1049 x1Now = 2. * process[3].e() / infoPtr->eCM();
1050 x2Now = 2. * process[4].e() / infoPtr->eCM();
1051 Q2FacNow = (scale < 0.) ? sigmaProcessPtr->Q2Fac() : pow2(scale);
1052 alphaEM = lhaUpPtr->alphaQED();
1053 if (alphaEM < 0.001) alphaEM = sigmaProcessPtr->alphaEMRen();
1054 alphaS = lhaUpPtr->alphaQCD();
1055 if (alphaS < 0.001) alphaS = sigmaProcessPtr->alphaSRen();
1056 Q2Ren = (scale < 0.) ? sigmaProcessPtr->Q2Ren() : pow2(scale);
1057 Vec4 pSum = process[3].p() + process[4].p();
1061 for (
int i = 5; i < process.size(); ++i)
1062 if (process[i].mother1() == 3 && process[i].mother2() == 4) {
1064 pTLH += process[i].pT();
1066 if (nFinLH > 0) pTHatL = pTLH / nFinLH;
1069 id1pdf = lhaUpPtr->id1pdf();
1070 id2pdf = lhaUpPtr->id2pdf();
1071 x1pdf = lhaUpPtr->x1pdf();
1072 x2pdf = lhaUpPtr->x2pdf();
1073 if (lhaUpPtr->pdfIsSet()) {
1074 pdf1 = lhaUpPtr->pdf1();
1075 pdf2 = lhaUpPtr->pdf2();
1076 Q2FacNow = pow2(lhaUpPtr->scalePDF());
1081 Vec4 pDifT = process[3].p() - process[5].p();
1082 tHat = pDifT * pDifT;
1083 Vec4 pDifU = process[3].p() - process[6].p();
1084 uHat = pDifU * pDifU;
1085 pTHatL = process[5].pT();
1086 m3 = process[5].m();
1087 m4 = process[6].m();
1088 Vec4 p5 = process[5].p();
1091 phi = process[5].phi();
1097 infoPtr->setPDFalpha( 0, id1pdf, id2pdf, x1pdf, x2pdf, pdf1, pdf2,
1098 Q2FacNow, alphaEM, alphaS, Q2Ren, scalup);
1099 infoPtr->setKin( 0, id1Now, id2Now, x1Now, x2Now, sHat, tHat, uHat,
1100 pTHatL, m3, m4, theta, phi);
1102 infoPtr->setTypeMPI( code(), pTHatL);
1106 int codeSub = lhaUpPtr->idProcess();
1107 ostringstream nameSub;
1108 nameSub <<
"user process " << codeSub;
1109 infoPtr->setSubType( 0, nameSub.str(), codeSub, nFin);
1122 bool ProcessContainer::constructDecays(
Event& process) {
1126 process.append( 90, -11, 0, 0, 0, 0, 0, 0, Vec4(0., 0., 0., 0.), 0., 0. );
1131 newPos.reserve(lhaUpPtr->sizePart());
1132 newPos.push_back(0);
1133 for (
int iNew = 0; iNew < lhaUpPtr->sizePart(); ++iNew) {
1136 for (
int i = 1; i < lhaUpPtr->sizePart(); ++i)
1137 if (lhaUpPtr->mother1(i) == newPos[iNew]) newPos.push_back(i);
1138 if (
int(newPos.size()) <= iNew)
break;
1142 double scale = lhaUpPtr->scale();
1143 process.scale( scale);
1147 for (
int i = 1; i < lhaUpPtr->sizePart(); ++i) {
1148 int iOld = newPos[i];
1149 int id = lhaUpPtr->id(iOld);
1152 int lhaStatus = lhaUpPtr->status(iOld);
1154 if (lhaStatus == 2 || lhaStatus == 3) status = -22;
1155 if (lhaStatus == 1) status = 23;
1158 int mother1Old = lhaUpPtr->mother1(iOld);
1159 int mother2Old = lhaUpPtr->mother2(iOld);
1162 for (
int im = 1; im < i; ++im) {
1163 if (mother1Old == newPos[im]) mother1 = im;
1164 if (mother2Old == newPos[im]) mother2 = im;
1168 if (mother1 > 0 && mother2 == mother1) {
1169 int sister1 = process[mother1].daughter1();
1170 int sister2 = process[mother1].daughter2();
1171 if (sister2 != sister1 && sister2 != 0) mother2 = 0;
1177 for (
int im = i + 1; im < lhaUpPtr->sizePart(); ++im) {
1178 if (lhaUpPtr->mother1(newPos[im]) == iOld
1179 || lhaUpPtr->mother2(newPos[im]) == iOld) {
1180 if (daughter1 == 0 || im < daughter1) daughter1 = im;
1181 if (daughter2 == 0 || im > daughter2) daughter2 = im;
1185 if (daughter2 == daughter1) daughter2 = 0;
1188 int colType = particleDataPtr->colType(
id);
1189 int col1 = (colType == 1 || colType == 2 || abs(colType) == 3)
1190 ? lhaUpPtr->col1(iOld) : 0;
1191 int col2 = (colType == -1 || colType == 2 || abs(colType) == 3)
1192 ? lhaUpPtr->col2(iOld) : 0;
1195 double px = lhaUpPtr->px(iOld);
1196 double py = lhaUpPtr->py(iOld);
1197 double pz = lhaUpPtr->pz(iOld);
1198 double e = lhaUpPtr->e(iOld);
1199 double m = lhaUpPtr->m(iOld);
1200 if (status > 0) pSum += Vec4( px, py, pz, e);
1203 double pol = lhaUpPtr->spin(iOld);
1206 double scaleNow = scale;
1207 if (mother1 > 0) scaleNow = process[mother1].m();
1210 int iNow = process.append(
id, status, mother1, mother2, daughter1,
1211 daughter2, col1, col2, Vec4(px, py, pz, e), m, scaleNow, pol);
1214 double tau = lhaUpPtr->tau(iOld);
1215 if ( (setLifetime == 1 && abs(
id) == 15) || setLifetime == 2)
1216 tau = process[iNow].tau0() * rndmPtr->exp();
1217 if (tau > 0.) process[iNow].tau(tau);
1221 process[0].p( pSum);
1222 process[0].m( pSum.mCalc());
1225 for (
int i = 1; i < process.size(); ++i) {
1226 int iMother = process[i].mother1();
1229 if ( process[i - 1].mother1() == iMother && process[i - 1].hasVertex()
1230 && i > 1) process[i].vProd( process[i - 1].vProd() );
1233 else if ( process[iMother].hasVertex() || process[iMother].tau() > 0.)
1234 process[i].vProd( process[iMother].vDec() );
1246 bool ProcessContainer::decayResonances(
Event& process) {
1250 vector<int> statusSave( process.size());
1251 for (
int i = 0; i < process.size(); ++i)
1252 statusSave[i] = process[i].status();
1253 bool physical =
true;
1254 bool newChain =
false;
1255 bool newFlavours =
false;
1262 physical = resDecaysPtr->next( process);
1263 if (!physical)
return false;
1267 newFlavours = ( sigmaProcessPtr->weightDecayFlav( process)
1268 < rndmPtr->flat() );
1272 process.restoreSize();
1273 for (
int i = 0; i < process.size(); ++i)
1274 process[i].status( statusSave[i]);
1278 }
while (newFlavours);
1281 phaseSpacePtr->decayKinematics( process);
1284 if (canVetoResDecay)
1285 newChain = userHooksPtr->doVetoResonanceDecays( process);
1289 process.restoreSize();
1290 for (
int i = 0; i < process.size(); ++i)
1291 process[i].status( statusSave[i]);
1306 void ProcessContainer::reset() {
1328 void ProcessContainer::sigmaDelta() {
1335 if (nAcc == 0)
return;
1339 double wgtNow = infoPtr->weight();
1341 if (lhaStrat == 0) wgtNow = sigmaTemp;
1342 if (lhaStratAbs == 3) wgtNow *= sigmaTemp;
1343 if (lhaStratAbs == 4) wgtNow /= 1e9;
1346 double wgtNow2 = 1.0;
1347 if (lhaStrat == 0) wgtNow2 = sigma2Temp;
1348 if (lhaStratAbs == 3) wgtNow2 = pow2(wgtNow)*sigma2Temp;
1349 if (lhaStratAbs == 4) wgtNow2 = pow2(wgtNow/1e9);
1350 sigma2Sum += wgtNow2;
1356 double nTryInv = 1. / nTry;
1357 double nSelInv = 1. / nSel;
1358 double nAccInv = 1. / nAcc;
1359 sigmaAvg = sigmaSum * nTryInv;
1360 double fracAcc = nAcc * nSelInv;
1364 if (lhaStratAbs >= 3 ) fracAcc = 1.;
1366 sigmaFin = sigmaAvg * fracAcc;
1367 deltaFin = sigmaFin;
1369 if (nAcc == 1)
return;
1373 double delta2Sig = (lhaStratAbs != 3)
1374 ? (sigma2Sum * nTryInv - pow2(sigmaAvg)) * nTryInv / pow2(sigmaAvg)
1375 : pow2( lhaUpPtr->xErrSum() / lhaUpPtr->xSecSum());
1376 double delta2Veto = (nSel - nAcc) * nAccInv * nSelInv;
1377 double delta2Sum = delta2Sig + delta2Veto;
1378 deltaFin = sqrtpos(delta2Sum) * sigmaFin;
1391 bool SetupContainers::init(vector<ProcessContainer*>& containerPtrs,
1392 Info *infoPtr, Settings& settings, ParticleData* particleDataPtr,
1393 Couplings* couplings) {
1396 if (containerPtrs.size() > 0) {
1397 for (
int i = 0; i < int(containerPtrs.size()); ++i)
1398 delete containerPtrs[i];
1399 containerPtrs.clear();
1401 SigmaProcess* sigmaPtr;
1404 bool softQCD = settings.flag(
"SoftQCD:all");
1405 bool inelastic = settings.flag(
"SoftQCD:inelastic");
1406 if (softQCD || inelastic || settings.flag(
"SoftQCD:nonDiffractive")) {
1407 sigmaPtr =
new Sigma0nonDiffractive;
1408 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1410 if (softQCD || settings.flag(
"SoftQCD:elastic")) {
1411 sigmaPtr =
new Sigma0AB2AB;
1412 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1414 if (softQCD || inelastic || settings.flag(
"SoftQCD:singleDiffractive")) {
1415 sigmaPtr =
new Sigma0AB2XB;
1416 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1417 sigmaPtr =
new Sigma0AB2AX;
1418 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1420 if (softQCD || inelastic || settings.flag(
"SoftQCD:doubleDiffractive")) {
1421 sigmaPtr =
new Sigma0AB2XX;
1422 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1424 if (softQCD || inelastic || settings.flag(
"SoftQCD:centralDiffractive")) {
1425 sigmaPtr =
new Sigma0AB2AXB;
1426 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1430 bool hardQCD = settings.flag(
"HardQCD:all");
1431 if (hardQCD || settings.flag(
"HardQCD:gg2gg")) {
1432 sigmaPtr =
new Sigma2gg2gg;
1433 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1435 if (hardQCD || settings.flag(
"HardQCD:gg2qqbar")) {
1436 sigmaPtr =
new Sigma2gg2qqbar;
1437 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1439 if (hardQCD || settings.flag(
"HardQCD:qg2qg")) {
1440 sigmaPtr =
new Sigma2qg2qg;
1441 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1443 if (hardQCD || settings.flag(
"HardQCD:qq2qq")) {
1444 sigmaPtr =
new Sigma2qq2qq;
1445 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1447 if (hardQCD || settings.flag(
"HardQCD:qqbar2gg")) {
1448 sigmaPtr =
new Sigma2qqbar2gg;
1449 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1451 if (hardQCD || settings.flag(
"HardQCD:qqbar2qqbarNew")) {
1452 sigmaPtr =
new Sigma2qqbar2qqbarNew;
1453 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1457 bool hardccbar = settings.flag(
"HardQCD:hardccbar");
1458 if (hardQCD || hardccbar || settings.flag(
"HardQCD:gg2ccbar")) {
1459 sigmaPtr =
new Sigma2gg2QQbar(4, 121);
1460 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1462 if (hardQCD || hardccbar || settings.flag(
"HardQCD:qqbar2ccbar")) {
1463 sigmaPtr =
new Sigma2qqbar2QQbar(4, 122);
1464 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1466 bool hardbbbar = settings.flag(
"HardQCD:hardbbbar");
1467 if (hardQCD || hardbbbar || settings.flag(
"HardQCD:gg2bbbar")) {
1468 sigmaPtr =
new Sigma2gg2QQbar(5, 123);
1469 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1471 if (hardQCD || hardbbbar || settings.flag(
"HardQCD:qqbar2bbbar")) {
1472 sigmaPtr =
new Sigma2qqbar2QQbar(5, 124);
1473 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1477 bool hardQCD3parton = settings.flag(
"HardQCD:3parton");
1478 if (hardQCD3parton || settings.flag(
"HardQCD:gg2ggg")) {
1479 sigmaPtr =
new Sigma3gg2ggg;
1480 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1482 if (hardQCD3parton || settings.flag(
"HardQCD:qqbar2ggg")) {
1483 sigmaPtr =
new Sigma3qqbar2ggg;
1484 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1486 if (hardQCD3parton || settings.flag(
"HardQCD:qg2qgg")) {
1487 sigmaPtr =
new Sigma3qg2qgg;
1488 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1490 if (hardQCD3parton || settings.flag(
"HardQCD:qq2qqgDiff")) {
1491 sigmaPtr =
new Sigma3qq2qqgDiff;
1492 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1494 if (hardQCD3parton || settings.flag(
"HardQCD:qq2qqgSame")) {
1495 sigmaPtr =
new Sigma3qq2qqgSame;
1496 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1498 if (hardQCD3parton || settings.flag(
"HardQCD:qqbar2qqbargDiff")) {
1499 sigmaPtr =
new Sigma3qqbar2qqbargDiff;
1500 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1502 if (hardQCD3parton || settings.flag(
"HardQCD:qqbar2qqbargSame")) {
1503 sigmaPtr =
new Sigma3qqbar2qqbargSame;
1504 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1506 if (hardQCD3parton || settings.flag(
"HardQCD:gg2qqbarg")) {
1507 sigmaPtr =
new Sigma3gg2qqbarg;
1508 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1510 if (hardQCD3parton || settings.flag(
"HardQCD:qg2qqqbarDiff")) {
1511 sigmaPtr =
new Sigma3qg2qqqbarDiff;
1512 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1514 if (hardQCD3parton || settings.flag(
"HardQCD:qg2qqqbarSame")) {
1515 sigmaPtr =
new Sigma3qg2qqqbarSame;
1516 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1520 bool promptPhotons = settings.flag(
"PromptPhoton:all");
1522 || settings.flag(
"PromptPhoton:qg2qgamma")) {
1523 sigmaPtr =
new Sigma2qg2qgamma;
1524 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1527 || settings.flag(
"PromptPhoton:qqbar2ggamma")) {
1528 sigmaPtr =
new Sigma2qqbar2ggamma;
1529 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1532 || settings.flag(
"PromptPhoton:gg2ggamma")) {
1533 sigmaPtr =
new Sigma2gg2ggamma;
1534 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1537 || settings.flag(
"PromptPhoton:ffbar2gammagamma")) {
1538 sigmaPtr =
new Sigma2ffbar2gammagamma;
1539 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1542 || settings.flag(
"PromptPhoton:gg2gammagamma")) {
1543 sigmaPtr =
new Sigma2gg2gammagamma;
1544 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1548 bool weakBosonExchanges = settings.flag(
"WeakBosonExchange:all");
1549 if (weakBosonExchanges
1550 || settings.flag(
"WeakBosonExchange:ff2ff(t:gmZ)")) {
1551 sigmaPtr =
new Sigma2ff2fftgmZ;
1552 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1554 if (weakBosonExchanges
1555 || settings.flag(
"WeakBosonExchange:ff2ff(t:W)")) {
1556 sigmaPtr =
new Sigma2ff2fftW;
1557 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1561 bool weakSingleBosons = settings.flag(
"WeakSingleBoson:all");
1562 if (weakSingleBosons
1563 || settings.flag(
"WeakSingleBoson:ffbar2gmZ")) {
1564 sigmaPtr =
new Sigma1ffbar2gmZ;
1565 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1567 if (weakSingleBosons
1568 || settings.flag(
"WeakSingleBoson:ffbar2W")) {
1569 sigmaPtr =
new Sigma1ffbar2W;
1570 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1575 if (settings.flag(
"WeakSingleBoson:ffbar2ffbar(s:gm)")) {
1576 sigmaPtr =
new Sigma2ffbar2ffbarsgm;
1577 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1581 if (settings.flag(
"WeakSingleBoson:ffbar2ffbar(s:gmZ)")) {
1582 sigmaPtr =
new Sigma2ffbar2ffbarsgmZ;
1583 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1585 if (settings.flag(
"WeakSingleBoson:ffbar2ffbar(s:W)")) {
1586 sigmaPtr =
new Sigma2ffbar2ffbarsW;
1587 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1591 bool weakDoubleBosons = settings.flag(
"WeakDoubleBoson:all");
1592 if (weakDoubleBosons
1593 || settings.flag(
"WeakDoubleBoson:ffbar2gmZgmZ")) {
1594 sigmaPtr =
new Sigma2ffbar2gmZgmZ;
1595 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1597 if (weakDoubleBosons
1598 || settings.flag(
"WeakDoubleBoson:ffbar2ZW")) {
1599 sigmaPtr =
new Sigma2ffbar2ZW;
1600 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1602 if (weakDoubleBosons
1603 || settings.flag(
"WeakDoubleBoson:ffbar2WW")) {
1604 sigmaPtr =
new Sigma2ffbar2WW;
1605 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1609 bool weakBosonAndPartons = settings.flag(
"WeakBosonAndParton:all");
1610 if (weakBosonAndPartons
1611 || settings.flag(
"WeakBosonAndParton:qqbar2gmZg")) {
1612 sigmaPtr =
new Sigma2qqbar2gmZg;
1613 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1615 if (weakBosonAndPartons
1616 || settings.flag(
"WeakBosonAndParton:qg2gmZq")) {
1617 sigmaPtr =
new Sigma2qg2gmZq;
1618 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1620 if (weakBosonAndPartons
1621 || settings.flag(
"WeakBosonAndParton:ffbar2gmZgm")) {
1622 sigmaPtr =
new Sigma2ffbar2gmZgm;
1623 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1625 if (weakBosonAndPartons
1626 || settings.flag(
"WeakBosonAndParton:fgm2gmZf")) {
1627 sigmaPtr =
new Sigma2fgm2gmZf;
1628 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1630 if (weakBosonAndPartons
1631 || settings.flag(
"WeakBosonAndParton:qqbar2Wg")) {
1632 sigmaPtr =
new Sigma2qqbar2Wg;
1633 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1635 if (weakBosonAndPartons
1636 || settings.flag(
"WeakBosonAndParton:qg2Wq")) {
1637 sigmaPtr =
new Sigma2qg2Wq;
1638 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1640 if (weakBosonAndPartons
1641 || settings.flag(
"WeakBosonAndParton:ffbar2Wgm")) {
1642 sigmaPtr =
new Sigma2ffbar2Wgm;
1643 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1645 if (weakBosonAndPartons
1646 || settings.flag(
"WeakBosonAndParton:fgm2Wf")) {
1647 sigmaPtr =
new Sigma2fgm2Wf;
1648 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1652 bool photonCollisions = settings.flag(
"PhotonCollision:all");
1653 bool hasGamma = settings.flag(
"PDF:lepton2gamma");
1654 int photonMode = settings.mode(
"Photon:ProcessType");
1655 bool initGmGm = ( ( (photonMode == 4) || (photonMode == 0) )
1656 && hasGamma ) || !hasGamma;
1657 if ( initGmGm && ( photonCollisions
1658 || settings.flag(
"PhotonCollision:gmgm2qqbar") ) ) {
1659 sigmaPtr =
new Sigma2gmgm2ffbar(1, 261);
1660 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1662 if ( initGmGm && ( photonCollisions
1663 || settings.flag(
"PhotonCollision:gmgm2ccbar") ) ) {
1664 sigmaPtr =
new Sigma2gmgm2ffbar(4, 262);
1665 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1667 if ( initGmGm && ( photonCollisions
1668 || settings.flag(
"PhotonCollision:gmgm2bbbar") ) ) {
1669 sigmaPtr =
new Sigma2gmgm2ffbar(5, 263);
1670 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1672 if ( initGmGm && ( photonCollisions
1673 || settings.flag(
"PhotonCollision:gmgm2ee") ) ) {
1674 sigmaPtr =
new Sigma2gmgm2ffbar(11, 264);
1675 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1677 if ( initGmGm && ( photonCollisions
1678 || settings.flag(
"PhotonCollision:gmgm2mumu") ) ) {
1679 sigmaPtr =
new Sigma2gmgm2ffbar(13, 265);
1680 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1682 if ( initGmGm && ( photonCollisions
1683 || settings.flag(
"PhotonCollision:gmgm2tautau") ) ) {
1684 sigmaPtr =
new Sigma2gmgm2ffbar(15, 266);
1685 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1689 bool photonParton = settings.flag(
"PhotonParton:all");
1690 bool beamAisHadron = abs(infoPtr->idA()) > 100;
1691 bool beamBisHadron = abs(infoPtr->idB()) > 100;
1692 bool isGammaGamma = infoPtr->idA() == 22 && infoPtr->idB() == 22;
1693 bool isGammaHadron = (infoPtr->idA() == 22 && beamBisHadron)
1694 || (infoPtr->idB() == 22 && beamAisHadron);
1697 int idAbsA = abs(infoPtr->idA());
1698 int idAbsB = abs(infoPtr->idB());
1699 bool hasGammaA = hasGamma && (idAbsA == 11 || idAbsA == 13 || idAbsA == 15);
1700 bool hasGammaB = hasGamma && (idAbsB == 11 || idAbsB == 13 || idAbsB == 15);
1701 bool gammaA = hasGammaA || idAbsA == 22;
1702 bool gammaB = hasGammaB || idAbsB == 22;
1706 bool initGammaA = gammaA && (photonMode == 0 || photonMode == 3);
1707 bool initGammaB = !(isGammaGamma || hasGamma || isGammaHadron)
1708 || ( (photonMode == 0 || photonMode == 2) && gammaB);
1712 if (photonParton || settings.flag(
"PhotonParton:ggm2qqbar")) {
1714 sigmaPtr =
new Sigma2ggm2qqbar(1, 271,
"ggm");
1715 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1718 sigmaPtr =
new Sigma2ggm2qqbar(1, 281,
"gmg");
1719 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1722 if (photonParton || settings.flag(
"PhotonParton:ggm2ccbar")) {
1724 sigmaPtr =
new Sigma2ggm2qqbar(4, 272,
"ggm");
1725 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1728 sigmaPtr =
new Sigma2ggm2qqbar(4, 282,
"gmg");
1729 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1732 if (photonParton || settings.flag(
"PhotonParton:ggm2bbbar")) {
1734 sigmaPtr =
new Sigma2ggm2qqbar(5, 273,
"ggm");
1735 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1738 sigmaPtr =
new Sigma2ggm2qqbar(5, 283,
"gmg");
1739 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1742 if (photonParton || settings.flag(
"PhotonParton:qgm2qg")) {
1744 sigmaPtr =
new Sigma2qgm2qg(274,
"qgm");
1745 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1748 sigmaPtr =
new Sigma2qgm2qg(284,
"gmq");
1749 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1752 if (settings.flag(
"PhotonParton:qgm2qgm")) {
1754 sigmaPtr =
new Sigma2qgm2qgm(275,
"qgm");
1755 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1758 sigmaPtr =
new Sigma2qgm2qgm(285,
"gmq");
1759 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1764 charmonium = SigmaOniaSetup(infoPtr, &settings, particleDataPtr, 4);
1765 bottomonium = SigmaOniaSetup(infoPtr, &settings, particleDataPtr, 5);
1766 vector<SigmaProcess*> charmoniumSigmaPtrs, bottomoniumSigmaPtrs;
1767 charmonium.setupSigma2gg(charmoniumSigmaPtrs);
1768 charmonium.setupSigma2qg(charmoniumSigmaPtrs);
1769 charmonium.setupSigma2qq(charmoniumSigmaPtrs);
1770 charmonium.setupSigma2dbl(charmoniumSigmaPtrs);
1771 bottomonium.setupSigma2gg(bottomoniumSigmaPtrs);
1772 bottomonium.setupSigma2qg(bottomoniumSigmaPtrs);
1773 bottomonium.setupSigma2qq(bottomoniumSigmaPtrs);
1774 bottomonium.setupSigma2dbl(bottomoniumSigmaPtrs);
1775 for (
unsigned int i = 0; i < charmoniumSigmaPtrs.size(); ++i)
1776 containerPtrs.push_back(
new ProcessContainer(charmoniumSigmaPtrs[i]) );
1777 for (
unsigned int i = 0; i < bottomoniumSigmaPtrs.size(); ++i)
1778 containerPtrs.push_back(
new ProcessContainer(bottomoniumSigmaPtrs[i]) );
1781 bool tops = settings.flag(
"Top:all");
1782 if (tops || settings.flag(
"Top:gg2ttbar")) {
1783 sigmaPtr =
new Sigma2gg2QQbar(6, 601);
1784 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1786 if (tops || settings.flag(
"Top:qqbar2ttbar")) {
1787 sigmaPtr =
new Sigma2qqbar2QQbar(6, 602);
1788 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1790 if (tops || settings.flag(
"Top:qq2tq(t:W)")) {
1791 sigmaPtr =
new Sigma2qq2QqtW(6, 603);
1792 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1794 if (tops || settings.flag(
"Top:ffbar2ttbar(s:gmZ)")) {
1795 sigmaPtr =
new Sigma2ffbar2FFbarsgmZ(6, 604);
1796 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1798 if (tops || settings.flag(
"Top:ffbar2tqbar(s:W)")) {
1799 sigmaPtr =
new Sigma2ffbar2FfbarsW(6, 0, 605);
1800 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1802 if (tops || settings.flag(
"Top:gmgm2ttbar")) {
1803 sigmaPtr =
new Sigma2gmgm2ffbar(6, 606);
1804 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1808 bool bPrimes = settings.flag(
"FourthBottom:all");
1809 if (bPrimes || settings.flag(
"FourthBottom:gg2bPrimebPrimebar")) {
1810 sigmaPtr =
new Sigma2gg2QQbar(7, 801);
1811 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1813 if (bPrimes || settings.flag(
"FourthBottom:qqbar2bPrimebPrimebar")) {
1814 sigmaPtr =
new Sigma2qqbar2QQbar(7, 802);
1815 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1817 if (bPrimes || settings.flag(
"FourthBottom:qq2bPrimeq(t:W)")) {
1818 sigmaPtr =
new Sigma2qq2QqtW(7, 803);
1819 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1821 if (bPrimes || settings.flag(
"FourthBottom:ffbar2bPrimebPrimebar(s:gmZ)")) {
1822 sigmaPtr =
new Sigma2ffbar2FFbarsgmZ(7, 804);
1823 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1825 if (bPrimes || settings.flag(
"FourthBottom:ffbar2bPrimeqbar(s:W)")) {
1826 sigmaPtr =
new Sigma2ffbar2FfbarsW(7, 0, 805);
1827 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1829 if (bPrimes || settings.flag(
"FourthBottom:ffbar2bPrimetbar(s:W)")) {
1830 sigmaPtr =
new Sigma2ffbar2FfbarsW(7, 6, 806);
1831 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1835 bool tPrimes = settings.flag(
"FourthTop:all");
1836 if (tPrimes || settings.flag(
"FourthTop:gg2tPrimetPrimebar")) {
1837 sigmaPtr =
new Sigma2gg2QQbar(8, 821);
1838 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1840 if (tPrimes || settings.flag(
"FourthTop:qqbar2tPrimetPrimebar")) {
1841 sigmaPtr =
new Sigma2qqbar2QQbar(8, 822);
1842 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1844 if (tPrimes || settings.flag(
"FourthTop:qq2tPrimeq(t:W)")) {
1845 sigmaPtr =
new Sigma2qq2QqtW(8, 823);
1846 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1848 if (tPrimes || settings.flag(
"FourthTop:ffbar2tPrimetPrimebar(s:gmZ)")) {
1849 sigmaPtr =
new Sigma2ffbar2FFbarsgmZ(8, 824);
1850 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1852 if (tPrimes || settings.flag(
"FourthTop:ffbar2tPrimeqbar(s:W)")) {
1853 sigmaPtr =
new Sigma2ffbar2FfbarsW(8, 0, 825);
1854 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1858 if (bPrimes || tPrimes
1859 || settings.flag(
"FourthPair:ffbar2tPrimebPrimebar(s:W)")) {
1860 sigmaPtr =
new Sigma2ffbar2FfbarsW(8, 7, 841);
1861 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1863 if (settings.flag(
"FourthPair:ffbar2tauPrimenuPrimebar(s:W)")) {
1864 sigmaPtr =
new Sigma2ffbar2FfbarsW(17, 18, 842);
1865 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1869 bool useBSMHiggses = settings.flag(
"Higgs:useBSM");
1872 if (!useBSMHiggses) {
1873 bool HiggsesSM = settings.flag(
"HiggsSM:all");
1874 if (HiggsesSM || settings.flag(
"HiggsSM:ffbar2H")) {
1875 sigmaPtr =
new Sigma1ffbar2H(0);
1876 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1878 if (HiggsesSM || settings.flag(
"HiggsSM:gg2H")) {
1879 sigmaPtr =
new Sigma1gg2H(0);
1880 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1882 if (HiggsesSM || settings.flag(
"HiggsSM:gmgm2H")) {
1883 sigmaPtr =
new Sigma1gmgm2H(0);
1884 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1886 if (HiggsesSM || settings.flag(
"HiggsSM:ffbar2HZ")) {
1887 sigmaPtr =
new Sigma2ffbar2HZ(0);
1888 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1890 if (HiggsesSM || settings.flag(
"HiggsSM:ffbar2HW")) {
1891 sigmaPtr =
new Sigma2ffbar2HW(0);
1892 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1894 if (HiggsesSM || settings.flag(
"HiggsSM:ff2Hff(t:ZZ)")) {
1895 sigmaPtr =
new Sigma3ff2HfftZZ(0);
1896 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1898 if (HiggsesSM || settings.flag(
"HiggsSM:ff2Hff(t:WW)")) {
1899 sigmaPtr =
new Sigma3ff2HfftWW(0);
1900 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1902 if (HiggsesSM || settings.flag(
"HiggsSM:gg2Httbar")) {
1903 sigmaPtr =
new Sigma3gg2HQQbar(6,0);
1904 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1906 if (HiggsesSM || settings.flag(
"HiggsSM:qqbar2Httbar")) {
1907 sigmaPtr =
new Sigma3qqbar2HQQbar(6,0);
1908 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1912 if (settings.flag(
"HiggsSM:qg2Hq")) {
1913 sigmaPtr =
new Sigma2qg2Hq(4,0);
1914 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1915 sigmaPtr =
new Sigma2qg2Hq(5,0);
1916 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1918 if (settings.flag(
"HiggsSM:gg2Hbbbar")) {
1919 sigmaPtr =
new Sigma3gg2HQQbar(5,0);
1920 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1922 if (settings.flag(
"HiggsSM:qqbar2Hbbbar")) {
1923 sigmaPtr =
new Sigma3qqbar2HQQbar(5,0);
1924 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1926 if (settings.flag(
"HiggsSM:gg2Hg(l:t)")) {
1927 sigmaPtr =
new Sigma2gg2Hglt(0);
1928 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1930 if (settings.flag(
"HiggsSM:qg2Hq(l:t)")) {
1931 sigmaPtr =
new Sigma2qg2Hqlt(0);
1932 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1934 if (settings.flag(
"HiggsSM:qqbar2Hg(l:t)")) {
1935 sigmaPtr =
new Sigma2qqbar2Hglt(0);
1936 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1941 if (useBSMHiggses) {
1942 bool HiggsesBSM = settings.flag(
"HiggsBSM:all");
1945 bool HiggsesH1 = settings.flag(
"HiggsBSM:allH1");
1946 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:ffbar2H1")) {
1947 sigmaPtr =
new Sigma1ffbar2H(1);
1948 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1950 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:gg2H1")) {
1951 sigmaPtr =
new Sigma1gg2H(1);
1952 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1954 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:gmgm2H1")) {
1955 sigmaPtr =
new Sigma1gmgm2H(1);
1956 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1958 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:ffbar2H1Z")) {
1959 sigmaPtr =
new Sigma2ffbar2HZ(1);
1960 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1962 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:ffbar2H1W")) {
1963 sigmaPtr =
new Sigma2ffbar2HW(1);
1964 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1966 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:ff2H1ff(t:ZZ)")) {
1967 sigmaPtr =
new Sigma3ff2HfftZZ(1);
1968 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1970 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:ff2H1ff(t:WW)")) {
1971 sigmaPtr =
new Sigma3ff2HfftWW(1);
1972 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1974 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:gg2H1ttbar")) {
1975 sigmaPtr =
new Sigma3gg2HQQbar(6,1);
1976 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1978 if (HiggsesBSM || HiggsesH1 || settings.flag(
"HiggsBSM:qqbar2H1ttbar")) {
1979 sigmaPtr =
new Sigma3qqbar2HQQbar(6,1);
1980 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1984 if (settings.flag(
"HiggsBSM:qg2H1q")) {
1985 sigmaPtr =
new Sigma2qg2Hq(4,1);
1986 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1987 sigmaPtr =
new Sigma2qg2Hq(5,1);
1988 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1990 if (settings.flag(
"HiggsBSM:gg2H1bbbar")) {
1991 sigmaPtr =
new Sigma3gg2HQQbar(5,1);
1992 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1994 if (settings.flag(
"HiggsBSM:qqbar2H1bbbar")) {
1995 sigmaPtr =
new Sigma3qqbar2HQQbar(5,1);
1996 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
1998 if (settings.flag(
"HiggsBSM:gg2H1g(l:t)")) {
1999 sigmaPtr =
new Sigma2gg2Hglt(1);
2000 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2002 if (settings.flag(
"HiggsBSM:qg2H1q(l:t)")) {
2003 sigmaPtr =
new Sigma2qg2Hqlt(1);
2004 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2006 if (settings.flag(
"HiggsBSM:qqbar2H1g(l:t)")) {
2007 sigmaPtr =
new Sigma2qqbar2Hglt(1);
2008 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2012 bool HiggsesH2 = settings.flag(
"HiggsBSM:allH2");
2013 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:ffbar2H2")) {
2014 sigmaPtr =
new Sigma1ffbar2H(2);
2015 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2017 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:gg2H2")) {
2018 sigmaPtr =
new Sigma1gg2H(2);
2019 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2021 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:gmgm2H2")) {
2022 sigmaPtr =
new Sigma1gmgm2H(2);
2023 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2025 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:ffbar2H2Z")) {
2026 sigmaPtr =
new Sigma2ffbar2HZ(2);
2027 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2029 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:ffbar2H2W")) {
2030 sigmaPtr =
new Sigma2ffbar2HW(2);
2031 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2033 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:ff2H2ff(t:ZZ)")) {
2034 sigmaPtr =
new Sigma3ff2HfftZZ(2);
2035 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2037 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:ff2H2ff(t:WW)")) {
2038 sigmaPtr =
new Sigma3ff2HfftWW(2);
2039 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2041 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:gg2H2ttbar")) {
2042 sigmaPtr =
new Sigma3gg2HQQbar(6,2);
2043 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2045 if (HiggsesBSM || HiggsesH2 || settings.flag(
"HiggsBSM:qqbar2H2ttbar")) {
2046 sigmaPtr =
new Sigma3qqbar2HQQbar(6,2);
2047 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2051 if (settings.flag(
"HiggsBSM:qg2H2q")) {
2052 sigmaPtr =
new Sigma2qg2Hq(4,2);
2053 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2054 sigmaPtr =
new Sigma2qg2Hq(5,2);
2055 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2057 if (settings.flag(
"HiggsBSM:gg2H2bbbar")) {
2058 sigmaPtr =
new Sigma3gg2HQQbar(5,2);
2059 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2061 if (settings.flag(
"HiggsBSM:qqbar2H2bbbar")) {
2062 sigmaPtr =
new Sigma3qqbar2HQQbar(5,2);
2063 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2065 if (settings.flag(
"HiggsBSM:gg2H2g(l:t)")) {
2066 sigmaPtr =
new Sigma2gg2Hglt(2);
2067 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2069 if (settings.flag(
"HiggsBSM:qg2H2q(l:t)")) {
2070 sigmaPtr =
new Sigma2qg2Hqlt(2);
2071 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2073 if (settings.flag(
"HiggsBSM:qqbar2H2g(l:t)")) {
2074 sigmaPtr =
new Sigma2qqbar2Hglt(2);
2075 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2079 bool HiggsesA3 = settings.flag(
"HiggsBSM:allA3");
2080 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:ffbar2A3")) {
2081 sigmaPtr =
new Sigma1ffbar2H(3);
2082 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2084 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:gg2A3")) {
2085 sigmaPtr =
new Sigma1gg2H(3);
2086 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2088 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:gmgm2A3")) {
2089 sigmaPtr =
new Sigma1gmgm2H(3);
2090 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2092 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:ffbar2A3Z")) {
2093 sigmaPtr =
new Sigma2ffbar2HZ(3);
2094 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2096 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:ffbar2A3W")) {
2097 sigmaPtr =
new Sigma2ffbar2HW(3);
2098 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2100 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:ff2A3ff(t:ZZ)")) {
2101 sigmaPtr =
new Sigma3ff2HfftZZ(3);
2102 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2104 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:ff2A3ff(t:WW)")) {
2105 sigmaPtr =
new Sigma3ff2HfftWW(3);
2106 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2108 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:gg2A3ttbar")) {
2109 sigmaPtr =
new Sigma3gg2HQQbar(6,3);
2110 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2112 if (HiggsesBSM || HiggsesA3 || settings.flag(
"HiggsBSM:qqbar2A3ttbar")) {
2113 sigmaPtr =
new Sigma3qqbar2HQQbar(6,3);
2114 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2118 if (settings.flag(
"HiggsBSM:qg2A3q")) {
2119 sigmaPtr =
new Sigma2qg2Hq(4,3);
2120 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2121 sigmaPtr =
new Sigma2qg2Hq(5,3);
2122 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2124 if (settings.flag(
"HiggsBSM:gg2A3bbbar")) {
2125 sigmaPtr =
new Sigma3gg2HQQbar(5,3);
2126 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2128 if (settings.flag(
"HiggsBSM:qqbar2A3bbbar")) {
2129 sigmaPtr =
new Sigma3qqbar2HQQbar(5,3);
2130 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2132 if (settings.flag(
"HiggsBSM:gg2A3g(l:t)")) {
2133 sigmaPtr =
new Sigma2gg2Hglt(3);
2134 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2136 if (settings.flag(
"HiggsBSM:qg2A3q(l:t)")) {
2137 sigmaPtr =
new Sigma2qg2Hqlt(3);
2138 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2140 if (settings.flag(
"HiggsBSM:qqbar2A3g(l:t)")) {
2141 sigmaPtr =
new Sigma2qqbar2Hglt(3);
2142 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2146 bool HiggsesChg = settings.flag(
"HiggsBSM:allH+-");
2147 if (HiggsesBSM || HiggsesChg || settings.flag(
"HiggsBSM:ffbar2H+-")) {
2148 sigmaPtr =
new Sigma1ffbar2Hchg;
2149 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2151 if (HiggsesBSM || HiggsesChg || settings.flag(
"HiggsBSM:bg2H+-t")) {
2152 sigmaPtr =
new Sigma2qg2Hchgq(6, 1062,
"b g -> H+- t");
2153 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2157 bool HiggsesPairs = settings.flag(
"HiggsBSM:allHpair");
2158 if (HiggsesBSM || HiggsesPairs || settings.flag(
"HiggsBSM:ffbar2A3H1")) {
2159 sigmaPtr =
new Sigma2ffbar2A3H12(1);
2160 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2162 if (HiggsesBSM || HiggsesPairs || settings.flag(
"HiggsBSM:ffbar2A3H2")) {
2163 sigmaPtr =
new Sigma2ffbar2A3H12(2);
2164 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2166 if (HiggsesBSM || HiggsesPairs || settings.flag(
"HiggsBSM:ffbar2H+-H1")) {
2167 sigmaPtr =
new Sigma2ffbar2HchgH12(1);
2168 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2170 if (HiggsesBSM || HiggsesPairs || settings.flag(
"HiggsBSM:ffbar2H+-H2")) {
2171 sigmaPtr =
new Sigma2ffbar2HchgH12(2);
2172 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2174 if (HiggsesBSM || HiggsesPairs || settings.flag(
"HiggsBSM:ffbar2H+H-")) {
2175 sigmaPtr =
new Sigma2ffbar2HposHneg();
2176 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2181 if (couplings->isSUSY) {
2182 CoupSUSY* coupSUSY = (CoupSUSY *) couplings;
2184 bool SUSYs = settings.flag(
"SUSY:all");
2185 bool nmssm = settings.flag(
"SLHA:NMSSM");
2188 setupIdVecs( settings);
2192 if (nmssm) nNeut = 5;
2195 if (SUSYs || settings.flag(
"SUSY:gg2gluinogluino")) {
2197 if (allowIdVals( 1000021, 1000021)) {
2198 sigmaPtr =
new Sigma2gg2gluinogluino();
2199 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2202 if (SUSYs || settings.flag(
"SUSY:qqbar2gluinogluino")) {
2204 if (allowIdVals( 1000021, 1000021)) {
2205 sigmaPtr =
new Sigma2qqbar2gluinogluino();
2206 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2211 if (SUSYs || settings.flag(
"SUSY:qg2squarkgluino")) {
2213 for (
int idx = 1; idx <= 6; ++idx) {
2214 for (
int iso = 1; iso <= 2; ++iso) {
2216 int id3 = iso + ((idx <= 3)
2217 ? 1000000+2*(idx-1) : 2000000+2*(idx-4));
2220 if (!allowIdVals( id3, id4))
continue;
2221 sigmaPtr =
new Sigma2qg2squarkgluino(id3,iproc-1);
2222 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2223 sigmaPtr =
new Sigma2qg2squarkgluino(-id3,iproc);
2224 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2230 if (SUSYs || settings.flag(
"SUSY:gg2squarkantisquark")) {
2232 for (
int idx = 1; idx <= 6; ++idx) {
2233 for (
int iso = 1; iso <= 2; ++iso) {
2235 int id = iso + ((idx <= 3)
2236 ? 1000000+2*(idx-1) : 2000000+2*(idx-4));
2238 if (!allowIdVals(
id,
id))
continue;
2239 sigmaPtr =
new Sigma2gg2squarkantisquark(
id,iproc);
2240 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2246 if (SUSYs || settings.flag(
"SUSY:qqbar2squarkantisquark")) {
2248 for (
int idx = 1; idx <= 6; ++idx) {
2249 for (
int iso = 1; iso <= 2; ++iso) {
2250 for (
int jso = iso; jso >= 1; --jso) {
2251 for (
int jdx = 1; jdx <= 6; ++jdx) {
2252 if (iso == jso && jdx < idx)
continue;
2253 int id1 = iso + ((idx <= 3) ? 1000000+2*(idx-1)
2254 : 2000000+2*(idx-4));
2255 int id2 = jso + ((jdx <= 3) ? 1000000+2*(jdx-1)
2256 : 2000000+2*(jdx-4));
2260 if (iso == jso && id1 != id2) iproc++;
2262 if (!allowIdVals( id1, id2))
continue;
2263 if (iso == jso && id1 != id2) {
2264 sigmaPtr =
new Sigma2qqbar2squarkantisquark(id1,-id2,iproc-1);
2265 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2266 sigmaPtr =
new Sigma2qqbar2squarkantisquark(id2,-id1,iproc);
2267 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2269 sigmaPtr =
new Sigma2qqbar2squarkantisquark(id1,-id2,iproc);
2270 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2279 if (SUSYs || settings.flag(
"SUSY:qq2squarksquark")) {
2281 for (
int idx = 1; idx <= 6; ++idx) {
2282 for (
int iso = 1; iso <= 2; ++iso) {
2283 for (
int jso = iso; jso >= 1; jso--) {
2284 for (
int jdx = 1; jdx <= 6; ++jdx) {
2285 if (iso == jso && jdx < idx)
continue;
2287 int id1 = iso + ((idx <= 3)
2288 ? 1000000+2*(idx-1) : 2000000+2*(idx-4));
2289 int id2 = jso + ((jdx <= 3)
2290 ? 1000000+2*(jdx-1) : 2000000+2*(jdx-4));
2292 if (!allowIdVals( id1, id2))
continue;
2293 sigmaPtr =
new Sigma2qq2squarksquark(id1,id2,iproc);
2294 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2302 if (SUSYs || settings.flag(
"SUSY:qg2chi0squark")) {
2304 for (
int iNeut= 1; iNeut <= nNeut; iNeut++) {
2305 for (
int idx = 1; idx <= 6; idx++) {
2307 for (
int iso = 1; iso <= 2; iso++) {
2308 if (iso == 2) isUp =
true;
2310 int id3 = coupSUSY->idNeut(iNeut);
2311 int id4 = iso + ((idx <= 3)
2312 ? 1000000+2*(idx-1) : 2000000+2*(idx-4));
2314 if (!allowIdVals( id3, id4))
continue;
2315 sigmaPtr =
new Sigma2qg2chi0squark(iNeut,idx,isUp,iproc);
2316 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2323 if (SUSYs || settings.flag(
"SUSY:qg2chi+-squark")) {
2325 for (
int iChar = 1; iChar <= 2; iChar++) {
2326 for (
int idx = 1; idx <= 6; idx++) {
2328 for (
int iso = 1; iso <= 2; iso++) {
2329 if (iso == 2) isUp =
true;
2331 int id3 = coupSUSY->idChar(iChar);
2332 int id4 = iso + ((idx <= 3)
2333 ? 1000000+2*(idx-1) : 2000000+2*(idx-4));
2335 if (!allowIdVals( id3, id4))
continue;
2336 sigmaPtr =
new Sigma2qg2charsquark(iChar,idx,isUp,iproc);
2337 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2344 if (SUSYs || settings.flag(
"SUSY:qqbar2chi0chi0")) {
2346 for (
int iNeut2 = 1; iNeut2 <= nNeut; iNeut2++) {
2347 for (
int iNeut1 = 1; iNeut1 <= iNeut2; iNeut1++) {
2350 if (!allowIdVals( coupSUSY->idNeut(iNeut1),
2351 coupSUSY->idNeut(iNeut2) ) )
continue;
2352 sigmaPtr =
new Sigma2qqbar2chi0chi0(iNeut1, iNeut2,iproc);
2353 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2359 if (SUSYs || settings.flag(
"SUSY:qqbar2chi+-chi0")) {
2361 for (
int iNeut = 1; iNeut <= nNeut; iNeut++) {
2362 for (
int iChar = 1; iChar <= 2; ++iChar) {
2365 if (!allowIdVals( coupSUSY->idNeut(iNeut),
2366 coupSUSY->idChar(iChar) ) )
continue;
2367 sigmaPtr =
new Sigma2qqbar2charchi0( iChar, iNeut, iproc-1);
2368 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2369 sigmaPtr =
new Sigma2qqbar2charchi0(-iChar, iNeut, iproc);
2370 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2376 if (SUSYs || settings.flag(
"SUSY:qqbar2chi+chi-")) {
2378 for (
int i = 1; i <= 2; ++i) {
2379 for (
int j = 1; j <= 2; ++j) {
2382 if (!allowIdVals( coupSUSY->idChar(i),
2383 coupSUSY->idChar(j) ) )
continue;
2384 sigmaPtr =
new Sigma2qqbar2charchar( i,-j, iproc);
2385 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2391 if(SUSYs || settings.flag(
"SUSY:qq2antisquark")) {
2392 for (
int idx = 1; idx <= 6; ++idx) {
2393 for (
int iso = 1; iso <= 2; ++iso) {
2394 int id1 = iso + ((idx <= 3) ? 1000000+2*(idx-1) : 2000000+2*(idx-4));
2396 if (!allowIdVals( id1, 0))
continue;
2397 sigmaPtr =
new Sigma1qq2antisquark(id1);
2398 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2404 if (SUSYs || settings.flag(
"SUSY:qqbar2chi0gluino")) {
2406 for (
int iNeut = 1; iNeut <= nNeut; iNeut++) {
2409 if (!allowIdVals( coupSUSY->idNeut(iNeut), 1000021))
continue;
2410 sigmaPtr =
new Sigma2qqbar2chi0gluino(iNeut, iproc);
2411 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2416 if (SUSYs || settings.flag(
"SUSY:qqbar2chi+-gluino")) {
2418 for (
int iChar = 1; iChar <= 2; ++iChar) {
2421 if (!allowIdVals( coupSUSY->idChar(iChar), 1000021))
continue;
2422 sigmaPtr =
new Sigma2qqbar2chargluino( iChar, iproc-1);
2423 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2424 sigmaPtr =
new Sigma2qqbar2chargluino( -iChar, iproc);
2425 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2431 if (SUSYs || settings.flag(
"SUSY:qqbar2sleptonantislepton")) {
2433 for (
int idx = 1; idx <= 6; ++idx) {
2434 for (
int iso = 1; iso <= 2; ++iso) {
2435 for (
int jso = iso; jso >= 1; --jso) {
2436 for (
int jdx = 1; jdx <= 6; ++jdx) {
2437 if (iso == jso && jdx < idx)
continue;
2438 int id1 = iso + ((idx <= 3) ? 1000010+2*(idx-1)
2439 : 2000010+2*(idx-4));
2440 int id2 = jso + ((jdx <= 3) ? 1000010+2*(jdx-1)
2441 : 2000010+2*(jdx-4));
2444 if (iso == jso && id1 != id2) iproc++;
2446 if (abs(id1) >= 2000012 && id1 % 2 == 0)
continue;
2447 if (abs(id2) >= 2000012 && id2 % 2 == 0)
continue;
2449 if (!allowIdVals( id1, id2))
continue;
2450 if (iso == jso && id1 != id2) {
2452 =
new Sigma2qqbar2sleptonantislepton(id1,-id2,iproc-1);
2453 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2454 sigmaPtr =
new Sigma2qqbar2sleptonantislepton(id2,-id1,iproc);
2455 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2457 sigmaPtr =
new Sigma2qqbar2sleptonantislepton(id1,-id2,iproc);
2458 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2469 if (settings.flag(
"NewGaugeBoson:ffbar2gmZZprime")) {
2470 sigmaPtr =
new Sigma1ffbar2gmZZprime();
2471 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2473 if (settings.flag(
"NewGaugeBoson:ffbar2Wprime")) {
2474 sigmaPtr =
new Sigma1ffbar2Wprime();
2475 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2477 if (settings.flag(
"NewGaugeBoson:ffbar2R0")) {
2478 sigmaPtr =
new Sigma1ffbar2Rhorizontal();
2479 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2483 bool leftrights = settings.flag(
"LeftRightSymmmetry:all");
2484 if (leftrights || settings.flag(
"LeftRightSymmmetry:ffbar2ZR")) {
2485 sigmaPtr =
new Sigma1ffbar2ZRight();
2486 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2488 if (leftrights || settings.flag(
"LeftRightSymmmetry:ffbar2WR")) {
2489 sigmaPtr =
new Sigma1ffbar2WRight();
2490 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2492 if (leftrights || settings.flag(
"LeftRightSymmmetry:ll2HL")) {
2493 sigmaPtr =
new Sigma1ll2Hchgchg(1);
2494 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2496 if (leftrights || settings.flag(
"LeftRightSymmmetry:lgm2HLe")) {
2497 sigmaPtr =
new Sigma2lgm2Hchgchgl(1, 11);
2498 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2500 if (leftrights || settings.flag(
"LeftRightSymmmetry:lgm2HLmu")) {
2501 sigmaPtr =
new Sigma2lgm2Hchgchgl(1, 13);
2502 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2504 if (leftrights || settings.flag(
"LeftRightSymmmetry:lgm2HLtau")) {
2505 sigmaPtr =
new Sigma2lgm2Hchgchgl(1, 15);
2506 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2508 if (leftrights || settings.flag(
"LeftRightSymmmetry:ff2HLff")) {
2509 sigmaPtr =
new Sigma3ff2HchgchgfftWW(1);
2510 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2512 if (leftrights || settings.flag(
"LeftRightSymmmetry:ffbar2HLHL")) {
2513 sigmaPtr =
new Sigma2ffbar2HchgchgHchgchg(1);
2514 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2516 if (leftrights || settings.flag(
"LeftRightSymmmetry:ll2HR")) {
2517 sigmaPtr =
new Sigma1ll2Hchgchg(2);
2518 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2520 if (leftrights || settings.flag(
"LeftRightSymmmetry:lgm2HRe")) {
2521 sigmaPtr =
new Sigma2lgm2Hchgchgl(2, 11);
2522 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2524 if (leftrights || settings.flag(
"LeftRightSymmmetry:lgm2HRmu")) {
2525 sigmaPtr =
new Sigma2lgm2Hchgchgl(2, 13);
2526 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2528 if (leftrights || settings.flag(
"LeftRightSymmmetry:lgm2HRtau")) {
2529 sigmaPtr =
new Sigma2lgm2Hchgchgl(2, 15);
2530 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2532 if (leftrights || settings.flag(
"LeftRightSymmmetry:ff2HRff")) {
2533 sigmaPtr =
new Sigma3ff2HchgchgfftWW(2);
2534 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2536 if (leftrights || settings.flag(
"LeftRightSymmmetry:ffbar2HRHR")) {
2537 sigmaPtr =
new Sigma2ffbar2HchgchgHchgchg(2);
2538 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2542 bool leptoquarks = settings.flag(
"LeptoQuark:all");
2543 if (leptoquarks || settings.flag(
"LeptoQuark:ql2LQ")) {
2544 sigmaPtr =
new Sigma1ql2LeptoQuark;
2545 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2547 if (leptoquarks || settings.flag(
"LeptoQuark:qg2LQl")) {
2548 sigmaPtr =
new Sigma2qg2LeptoQuarkl;
2549 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2551 if (leptoquarks || settings.flag(
"LeptoQuark:gg2LQLQbar")) {
2552 sigmaPtr =
new Sigma2gg2LQLQbar;
2553 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2555 if (leptoquarks || settings.flag(
"LeptoQuark:qqbar2LQLQbar")) {
2556 sigmaPtr =
new Sigma2qqbar2LQLQbar;
2557 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2561 bool excitedfermions = settings.flag(
"ExcitedFermion:all");
2562 if (excitedfermions || settings.flag(
"ExcitedFermion:dg2dStar")) {
2563 sigmaPtr =
new Sigma1qg2qStar(1);
2564 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2566 if (excitedfermions || settings.flag(
"ExcitedFermion:ug2uStar")) {
2567 sigmaPtr =
new Sigma1qg2qStar(2);
2568 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2570 if (excitedfermions || settings.flag(
"ExcitedFermion:sg2sStar")) {
2571 sigmaPtr =
new Sigma1qg2qStar(3);
2572 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2574 if (excitedfermions || settings.flag(
"ExcitedFermion:cg2cStar")) {
2575 sigmaPtr =
new Sigma1qg2qStar(4);
2576 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2578 if (excitedfermions || settings.flag(
"ExcitedFermion:bg2bStar")) {
2579 sigmaPtr =
new Sigma1qg2qStar(5);
2580 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2582 if (excitedfermions || settings.flag(
"ExcitedFermion:egm2eStar")) {
2583 sigmaPtr =
new Sigma1lgm2lStar(11);
2584 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2586 if (excitedfermions || settings.flag(
"ExcitedFermion:mugm2muStar")) {
2587 sigmaPtr =
new Sigma1lgm2lStar(13);
2588 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2590 if (excitedfermions || settings.flag(
"ExcitedFermion:taugm2tauStar")) {
2591 sigmaPtr =
new Sigma1lgm2lStar(15);
2592 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2594 if (excitedfermions || settings.flag(
"ExcitedFermion:qq2dStarq")) {
2595 sigmaPtr =
new Sigma2qq2qStarq(1);
2596 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2598 if (excitedfermions || settings.flag(
"ExcitedFermion:qq2uStarq")) {
2599 sigmaPtr =
new Sigma2qq2qStarq(2);
2600 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2602 if (excitedfermions || settings.flag(
"ExcitedFermion:qq2sStarq")) {
2603 sigmaPtr =
new Sigma2qq2qStarq(3);
2604 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2606 if (excitedfermions || settings.flag(
"ExcitedFermion:qq2cStarq")) {
2607 sigmaPtr =
new Sigma2qq2qStarq(4);
2608 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2610 if (excitedfermions || settings.flag(
"ExcitedFermion:qq2bStarq")) {
2611 sigmaPtr =
new Sigma2qq2qStarq(5);
2612 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2614 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2eStare")) {
2615 sigmaPtr =
new Sigma2qqbar2lStarlbar(11);
2616 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2618 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2nueStarnue")) {
2619 sigmaPtr =
new Sigma2qqbar2lStarlbar(12);
2620 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2622 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2muStarmu")) {
2623 sigmaPtr =
new Sigma2qqbar2lStarlbar(13);
2624 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2626 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2numuStarnumu")) {
2627 sigmaPtr =
new Sigma2qqbar2lStarlbar(14);
2628 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2630 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2tauStartau")) {
2631 sigmaPtr =
new Sigma2qqbar2lStarlbar(15);
2632 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2635 || settings.flag(
"ExcitedFermion:qqbar2nutauStarnutau")) {
2636 sigmaPtr =
new Sigma2qqbar2lStarlbar(16);
2637 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2639 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2eStareStar")) {
2640 sigmaPtr =
new Sigma2qqbar2lStarlStarBar(11);
2641 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2644 || settings.flag(
"ExcitedFermion:qqbar2nueStarnueStar")) {
2645 sigmaPtr =
new Sigma2qqbar2lStarlStarBar(12);
2646 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2648 if (excitedfermions || settings.flag(
"ExcitedFermion:qqbar2muStarmuStar")) {
2649 sigmaPtr =
new Sigma2qqbar2lStarlStarBar(13);
2650 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2653 || settings.flag(
"ExcitedFermion:qqbar2numuStarnumuStar")) {
2654 sigmaPtr =
new Sigma2qqbar2lStarlStarBar(14);
2655 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2658 || settings.flag(
"ExcitedFermion:qqbar2tauStartauStar")) {
2659 sigmaPtr =
new Sigma2qqbar2lStarlStarBar(15);
2660 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2663 || settings.flag(
"ExcitedFermion:qqbar2nutauStarnutauStar")) {
2664 sigmaPtr =
new Sigma2qqbar2lStarlStarBar(16);
2665 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2669 if (settings.flag(
"ContactInteractions:QCqq2qq")) {
2670 sigmaPtr =
new Sigma2QCqq2qq();
2671 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2673 if (settings.flag(
"ContactInteractions:QCqqbar2qqbar")) {
2674 sigmaPtr =
new Sigma2QCqqbar2qqbar();
2675 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2677 if (settings.flag(
"ContactInteractions:QCffbar2eebar")) {
2678 sigmaPtr =
new Sigma2QCffbar2llbar(11, 4203);
2679 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2681 if (settings.flag(
"ContactInteractions:QCffbar2mumubar")) {
2682 sigmaPtr =
new Sigma2QCffbar2llbar(13, 4204);
2683 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2685 if (settings.flag(
"ContactInteractions:QCffbar2tautaubar")) {
2686 sigmaPtr =
new Sigma2QCffbar2llbar(15, 4205);
2687 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2691 int spinFv = settings.mode(
"HiddenValley:spinFv");
2692 for (
int i = 1; i < 7; ++i) {
2693 if (particleDataPtr->spinType( 4900000 + i) != spinFv + 1)
2694 particleDataPtr->spinType( 4900000 + i, spinFv + 1);
2695 if (particleDataPtr->spinType( 4900010 + i) != spinFv + 1)
2696 particleDataPtr->spinType( 4900010 + i, spinFv + 1);
2699 if (particleDataPtr->spinType( 4900101) != 2)
2700 particleDataPtr->spinType( 4900101, 2);
2702 int spinqv = settings.mode(
"HiddenValley:spinqv");
2703 if (particleDataPtr->spinType( 4900101) != 2 * spinqv + 1)
2704 particleDataPtr->spinType( 4900101, 2 * spinqv + 1);
2708 bool hiddenvalleys = settings.flag(
"HiddenValley:all");
2709 if (hiddenvalleys || settings.flag(
"HiddenValley:gg2DvDvbar")) {
2710 sigmaPtr =
new Sigma2gg2qGqGbar( 4900001, 4901, spinFv,
2712 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2714 if (hiddenvalleys || settings.flag(
"HiddenValley:gg2UvUvbar")) {
2715 sigmaPtr =
new Sigma2gg2qGqGbar( 4900002, 4902, spinFv,
2717 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2719 if (hiddenvalleys || settings.flag(
"HiddenValley:gg2SvSvbar")) {
2720 sigmaPtr =
new Sigma2gg2qGqGbar( 4900003, 4903, spinFv,
2722 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2724 if (hiddenvalleys || settings.flag(
"HiddenValley:gg2CvCvbar")) {
2725 sigmaPtr =
new Sigma2gg2qGqGbar( 4900004, 4904, spinFv,
2727 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2729 if (hiddenvalleys || settings.flag(
"HiddenValley:gg2BvBvbar")) {
2730 sigmaPtr =
new Sigma2gg2qGqGbar( 4900005, 4905, spinFv,
2732 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2734 if (hiddenvalleys || settings.flag(
"HiddenValley:gg2TvTvbar")) {
2735 sigmaPtr =
new Sigma2gg2qGqGbar( 4900006, 4906, spinFv,
2737 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2739 if (hiddenvalleys || settings.flag(
"HiddenValley:qqbar2DvDvbar")) {
2740 sigmaPtr =
new Sigma2qqbar2qGqGbar( 4900001, 4911, spinFv,
2741 "q qbar -> Dv Dvbar");
2742 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2744 if (hiddenvalleys || settings.flag(
"HiddenValley:qqbar2UvUvbar")) {
2745 sigmaPtr =
new Sigma2qqbar2qGqGbar( 4900002, 4912, spinFv,
2746 "q qbar -> Uv Uvbar");
2747 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2749 if (hiddenvalleys || settings.flag(
"HiddenValley:qqbar2SvSvbar")) {
2750 sigmaPtr =
new Sigma2qqbar2qGqGbar( 4900003, 4913, spinFv,
2751 "q qbar -> Sv Svbar");
2752 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2754 if (hiddenvalleys || settings.flag(
"HiddenValley:qqbar2CvCvbar")) {
2755 sigmaPtr =
new Sigma2qqbar2qGqGbar( 4900004, 4914, spinFv,
2756 "q qbar -> Cv Cvbar");
2757 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2759 if (hiddenvalleys || settings.flag(
"HiddenValley:qqbar2BvBvbar")) {
2760 sigmaPtr =
new Sigma2qqbar2qGqGbar( 4900005, 4915, spinFv,
2761 "q qbar -> Bv Bvbar");
2762 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2764 if (hiddenvalleys || settings.flag(
"HiddenValley:qqbar2TvTvbar")) {
2765 sigmaPtr =
new Sigma2qqbar2qGqGbar( 4900006, 4916, spinFv,
2766 "q qbar -> Tv Tvbar");
2767 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2769 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2DvDvbar")) {
2770 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900001, 4921, spinFv,
2771 "f fbar -> Dv Dvbar");
2772 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2774 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2UvUvbar")) {
2775 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900002, 4922, spinFv,
2776 "f fbar -> Uv Uvbar");
2777 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2779 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2SvSvbar")) {
2780 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900003, 4923, spinFv,
2781 "f fbar -> Sv Svbar");
2782 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2784 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2CvCvbar")) {
2785 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900004, 4924, spinFv,
2786 "f fbar -> Cv Cvbar");
2787 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2789 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2BvBvbar")) {
2790 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900005, 4925, spinFv,
2791 "f fbar -> Bv Bvbar");
2792 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2794 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2TvTvbar")) {
2795 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900006, 4926, spinFv,
2796 "f fbar -> Tv Tvbar");
2797 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2799 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2EvEvbar")) {
2800 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900011, 4931, spinFv,
2801 "f fbar -> Ev Evbar");
2802 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2804 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2nuEvnuEvbar")) {
2805 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900012, 4932, spinFv,
2806 "f fbar -> nuEv nuEvbar");
2807 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2809 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2MUvMUvbar")) {
2810 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900013, 4933, spinFv,
2811 "f fbar -> MUv MUvbar");
2812 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2814 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2nuMUvnuMUvbar")) {
2815 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900014, 4934, spinFv,
2816 "f fbar -> nuMUv nuMUvbar");
2817 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2819 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2TAUvTAUvbar")) {
2820 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900015, 4935, spinFv,
2821 "f fbar -> TAUv TAUvbar");
2822 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2824 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2nuTAUvnuTAUvbar")) {
2825 sigmaPtr =
new Sigma2ffbar2fGfGbar( 4900016, 4936, spinFv,
2826 "f fbar -> nuTAUv nuTAUvbar");
2827 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2829 if (hiddenvalleys || settings.flag(
"HiddenValley:ffbar2Zv")) {
2830 sigmaPtr =
new Sigma1ffbar2Zv();
2831 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2835 bool extraDimGstars = settings.flag(
"ExtraDimensionsG*:all");
2836 if (extraDimGstars || settings.flag(
"ExtraDimensionsG*:gg2G*")) {
2837 sigmaPtr =
new Sigma1gg2GravitonStar;
2838 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2840 if (extraDimGstars || settings.flag(
"ExtraDimensionsG*:ffbar2G*")) {
2841 sigmaPtr =
new Sigma1ffbar2GravitonStar;
2842 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2844 if (settings.flag(
"ExtraDimensionsG*:gg2G*g")) {
2845 sigmaPtr =
new Sigma2gg2GravitonStarg;
2846 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2848 if (settings.flag(
"ExtraDimensionsG*:qg2G*q")) {
2849 sigmaPtr =
new Sigma2qg2GravitonStarq;
2850 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2852 if (settings.flag(
"ExtraDimensionsG*:qqbar2G*g")) {
2853 sigmaPtr =
new Sigma2qqbar2GravitonStarg;
2854 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2858 if (settings.flag(
"ExtraDimensionsG*:qqbar2KKgluon*")) {
2859 sigmaPtr =
new Sigma1qqbar2KKgluonStar;
2860 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2864 if (settings.flag(
"ExtraDimensionsTEV:ffbar2ddbar")) {
2865 sigmaPtr =
new Sigma2ffbar2TEVffbar(1, 5061);
2866 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2868 if (settings.flag(
"ExtraDimensionsTEV:ffbar2uubar")) {
2869 sigmaPtr =
new Sigma2ffbar2TEVffbar(2, 5062);
2870 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2872 if (settings.flag(
"ExtraDimensionsTEV:ffbar2ssbar")) {
2873 sigmaPtr =
new Sigma2ffbar2TEVffbar(3, 5063);
2874 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2876 if (settings.flag(
"ExtraDimensionsTEV:ffbar2ccbar")) {
2877 sigmaPtr =
new Sigma2ffbar2TEVffbar(4, 5064);
2878 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2880 if (settings.flag(
"ExtraDimensionsTEV:ffbar2bbbar")) {
2881 sigmaPtr =
new Sigma2ffbar2TEVffbar(5, 5065);
2882 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2884 if (settings.flag(
"ExtraDimensionsTEV:ffbar2ttbar")) {
2885 sigmaPtr =
new Sigma2ffbar2TEVffbar(6, 5066);
2886 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2888 if (settings.flag(
"ExtraDimensionsTEV:ffbar2e+e-")) {
2889 sigmaPtr =
new Sigma2ffbar2TEVffbar(11, 5071);
2890 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2892 if (settings.flag(
"ExtraDimensionsTEV:ffbar2nuenuebar")) {
2893 sigmaPtr =
new Sigma2ffbar2TEVffbar(12, 5072);
2894 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2896 if (settings.flag(
"ExtraDimensionsTEV:ffbar2mu+mu-")) {
2897 sigmaPtr =
new Sigma2ffbar2TEVffbar(13, 5073);
2898 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2900 if (settings.flag(
"ExtraDimensionsTEV:ffbar2numunumubar")) {
2901 sigmaPtr =
new Sigma2ffbar2TEVffbar(14, 5074);
2902 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2904 if (settings.flag(
"ExtraDimensionsTEV:ffbar2tau+tau-")) {
2905 sigmaPtr =
new Sigma2ffbar2TEVffbar(15, 5075);
2906 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2908 if (settings.flag(
"ExtraDimensionsTEV:ffbar2nutaunutaubar")) {
2909 sigmaPtr =
new Sigma2ffbar2TEVffbar(16, 5076);
2910 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2914 bool extraDimLEDmono = settings.flag(
"ExtraDimensionsLED:monojet");
2915 if (extraDimLEDmono || settings.flag(
"ExtraDimensionsLED:gg2Gg")) {
2916 sigmaPtr =
new Sigma2gg2LEDUnparticleg(
true );
2917 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2919 if (extraDimLEDmono || settings.flag(
"ExtraDimensionsLED:qg2Gq")) {
2920 sigmaPtr =
new Sigma2qg2LEDUnparticleq(
true );
2921 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2923 if (extraDimLEDmono || settings.flag(
"ExtraDimensionsLED:qqbar2Gg")) {
2924 sigmaPtr =
new Sigma2qqbar2LEDUnparticleg(
true );
2925 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2927 if (settings.flag(
"ExtraDimensionsLED:ffbar2GZ")) {
2928 sigmaPtr =
new Sigma2ffbar2LEDUnparticleZ(
true );
2929 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2931 if (settings.flag(
"ExtraDimensionsLED:ffbar2Ggamma")) {
2932 sigmaPtr =
new Sigma2ffbar2LEDUnparticlegamma(
true );
2933 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2935 if (settings.flag(
"ExtraDimensionsLED:ffbar2gammagamma")) {
2936 sigmaPtr =
new Sigma2ffbar2LEDgammagamma(
true );
2937 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2939 if (settings.flag(
"ExtraDimensionsLED:gg2gammagamma")) {
2940 sigmaPtr =
new Sigma2gg2LEDgammagamma(
true );
2941 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2943 if (settings.flag(
"ExtraDimensionsLED:ffbar2llbar")) {
2944 sigmaPtr =
new Sigma2ffbar2LEDllbar(
true );
2945 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2947 if (settings.flag(
"ExtraDimensionsLED:gg2llbar")) {
2948 sigmaPtr =
new Sigma2gg2LEDllbar(
true );
2949 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2951 bool extraDimLEDdij = settings.flag(
"ExtraDimensionsLED:dijets");
2952 if (extraDimLEDdij || settings.flag(
"ExtraDimensionsLED:gg2DJgg")) {
2953 sigmaPtr =
new Sigma2gg2LEDgg;
2954 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2956 if (extraDimLEDdij || settings.flag(
"ExtraDimensionsLED:gg2DJqqbar")) {
2957 sigmaPtr =
new Sigma2gg2LEDqqbar;
2958 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2960 if (extraDimLEDdij || settings.flag(
"ExtraDimensionsLED:qg2DJqg")) {
2961 sigmaPtr =
new Sigma2qg2LEDqg;
2962 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2964 if (extraDimLEDdij || settings.flag(
"ExtraDimensionsLED:qq2DJqq")) {
2965 sigmaPtr =
new Sigma2qq2LEDqq;
2966 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2968 if (extraDimLEDdij || settings.flag(
"ExtraDimensionsLED:qqbar2DJgg")) {
2969 sigmaPtr =
new Sigma2qqbar2LEDgg;
2970 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2972 if (extraDimLEDdij || settings.flag(
"ExtraDimensionsLED:qqbar2DJqqbarNew")) {
2973 sigmaPtr =
new Sigma2qqbar2LEDqqbarNew;
2974 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2978 bool extraDimUnpartmono = settings.flag(
"ExtraDimensionsUnpart:monojet");
2979 if (extraDimUnpartmono || settings.flag(
"ExtraDimensionsUnpart:gg2Ug")) {
2980 sigmaPtr =
new Sigma2gg2LEDUnparticleg(
false );
2981 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2983 if (extraDimUnpartmono || settings.flag(
"ExtraDimensionsUnpart:qg2Uq")) {
2984 sigmaPtr =
new Sigma2qg2LEDUnparticleq(
false );
2985 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2987 if (extraDimUnpartmono || settings.flag(
"ExtraDimensionsUnpart:qqbar2Ug")) {
2988 sigmaPtr =
new Sigma2qqbar2LEDUnparticleg(
false );
2989 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2991 if (settings.flag(
"ExtraDimensionsUnpart:ffbar2UZ")) {
2992 sigmaPtr =
new Sigma2ffbar2LEDUnparticleZ(
false );
2993 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2995 if (settings.flag(
"ExtraDimensionsUnpart:ffbar2Ugamma")) {
2996 sigmaPtr =
new Sigma2ffbar2LEDUnparticlegamma(
false );
2997 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
2999 if (settings.flag(
"ExtraDimensionsUnpart:ffbar2gammagamma")) {
3000 sigmaPtr =
new Sigma2ffbar2LEDgammagamma(
false );
3001 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3003 if (settings.flag(
"ExtraDimensionsUnpart:gg2gammagamma")) {
3004 sigmaPtr =
new Sigma2gg2LEDgammagamma(
false );
3005 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3007 if (settings.flag(
"ExtraDimensionsUnpart:ffbar2llbar")) {
3008 sigmaPtr =
new Sigma2ffbar2LEDllbar(
false );
3009 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3011 if (settings.flag(
"ExtraDimensionsUnpart:gg2llbar")) {
3012 sigmaPtr =
new Sigma2gg2LEDllbar(
false );
3013 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3017 if (settings.flag(
"DM:ffbar2Zp2XX")) {
3018 sigmaPtr =
new Sigma1ffbar2Zp2XX();
3019 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3021 if (settings.flag(
"DM:ffbar2Zp2XXj")) {
3022 sigmaPtr =
new Sigma2qqbar2Zpg2XXj();
3023 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3025 if (settings.flag(
"DM:ffbar2ZpH")) {
3026 sigmaPtr =
new Sigma2ffbar2ZpH();
3027 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3029 if (settings.flag(
"DM:gg2S2XX")) {
3030 sigmaPtr =
new Sigma1gg2S2XX();
3031 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3033 if (settings.flag(
"DM:gg2S2XXj")) {
3034 sigmaPtr =
new Sigma2gg2Sg2XXj();
3035 containerPtrs.push_back(
new ProcessContainer(sigmaPtr) );
3047 bool SetupContainers::init2(vector<ProcessContainer*>& container2Ptrs,
3048 Settings& settings) {
3051 if (container2Ptrs.size() > 0) {
3052 for (
int i = 0; i < int(container2Ptrs.size()); ++i)
3053 delete container2Ptrs[i];
3054 container2Ptrs.clear();
3056 SigmaProcess* sigmaPtr;
3059 if (settings.flag(
"SecondHard:TwoJets")) {
3060 sigmaPtr =
new Sigma2gg2gg;
3061 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3062 sigmaPtr =
new Sigma2gg2qqbar;
3063 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3064 sigmaPtr =
new Sigma2qg2qg;
3065 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3066 sigmaPtr =
new Sigma2qq2qq;
3067 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3068 sigmaPtr =
new Sigma2qqbar2gg;
3069 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3070 sigmaPtr =
new Sigma2qqbar2qqbarNew;
3071 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3072 sigmaPtr =
new Sigma2gg2QQbar(4, 121);
3073 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3074 sigmaPtr =
new Sigma2qqbar2QQbar(4, 122);
3075 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3076 sigmaPtr =
new Sigma2gg2QQbar(5, 123);
3077 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3078 sigmaPtr =
new Sigma2qqbar2QQbar(5, 124);
3079 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3083 if (settings.flag(
"SecondHard:PhotonAndJet")) {
3084 sigmaPtr =
new Sigma2qg2qgamma;
3085 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3086 sigmaPtr =
new Sigma2qqbar2ggamma;
3087 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3088 sigmaPtr =
new Sigma2gg2ggamma;
3089 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3093 if (settings.flag(
"SecondHard:TwoPhotons")) {
3094 sigmaPtr =
new Sigma2ffbar2gammagamma;
3095 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3096 sigmaPtr =
new Sigma2gg2gammagamma;
3097 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3101 if (settings.flag(
"SecondHard:Charmonium")) {
3102 vector<SigmaProcess*> charmoniumSigmaPtrs;
3103 charmonium.setupSigma2gg(charmoniumSigmaPtrs,
true);
3104 charmonium.setupSigma2qg(charmoniumSigmaPtrs,
true);
3105 charmonium.setupSigma2qq(charmoniumSigmaPtrs,
true);
3106 for (
unsigned int i = 0; i < charmoniumSigmaPtrs.size(); ++i)
3107 container2Ptrs.push_back(
new ProcessContainer(charmoniumSigmaPtrs[i]));
3111 if (settings.flag(
"SecondHard:Bottomonium")) {
3112 vector<SigmaProcess*> bottomoniumSigmaPtrs;
3113 bottomonium.setupSigma2gg(bottomoniumSigmaPtrs,
true);
3114 bottomonium.setupSigma2qg(bottomoniumSigmaPtrs,
true);
3115 bottomonium.setupSigma2qq(bottomoniumSigmaPtrs,
true);
3116 for (
unsigned int i = 0; i < bottomoniumSigmaPtrs.size(); ++i)
3117 container2Ptrs.push_back(
new ProcessContainer(bottomoniumSigmaPtrs[i]));
3121 if (settings.flag(
"SecondHard:SingleGmZ")) {
3122 sigmaPtr =
new Sigma1ffbar2gmZ;
3123 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3127 if (settings.flag(
"SecondHard:SingleW")) {
3128 sigmaPtr =
new Sigma1ffbar2W;
3129 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3133 if (settings.flag(
"SecondHard:GmZAndJet")) {
3134 sigmaPtr =
new Sigma2qqbar2gmZg;
3135 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3136 sigmaPtr =
new Sigma2qg2gmZq;
3137 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3141 if (settings.flag(
"SecondHard:WAndJet")) {
3142 sigmaPtr =
new Sigma2qqbar2Wg;
3143 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3144 sigmaPtr =
new Sigma2qg2Wq;
3145 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3149 if (settings.flag(
"SecondHard:TopPair")) {
3150 sigmaPtr =
new Sigma2gg2QQbar(6, 601);
3151 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3152 sigmaPtr =
new Sigma2qqbar2QQbar(6, 602);
3153 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3154 sigmaPtr =
new Sigma2ffbar2FFbarsgmZ(6, 604);
3155 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3159 if (settings.flag(
"SecondHard:SingleTop")) {
3160 sigmaPtr =
new Sigma2qq2QqtW(6, 603);
3161 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3162 sigmaPtr =
new Sigma2ffbar2FfbarsW(6, 0, 605);
3163 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3167 if (settings.flag(
"SecondHard:TwoBJets")) {
3168 sigmaPtr =
new Sigma2gg2QQbar(5, 123);
3169 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3170 sigmaPtr =
new Sigma2qqbar2QQbar(5, 124);
3171 container2Ptrs.push_back(
new ProcessContainer(sigmaPtr) );
3183 void SetupContainers::setupIdVecs( Settings& settings) {
3187 if (settings.mode(
"SUSY:idA") != 0) {
3188 idVecA.push_back( abs(settings.mode(
"SUSY:idA")) );
3190 vector<int> idTmpA = settings.mvec(
"SUSY:idVecA");
3191 for (
int i = 0; i < int(idTmpA.size()); ++i)
3192 if (idTmpA[i] != 0) idVecA.push_back( abs(idTmpA[i]) );
3194 nVecA = idVecA.size();
3198 if (settings.mode(
"SUSY:idB") != 0) {
3199 idVecB.push_back( abs(settings.mode(
"SUSY:idB")) );
3201 vector<int> idTmpB = settings.mvec(
"SUSY:idVecB");
3202 for (
int i = 0; i < int(idTmpB.size()); ++i)
3203 if (idTmpB[i] != 0) idVecB.push_back( abs(idTmpB[i]) );
3205 nVecB = idVecB.size();
3214 bool SetupContainers::allowIdVals(
int idCheck1,
int idCheck2) {
3217 if (nVecA == 0 && nVecB == 0)
return true;
3218 if (idCheck1 == 0 && idCheck2 == 0)
return true;
3219 int idChk1 = abs(idCheck1);
3220 int idChk2 = abs(idCheck2);
3223 if (idChk1 == 0) swap(idChk1, idChk2);
3225 for (
int i = 0; i < nVecA; ++i)
if (idChk1 == idVecA[i])
return true;
3226 for (
int i = 0; i < nVecB; ++i)
if (idChk1 == idVecB[i])
return true;
3232 for (
int i = 0; i < nVecA; ++i)
3233 if (idChk1 == idVecA[i] || idChk2 == idVecA[i])
return true;
3239 for (
int i = 0; i < nVecB; ++i)
3240 if (idChk1 == idVecB[i] || idChk2 == idVecB[i])
return true;
3245 for (
int i = 0; i < nVecA; ++i)
3246 for (
int j = 0; j < nVecB; ++j)
3247 if ( (idChk1 == idVecA[i] && idChk2 == idVecB[j])
3248 || (idChk2 == idVecA[i] && idChk1 == idVecB[j]) )
return true;