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/PhysicsBase.h"
35 #include "Pythia8/PythiaComplex.h"
36 #include "Pythia8/PythiaStdlib.h"
37 #include "Pythia8/ResonanceWidths.h"
38 #include "Pythia8/Settings.h"
39 #include "Pythia8/SigmaTotal.h"
40 #include "Pythia8/StandardModel.h"
41 #include "Pythia8/SLHAinterface.h"
42 #include "Pythia8/SusyLesHouches.h"
55 InBeam(
int idIn = 0) : id(idIn), pdf(0.) {}
72 InPair(
int idAIn = 0,
int idBIn = 0) : idA(idAIn), idB(idBIn),
73 pdfA(0.), pdfB(0.), pdfSigma(0.) {}
77 double pdfA, pdfB, pdfSigma;
85 class SigmaProcess :
public PhysicsBase {
90 virtual ~SigmaProcess() {}
93 void init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
94 SLHAinterface* slhaInterfacePtrIn = 0);
97 void setLHAPtr( LHAupPtr 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() ); }
144 virtual double sigmaPDF(
bool initPS =
false,
bool samexGamma =
false,
145 bool useNewXvalues =
false,
double x1New = 0.,
double x2New = 0.);
148 void pickInState(
int id1in = 0,
int id2in = 0);
151 virtual void setIdColAcol() {}
154 virtual bool final2KinMPI(
int = 0,
int = 0, Vec4 = 0., Vec4 = 0.,
155 double = 0.,
double = 0.) {
return true;}
159 virtual double weightDecayFlav(
Event&) {
return 1.;}
164 virtual double weightDecay(
Event&,
int,
int) {
return 1.;}
167 virtual void setScale() {}
170 virtual string name()
const {
return "unnamed process";}
171 virtual int code()
const {
return 0;}
172 virtual int nFinal()
const {
return 2;}
175 virtual string inFlux()
const {
return "unknown";}
178 virtual bool convert2mb()
const {
return true;}
181 virtual bool convertM2()
const {
return false;}
184 virtual bool isLHA()
const {
return false;}
187 virtual bool isNonDiff()
const {
return false;}
188 virtual bool isResolved()
const {
return true;}
189 virtual bool isDiffA()
const {
return false;}
190 virtual bool isDiffB()
const {
return false;}
191 virtual bool isDiffC()
const {
return false;}
194 virtual bool isSUSY()
const {
return false;}
197 virtual bool allowNegativeSigma()
const {
return false;}
202 virtual int id3Mass()
const {
return 0;}
203 virtual int id4Mass()
const {
return 0;}
204 virtual int id5Mass()
const {
return 0;}
207 virtual int resonanceA()
const {
return 0;}
208 virtual int resonanceB()
const {
return 0;}
211 virtual bool isSChannel()
const {
return false;}
214 virtual int idSChannel()
const {
return 0;}
217 virtual bool isQCD3body()
const {
return false;}
220 virtual int idTchan1()
const {
return 0;}
221 virtual int idTchan2()
const {
return 0;}
222 virtual double tChanFracPow1()
const {
return 0.3;}
223 virtual double tChanFracPow2()
const {
return 0.3;}
224 virtual bool useMirrorWeight()
const {
return false;}
227 virtual int gmZmode()
const {
return -1;}
230 bool swappedTU()
const {
return swapTU;}
233 int id(
int i)
const {
return idSave[i];}
234 int col(
int i)
const {
return colSave[i];}
235 int acol(
int i)
const {
return acolSave[i];}
236 double m(
int i)
const {
return mSave[i];}
237 Particle getParton(
int i)
const {
return parton[i];}
241 double Q2Ren()
const {
return Q2RenSave;}
242 double alphaEMRen()
const {
return alpEM;}
243 double alphaSRen()
const {
return alpS;}
244 double Q2Fac()
const {
return Q2FacSave;}
245 double pdf1()
const {
return pdf1Save;}
246 double pdf2()
const {
return pdf2Save;}
249 double thetaMPI()
const {
return atan2( sinTheta, cosTheta);}
250 double phiMPI()
const {
return phi;}
251 double sHBetaMPI()
const {
return sHBeta;}
252 double pT2MPI()
const {
return pT2Mass;}
253 double pTMPIFin()
const {
return pTFin;}
257 for (
int i = 0; i < 12; i++) { partonT[i] = parton[i];
258 mSaveT[i] = mSave[i]; }
259 pTFinT = pTFin; phiT = phi; cosThetaT = cosTheta; sinThetaT = sinTheta; }
261 for (
int i = 0; i < 12; i++) { parton[i] = partonT[i];
262 mSave[i] = mSaveT[i]; }
263 pTFin = pTFinT; cosTheta = cosThetaT; sinTheta = sinThetaT; phi = phiT;
266 for (
int i = 0; i < 12; i++) { swap(parton[i], partonT[i]);
267 swap(mSave[i], mSaveT[i]); }
268 swap(pTFin, pTFinT); swap(cosTheta, cosThetaT);
269 swap(sinTheta, sinThetaT); swap(phi, phiT); }
272 virtual void setIdInDiff(
int,
int) {}
277 SigmaProcess() : slhaPtr(0), lhaUpPtr(0), nQuarkIn(), renormScale1(),
278 renormScale2(), renormScale3(), renormScale3VV(), factorScale1(),
279 factorScale2(), factorScale3(), factorScale3VV(), Kfactor(), mcME(),
280 mbME(), mmuME(), mtauME(), renormMultFac(), renormFixScale(),
281 factorMultFac(), factorFixScale(), higgsH1parity(), higgsH2parity(),
282 higgsA3parity(), higgsH1eta(), higgsH2eta(), higgsA3eta(),
283 higgsH1phi(), higgsH2phi(), higgsA3phi(), idA(), idB(), mA(), mB(),
284 isLeptonA(), isLeptonB(), hasLeptonBeams(), beamA2gamma(), beamB2gamma(),
285 hasGamma(), mH(), sH(), sH2(), x1Save(), x2Save(), sigmaSumSave(),
286 id1(), id2(), id3(), id4(), id5(), idSave(), colSave(), acolSave(),
287 mSave(), cosTheta(), sinTheta(), phi(), sHMass(), sHBeta(), pT2Mass(),
288 pTFin(), mSaveT(), pTFinT(), cosThetaT(), sinThetaT(), phiT(), mME(),
290 for (
int i = 0; i < 12; ++i) mSave[i] = 0.;
291 Q2RenSave = alpEM = alpS = Q2FacSave = pdf1Save = pdf2Save = 0.; }
294 static const double CONVERT2MB, MASSMARGIN, COMPRELERR;
295 static const int NCOMPSTEP;
298 SusyLesHouches* slhaPtr;
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, higgsH1phi, higgsH2phi,
317 bool isLeptonA, isLeptonB, hasLeptonBeams, beamA2gamma, beamB2gamma,
321 vector<InBeam> inBeamA;
322 vector<InBeam> inBeamB;
323 void addBeamA(
int idIn) {inBeamA.push_back(InBeam(idIn));}
324 void addBeamB(
int idIn) {inBeamB.push_back(InBeam(idIn));}
325 int sizeBeamA()
const {
return inBeamA.size();}
326 int sizeBeamB()
const {
return inBeamB.size();}
329 vector<InPair> inPair;
330 void addPair(
int idAIn,
int idBIn) {
331 inPair.push_back(InPair(idAIn, idBIn));}
332 int sizePair()
const {
return inPair.size();}
338 double Q2RenSave, alpEM, alpS, Q2FacSave, x1Save, x2Save, pdf1Save,
339 pdf2Save, sigmaSumSave;
342 int id1, id2, id3, id4, id5;
343 int idSave[12], colSave[12], acolSave[12];
344 double mSave[12], cosTheta, sinTheta, phi, sHMass, sHBeta, pT2Mass, pTFin;
349 Particle partonT[12];
350 double mSaveT[12], pTFinT, cosThetaT, sinThetaT, phiT;
354 virtual bool setupForME() {
return true;}
363 void setId(
int id1in = 0,
int id2in = 0,
int id3in = 0,
int id4in = 0,
364 int id5in = 0) {idSave[1] = id1in; idSave[2] = id2in; idSave[3] = id3in;
365 idSave[4] = id4in; idSave[5] = id5in;}
366 void setColAcol(
int col1 = 0,
int acol1 = 0,
367 int col2 = 0,
int acol2 = 0,
int col3 = 0,
int acol3 = 0,
368 int col4 = 0,
int acol4 = 0,
int col5 = 0,
int acol5 = 0) {
369 colSave[1] = col1; acolSave[1] = acol1; colSave[2] = col2;
370 acolSave[2] = acol2; colSave[3] = col3; acolSave[3] = acol3;
371 colSave[4] = col4; acolSave[4] = acol4; colSave[5] = col5;
372 acolSave[5] = acol5; }
373 void swapColAcol() { swap(colSave[1], acolSave[1]);
374 swap(colSave[2], acolSave[2]); swap(colSave[3], acolSave[3]);
375 swap(colSave[4], acolSave[4]); swap(colSave[5], acolSave[5]);}
376 void swapCol1234() { swap(colSave[1], colSave[2]);
377 swap(colSave[3], colSave[4]); swap(acolSave[1], acolSave[2]);
378 swap(acolSave[3], acolSave[4]);}
379 void swapCol12() { swap(colSave[1], colSave[2]);
380 swap(acolSave[1], acolSave[2]);}
381 void swapCol34() { swap(colSave[3], colSave[4]);
382 swap(acolSave[3], acolSave[4]);}
385 double weightTopDecay(
Event& process,
int iResBeg,
int iResEnd);
386 double weightHiggsDecay(
Event& process,
int iResBeg,
int iResEnd);
395 class Sigma0Process :
public SigmaProcess {
400 virtual ~Sigma0Process() {}
403 virtual int nFinal()
const {
return 2;};
406 virtual bool initFlux() {
return true;}
409 virtual double sigmaHat() {
return 0.;}
412 virtual double sigmaPDF(
bool,
bool,
bool,
double,
double )
416 virtual bool convert2mb()
const {
return false;}
419 virtual void setIdInDiff(
int idAin,
int idBin) { idA = idAin; idB = idBin; }
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;
509 virtual bool final2KinMPI(
int i1Res = 0,
int i2Res = 0, Vec4 p1Res = 0.,
510 Vec4 p2Res = 0.,
double m1Res = 0.,
double m2Res = 0.);
515 Sigma2Process() : tH(0.), uH(0.), tH2(0.), uH2(0.), m3(0.), s3(0.),
516 m4(0.), s4(0.), pT2(0.), runBW3(0.), runBW4(0.) {}
519 virtual void store2Kin(
double x1in,
double x2in,
double sHin,
520 double tHin,
double m3in,
double m4in,
double runBW3in,
522 virtual void store2KinMPI(
double x1in,
double x2in,
double sHin,
523 double tHin,
double uHin,
double alpSin,
double alpEMin,
524 bool needMasses,
double m3in,
double m4in);
527 virtual bool setupForME();
530 double tH, uH, tH2, uH2, m3, s3, m4, s4, pT2, runBW3, runBW4;
539 class Sigma3Process :
public SigmaProcess {
544 virtual ~Sigma3Process() {}
547 virtual int nFinal()
const {
return 3;};
550 virtual void set3Kin(
double x1in,
double x2in,
double sHin,
551 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
552 double m5in,
double runBW3in,
double runBW4in,
double runBW5in) {
553 store3Kin( x1in, x2in, sHin, p3cmIn, p4cmIn, p5cmIn, m3in, m4in, m5in,
554 runBW3in, runBW4in, runBW5in); sigmaKin();}
557 virtual double sigmaHat() {
return 0.;}
562 Sigma3Process() : m3(), s3(), m4(), s4(), m5(), s5(), runBW3(),
563 runBW4(), runBW5() {}
566 virtual void store3Kin(
double x1in,
double x2in,
double sHin,
567 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn,
double m3in,
double m4in,
568 double m5in,
double runBW3in,
double runBW4in,
double runBW5in);
571 virtual bool setupForME();
574 double m3, s3, m4, s4, m5, s5, runBW3, runBW4, runBW5;
575 Vec4 p3cm, p4cm, p5cm;
584 class SigmaLHAProcess :
public SigmaProcess {
592 virtual ~SigmaLHAProcess() {}
595 virtual bool initFlux() {
return true;}
598 virtual double sigmaPDF(
bool,
bool,
bool,
double,
double ) {
return 1.;}
601 virtual double weightDecay(
Event& process,
int iResBeg,
int iResEnd);
604 virtual void setScale();
607 virtual string name()
const {
return "Les Houches User Process(es)";}
608 virtual int code()
const {
return 9999;}
611 virtual int nFinal()
const;
614 virtual bool convert2mb()
const {
return false;}
617 virtual bool isLHA()
const {
return true;}
620 virtual bool allowNegativeSigma()
const {
621 return (lhaUpPtr->strategy() < 0);}
631 #endif // Pythia8_SigmaProcess_H