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() ); }
145 virtual double sigmaPDF(
bool initPS =
false,
bool samexGamma =
false,
146 bool useNewXvalues =
false,
double x1New = 0.,
double x2New = 0.);
149 void pickInState(
int id1in = 0,
int id2in = 0);
152 virtual void setIdColAcol() {}
155 virtual bool final2KinMPI(
int = 0,
int = 0, Vec4 = 0., Vec4 = 0.,
156 double = 0.,
double = 0.) {
return true;}
160 virtual double weightDecayFlav(
Event&) {
return 1.;}
165 virtual double weightDecay(
Event&,
int,
int) {
return 1.;}
168 virtual void setScale() {}
171 virtual string name()
const {
return "unnamed process";}
172 virtual int code()
const {
return 0;}
173 virtual int nFinal()
const {
return 2;}
176 virtual string inFlux()
const {
return "unknown";}
179 virtual bool convert2mb()
const {
return true;}
182 virtual bool convertM2()
const {
return false;}
185 virtual bool isLHA()
const {
return false;}
188 virtual bool isNonDiff()
const {
return false;}
189 virtual bool isResolved()
const {
return true;}
190 virtual bool isDiffA()
const {
return false;}
191 virtual bool isDiffB()
const {
return false;}
192 virtual bool isDiffC()
const {
return false;}
195 virtual bool isSUSY()
const {
return false;}
198 virtual bool allowNegativeSigma()
const {
return false;}
203 virtual int id3Mass()
const {
return 0;}
204 virtual int id4Mass()
const {
return 0;}
205 virtual int id5Mass()
const {
return 0;}
208 virtual int resonanceA()
const {
return 0;}
209 virtual int resonanceB()
const {
return 0;}
212 virtual bool isSChannel()
const {
return false;}
215 virtual int idSChannel()
const {
return 0;}
218 virtual bool isQCD3body()
const {
return false;}
221 virtual int idTchan1()
const {
return 0;}
222 virtual int idTchan2()
const {
return 0;}
223 virtual double tChanFracPow1()
const {
return 0.3;}
224 virtual double tChanFracPow2()
const {
return 0.3;}
225 virtual bool useMirrorWeight()
const {
return false;}
228 virtual int gmZmode()
const {
return -1;}
231 bool swappedTU()
const {
return swapTU;}
234 int id(
int i)
const {
return idSave[i];}
235 int col(
int i)
const {
return colSave[i];}
236 int acol(
int i)
const {
return acolSave[i];}
237 double m(
int i)
const {
return mSave[i];}
238 Particle getParton(
int i)
const {
return parton[i];}
242 double Q2Ren()
const {
return Q2RenSave;}
243 double alphaEMRen()
const {
return alpEM;}
244 double alphaSRen()
const {
return alpS;}
245 double Q2Fac()
const {
return Q2FacSave;}
246 double pdf1()
const {
return pdf1Save;}
247 double pdf2()
const {
return pdf2Save;}
250 double thetaMPI()
const {
return atan2( sinTheta, cosTheta);}
251 double phiMPI()
const {
return phi;}
252 double sHBetaMPI()
const {
return sHBeta;}
253 double pT2MPI()
const {
return pT2Mass;}
254 double pTMPIFin()
const {
return pTFin;}
258 for (
int i = 0; i < 12; i++) { partonT[i] = parton[i];
259 mSaveT[i] = mSave[i]; }
260 pTFinT = pTFin; phiT = phi; cosThetaT = cosTheta; sinThetaT = sinTheta; }
262 for (
int i = 0; i < 12; i++) { parton[i] = partonT[i];
263 mSave[i] = mSaveT[i]; }
264 pTFin = pTFinT; cosTheta = cosThetaT; sinTheta = sinThetaT; phi = phiT;
267 for (
int i = 0; i < 12; i++) { swap(parton[i], partonT[i]);
268 swap(mSave[i], mSaveT[i]); }
269 swap(pTFin, pTFinT); swap(cosTheta, cosThetaT);
270 swap(sinTheta, sinThetaT); swap(phi, phiT); }
275 SigmaProcess() : infoPtr(0), settingsPtr(0), particleDataPtr(0),
276 rndmPtr(0), beamAPtr(0), beamBPtr(0), couplingsPtr(0), sigmaTotPtr(0),
277 slhaPtr(0), lhaUpPtr(0) {
for (
int i = 0; i < 12; ++i) mSave[i] = 0.;
278 Q2RenSave = alpEM = alpS = Q2FacSave = pdf1Save = pdf2Save = 0.; }
281 static const double CONVERT2MB, MASSMARGIN, COMPRELERR;
282 static const int NCOMPSTEP;
288 Settings* settingsPtr;
291 ParticleData* particleDataPtr;
297 BeamParticle* beamAPtr;
298 BeamParticle* beamBPtr;
301 Couplings* couplingsPtr;
304 SigmaTotal* sigmaTotPtr;
307 SusyLesHouches* slhaPtr;
313 int nQuarkIn, renormScale1, renormScale2, renormScale3, renormScale3VV,
314 factorScale1, factorScale2, factorScale3, factorScale3VV;
315 double Kfactor, mcME, mbME, mmuME, mtauME, renormMultFac, renormFixScale,
316 factorMultFac, factorFixScale;
319 int higgsH1parity, higgsH2parity, higgsA3parity;
320 double higgsH1eta, higgsH2eta, higgsA3eta, higgsH1phi, higgsH2phi,
326 bool isLeptonA, isLeptonB, hasLeptonBeams, lepton2gammaA, lepton2gammaB;
329 vector<InBeam> inBeamA;
330 vector<InBeam> inBeamB;
331 void addBeamA(
int idIn) {inBeamA.push_back(InBeam(idIn));}
332 void addBeamB(
int idIn) {inBeamB.push_back(InBeam(idIn));}
333 int sizeBeamA()
const {
return inBeamA.size();}
334 int sizeBeamB()
const {
return inBeamB.size();}
337 vector<InPair> inPair;
338 void addPair(
int idAIn,
int idBIn) {
339 inPair.push_back(InPair(idAIn, idBIn));}
340 int sizePair()
const {
return inPair.size();}
346 double Q2RenSave, alpEM, alpS, Q2FacSave, x1Save, x2Save, pdf1Save,
347 pdf2Save, sigmaSumSave;
350 int id1, id2, id3, id4, id5;
351 int idSave[12], colSave[12], acolSave[12];
352 double mSave[12], cosTheta, sinTheta, phi, sHMass, sHBeta, pT2Mass, pTFin;
357 Particle partonT[12];
358 double mSaveT[12], pTFinT, cosThetaT, sinThetaT, phiT;
362 virtual bool setupForME() {
return true;}
371 void setId(
int id1in = 0,
int id2in = 0,
int id3in = 0,
int id4in = 0,
372 int id5in = 0) {idSave[1] = id1in; idSave[2] = id2in; idSave[3] = id3in;
373 idSave[4] = id4in; idSave[5] = id5in;}
374 void setColAcol(
int col1 = 0,
int acol1 = 0,
375 int col2 = 0,
int acol2 = 0,
int col3 = 0,
int acol3 = 0,
376 int col4 = 0,
int acol4 = 0,
int col5 = 0,
int acol5 = 0) {
377 colSave[1] = col1; acolSave[1] = acol1; colSave[2] = col2;
378 acolSave[2] = acol2; colSave[3] = col3; acolSave[3] = acol3;
379 colSave[4] = col4; acolSave[4] = acol4; colSave[5] = col5;
380 acolSave[5] = acol5; }
381 void swapColAcol() { swap(colSave[1], acolSave[1]);
382 swap(colSave[2], acolSave[2]); swap(colSave[3], acolSave[3]);
383 swap(colSave[4], acolSave[4]); swap(colSave[5], acolSave[5]);}
384 void swapCol1234() { swap(colSave[1], colSave[2]);
385 swap(colSave[3], colSave[4]); swap(acolSave[1], acolSave[2]);
386 swap(acolSave[3], acolSave[4]);}
387 void swapCol12() { swap(colSave[1], colSave[2]);
388 swap(acolSave[1], acolSave[2]);}
389 void swapCol34() { swap(colSave[3], colSave[4]);
390 swap(acolSave[3], acolSave[4]);}
393 double weightTopDecay(
Event& process,
int iResBeg,
int iResEnd);
394 double weightHiggsDecay(
Event& process,
int iResBeg,
int iResEnd);
403 class Sigma0Process :
public SigmaProcess {
408 virtual ~Sigma0Process() {}
411 virtual int nFinal()
const {
return 2;};
414 virtual bool initFlux() {
return true;}
417 virtual double sigmaHat() {
return 0.;}
420 virtual double sigmaPDF(
bool,
bool,
bool,
double,
double )
424 virtual bool convert2mb()
const {
return false;}
438 class Sigma1Process :
public SigmaProcess {
443 virtual ~Sigma1Process() {}
446 virtual int nFinal()
const {
return 1;};
449 virtual void set1Kin(
double x1in,
double x2in,
double sHin) {
450 store1Kin( x1in, x2in, sHin); sigmaKin();}
453 virtual double sigmaHat() {
return 0.;}
458 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0);
466 virtual void store1Kin(
double x1in,
double x2in,
double sHin);
469 virtual bool setupForME();
478 class Sigma2Process :
public SigmaProcess {
483 virtual ~Sigma2Process() {}
486 virtual int nFinal()
const {
return 2;};
489 virtual void set2Kin(
double x1in,
double x2in,
double sHin,
490 double tHin,
double m3in,
double m4in,
double runBW3in,
491 double runBW4in) { store2Kin( x1in, x2in, sHin, tHin, m3in, m4in,
492 runBW3in, runBW4in); sigmaKin();}
495 virtual void set2KinMPI(
double x1in,
double x2in,
double sHin,
496 double tHin,
double uHin,
double alpSin,
double alpEMin,
497 bool needMasses,
double m3in,
double m4in) {
498 store2KinMPI( x1in, x2in, sHin, tHin, uHin, alpSin, alpEMin,
499 needMasses, m3in, m4in); sigmaKin();}
502 virtual double sigmaHat() {
return 0.;}
507 virtual double sigmaHatWrap(
int id1in = 0,
int id2in = 0) {
508 id1 = id1in; id2 = id2in;
double sigmaTmp = sigmaHat();
509 if (convertM2()) sigmaTmp /= 16. * M_PI * sH2;
510 if (convert2mb()) sigmaTmp *= CONVERT2MB;
514 virtual bool final2KinMPI(
int i1Res = 0,
int i2Res = 0, Vec4 p1Res = 0.,
515 Vec4 p2Res = 0.,
double m1Res = 0.,
double m2Res = 0.);
520 Sigma2Process() : tH(0.), uH(0.), tH2(0.), uH2(0.), m3(0.), s3(0.),
521 m4(0.), s4(0.), pT2(0.), runBW3(0.), runBW4(0.) {}
524 virtual void store2Kin(
double x1in,
double x2in,
double sHin,
525 double tHin,
double m3in,
double m4in,
double runBW3in,
527 virtual void store2KinMPI(
double x1in,
double x2in,
double sHin,
528 double tHin,
double uHin,
double alpSin,
double alpEMin,
529 bool needMasses,
double m3in,
double m4in);
532 virtual bool setupForME();
535 double tH, uH, tH2, uH2, m3, s3, m4, s4, pT2, runBW3, runBW4;
544 class Sigma3Process :
public SigmaProcess {
549 virtual ~Sigma3Process() {}
552 virtual int nFinal()
const {
return 3;};
555 virtual void set3Kin(
double x1in,
double x2in,
double sHin,
556 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
557 double m5in,
double runBW3in,
double runBW4in,
double runBW5in) {
558 store3Kin( x1in, x2in, sHin, p3cmIn, p4cmIn, p5cmIn, m3in, m4in, m5in,
559 runBW3in, runBW4in, runBW5in); sigmaKin();}
562 virtual double sigmaHat() {
return 0.;}
570 virtual void store3Kin(
double x1in,
double x2in,
double sHin,
571 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
572 double m5in,
double runBW3in,
double runBW4in,
double runBW5in);
575 virtual bool setupForME();
578 double m3, s3, m4, s4, m5, s5, runBW3, runBW4, runBW5;
579 Vec4 p3cm, p4cm, p5cm;
588 class SigmaLHAProcess :
public SigmaProcess {
596 virtual ~SigmaLHAProcess() {}
599 virtual bool initFlux() {
return true;}
602 virtual double sigmaPDF(
bool,
bool,
bool,
double,
double ) {
return 1.;}
605 virtual double weightDecay(
Event& process,
int iResBeg,
int iResEnd);
608 virtual void setScale();
611 virtual string name()
const {
return "Les Houches User Process(es)";}
612 virtual int code()
const {
return 9999;}
615 virtual int nFinal()
const;
618 virtual bool convert2mb()
const {
return false;}
621 virtual bool isLHA()
const {
return true;}
624 virtual bool allowNegativeSigma()
const {
625 return (lhaUpPtr->strategy() < 0);}
635 #endif // Pythia8_SigmaProcess_H