File indexing completed on 2025-01-18 10:06:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef Pythia8_SigmaTotal_H
0016 #define Pythia8_SigmaTotal_H
0017
0018 #include "Pythia8/Info.h"
0019 #include "Pythia8/ParticleData.h"
0020 #include "Pythia8/PhysicsBase.h"
0021 #include "Pythia8/PythiaStdlib.h"
0022 #include "Pythia8/PythiaComplex.h"
0023 #include "Pythia8/Settings.h"
0024
0025 namespace Pythia8 {
0026
0027
0028
0029
0030
0031
0032
0033 class SigmaTotAux {
0034
0035 public:
0036
0037
0038 SigmaTotAux() : isExpEl(), hasCou(), sigTot(), rhoOwn(), sigEl(), bEl(),
0039 sigTotCou(), sigElCou(), sigXB(), sigAX(), sigXX(), sigAXB(), idA(),
0040 idB(), tryCoulomb(), chgSgn(), tAbsMin(), lambda(), phaseCst(),
0041 particleDataPtr(), rndmPtr() {}
0042
0043
0044 virtual ~SigmaTotAux() {};
0045
0046
0047 virtual void init(Info*) = 0;
0048
0049
0050 virtual bool calcTot( int, int, double) {return true;}
0051
0052
0053
0054 virtual bool calcTotEl( int , int , double , double , double ) {return true;}
0055
0056
0057 bool isExpEl, hasCou;
0058 double sigTot, rhoOwn, sigEl, bEl, sigTotCou, sigElCou;
0059
0060
0061 virtual double dsigmaEl( double , bool = false, bool = false) {return 0.;}
0062
0063
0064
0065 virtual bool calcDiff( int , int , double , double , double ) {return true;}
0066
0067
0068 double sigXB, sigAX, sigXX, sigAXB, sigNDtmp;
0069
0070
0071
0072 virtual double dsigmaSD( double , double, bool = true, int = 0) {return 0.;}
0073
0074
0075 virtual bool splitDiff() {return false;}
0076
0077
0078
0079 virtual double dsigmaDD( double , double , double , int = 0) {return 0.;}
0080
0081
0082
0083 virtual double dsigmaCD( double , double , double , double, int ) {
0084 return 0.;}
0085
0086
0087 virtual double mMinCD() {return 1.;}
0088
0089
0090
0091 pair<double,double> tRange( double sIn, double s1In, double s2In,
0092 double s3In, double s4In) {
0093 double lambda12 = pow2( sIn - s1In - s2In) - 4. * s1In * s2In;
0094 double lambda34 = pow2( sIn - s3In - s4In) - 4. * s3In * s4In;
0095 if (lambda12 < 0. || lambda34 < 0.) return make_pair( 0., 0.);
0096 double tLow = -0.5 * (sIn - (s1In + s2In + s3In + s4In) + (s1In - s2In)
0097 * (s3In - s4In) / sIn + sqrtpos(lambda12 * lambda34) / sIn);
0098 double tUpp = ( (s3In - s1In) * (s4In - s2In) + (s1In + s4In - s2In - s3In)
0099 * (s1In * s4In - s2In * s3In) / sIn ) / tLow;
0100 return make_pair( tLow, tUpp); }
0101 bool tInRange( double tIn, double sIn, double s1In, double s2In,
0102 double s3In, double s4In) {
0103 pair<double, double> tRng = tRange( sIn, s1In, s2In, s3In, s4In);
0104 return (tIn > tRng.first && tIn < tRng.second); }
0105
0106
0107 double pFormFac(double tIn) {return (4. * SPROTON - 2.79 * tIn)
0108 / ((4. * SPROTON - tIn) * pow2(1. - tIn / 0.71)); }
0109
0110 protected:
0111
0112
0113 static const int NPOINTS;
0114 static const double ALPHAEM, CONVERTEL, MPROTON, SPROTON, MPION, SPION,
0115 GAMMAEUL, TABSREF, TABSMAX, MINSLOPEEL;
0116
0117
0118 int idA, idB;
0119
0120
0121 bool tryCoulomb;
0122 double chgSgn, tAbsMin, lambda, phaseCst;
0123 virtual bool initCoulomb(Settings& settings,
0124 ParticleData* particleDataPtrIn);
0125 virtual bool addCoulomb();
0126 virtual double dsigmaElCoulomb(double t);
0127
0128
0129 ParticleData* particleDataPtr;
0130
0131
0132 Rndm* rndmPtr;
0133
0134 };
0135
0136
0137
0138
0139
0140
0141 class SigmaTotal : public PhysicsBase {
0142
0143 public:
0144
0145
0146 SigmaTotal() : isCalc(false), ispp(), modeTotEl(), modeTotElNow(),
0147 modeDiff(), modeDiffNow(), idAbsA(), idAbsB(), s(), sigND(),
0148 sigTotElPtr(nullptr), sigDiffPtr(nullptr) {};
0149
0150
0151 virtual ~SigmaTotal() { if (sigTotElPtr) delete sigTotElPtr;
0152 if (sigDiffPtr) delete sigDiffPtr; }
0153
0154
0155 void init();
0156
0157
0158 bool calc( int idA, int idB, double eCM);
0159
0160
0161 bool hasSigmaTot() {return isCalc;}
0162
0163
0164 double sigmaTot() {return sigTotElPtr->sigTotCou;}
0165 double rho() {return sigTotElPtr->rhoOwn;}
0166 double sigmaEl() {return sigTotElPtr->sigElCou;}
0167 bool bElIsExp() {return sigTotElPtr->isExpEl;}
0168 double bSlopeEl() {return sigTotElPtr->bEl;}
0169 bool hasCoulomb() {return sigTotElPtr->hasCou;}
0170
0171
0172 bool calcTotEl( int idAin, int idBin, double sIn, double mAin, double mBin) {
0173 return sigTotElPtr->calcTotEl( idAin, idBin, sIn, mAin, mBin); }
0174
0175
0176 double dsigmaEl( double t, bool useCoulomb = false,
0177 bool onlyPomerons = false) {
0178 return sigTotElPtr->dsigmaEl( t, useCoulomb, onlyPomerons); }
0179
0180
0181 double sigmaXB() const {return sigDiffPtr->sigXB;}
0182 double sigmaAX() const {return sigDiffPtr->sigAX;}
0183 double sigmaXX() const {return sigDiffPtr->sigXX;}
0184 double sigmaAXB() const {return sigDiffPtr->sigAXB;}
0185 double sigmaND() const {return sigND;}
0186
0187
0188 double dsigmaSD( double xi, double t, bool isXB = true, int step = 0) {
0189 return sigDiffPtr->dsigmaSD( xi, t, isXB, step); }
0190
0191
0192 virtual bool splitDiff() {return sigDiffPtr->splitDiff();}
0193
0194
0195 double dsigmaDD( double xi1, double xi2, double t, int step = 0) {
0196 return sigDiffPtr->dsigmaDD( xi1, xi2, t, step); }
0197
0198
0199 double dsigmaCD( double xi1, double xi2, double t1, double t2, int step = 0)
0200 { return sigDiffPtr->dsigmaCD( xi1, xi2, t1, t2, step); }
0201
0202
0203 double mMinCD() {return sigDiffPtr->mMinCD();}
0204
0205
0206 void chooseVMDstates(int idA, int idB, double eCM, int processCode);
0207
0208
0209
0210 pair<double,double> tRange( double sIn, double s1In, double s2In,
0211 double s3In, double s4In) {
0212 return sigDiffPtr->tRange( sIn, s1In, s2In, s3In, s4In); }
0213 bool tInRange( double tIn, double sIn, double s1In, double s2In,
0214 double s3In, double s4In) {
0215 return sigDiffPtr->tInRange( tIn, sIn, s1In, s2In, s3In, s4In); }
0216
0217 private:
0218
0219
0220 static const double MMIN;
0221
0222
0223 bool isCalc, ispp;
0224
0225 int modeTotEl, modeTotElNow, modeDiff, modeDiffNow, idAbsA, idAbsB,
0226 idAOld, idBOld, modeTotElOld, modeDiffOld;
0227 double s, sigND, eCMOld;
0228
0229
0230 SigmaTotAux* sigTotElPtr;
0231
0232
0233 SigmaTotAux* sigDiffPtr;
0234
0235 };
0236
0237
0238
0239
0240
0241
0242 class SigmaTotOwn : public SigmaTotAux {
0243
0244 public:
0245
0246
0247 SigmaTotOwn() : dampenGap(), pomFlux(), s(), a0(), ap(), b0(), A1(), A2(),
0248 A3(), a1(), a2(), a3(), bMinDD(), ygap(), ypow(), expPygap(), mMinCDnow(),
0249 wtNow(), yNow(), yNow1(), yNow2(), b(), b1(), b2(), Q(), Q1(),
0250 Q2() {};
0251
0252
0253 virtual void init(Info* infoPtrIn);
0254
0255
0256 virtual bool calcTotEl( int idAin, int idBin, double , double , double);
0257
0258
0259 virtual double dsigmaEl( double t, bool useCoulomb = false, bool = false);
0260
0261
0262 virtual bool calcDiff( int , int , double sIn, double , double ) {
0263 s = sIn; return true;}
0264
0265
0266 virtual double dsigmaSD( double xi, double t, bool = true, int = 0);
0267
0268
0269 virtual double dsigmaDD( double xi1, double xi2, double t, int = 0);
0270
0271
0272 virtual double dsigmaCD( double xi1, double xi2, double t1, double t2,
0273 int = 0);
0274
0275
0276 virtual double mMinCD() {return mMinCDnow;}
0277
0278 private:
0279
0280
0281 bool dampenGap;
0282 int pomFlux;
0283 double s, a0, ap, b0, A1, A2, A3, a1, a2, a3, bMinDD, ygap, ypow, expPygap,
0284 mMinCDnow, wtNow, yNow, yNow1, yNow2, b, b1, b2, Q, Q1, Q2;
0285
0286 };
0287
0288
0289
0290
0291
0292
0293
0294 class SigmaSaSDL : public SigmaTotAux {
0295
0296 public:
0297
0298
0299 SigmaSaSDL() : doDampen(), zeroAXB(), swapped(), sameSign(), idAbsA(),
0300 idAbsB(), iProc(), iHadA(), iHadB(), iHadAtmp(), iHadBtmp(), iProcVP(),
0301 iProcVV(), s(), mA(), mB(), bA(), bB(), maxXBOwn(), maxAXOwn(), maxXXOwn(),
0302 maxAXBOwn(), epsSaS(), sigmaPomP(), mPomP(), pPomP(), sigAXB2TeV(),
0303 mMin0(), cRes(), mRes0(), mMinCDnow(), alP2(), s0(), mMinXB(), mMinAX(),
0304 mMinAXB(), mResXB(), mResAX(), sResXB(), sResAX(), wtNow(), mAtmp(),
0305 mBtmp(), multVP(), multVV(), infoPtr() {};
0306
0307
0308 virtual void init(Info* infoPtrIn);
0309
0310
0311 double sigmaTotal( int idAin, int idBin, double sIn, double mAin,
0312 double mBin);
0313
0314
0315 virtual bool calcTotEl( int idAin, int idBin, double sIn, double mAin,
0316 double mBin);
0317
0318
0319 virtual double dsigmaEl( double t, bool useCoulomb = false, bool = false);
0320
0321
0322 virtual bool calcDiff( int idAin, int idBin, double sIn, double mAin,
0323 double mBin);
0324
0325
0326 virtual double dsigmaSD( double xi, double t, bool isXB, int = 0);
0327
0328
0329 virtual double dsigmaDD( double xi1, double xi2, double t, int = 0);
0330
0331
0332 virtual double dsigmaCD( double xi1, double xi2, double t1, double t2,
0333 int = 0);
0334
0335
0336 virtual double mMinCD() {return mMinCDnow;}
0337
0338 private:
0339
0340
0341 static const int IHADATABLE[], IHADBTABLE[], ISDTABLE[], IDDTABLE[], NVMD;
0342 static const double EPSILON, ETA, X[], Y[], BETA0[], BHAD[], ALPHAPRIME,
0343 CONVERTSD, CONVERTDD, VMDMASS[4], GAMMAFAC[4],
0344 CSD[24][8], CDD[22][9], DIFFTHR, DIFFMULT;
0345
0346
0347 bool doDampen, zeroAXB, swapped, sameSign;
0348 int idAbsA, idAbsB, iProc, iHadA, iHadB, iHadAtmp[4],
0349 iHadBtmp[4], iProcVP[4], iProcVV[4][4];
0350 double s, mA, mB, bA, bB, maxXBOwn, maxAXOwn, maxXXOwn, maxAXBOwn, epsSaS,
0351 sigmaPomP, mPomP, pPomP, sigAXB2TeV, mMin0, cRes, mRes0, mMinCDnow,
0352 alP2, s0, mMinXB, mMinAX, mMinAXB, mResXB, mResAX, sResXB,
0353 sResAX, wtNow, mAtmp[4], mBtmp[4], multVP[4], multVV[4][4];
0354
0355
0356 bool findBeamComb( int idAin, int idBin, double mAin, double mBin);
0357
0358
0359 Info* infoPtr;
0360
0361 };
0362
0363
0364
0365
0366
0367
0368 class SigmaMBR : public SigmaTotAux {
0369
0370 public:
0371
0372
0373 SigmaMBR() : s(), sigSD(), sigDD(), sigCD(), eps(), alph(), beta0gev(),
0374 beta0mb(), sigma0mb(), sigma0gev(), m2min(), dyminSDflux(),
0375 dyminDDflux(), dyminCDflux(), dyminSD(), dyminDD(), dyminCD(),
0376 dyminSigSD(), dyminSigDD(), dyminSigCD(), a1(), a2(), b1(), b2(),
0377 sdpmax(), ddpmax(), dpepmax() {};
0378
0379
0380 virtual void init(Info* infoPtrIn);
0381
0382
0383 virtual bool calcTotEl( int idAin, int idBin, double sIn, double , double );
0384
0385
0386 virtual double dsigmaEl(double t, bool useCoulomb = false, bool = false);
0387
0388
0389 virtual bool calcDiff( int , int , double sIn, double , double );
0390
0391
0392 virtual bool splitDiff() {return true;}
0393
0394
0395 virtual double dsigmaSD( double xi, double t, bool = true, int step = 0);
0396
0397
0398 virtual double dsigmaDD( double xi1, double xi2, double t, int step = 0);
0399
0400
0401 virtual double dsigmaCD( double xi1, double xi2, double t1, double t2,
0402 int step = 0);
0403
0404
0405 virtual double mMinCD() {return sqrt(m2min);}
0406
0407 private:
0408
0409
0410 static const int NINTEG, NINTEG2;
0411 static const double FFA1, FFA2, FFB1, FFB2;
0412
0413
0414 double s, sigSD, sigDD, sigCD, eps, alph, beta0gev,
0415 beta0mb, sigma0mb, sigma0gev, m2min, dyminSDflux, dyminDDflux,
0416 dyminCDflux, dyminSD, dyminDD, dyminCD, dyminSigSD, dyminSigDD,
0417 dyminSigCD, a1, a2, b1, b2, sdpmax, ddpmax, dpepmax;
0418
0419
0420
0421
0422
0423
0424
0425 };
0426
0427
0428
0429
0430
0431
0432 class SigmaABMST : public SigmaTotAux {
0433
0434 public:
0435
0436
0437 SigmaABMST() : ispp(), dampenGap(), useBMin(), modeSD(), modeDD(), modeCD(),
0438 s(), facEl(), m2minp(), m2minm(), alp0(), alpt(), s0(), c0(), ygap(),
0439 ypow(), expPygap(), multSD(), powSD(), multDD(), powDD(), multCD(),
0440 powCD(), mMinCDnow(), bMinSD(), bMinDD(), bMinCD() {};
0441
0442
0443 virtual void init(Info* infoPtrIn);
0444
0445
0446 virtual bool calcTotEl( int idAin, int idBin, double sIn, double , double );
0447
0448
0449 virtual double dsigmaEl( double t, bool useCoulomb = false,
0450 bool onlyPomerons = false) {
0451 return facEl * pow2(abs(amplitude( t, useCoulomb, onlyPomerons)));}
0452
0453
0454 virtual bool calcDiff( int idAin, int idBin, double sIn, double , double );
0455
0456
0457 virtual double dsigmaSD( double xi, double t, bool = true , int = 0);
0458
0459
0460 virtual double dsigmaDD( double xi1, double xi2, double t, int = 0);
0461
0462
0463 virtual double dsigmaCD( double xi1, double xi2, double t1, double t2,
0464 int = 0);
0465
0466
0467 virtual double mMinCD() {return mMinCDnow;}
0468
0469 private:
0470
0471
0472 static const bool MCINTDD;
0473 static const int NPOINTSTSD, NPOINTSTDD, NPOINTMCDD, NPOINTMCCD;
0474 static const double EPSI[], ALPP[], NORM[], SLOPE[], FRACS[], TRIG[],
0475 LAM2P, BAPPR[], LAM2FF, MRES[4], WRES[4], CRES[4],
0476 AFAC[4], BFAC[4], CFAC[4], PPP[4], EPS[2], APR[2],
0477 CPI[6], CNST[5], XIDIVSD, DXIRAWSD, DLNXIRAWSD,
0478 XIDIVDD, DXIRAWDD, DLNXIRAWDD, BMCINTDD, BMCINTCD;
0479
0480
0481 bool ispp, dampenGap, useBMin;
0482 int modeSD, modeDD, modeCD;
0483 double s, facEl, m2minp, m2minm, alp0[2], alpt[3], s0, c0,
0484 ygap, ypow, expPygap, multSD, powSD, multDD, powDD,
0485 multCD, powCD, mMinCDnow, bMinSD, bMinDD, bMinCD;
0486
0487
0488 complex amplitude( double t, bool useCoulomb = false,
0489 bool onlyPomerons = false) ;
0490
0491
0492 complex sModAlp( double sMod, double alpha) {
0493 return exp(complex( 0., -0.5 * M_PI * alpha)) * pow( sMod, alpha); }
0494
0495
0496 virtual double dsigmaSDcore(double xi, double t);
0497
0498
0499 double dsigmaSDintT( double xi, double tMinIn, double tMaxIn);
0500
0501
0502 double dsigmaSDintXiT( double xiMinIn, double xiMaxIn, double tMinIn,
0503 double tMaxIn );
0504
0505
0506 double dsigmaDDintMC();
0507
0508
0509 double dsigmaDDintT( double xi1, double xi2, double tMinIn, double tMaxIn);
0510
0511
0512 double dsigmaDDintXi2T( double xi1, double xi2MinIn, double xi2MaxIn,
0513 double tMinIn, double tMaxIn);
0514
0515
0516 double dsigmaDDintXi1Xi2T( double xi1MinIn, double xi1MaxIn,
0517 double xi2MinIn, double xi2MaxIn, double tMinIn, double tMaxIn);
0518
0519
0520 double dsigmaCDintMC();
0521
0522 };
0523
0524
0525
0526
0527
0528
0529 class SigmaRPP : public SigmaTotAux {
0530
0531 public:
0532
0533
0534 SigmaRPP() : ispp(), s(), facEl() {};
0535
0536
0537 virtual void init(Info* infoPtrIn) {
0538 tryCoulomb = infoPtrIn->settingsPtr->flag("SigmaElastic:Coulomb");
0539 tAbsMin = infoPtrIn->settingsPtr->parm("SigmaElastic:tAbsMin"); }
0540
0541
0542 virtual bool calcTotEl( int idAin, int idBin, double sIn, double , double );
0543
0544
0545 virtual double dsigmaEl( double t, bool useCoulomb = false, bool = false) {
0546 return facEl * pow2(abs(amplitude( t, useCoulomb))); }
0547
0548 private:
0549
0550
0551 static const double EPS1[], ALPP[], NORM[], BRPP[], KRPP[], LAM2FF;
0552
0553
0554 bool ispp;
0555 double s, facEl;
0556
0557
0558 complex amplitude( double t, bool useCoulomb = false) ;
0559
0560
0561 complex sModAlp( double sMod, double alpha) {
0562 return exp(complex( 0., -0.5 * M_PI * alpha)) * pow( sMod, alpha); }
0563
0564
0565 complex besJ0( complex x);
0566 complex besJ1( complex x);
0567
0568 };
0569
0570
0571
0572 }
0573
0574 #endif