15 #ifndef Pythia8_SigmaTotal_H
16 #define Pythia8_SigmaTotal_H
18 #include "Pythia8/Info.h"
19 #include "Pythia8/ParticleData.h"
20 #include "Pythia8/PhysicsBase.h"
21 #include "Pythia8/PythiaStdlib.h"
22 #include "Pythia8/PythiaComplex.h"
23 #include "Pythia8/Settings.h"
38 SigmaTotAux() : isExpEl(), hasCou(), sigTot(), rhoOwn(), sigEl(), bEl(),
39 sigTotCou(), sigElCou(), sigXB(), sigAX(), sigXX(), sigAXB(), idA(),
40 idB(), tryCoulomb(), chgSgn(), tAbsMin(), lambda(), phaseCst(),
41 particleDataPtr(), rndmPtr() {}
44 virtual ~SigmaTotAux() {};
47 virtual void init(Info*) = 0;
51 virtual bool calcTotEl(
int ,
int ,
double ,
double ,
double ) {
return true;}
55 double sigTot, rhoOwn, sigEl, bEl, sigTotCou, sigElCou;
58 virtual double dsigmaEl(
double ,
bool =
false,
bool =
true) {
return 0.;}
62 virtual bool calcDiff(
int ,
int ,
double ,
double ,
double ) {
return true;}
65 double sigXB, sigAX, sigXX, sigAXB;
69 virtual double dsigmaSD(
double ,
double,
bool =
true,
int = 0) {
return 0.;}
72 virtual bool splitDiff() {
return false;}
76 virtual double dsigmaDD(
double ,
double ,
double ,
int = 0) {
return 0.;}
80 virtual double dsigmaCD(
double ,
double ,
double ,
double,
int ) {
84 virtual double mMinCD() {
return 1.;}
88 pair<double,double> tRange(
double sIn,
double s1In,
double s2In,
89 double s3In,
double s4In) {
90 double lambda12 = pow2( sIn - s1In - s2In) - 4. * s1In * s2In;
91 double lambda34 = pow2( sIn - s3In - s4In) - 4. * s3In * s4In;
92 if (lambda12 < 0. || lambda34 < 0.)
return make_pair( 0., 0.);
93 double tLow = -0.5 * (sIn - (s1In + s2In + s3In + s4In) + (s1In - s2In)
94 * (s3In - s4In) / sIn + sqrtpos(lambda12 * lambda34) / sIn);
95 double tUpp = ( (s3In - s1In) * (s4In - s2In) + (s1In + s4In - s2In - s3In)
96 * (s1In * s4In - s2In * s3In) / sIn ) / tLow;
97 return make_pair( tLow, tUpp); }
98 bool tInRange(
double tIn,
double sIn,
double s1In,
double s2In,
99 double s3In,
double s4In) {
100 pair<double, double> tRng = tRange( sIn, s1In, s2In, s3In, s4In);
101 return (tIn > tRng.first && tIn < tRng.second); }
104 double pFormFac(
double tIn) {
return (4. * SPROTON - 2.79 * tIn)
105 / ((4. * SPROTON - tIn) * pow2(1. - tIn / 0.71)); }
110 static const int NPOINTS;
111 static const double ALPHAEM, CONVERTEL, MPROTON, SPROTON, MPION, SPION,
112 GAMMAEUL, TABSREF, TABSMAX, MINSLOPEEL;
119 double chgSgn, tAbsMin, lambda, phaseCst;
120 virtual bool initCoulomb(Settings& settings,
121 ParticleData* particleDataPtrIn);
122 virtual bool addCoulomb();
123 virtual double dsigmaElCoulomb(
double t);
126 ParticleData* particleDataPtr;
138 class SigmaTotal :
public PhysicsBase {
143 SigmaTotal() : isCalc(false), ispp(), modeTotEl(), modeTotElNow(),
144 modeDiff(), modeDiffNow(), idAbsA(), idAbsB(), s(), sigND(),
145 sigTotElPtr(NULL), sigDiffPtr(NULL) {};
148 virtual ~SigmaTotal() {
if (sigTotElPtr)
delete sigTotElPtr;
149 if (sigDiffPtr)
delete sigDiffPtr; }
155 bool calc(
int idA,
int idB,
double eCM);
158 bool hasSigmaTot() {
return isCalc;}
161 double sigmaTot() {
return sigTotElPtr->sigTotCou;}
162 double rho() {
return sigTotElPtr->rhoOwn;}
163 double sigmaEl() {
return sigTotElPtr->sigElCou;}
164 bool bElIsExp() {
return sigTotElPtr->isExpEl;}
165 double bSlopeEl() {
return sigTotElPtr->bEl;}
166 bool hasCoulomb() {
return sigTotElPtr->hasCou;}
169 bool calcTotEl(
int idAin,
int idBin,
double sIn,
double mAin,
double mBin) {
170 return sigTotElPtr->calcTotEl( idAin, idBin, sIn, mAin, mBin); }
173 double dsigmaEl(
double t,
bool useCoulomb =
false,
174 bool onlyPomerons =
false) {
175 return sigTotElPtr->dsigmaEl( t, useCoulomb, onlyPomerons); }
178 double sigmaXB()
const {
return sigDiffPtr->sigXB;}
179 double sigmaAX()
const {
return sigDiffPtr->sigAX;}
180 double sigmaXX()
const {
return sigDiffPtr->sigXX;}
181 double sigmaAXB()
const {
return sigDiffPtr->sigAXB;}
182 double sigmaND()
const {
return sigND;}
185 double dsigmaSD(
double xi,
double t,
bool isXB =
true,
int step = 0) {
186 return sigDiffPtr->dsigmaSD( xi, t, isXB, step); }
189 virtual bool splitDiff() {
return sigDiffPtr->splitDiff();}
192 double dsigmaDD(
double xi1,
double xi2,
double t,
int step = 0) {
193 return sigDiffPtr->dsigmaDD( xi1, xi2, t, step); }
196 double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
int step = 0)
197 {
return sigDiffPtr->dsigmaCD( xi1, xi2, t1, t2, step); }
200 double mMinCD() {
return sigDiffPtr->mMinCD();}
203 void chooseVMDstates(
int idA,
int idB,
double eCM,
int processCode);
207 pair<double,double> tRange(
double sIn,
double s1In,
double s2In,
208 double s3In,
double s4In) {
209 return sigDiffPtr->tRange( sIn, s1In, s2In, s3In, s4In); }
210 bool tInRange(
double tIn,
double sIn,
double s1In,
double s2In,
211 double s3In,
double s4In) {
212 return sigDiffPtr->tInRange( tIn, sIn, s1In, s2In, s3In, s4In); }
217 static const double MMIN;
222 int modeTotEl, modeTotElNow, modeDiff, modeDiffNow, idAbsA, idAbsB;
226 SigmaTotAux* sigTotElPtr;
229 SigmaTotAux* sigDiffPtr;
238 class SigmaTotOwn :
public SigmaTotAux {
243 SigmaTotOwn() : dampenGap(), pomFlux(), s(), a0(), ap(), b0(), A1(), A2(),
244 A3(), a1(), a2(), a3(), bMinDD(), ygap(), ypow(), expPygap(), mMinCDnow(),
245 wtNow(), yNow(), yNow1(), yNow2(), b(), b1(), b2(), Q(), Q1(),
249 virtual void init(Info* infoPtrIn);
252 virtual bool calcTotEl(
int idAin,
int idBin,
double ,
double ,
double);
255 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
true);
258 virtual bool calcDiff(
int ,
int ,
double sIn,
double ,
double ) {
259 s = sIn;
return true;}
262 virtual double dsigmaSD(
double xi,
double t,
bool =
true,
int = 0);
265 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int = 0);
268 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
272 virtual double mMinCD() {
return mMinCDnow;}
279 double s, a0, ap, b0, A1, A2, A3, a1, a2, a3, bMinDD, ygap, ypow, expPygap,
280 mMinCDnow, wtNow, yNow, yNow1, yNow2, b, b1, b2, Q, Q1, Q2;
290 class SigmaSaSDL :
public SigmaTotAux {
295 SigmaSaSDL() : doDampen(), zeroAXB(), swapped(), sameSign(), idAbsA(),
296 idAbsB(), iProc(), iHadA(), iHadB(), iHadAtmp(), iHadBtmp(), iProcVP(),
297 iProcVV(), s(), mA(), mB(), bA(), bB(), maxXBOwn(), maxAXOwn(), maxXXOwn(),
298 maxAXBOwn(), epsSaS(), sigmaPomP(), mPomP(), pPomP(), sigAXB2TeV(),
299 mMin0(), cRes(), mRes0(), mMinCDnow(), alP2(), s0(), mMinXB(), mMinAX(),
300 mMinAXB(), mResXB(), mResAX(), sResXB(), sResAX(), wtNow(), mAtmp(),
301 mBtmp(), multVP(), multVV(), infoPtr() {};
304 virtual void init(Info* infoPtrIn);
307 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double mAin,
311 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
true);
314 virtual bool calcDiff(
int idAin,
int idBin,
double sIn,
double mAin,
318 virtual double dsigmaSD(
double xi,
double t,
bool isXB,
int = 0);
321 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int = 0);
324 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
328 virtual double mMinCD() {
return mMinCDnow;}
333 static const int IHADATABLE[], IHADBTABLE[], ISDTABLE[], IDDTABLE[], NVMD;
334 static const double EPSILON, ETA, X[], Y[], BETA0[], BHAD[], ALPHAPRIME,
335 CONVERTSD, CONVERTDD, VMDMASS[4], GAMMAFAC[4],
336 CSD[10][8], CDD[10][9];
339 bool doDampen, zeroAXB, swapped, sameSign;
340 int idAbsA, idAbsB, iProc, iHadA, iHadB, iHadAtmp[4],
341 iHadBtmp[4], iProcVP[4], iProcVV[4][4];
342 double s, mA, mB, bA, bB, maxXBOwn, maxAXOwn, maxXXOwn, maxAXBOwn, epsSaS,
343 sigmaPomP, mPomP, pPomP, sigAXB2TeV, mMin0, cRes, mRes0, mMinCDnow,
344 alP2, s0, mMinXB, mMinAX, mMinAXB, mResXB, mResAX, sResXB,
345 sResAX, wtNow, mAtmp[4], mBtmp[4], multVP[4], multVV[4][4];
348 bool findBeamComb(
int idAin,
int idBin,
double mAin,
double mBin);
360 class SigmaMBR :
public SigmaTotAux {
365 SigmaMBR() : s(), sigSD(), sigDD(), sigCD(), eps(), alph(), beta0gev(),
366 beta0mb(), sigma0mb(), sigma0gev(), m2min(), dyminSDflux(),
367 dyminDDflux(), dyminCDflux(), dyminSD(), dyminDD(), dyminCD(),
368 dyminSigSD(), dyminSigDD(), dyminSigCD(), a1(), a2(), b1(), b2(),
369 sdpmax(), ddpmax(), dpepmax() {};
372 virtual void init(Info* infoPtrIn);
375 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double );
378 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
true);
381 virtual bool calcDiff(
int ,
int ,
double sIn,
double ,
double );
384 virtual bool splitDiff() {
return true;}
387 virtual double dsigmaSD(
double xi,
double t,
bool =
true,
int step = 0);
390 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int step = 0);
393 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
397 virtual double mMinCD() {
return sqrt(m2min);}
402 static const int NINTEG, NINTEG2;
403 static const double FFA1, FFA2, FFB1, FFB2;
406 double s, sigSD, sigDD, sigCD, eps, alph, beta0gev,
407 beta0mb, sigma0mb, sigma0gev, m2min, dyminSDflux, dyminDDflux,
408 dyminCDflux, dyminSD, dyminDD, dyminCD, dyminSigSD, dyminSigDD,
409 dyminSigCD, a1, a2, b1, b2, sdpmax, ddpmax, dpepmax;
424 class SigmaABMST :
public SigmaTotAux {
429 SigmaABMST() : ispp(), dampenGap(), useBMin(), modeSD(), modeDD(), modeCD(),
430 s(), facEl(), m2minp(), m2minm(), alp0(), alpt(), s0(), c0(), ygap(),
431 ypow(), expPygap(), multSD(), powSD(), multDD(), powDD(), multCD(),
432 powCD(), mMinCDnow(), bMinSD(), bMinDD(), bMinCD() {};
435 virtual void init(Info* infoPtrIn);
438 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double );
441 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
442 bool onlyPomerons =
false) {
443 return facEl * pow2(abs(amplitude( t, useCoulomb, onlyPomerons)));}
446 virtual bool calcDiff(
int idAin,
int idBin,
double sIn,
double ,
double );
449 virtual double dsigmaSD(
double xi,
double t,
bool =
true ,
int = 0);
452 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int = 0);
455 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
459 virtual double mMinCD() {
return mMinCDnow;}
464 static const bool MCINTDD;
465 static const int NPOINTSTSD, NPOINTSTDD, NPOINTMCDD, NPOINTMCCD;
466 static const double EPSI[], ALPP[], NORM[], SLOPE[], FRACS[], TRIG[],
467 LAM2P, BAPPR[], LAM2FF, MRES[4], WRES[4], CRES[4],
468 AFAC[4], BFAC[4], CFAC[4], PPP[4], EPS[2], APR[2],
469 CPI[6], CNST[5], XIDIVSD, DXIRAWSD, DLNXIRAWSD,
470 XIDIVDD, DXIRAWDD, DLNXIRAWDD, BMCINTDD, BMCINTCD;
473 bool ispp, dampenGap, useBMin;
474 int modeSD, modeDD, modeCD;
475 double s, facEl, m2minp, m2minm, alp0[2], alpt[3], s0, c0,
476 ygap, ypow, expPygap, multSD, powSD, multDD, powDD,
477 multCD, powCD, mMinCDnow, bMinSD, bMinDD, bMinCD;
480 complex amplitude(
double t,
bool useCoulomb =
false,
481 bool onlyPomerons =
false) ;
484 complex sModAlp(
double sMod,
double alpha) {
485 return exp(complex( 0., -0.5 * M_PI * alpha)) * pow( sMod, alpha); }
488 virtual double dsigmaSDcore(
double xi,
double t);
491 double dsigmaSDintT(
double xi,
double tMinIn,
double tMaxIn);
494 double dsigmaSDintXiT(
double xiMinIn,
double xiMaxIn,
double tMinIn,
498 double dsigmaDDintMC();
501 double dsigmaDDintT(
double xi1,
double xi2,
double tMinIn,
double tMaxIn);
504 double dsigmaDDintXi2T(
double xi1,
double xi2MinIn,
double xi2MaxIn,
505 double tMinIn,
double tMaxIn);
508 double dsigmaDDintXi1Xi2T(
double xi1MinIn,
double xi1MaxIn,
509 double xi2MinIn,
double xi2MaxIn,
double tMinIn,
double tMaxIn);
512 double dsigmaCDintMC();
521 class SigmaRPP :
public SigmaTotAux {
526 SigmaRPP() : ispp(), s(), facEl() {};
529 virtual void init(Info* infoPtrIn) {
530 tryCoulomb = infoPtrIn->settingsPtr->flag(
"SigmaElastic:Coulomb");
531 tAbsMin = infoPtrIn->settingsPtr->parm(
"SigmaElastic:tAbsMin"); }
534 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double );
537 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
true) {
538 return facEl * pow2(abs(amplitude( t, useCoulomb))); }
543 static const double EPS1[], ALPP[], NORM[], BRPP[], KRPP[], LAM2FF;
550 complex amplitude(
double t,
bool useCoulomb =
false) ;
553 complex sModAlp(
double sMod,
double alpha) {
554 return exp(complex( 0., -0.5 * M_PI * alpha)) * pow( sMod, alpha); }
557 complex besJ0( complex x);
558 complex besJ1( complex x);
566 #endif // Pythia8_SigmaTotal_H