24 #ifndef Pythia8_SigmaProcess_H
25 #define Pythia8_SigmaProcess_H
27 #include "Pythia8/Basics.h"
28 #include "Pythia8/BeamParticle.h"
29 #include "Pythia8/Event.h"
30 #include "Pythia8/Info.h"
31 #include "Pythia8/LesHouches.h"
32 #include "Pythia8/ParticleData.h"
33 #include "Pythia8/PartonDistributions.h"
34 #include "Pythia8/PythiaComplex.h"
35 #include "Pythia8/PythiaStdlib.h"
36 #include "Pythia8/ResonanceWidths.h"
37 #include "Pythia8/Settings.h"
38 #include "Pythia8/SigmaTotal.h"
39 #include "Pythia8/StandardModel.h"
40 #include "Pythia8/SLHAinterface.h"
41 #include "Pythia8/SusyLesHouches.h"
54 InBeam(
int idIn = 0) : id(idIn), pdf(0.) {}
71 InPair(
int idAIn = 0,
int idBIn = 0) : idA(idAIn), idB(idBIn),
72 pdfA(0.), pdfB(0.), pdfSigma(0.) {}
76 double pdfA, pdfB, pdfSigma;
89 virtual ~SigmaProcess() {}
92 void init(Info* infoPtrIn, Settings* settingsPtrIn,
93 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
94 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn, Couplings* couplings,
95 SigmaTotal* sigmaTotPtrIn = 0, SLHAinterface* slhaInterfacePtrIn = 0);
98 void setLHAPtr( LHAup* lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;}
101 virtual void initProc() {}
104 virtual bool initFlux();
108 virtual void set1Kin(
double ,
double ,
double ) {}
112 virtual void set2Kin(
double ,
double ,
double ,
double ,
double ,
113 double,
double,
double ) {}
118 virtual void set2KinMPI(
double ,
double ,
double ,
double ,
119 double ,
double ,
double ,
bool ,
double ,
double ) {}
124 virtual void set3Kin(
double ,
double ,
double , Vec4 , Vec4 , Vec4 ,
125 double ,
double ,
double ,
double ,
double ,
double ) {}
128 virtual void sigmaKin() {}
133 virtual double sigmaHat() {
return 0.;}
138 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0) {
139 id1 = id1in; id2 = id2in;
140 return ( convert2mb() ? CONVERT2MB * sigmaHat() : sigmaHat() ); }
143 virtual double sigmaPDF();
146 void pickInState(
int id1in = 0,
int id2in = 0);
149 virtual void setIdColAcol() {}
152 virtual bool final2KinMPI(
int = 0,
int = 0, Vec4 = 0., Vec4 = 0.,
153 double = 0.,
double = 0.) {
return true;}
157 virtual double weightDecayFlav(
Event&) {
return 1.;}
162 virtual double weightDecay(
Event&,
int,
int) {
return 1.;}
165 virtual void setScale() {}
168 virtual string name()
const {
return "unnamed process";}
169 virtual int code()
const {
return 0;}
170 virtual int nFinal()
const {
return 2;}
173 virtual string inFlux()
const {
return "unknown";}
176 virtual bool convert2mb()
const {
return true;}
179 virtual bool convertM2()
const {
return false;}
182 virtual bool isLHA()
const {
return false;}
185 virtual bool isNonDiff()
const {
return false;}
186 virtual bool isResolved()
const {
return true;}
187 virtual bool isDiffA()
const {
return false;}
188 virtual bool isDiffB()
const {
return false;}
189 virtual bool isDiffC()
const {
return false;}
192 virtual bool isSUSY()
const {
return false;}
195 virtual bool allowNegativeSigma()
const {
return false;}
200 virtual int id3Mass()
const {
return 0;}
201 virtual int id4Mass()
const {
return 0;}
202 virtual int id5Mass()
const {
return 0;}
205 virtual int resonanceA()
const {
return 0;}
206 virtual int resonanceB()
const {
return 0;}
209 virtual bool isSChannel()
const {
return false;}
212 virtual int idSChannel()
const {
return 0;}
215 virtual bool isQCD3body()
const {
return false;}
218 virtual int idTchan1()
const {
return 0;}
219 virtual int idTchan2()
const {
return 0;}
220 virtual double tChanFracPow1()
const {
return 0.3;}
221 virtual double tChanFracPow2()
const {
return 0.3;}
222 virtual bool useMirrorWeight()
const {
return false;}
225 virtual int gmZmode()
const {
return -1;}
228 bool swappedTU()
const {
return swapTU;}
231 int id(
int i)
const {
return idSave[i];}
232 int col(
int i)
const {
return colSave[i];}
233 int acol(
int i)
const {
return acolSave[i];}
234 double m(
int i)
const {
return mSave[i];}
235 Particle getParton(
int i)
const {
return parton[i];}
239 double Q2Ren()
const {
return Q2RenSave;}
240 double alphaEMRen()
const {
return alpEM;}
241 double alphaSRen()
const {
return alpS;}
242 double Q2Fac()
const {
return Q2FacSave;}
243 double pdf1()
const {
return pdf1Save;}
244 double pdf2()
const {
return pdf2Save;}
247 double thetaMPI()
const {
return atan2( sinTheta, cosTheta);}
248 double phiMPI()
const {
return phi;}
249 double sHBetaMPI()
const {
return sHBeta;}
250 double pT2MPI()
const {
return pT2Mass;}
251 double pTMPIFin()
const {
return pTFin;}
255 for (
int i = 0; i < 6; i++) { partonT[i] = parton[i];
256 mSaveT[i] = mSave[i]; }
257 pTFinT = pTFin; phiT = phi; cosThetaT = cosTheta; sinThetaT = sinTheta; }
259 for (
int i = 0; i < 6; i++) { parton[i] = partonT[i];
260 mSave[i] = mSaveT[i]; }
261 pTFin = pTFinT; cosTheta = cosThetaT; sinTheta = sinThetaT; phi = phiT;
264 for (
int i = 0; i < 6; i++) { swap(parton[i], partonT[i]);
265 swap(mSave[i], mSaveT[i]); }
266 swap(pTFin, pTFinT); swap(cosTheta, cosThetaT);
267 swap(sinTheta, sinThetaT); swap(phi, phiT); }
272 SigmaProcess() : infoPtr(0), settingsPtr(0), particleDataPtr(0),
273 rndmPtr(0), beamAPtr(0), beamBPtr(0), couplingsPtr(0), sigmaTotPtr(0),
274 slhaPtr(0), lhaUpPtr(0) {
for (
int i = 0; i < 6; ++i) mSave[i] = 0.;
275 Q2RenSave = alpEM = alpS = Q2FacSave = pdf1Save = pdf2Save = 0.; }
278 static const double CONVERT2MB, MASSMARGIN, COMPRELERR;
279 static const int NCOMPSTEP;
285 Settings* settingsPtr;
288 ParticleData* particleDataPtr;
294 BeamParticle* beamAPtr;
295 BeamParticle* beamBPtr;
298 Couplings* couplingsPtr;
301 SigmaTotal* sigmaTotPtr;
304 SusyLesHouches* slhaPtr;
310 int nQuarkIn, renormScale1, renormScale2, renormScale3, renormScale3VV,
311 factorScale1, factorScale2, factorScale3, factorScale3VV;
312 double Kfactor, mcME, mbME, mmuME, mtauME, renormMultFac, renormFixScale,
313 factorMultFac, factorFixScale;
316 int higgsH1parity, higgsH2parity, higgsA3parity;
317 double higgsH1eta, higgsH2eta, higgsA3eta;
322 bool isLeptonA, isLeptonB, hasLeptonBeams;
325 vector<InBeam> inBeamA;
326 vector<InBeam> inBeamB;
327 void addBeamA(
int idIn) {inBeamA.push_back(InBeam(idIn));}
328 void addBeamB(
int idIn) {inBeamB.push_back(InBeam(idIn));}
329 int sizeBeamA()
const {
return inBeamA.size();}
330 int sizeBeamB()
const {
return inBeamB.size();}
333 vector<InPair> inPair;
334 void addPair(
int idAIn,
int idBIn) {
335 inPair.push_back(InPair(idAIn, idBIn));}
336 int sizePair()
const {
return inPair.size();}
342 double Q2RenSave, alpEM, alpS, Q2FacSave, x1Save, x2Save, pdf1Save,
343 pdf2Save, sigmaSumSave;
346 int id1, id2, id3, id4, id5;
347 int idSave[6], colSave[6], acolSave[6];
348 double mSave[6], cosTheta, sinTheta, phi, sHMass, sHBeta, pT2Mass, pTFin;
354 double mSaveT[6], pTFinT, cosThetaT, sinThetaT, phiT;
358 virtual bool setupForME() {
return true;}
367 void setId(
int id1in = 0,
int id2in = 0,
int id3in = 0,
int id4in = 0,
368 int id5in = 0) {idSave[1] = id1in; idSave[2] = id2in; idSave[3] = id3in;
369 idSave[4] = id4in; idSave[5] = id5in;}
370 void setColAcol(
int col1 = 0,
int acol1 = 0,
371 int col2 = 0,
int acol2 = 0,
int col3 = 0,
int acol3 = 0,
372 int col4 = 0,
int acol4 = 0,
int col5 = 0,
int acol5 = 0) {
373 colSave[1] = col1; acolSave[1] = acol1; colSave[2] = col2;
374 acolSave[2] = acol2; colSave[3] = col3; acolSave[3] = acol3;
375 colSave[4] = col4; acolSave[4] = acol4; colSave[5] = col5;
376 acolSave[5] = acol5; }
377 void swapColAcol() { swap(colSave[1], acolSave[1]);
378 swap(colSave[2], acolSave[2]); swap(colSave[3], acolSave[3]);
379 swap(colSave[4], acolSave[4]); swap(colSave[5], acolSave[5]);}
380 void swapCol1234() { swap(colSave[1], colSave[2]);
381 swap(colSave[3], colSave[4]); swap(acolSave[1], acolSave[2]);
382 swap(acolSave[3], acolSave[4]);}
383 void swapCol12() { swap(colSave[1], colSave[2]);
384 swap(acolSave[1], acolSave[2]);}
385 void swapCol34() { swap(colSave[3], colSave[4]);
386 swap(acolSave[3], acolSave[4]);}
389 double weightTopDecay(
Event& process,
int iResBeg,
int iResEnd);
390 double weightHiggsDecay(
Event& process,
int iResBeg,
int iResEnd);
399 class Sigma0Process :
public SigmaProcess {
404 virtual ~Sigma0Process() {}
407 virtual int nFinal()
const {
return 2;};
410 virtual bool initFlux() {
return true;}
413 virtual double sigmaHat() {
return 0.;}
416 virtual double sigmaPDF() {
return sigmaHat();}
419 virtual bool convert2mb()
const {
return false;}
433 class Sigma1Process :
public SigmaProcess {
438 virtual ~Sigma1Process() {}
441 virtual int nFinal()
const {
return 1;};
444 virtual void set1Kin(
double x1in,
double x2in,
double sHin) {
445 store1Kin( x1in, x2in, sHin); sigmaKin();}
448 virtual double sigmaHat() {
return 0.;}
453 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0);
461 virtual void store1Kin(
double x1in,
double x2in,
double sHin);
464 virtual bool setupForME();
473 class Sigma2Process :
public SigmaProcess {
478 virtual ~Sigma2Process() {}
481 virtual int nFinal()
const {
return 2;};
484 virtual void set2Kin(
double x1in,
double x2in,
double sHin,
485 double tHin,
double m3in,
double m4in,
double runBW3in,
486 double runBW4in) { store2Kin( x1in, x2in, sHin, tHin, m3in, m4in,
487 runBW3in, runBW4in); sigmaKin();}
490 virtual void set2KinMPI(
double x1in,
double x2in,
double sHin,
491 double tHin,
double uHin,
double alpSin,
double alpEMin,
492 bool needMasses,
double m3in,
double m4in) {
493 store2KinMPI( x1in, x2in, sHin, tHin, uHin, alpSin, alpEMin,
494 needMasses, m3in, m4in); sigmaKin();}
497 virtual double sigmaHat() {
return 0.;}
502 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0) {
503 id1 = id1in; id2 = id2in;
double sigmaTmp = sigmaHat();
504 if (convertM2()) sigmaTmp /= 16. * M_PI * sH2;
505 if (convert2mb()) sigmaTmp *= CONVERT2MB;
return sigmaTmp;}
508 virtual bool final2KinMPI(
int i1Res = 0,
int i2Res = 0, Vec4 p1Res = 0.,
509 Vec4 p2Res = 0.,
double m1Res = 0.,
double m2Res = 0.);
514 Sigma2Process() : tH(0.), uH(0.), tH2(0.), uH2(0.), m3(0.), s3(0.),
515 m4(0.), s4(0.), pT2(0.), runBW3(0.), runBW4(0.) {}
518 virtual void store2Kin(
double x1in,
double x2in,
double sHin,
519 double tHin,
double m3in,
double m4in,
double runBW3in,
521 virtual void store2KinMPI(
double x1in,
double x2in,
double sHin,
522 double tHin,
double uHin,
double alpSin,
double alpEMin,
523 bool needMasses,
double m3in,
double m4in);
526 virtual bool setupForME();
529 double tH, uH, tH2, uH2, m3, s3, m4, s4, pT2, runBW3, runBW4;
538 class Sigma3Process :
public SigmaProcess {
543 virtual ~Sigma3Process() {}
546 virtual int nFinal()
const {
return 3;};
549 virtual void set3Kin(
double x1in,
double x2in,
double sHin,
550 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
551 double m5in,
double runBW3in,
double runBW4in,
double runBW5in) {
552 store3Kin( x1in, x2in, sHin, p3cmIn, p4cmIn, p5cmIn, m3in, m4in, m5in,
553 runBW3in, runBW4in, runBW5in); sigmaKin();}
556 virtual double sigmaHat() {
return 0.;}
564 virtual void store3Kin(
double x1in,
double x2in,
double sHin,
565 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
566 double m5in,
double runBW3in,
double runBW4in,
double runBW5in);
569 virtual bool setupForME();
572 double m3, s3, m4, s4, m5, s5, runBW3, runBW4, runBW5;
573 Vec4 p3cm, p4cm, p5cm;
582 class SigmaLHAProcess :
public SigmaProcess {
590 virtual ~SigmaLHAProcess() {}
593 virtual bool initFlux() {
return true;}
596 virtual double sigmaPDF() {
return 1.;}
599 virtual double weightDecay(
Event& process,
int iResBeg,
int iResEnd);
602 virtual void setScale();
605 virtual string name()
const {
return "Les Houches User Process(es)";}
606 virtual int code()
const {
return 9999;}
609 virtual int nFinal()
const;
612 virtual bool convert2mb()
const {
return false;}
615 virtual bool isLHA()
const {
return true;}
618 virtual bool allowNegativeSigma()
const {
619 return (lhaUpPtr->strategy() < 0);}
629 #endif // Pythia8_SigmaProcess_H