24 #ifndef Pythia8_SigmaProcess_H
25 #define Pythia8_SigmaProcess_H
28 #include "BeamParticle.h"
31 #include "LesHouches.h"
32 #include "ParticleData.h"
33 #include "PartonDistributions.h"
34 #include "PythiaComplex.h"
35 #include "PythiaStdlib.h"
36 #include "ResonanceWidths.h"
38 #include "SigmaTotal.h"
39 #include "StandardModel.h"
40 #include "SusyLesHouches.h"
53 InBeam(
int idIn = 0) : id(idIn), pdf(0.) {}
70 InPair(
int idAIn = 0,
int idBIn = 0) : idA(idAIn), idB(idBIn),
71 pdfA(0.), pdfB(0.), pdfSigma(0.) {}
75 double pdfA, pdfB, pdfSigma;
97 void setLHAPtr(
LHAup* lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;}
100 virtual void initProc() {}
103 virtual bool initFlux();
107 virtual void set1Kin(
double ,
double ,
double ) {}
111 virtual void set2Kin(
double ,
double ,
double ,
double ,
double ,
112 double,
double,
double ) {}
117 virtual void set2KinMPI(
double ,
double ,
double ,
double ,
118 double ,
double ,
double ,
bool ,
double ,
double ) {}
123 virtual void set3Kin(
double ,
double ,
double ,
Vec4 ,
Vec4 ,
Vec4 ,
124 double ,
double ,
double ,
double ,
double ,
double ) {}
127 virtual void sigmaKin() {}
132 virtual double sigmaHat() {
return 0.;}
137 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0) {
138 id1 = id1in; id2 = id2in;
139 return ( convert2mb() ? CONVERT2MB * sigmaHat() : sigmaHat() ); }
142 virtual double sigmaPDF();
145 void pickInState(
int id1in = 0,
int id2in = 0);
148 virtual void setIdColAcol() {}
151 virtual bool final2KinMPI(
int = 0,
int = 0,
Vec4 = 0.,
Vec4 = 0.,
152 double = 0.,
double = 0.) {
return true;}
156 virtual double weightDecayFlav(
Event&) {
return 1.;}
161 virtual double weightDecay(
Event&,
int,
int) {
return 1.;}
164 virtual void setScale() {}
167 virtual string name()
const {
return "unnamed process";}
168 virtual int code()
const {
return 0;}
169 virtual int nFinal()
const {
return 2;}
172 virtual string inFlux()
const {
return "unknown";}
175 virtual bool convert2mb()
const {
return true;}
178 virtual bool convertM2()
const {
return false;}
181 virtual bool isLHA()
const {
return false;}
184 virtual bool isMinBias()
const {
return false;}
185 virtual bool isResolved()
const {
return true;}
186 virtual bool isDiffA()
const {
return false;}
187 virtual bool isDiffB()
const {
return false;}
190 virtual bool isSUSY()
const {
return false;}
193 virtual bool allowNegativeSigma()
const {
return false;}
198 virtual int id3Mass()
const {
return 0;}
199 virtual int id4Mass()
const {
return 0;}
200 virtual int id5Mass()
const {
return 0;}
203 virtual int resonanceA()
const {
return 0;}
204 virtual int resonanceB()
const {
return 0;}
207 virtual bool isSChannel()
const {
return false;}
210 virtual int idSChannel()
const {
return 0;}
213 virtual bool isQCD3body()
const {
return false;}
216 virtual int idTchan1()
const {
return 0;}
217 virtual int idTchan2()
const {
return 0;}
218 virtual double tChanFracPow1()
const {
return 0.3;}
219 virtual double tChanFracPow2()
const {
return 0.3;}
220 virtual bool useMirrorWeight()
const {
return false;}
223 virtual int gmZmode()
const {
return -1;}
226 bool swappedTU()
const {
return swapTU;}
229 int id(
int i)
const {
return idSave[i];}
230 int col(
int i)
const {
return colSave[i];}
231 int acol(
int i)
const {
return acolSave[i];}
232 double m(
int i)
const {
return mSave[i];}
233 Particle getParton(
int i)
const {
return parton[i];}
236 double Q2Ren()
const {
return Q2RenSave;}
237 double alphaEMRen()
const {
return alpEM;}
238 double alphaSRen()
const {
return alpS;}
239 double Q2Fac()
const {
return Q2FacSave;}
240 double pdf1()
const {
return pdf1Save;}
241 double pdf2()
const {
return pdf2Save;}
244 double thetaMPI()
const {
return atan2( sinTheta, cosTheta);}
245 double phiMPI()
const {
return phi;}
246 double sHBetaMPI()
const {
return sHBeta;}
247 double pT2MPI()
const {
return pT2Mass;}
248 double pTMPIFin()
const {
return pTFin;}
252 for (
int i = 0; i < 6; i++) { partonT[i] = parton[i];
253 mSaveT[i] = mSave[i]; }
254 pTFinT = pTFin; phiT = phi; cosThetaT = cosTheta; sinThetaT = sinTheta; }
256 for (
int i = 0; i < 6; i++) { parton[i] = partonT[i];
257 mSave[i] = mSaveT[i]; }
258 pTFin = pTFinT; cosTheta = cosThetaT; sinTheta = sinThetaT; phi = phiT;
261 for (
int i = 0; i < 6; i++) { swap(parton[i], partonT[i]);
262 swap(mSave[i], mSaveT[i]); }
263 swap(pTFin, pTFinT); swap(cosTheta, cosThetaT);
264 swap(sinTheta, sinThetaT); swap(phi, phiT); }
269 SigmaProcess() {
for (
int i = 0; i < 6; ++i) mSave[i] = 0.;}
272 static const double CONVERT2MB, MASSMARGIN, COMPRELERR;
273 static const int NCOMPSTEP;
304 int nQuarkIn, renormScale1, renormScale2, renormScale3, renormScale3VV,
305 factorScale1, factorScale2, factorScale3, factorScale3VV;
306 double Kfactor, mcME, mbME, mmuME, mtauME, renormMultFac, renormFixScale,
307 factorMultFac, factorFixScale;
310 int higgsH1parity, higgsH2parity, higgsA3parity;
311 double higgsH1eta, higgsH2eta, higgsA3eta;
316 bool isLeptonA, isLeptonB, hasLeptonBeams;
319 vector<InBeam> inBeamA;
320 vector<InBeam> inBeamB;
321 void addBeamA(
int idIn) {inBeamA.push_back(
InBeam(idIn));}
322 void addBeamB(
int idIn) {inBeamB.push_back(
InBeam(idIn));}
323 int sizeBeamA()
const {
return inBeamA.size();}
324 int sizeBeamB()
const {
return inBeamB.size();}
327 vector<InPair> inPair;
328 void addPair(
int idAIn,
int idBIn) {
329 inPair.push_back(
InPair(idAIn, idBIn));}
330 int sizePair()
const {
return inPair.size();}
336 double Q2RenSave, alpEM, alpS, Q2FacSave, x1Save, x2Save, pdf1Save,
337 pdf2Save, sigmaSumSave;
340 int id1, id2, id3, id4, id5;
341 int idSave[6], colSave[6], acolSave[6];
342 double mSave[6], cosTheta, sinTheta, phi, sHMass, sHBeta, pT2Mass, pTFin;
348 double mSaveT[6], pTFinT, cosThetaT, sinThetaT, phiT;
352 virtual bool setupForME() {
return true;}
361 void setId(
int id1in = 0,
int id2in = 0,
int id3in = 0,
int id4in = 0,
362 int id5in = 0) {idSave[1] = id1in; idSave[2] = id2in; idSave[3] = id3in;
363 idSave[4] = id4in; idSave[5] = id5in;}
364 void setColAcol(
int col1 = 0,
int acol1 = 0,
365 int col2 = 0,
int acol2 = 0,
int col3 = 0,
int acol3 = 0,
366 int col4 = 0,
int acol4 = 0,
int col5 = 0,
int acol5 = 0) {
367 colSave[1] = col1; acolSave[1] = acol1; colSave[2] = col2;
368 acolSave[2] = acol2; colSave[3] = col3; acolSave[3] = acol3;
369 colSave[4] = col4; acolSave[4] = acol4; colSave[5] = col5;
370 acolSave[5] = acol5; }
371 void swapColAcol() { swap(colSave[1], acolSave[1]);
372 swap(colSave[2], acolSave[2]); swap(colSave[3], acolSave[3]);
373 swap(colSave[4], acolSave[4]); swap(colSave[5], acolSave[5]);}
374 void swapCol1234() { swap(colSave[1], colSave[2]);
375 swap(colSave[3], colSave[4]); swap(acolSave[1], acolSave[2]);
376 swap(acolSave[3], acolSave[4]);}
377 void swapCol12() { swap(colSave[1], colSave[2]);
378 swap(acolSave[1], acolSave[2]);}
379 void swapCol34() { swap(colSave[3], colSave[4]);
380 swap(acolSave[3], acolSave[4]);}
383 double weightTopDecay(
Event& process,
int iResBeg,
int iResEnd);
384 double weightHiggsDecay(
Event& process,
int iResBeg,
int iResEnd);
401 virtual int nFinal()
const {
return 2;};
404 virtual bool initFlux() {
return true;}
407 virtual double sigmaHat() {
return 0.;}
410 virtual double sigmaPDF() {
return sigmaHat();}
413 virtual bool convert2mb()
const {
return false;}
435 virtual int nFinal()
const {
return 1;};
438 virtual void set1Kin(
double x1in,
double x2in,
double sHin) {
439 store1Kin( x1in, x2in, sHin); sigmaKin();}
442 virtual double sigmaHat() {
return 0.;}
447 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0);
455 virtual void store1Kin(
double x1in,
double x2in,
double sHin);
458 virtual bool setupForME();
475 virtual int nFinal()
const {
return 2;};
478 virtual void set2Kin(
double x1in,
double x2in,
double sHin,
479 double tHin,
double m3in,
double m4in,
double runBW3in,
480 double runBW4in) { store2Kin( x1in, x2in, sHin, tHin, m3in, m4in,
481 runBW3in, runBW4in); sigmaKin();}
484 virtual void set2KinMPI(
double x1in,
double x2in,
double sHin,
485 double tHin,
double uHin,
double alpSin,
double alpEMin,
486 bool needMasses,
double m3in,
double m4in) {
487 store2KinMPI( x1in, x2in, sHin, tHin, uHin, alpSin, alpEMin,
488 needMasses, m3in, m4in); sigmaKin();}
491 virtual double sigmaHat() {
return 0.;}
496 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0) {
497 id1 = id1in; id2 = id2in;
double sigmaTmp = sigmaHat();
498 if (convertM2()) sigmaTmp /= 16. * M_PI * sH2;
499 if (convert2mb()) sigmaTmp *= CONVERT2MB;
return sigmaTmp;}
502 virtual bool final2KinMPI(
int i1Res = 0,
int i2Res = 0,
Vec4 p1Res = 0.,
503 Vec4 p2Res = 0.,
double m1Res = 0.,
double m2Res = 0.);
511 virtual void store2Kin(
double x1in,
double x2in,
double sHin,
512 double tHin,
double m3in,
double m4in,
double runBW3in,
514 virtual void store2KinMPI(
double x1in,
double x2in,
double sHin,
515 double tHin,
double uHin,
double alpSin,
double alpEMin,
516 bool needMasses,
double m3in,
double m4in);
519 virtual bool setupForME();
522 double tH, uH, tH2, uH2, m3, s3, m4, s4, pT2, runBW3, runBW4;
539 virtual int nFinal()
const {
return 3;};
542 virtual void set3Kin(
double x1in,
double x2in,
double sHin,
543 Vec4 p3cmIn,
Vec4 p4cmIn,
Vec4 p5cmIn,
double m3in,
double m4in,
544 double m5in,
double runBW3in,
double runBW4in,
double runBW5in) {
545 store3Kin( x1in, x2in, sHin, p3cmIn, p4cmIn, p5cmIn, m3in, m4in, m5in,
546 runBW3in, runBW4in, runBW5in); sigmaKin();}
549 virtual double sigmaHat() {
return 0.;}
557 virtual void store3Kin(
double x1in,
double x2in,
double sHin,
558 Vec4 p3cmIn,
Vec4 p4cmIn,
Vec4 p5cmIn,
double m3in,
double m4in,
559 double m5in,
double runBW3in,
double runBW4in,
double runBW5in);
562 virtual bool setupForME();
565 double m3, s3, m4, s4, m5, s5, runBW3, runBW4, runBW5;
566 Vec4 p3cm, p4cm, p5cm;
586 virtual bool initFlux() {
return true;}
589 virtual double sigmaPDF() {
return 1.;}
592 virtual void setScale();
595 virtual string name()
const {
return "Les Houches User Process(es)";}
596 virtual int code()
const {
return 9999;}
599 virtual int nFinal()
const;
602 virtual bool convert2mb()
const {
return false;}
605 virtual bool isLHA()
const {
return true;}
608 virtual bool allowNegativeSigma()
const {
609 return (lhaUpPtr->strategy() < 0);}
619 #endif // Pythia8_SigmaProcess_H