File indexing completed on 2025-01-18 10:06:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef Pythia8_SigmaProcess_H
0025 #define Pythia8_SigmaProcess_H
0026
0027 #include "Pythia8/Basics.h"
0028 #include "Pythia8/BeamParticle.h"
0029 #include "Pythia8/Event.h"
0030 #include "Pythia8/Info.h"
0031 #include "Pythia8/SigmaLowEnergy.h"
0032 #include "Pythia8/LesHouches.h"
0033 #include "Pythia8/ParticleData.h"
0034 #include "Pythia8/PartonDistributions.h"
0035 #include "Pythia8/PhysicsBase.h"
0036 #include "Pythia8/PythiaComplex.h"
0037 #include "Pythia8/PythiaStdlib.h"
0038 #include "Pythia8/ResonanceWidths.h"
0039 #include "Pythia8/Settings.h"
0040 #include "Pythia8/SigmaTotal.h"
0041 #include "Pythia8/StandardModel.h"
0042 #include "Pythia8/SLHAinterface.h"
0043 #include "Pythia8/SusyLesHouches.h"
0044
0045 namespace Pythia8 {
0046
0047
0048
0049
0050
0051 class InBeam {
0052
0053 public:
0054
0055
0056 InBeam( int idIn = 0) : id(idIn), pdf(0.) {}
0057
0058
0059 int id;
0060 double pdf;
0061
0062 };
0063
0064
0065
0066
0067
0068 class InPair {
0069
0070 public:
0071
0072
0073 InPair( int idAIn = 0, int idBIn = 0) : idA(idAIn), idB(idBIn),
0074 pdfA(0.), pdfB(0.), pdfSigma(0.) {}
0075
0076
0077 int idA, idB;
0078 double pdfA, pdfB, pdfSigma;
0079
0080 };
0081
0082
0083
0084
0085
0086 class SigmaProcess : public PhysicsBase {
0087
0088 public:
0089
0090
0091 virtual ~SigmaProcess() {}
0092
0093
0094 void init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
0095 SLHAinterface* slhaInterfacePtrIn = 0);
0096
0097
0098 void setLHAPtr( LHAupPtr lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;}
0099
0100
0101 void updateBeamIDs() { idA = beamAPtr->id(); idB = beamBPtr->id();
0102 mA = beamAPtr->m(); mB = beamBPtr->m();}
0103
0104
0105 virtual void initProc() {}
0106
0107
0108 virtual bool initFlux();
0109
0110
0111
0112 virtual void set1Kin( double , double , double ) {}
0113
0114
0115
0116 virtual void set2Kin( double , double , double , double , double ,
0117 double, double, double ) {}
0118
0119
0120
0121
0122 virtual void set2KinMPI( double , double , double , double ,
0123 double , double , double , bool , double , double ) {}
0124
0125
0126
0127
0128 virtual void set3Kin( double , double , double , Vec4 , Vec4 , Vec4 ,
0129 double , double , double , double , double , double ) {}
0130
0131
0132 virtual void sigmaKin() {}
0133
0134
0135
0136
0137 virtual double sigmaHat() {return 0.;}
0138
0139
0140
0141
0142 virtual double sigmaHatWrap(int id1in = 0, int id2in = 0) {
0143 id1 = id1in; id2 = id2in;
0144 return ( convert2mb() ? CONVERT2MB * sigmaHat() : sigmaHat() ); }
0145
0146
0147
0148
0149 virtual double sigmaPDF(bool initPS = false, bool samexGamma = false,
0150 bool useNewXvalues = false, double x1New = 0., double x2New = 0.);
0151
0152
0153 void pickInState(int id1in = 0, int id2in = 0);
0154
0155
0156 virtual void setIdColAcol() {}
0157
0158
0159 virtual bool final2KinMPI( int = 0, int = 0, Vec4 = 0., Vec4 = 0.,
0160 double = 0., double = 0.) {return true;}
0161
0162
0163
0164 virtual double weightDecayFlav( Event&) {return 1.;}
0165
0166
0167
0168
0169 virtual double weightDecay( Event&, int, int) {return 1.;}
0170
0171
0172 virtual void setScale() {}
0173
0174
0175 virtual string name() const {return "unnamed process";}
0176 virtual int code() const {return 0;}
0177 virtual int nFinal() const {return 2;}
0178
0179
0180 virtual string inFlux() const {return "unknown";}
0181
0182
0183 virtual bool convert2mb() const {return true;}
0184
0185
0186 virtual bool convertM2() const {return false;}
0187
0188
0189 virtual bool isLHA() const {return false;}
0190
0191
0192 virtual bool isNonDiff() const {return false;}
0193 virtual bool isResolved() const {return true;}
0194 virtual bool isDiffA() const {return false;}
0195 virtual bool isDiffB() const {return false;}
0196 virtual bool isDiffC() const {return false;}
0197
0198
0199 virtual bool isSUSY() const {return false;}
0200
0201
0202 virtual bool allowNegativeSigma() const {return false;}
0203
0204
0205
0206
0207 virtual int id3Mass() const {return 0;}
0208 virtual int id4Mass() const {return 0;}
0209 virtual int id5Mass() const {return 0;}
0210
0211
0212 virtual int resonanceA() const {return 0;}
0213 virtual int resonanceB() const {return 0;}
0214
0215
0216 virtual bool isSChannel() const {return false;}
0217
0218
0219 virtual int idSChannel() const {return 0;}
0220
0221
0222 virtual bool isQCD3body() const {return false;}
0223
0224
0225 virtual int idTchan1() const {return 0;}
0226 virtual int idTchan2() const {return 0;}
0227 virtual double tChanFracPow1() const {return 0.3;}
0228 virtual double tChanFracPow2() const {return 0.3;}
0229 virtual bool useMirrorWeight() const {return false;}
0230
0231
0232 virtual int gmZmode() const {return -1;}
0233
0234
0235 bool swappedTU() const {return swapTU;}
0236
0237
0238 int id(int i) const {return idSave[i];}
0239 int col(int i) const {return colSave[i];}
0240 int acol(int i) const {return acolSave[i];}
0241 double m(int i) const {return mSave[i];}
0242 Particle getParton(int i) const {return parton[i];}
0243
0244
0245
0246 double Q2Ren() const {return Q2RenSave;}
0247 double alphaEMRen() const {return alpEM;}
0248 double alphaSRen() const {return alpS;}
0249 double Q2Fac() const {return Q2FacSave;}
0250 double pdf1() const {return pdf1Save;}
0251 double pdf2() const {return pdf2Save;}
0252
0253
0254 double thetaMPI() const {return atan2( sinTheta, cosTheta);}
0255 double phiMPI() const {return phi;}
0256 double sHBetaMPI() const {return sHBeta;}
0257 double pT2MPI() const {return pT2Mass;}
0258 double pTMPIFin() const {return pTFin;}
0259
0260
0261 void saveKin() {
0262 for (int i = 0; i < 12; i++) { partonT[i] = parton[i];
0263 mSaveT[i] = mSave[i]; }
0264 pTFinT = pTFin; phiT = phi; cosThetaT = cosTheta; sinThetaT = sinTheta; }
0265 void loadKin() {
0266 for (int i = 0; i < 12; i++) { parton[i] = partonT[i];
0267 mSave[i] = mSaveT[i]; }
0268 pTFin = pTFinT; cosTheta = cosThetaT; sinTheta = sinThetaT; phi = phiT;
0269 }
0270 void swapKin() {
0271 for (int i = 0; i < 12; i++) { swap(parton[i], partonT[i]);
0272 swap(mSave[i], mSaveT[i]); }
0273 swap(pTFin, pTFinT); swap(cosTheta, cosThetaT);
0274 swap(sinTheta, sinThetaT); swap(phi, phiT); }
0275
0276
0277 virtual void setIdInDiff(int, int) {}
0278
0279 protected:
0280
0281
0282 SigmaProcess() : slhaPtr(0), lhaUpPtr(0), doVarE(), nQuarkIn(),
0283 renormScale1(), renormScale2(), renormScale3(), renormScale3VV(),
0284 factorScale1(), factorScale2(), factorScale3(), factorScale3VV(),
0285 Kfactor(), mcME(), mbME(), mmuME(), mtauME(), renormMultFac(),
0286 renormFixScale(), factorMultFac(), factorFixScale(), higgsH1parity(),
0287 higgsH2parity(), higgsA3parity(), higgsH1eta(), higgsH2eta(), higgsA3eta(),
0288 higgsH1phi(), higgsH2phi(), higgsA3phi(), idA(), idB(), mA(), mB(),
0289 isLeptonA(), isLeptonB(), hasLeptonBeams(), beamA2gamma(), beamB2gamma(),
0290 hasGamma(), mH(), sH(), sH2(), x1Save(), x2Save(), sigmaSumSave(),
0291 id1(), id2(), id3(), id4(), id5(), idSave(), colSave(), acolSave(),
0292 mSave(), cosTheta(), sinTheta(), phi(), sHMass(), sHBeta(), pT2Mass(),
0293 pTFin(), mSaveT(), pTFinT(), cosThetaT(), sinThetaT(), phiT(), mME(),
0294 swapTU() {
0295 for (int i = 0; i < 12; ++i) mSave[i] = 0.;
0296 Q2RenSave = alpEM = alpS = Q2FacSave = pdf1Save = pdf2Save = 0.; }
0297
0298
0299 static const double CONVERT2MB, MASSMARGIN, COMPRELERR;
0300 static const int NCOMPSTEP;
0301
0302
0303 SusyLesHouches* slhaPtr;
0304
0305
0306 LHAupPtr lhaUpPtr;
0307
0308
0309 bool doVarE;
0310 int nQuarkIn, renormScale1, renormScale2, renormScale3, renormScale3VV,
0311 factorScale1, factorScale2, factorScale3, factorScale3VV;
0312 double Kfactor, mcME, mbME, mmuME, mtauME, renormMultFac, renormFixScale,
0313 factorMultFac, factorFixScale;
0314
0315
0316 int higgsH1parity, higgsH2parity, higgsA3parity;
0317 double higgsH1eta, higgsH2eta, higgsA3eta, higgsH1phi, higgsH2phi,
0318 higgsA3phi;
0319
0320
0321 int idA, idB;
0322 double mA, mB;
0323 bool isLeptonA, isLeptonB, hasLeptonBeams, beamA2gamma, beamB2gamma,
0324 hasGamma;
0325
0326
0327 vector<InBeam> inBeamA;
0328 vector<InBeam> inBeamB;
0329 void addBeamA(int idIn) {inBeamA.push_back(InBeam(idIn));}
0330 void addBeamB(int idIn) {inBeamB.push_back(InBeam(idIn));}
0331 int sizeBeamA() const {return inBeamA.size();}
0332 int sizeBeamB() const {return inBeamB.size();}
0333
0334
0335 vector<InPair> inPair;
0336 void addPair(int idAIn, int idBIn) {
0337 inPair.push_back(InPair(idAIn, idBIn));}
0338 int sizePair() const {return inPair.size();}
0339
0340
0341 double mH, sH, sH2;
0342
0343
0344 double Q2RenSave, alpEM, alpS, Q2FacSave, x1Save, x2Save, pdf1Save,
0345 pdf2Save, sigmaSumSave;
0346
0347
0348 int id1, id2, id3, id4, id5;
0349 int idSave[12], colSave[12], acolSave[12];
0350 double mSave[12], cosTheta, sinTheta, phi, sHMass, sHBeta, pT2Mass, pTFin;
0351 Particle parton[12];
0352
0353
0354
0355 Particle partonT[12];
0356 double mSaveT[12], pTFinT, cosThetaT, sinThetaT, phiT;
0357
0358
0359
0360 virtual bool setupForME() {return true;}
0361 bool setupForMEin();
0362 double mME[12];
0363 Vec4 pME[12];
0364
0365
0366 bool swapTU;
0367
0368
0369 void setId( int id1in = 0, int id2in = 0, int id3in = 0, int id4in = 0,
0370 int id5in = 0) {idSave[1] = id1in; idSave[2] = id2in; idSave[3] = id3in;
0371 idSave[4] = id4in; idSave[5] = id5in;}
0372 void setColAcol( int col1 = 0, int acol1 = 0,
0373 int col2 = 0, int acol2 = 0, int col3 = 0, int acol3 = 0,
0374 int col4 = 0, int acol4 = 0, int col5 = 0, int acol5 = 0) {
0375 colSave[1] = col1; acolSave[1] = acol1; colSave[2] = col2;
0376 acolSave[2] = acol2; colSave[3] = col3; acolSave[3] = acol3;
0377 colSave[4] = col4; acolSave[4] = acol4; colSave[5] = col5;
0378 acolSave[5] = acol5; }
0379 void swapColAcol() { swap(colSave[1], acolSave[1]);
0380 swap(colSave[2], acolSave[2]); swap(colSave[3], acolSave[3]);
0381 swap(colSave[4], acolSave[4]); swap(colSave[5], acolSave[5]);}
0382 void swapCol1234() { swap(colSave[1], colSave[2]);
0383 swap(colSave[3], colSave[4]); swap(acolSave[1], acolSave[2]);
0384 swap(acolSave[3], acolSave[4]);}
0385 void swapCol12() { swap(colSave[1], colSave[2]);
0386 swap(acolSave[1], acolSave[2]);}
0387 void swapCol34() { swap(colSave[3], colSave[4]);
0388 swap(acolSave[3], acolSave[4]);}
0389
0390
0391 double weightTopDecay( Event& process, int iResBeg, int iResEnd);
0392 double weightHiggsDecay( Event& process, int iResBeg, int iResEnd);
0393
0394 };
0395
0396
0397
0398
0399
0400
0401 class Sigma0Process : public SigmaProcess {
0402
0403 public:
0404
0405
0406 virtual ~Sigma0Process() {}
0407
0408
0409 virtual int nFinal() const {return 2;};
0410
0411
0412 virtual bool initFlux() {return true;}
0413
0414
0415 virtual double sigmaHat() {return 0.;}
0416
0417
0418 virtual double sigmaPDF(bool, bool, bool, double, double )
0419 {return sigmaHat();}
0420
0421
0422 virtual bool convert2mb() const {return false;}
0423
0424
0425 virtual void setIdInDiff(int idAin, int idBin) { idA = idAin; idB = idBin; }
0426
0427 protected:
0428
0429
0430 Sigma0Process() {}
0431
0432 };
0433
0434
0435
0436
0437
0438
0439 class Sigma1Process : public SigmaProcess {
0440
0441 public:
0442
0443
0444 virtual ~Sigma1Process() {}
0445
0446
0447 virtual int nFinal() const {return 1;};
0448
0449
0450 virtual void set1Kin( double x1in, double x2in, double sHin) {
0451 store1Kin( x1in, x2in, sHin); sigmaKin();}
0452
0453
0454 virtual double sigmaHat() {return 0.;}
0455
0456
0457
0458
0459 virtual double sigmaHatWrap(int id1in = 0, int id2in = 0);
0460
0461 protected:
0462
0463
0464 Sigma1Process() {}
0465
0466
0467 virtual void store1Kin( double x1in, double x2in, double sHin);
0468
0469
0470 virtual bool setupForME();
0471
0472 };
0473
0474
0475
0476
0477
0478
0479 class Sigma2Process : public SigmaProcess {
0480
0481 public:
0482
0483
0484 virtual ~Sigma2Process() {}
0485
0486
0487 virtual int nFinal() const {return 2;};
0488
0489
0490 virtual void set2Kin( double x1in, double x2in, double sHin,
0491 double tHin, double m3in, double m4in, double runBW3in,
0492 double runBW4in) { store2Kin( x1in, x2in, sHin, tHin, m3in, m4in,
0493 runBW3in, runBW4in); sigmaKin();}
0494
0495
0496 virtual void set2KinMPI( double x1in, double x2in, double sHin,
0497 double tHin, double uHin, double alpSin, double alpEMin,
0498 bool needMasses, double m3in, double m4in) {
0499 store2KinMPI( x1in, x2in, sHin, tHin, uHin, alpSin, alpEMin,
0500 needMasses, m3in, m4in); sigmaKin();}
0501
0502
0503 virtual double sigmaHat() {return 0.;}
0504
0505
0506
0507
0508 virtual double sigmaHatWrap(int id1in = 0, int id2in = 0) {
0509 id1 = id1in; id2 = id2in; double sigmaTmp = sigmaHat();
0510 if (convertM2()) sigmaTmp /= 16. * M_PI * sH2;
0511 if (convert2mb()) sigmaTmp *= CONVERT2MB;
0512 return sigmaTmp;}
0513
0514
0515 virtual bool final2KinMPI( int i1Res = 0, int i2Res = 0, Vec4 p1Res = 0.,
0516 Vec4 p2Res = 0., double m1Res = 0., double m2Res = 0.);
0517
0518 protected:
0519
0520
0521 Sigma2Process() : tH(0.), uH(0.), tH2(0.), uH2(0.), m3(0.), s3(0.),
0522 m4(0.), s4(0.), pT2(0.), runBW3(0.), runBW4(0.) {}
0523
0524
0525 virtual void store2Kin( double x1in, double x2in, double sHin,
0526 double tHin, double m3in, double m4in, double runBW3in,
0527 double runBW4in);
0528 virtual void store2KinMPI( double x1in, double x2in, double sHin,
0529 double tHin, double uHin, double alpSin, double alpEMin,
0530 bool needMasses, double m3in, double m4in);
0531
0532
0533 virtual bool setupForME();
0534
0535
0536 double tH, uH, tH2, uH2, m3, s3, m4, s4, pT2, runBW3, runBW4;
0537
0538 };
0539
0540
0541
0542
0543
0544
0545 class Sigma3Process : public SigmaProcess {
0546
0547 public:
0548
0549
0550 virtual ~Sigma3Process() {}
0551
0552
0553 virtual int nFinal() const {return 3;};
0554
0555
0556 virtual void set3Kin( double x1in, double x2in, double sHin,
0557 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn, double m3in, double m4in,
0558 double m5in, double runBW3in, double runBW4in, double runBW5in) {
0559 store3Kin( x1in, x2in, sHin, p3cmIn, p4cmIn, p5cmIn, m3in, m4in, m5in,
0560 runBW3in, runBW4in, runBW5in); sigmaKin();}
0561
0562
0563 virtual double sigmaHat() {return 0.;}
0564
0565 protected:
0566
0567
0568 Sigma3Process() : m3(), s3(), m4(), s4(), m5(), s5(), runBW3(),
0569 runBW4(), runBW5() {}
0570
0571
0572 virtual void store3Kin( double x1in, double x2in, double sHin,
0573 Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn, double m3in, double m4in,
0574 double m5in, double runBW3in, double runBW4in, double runBW5in);
0575
0576
0577 virtual bool setupForME();
0578
0579
0580 double m3, s3, m4, s4, m5, s5, runBW3, runBW4, runBW5;
0581 Vec4 p3cm, p4cm, p5cm;
0582
0583 };
0584
0585
0586
0587
0588
0589
0590 class SigmaLHAProcess : public SigmaProcess {
0591
0592 public:
0593
0594
0595 SigmaLHAProcess() {}
0596
0597
0598 virtual ~SigmaLHAProcess() {}
0599
0600
0601 virtual bool initFlux() {return true;}
0602
0603
0604 virtual double sigmaPDF(bool, bool, bool, double, double ) {return 1.;}
0605
0606
0607 virtual double weightDecay( Event& process, int iResBeg, int iResEnd);
0608
0609
0610 virtual void setScale();
0611
0612
0613 virtual string name() const {return "Les Houches User Process(es)";}
0614 virtual int code() const {return 9999;}
0615
0616
0617 virtual int nFinal() const;
0618
0619
0620 virtual bool convert2mb() const {return false;}
0621
0622
0623 virtual bool isLHA() const {return true;}
0624
0625
0626 virtual bool allowNegativeSigma() const {
0627 return (lhaUpPtr->strategy() < 0);}
0628
0629 private:
0630
0631 };
0632
0633
0634
0635 }
0636
0637 #endif