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" 39 sigTotCou(), sigElCou(),
sigXB(), sigAX(), sigXX(), sigAXB(),
idA(),
40 idB(),
tryCoulomb(), chgSgn(), tAbsMin(), lambda(), phaseCst(),
50 virtual bool calcTot(
int,
int,
double) {
return true;}
54 virtual bool calcTotEl(
int ,
int ,
double ,
double ,
double ) {
return true;}
58 double sigTot, rhoOwn, sigEl, bEl, sigTotCou, sigElCou;
61 virtual double dsigmaEl(
double ,
bool =
false,
bool =
false) {
return 0.;}
65 virtual bool calcDiff(
int ,
int ,
double ,
double ,
double ) {
return true;}
68 double sigXB, sigAX, sigXX, sigAXB, sigNDtmp;
72 virtual double dsigmaSD(
double ,
double,
bool =
true,
int = 0) {
return 0.;}
79 virtual double dsigmaDD(
double ,
double ,
double ,
int = 0) {
return 0.;}
83 virtual double dsigmaCD(
double ,
double ,
double ,
double,
int ) {
91 pair<double,double>
tRange(
double sIn,
double s1In,
double s2In,
92 double s3In,
double s4In) {
93 double lambda12 =
pow2( sIn - s1In - s2In) - 4. * s1In * s2In;
94 double lambda34 =
pow2( sIn - s3In - s4In) - 4. * s3In * s4In;
95 if (lambda12 < 0. || lambda34 < 0.)
return make_pair( 0., 0.);
96 double tLow = -0.5 * (sIn - (s1In + s2In + s3In + s4In) + (s1In - s2In)
97 * (s3In - s4In) / sIn +
sqrtpos(lambda12 * lambda34) / sIn);
98 double tUpp = ( (s3In - s1In) * (s4In - s2In) + (s1In + s4In - s2In - s3In)
99 * (s1In * s4In - s2In * s3In) / sIn ) / tLow;
100 return make_pair( tLow, tUpp); }
101 bool tInRange(
double tIn,
double sIn,
double s1In,
double s2In,
102 double s3In,
double s4In) {
103 pair<double, double> tRng =
tRange( sIn, s1In, s2In, s3In, s4In);
104 return (tIn > tRng.first && tIn < tRng.second); }
107 double pFormFac(
double tIn) {
return (4. * SPROTON - 2.79 * tIn)
108 / ((4. * SPROTON - tIn) *
pow2(1. - tIn / 0.71)); }
115 GAMMAEUL,
TABSREF, TABSMAX, MINSLOPEEL;
122 double chgSgn, tAbsMin, lambda, phaseCst;
146 SigmaTotal() : isCalc(false), ispp(), modeTotEl(), modeTotElNow(),
147 modeDiff(), modeDiffNow(), idAbsA(), idAbsB(), s(), sigND(),
148 sigTotElPtr(nullptr), sigDiffPtr(nullptr) {};
152 if (sigDiffPtr)
delete sigDiffPtr; }
158 bool calc(
int idA,
int idB,
double eCM);
165 double rho() {
return sigTotElPtr->rhoOwn;}
166 double sigmaEl() {
return sigTotElPtr->sigElCou;}
167 bool bElIsExp() {
return sigTotElPtr->isExpEl;}
168 double bSlopeEl() {
return sigTotElPtr->bEl;}
169 bool hasCoulomb() {
return sigTotElPtr->hasCou;}
172 bool calcTotEl(
int idAin,
int idBin,
double sIn,
double mAin,
double mBin) {
173 return sigTotElPtr->calcTotEl( idAin, idBin, sIn, mAin, mBin); }
176 double dsigmaEl(
double t,
bool useCoulomb =
false,
177 bool onlyPomerons =
false) {
178 return sigTotElPtr->dsigmaEl( t, useCoulomb, onlyPomerons); }
181 double sigmaXB()
const {
return sigDiffPtr->sigXB;}
182 double sigmaAX()
const {
return sigDiffPtr->sigAX;}
183 double sigmaXX()
const {
return sigDiffPtr->sigXX;}
184 double sigmaAXB()
const {
return sigDiffPtr->sigAXB;}
185 double sigmaND()
const {
return sigND;}
188 double dsigmaSD(
double xi,
double t,
bool isXB =
true,
int step = 0) {
189 return sigDiffPtr->dsigmaSD( xi, t, isXB, step); }
192 virtual bool splitDiff() {
return sigDiffPtr->splitDiff();}
195 double dsigmaDD(
double xi1,
double xi2,
double t,
int step = 0) {
196 return sigDiffPtr->dsigmaDD( xi1, xi2, t, step); }
199 double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
int step = 0)
200 {
return sigDiffPtr->dsigmaCD( xi1, xi2, t1, t2, step); }
203 double mMinCD() {
return sigDiffPtr->mMinCD();}
206 void chooseVMDstates(
int idA,
int idB,
double eCM,
int processCode);
210 pair<double,double>
tRange(
double sIn,
double s1In,
double s2In,
211 double s3In,
double s4In) {
212 return sigDiffPtr->tRange( sIn, s1In, s2In, s3In, s4In); }
213 bool tInRange(
double tIn,
double sIn,
double s1In,
double s2In,
214 double s3In,
double s4In) {
215 return sigDiffPtr->tInRange( tIn, sIn, s1In, s2In, s3In, s4In); }
220 static const double MMIN;
225 int modeTotEl, modeTotElNow, modeDiff, modeDiffNow, idAbsA, idAbsB,
226 idAOld, idBOld, modeTotElOld, modeDiffOld;
227 double s, sigND, eCMOld;
247 SigmaTotOwn() : dampenGap(), pomFlux(), s(), a0(), ap(), b0(), A1(), A2(),
248 A3(), a1(), a2(), a3(), bMinDD(), ygap(), ypow(), expPygap(), mMinCDnow(),
249 wtNow(), yNow(), yNow1(), yNow2(), b(), b1(), b2(), Q(), Q1(),
256 virtual bool calcTotEl(
int idAin,
int idBin,
double ,
double ,
double);
259 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
false);
262 virtual bool calcDiff(
int ,
int ,
double sIn,
double ,
double ) {
263 s = sIn;
return true;}
266 virtual double dsigmaSD(
double xi,
double t,
bool =
true,
int = 0);
269 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int = 0);
272 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
276 virtual double mMinCD() {
return mMinCDnow;}
283 double s, a0, ap, b0, A1, A2, A3, a1, a2, a3, bMinDD, ygap, ypow, expPygap,
284 mMinCDnow, wtNow, yNow, yNow1, yNow2, b, b1, b2, Q, Q1, Q2;
299 SigmaSaSDL() : doDampen(), zeroAXB(), swapped(), sameSign(), idAbsA(),
300 idAbsB(), iProc(), iHadA(), iHadB(), iHadAtmp(), iHadBtmp(), iProcVP(),
301 iProcVV(), s(), mA(), mB(), bA(), bB(), maxXBOwn(), maxAXOwn(), maxXXOwn(),
302 maxAXBOwn(), epsSaS(), sigmaPomP(), mPomP(), pPomP(), sigAXB2TeV(),
303 mMin0(), cRes(), mRes0(), mMinCDnow(), alP2(), s0(), mMinXB(), mMinAX(),
304 mMinAXB(), mResXB(), mResAX(), sResXB(), sResAX(), wtNow(), mAtmp(),
305 mBtmp(), multVP(), multVV(), infoPtr() {};
311 double sigmaTotal(
int idAin,
int idBin,
double sIn,
double mAin,
315 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double mAin,
319 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
false);
322 virtual bool calcDiff(
int idAin,
int idBin,
double sIn,
double mAin,
326 virtual double dsigmaSD(
double xi,
double t,
bool isXB,
int = 0);
329 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int = 0);
332 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
336 virtual double mMinCD() {
return mMinCDnow;}
341 static const int IHADATABLE[], IHADBTABLE[], ISDTABLE[], IDDTABLE[], NVMD;
342 static const double EPSILON, ETA, X[], Y[], BETA0[], BHAD[], ALPHAPRIME,
343 CONVERTSD, CONVERTDD, VMDMASS[4], GAMMAFAC[4],
344 CSD[24][8], CDD[22][9], DIFFTHR, DIFFMULT;
347 bool doDampen, zeroAXB, swapped, sameSign;
348 int idAbsA, idAbsB, iProc, iHadA, iHadB, iHadAtmp[4],
349 iHadBtmp[4], iProcVP[4], iProcVV[4][4];
350 double s, mA, mB, bA, bB, maxXBOwn, maxAXOwn, maxXXOwn, maxAXBOwn, epsSaS,
351 sigmaPomP, mPomP, pPomP, sigAXB2TeV, mMin0, cRes, mRes0, mMinCDnow,
352 alP2, s0, mMinXB, mMinAX, mMinAXB, mResXB, mResAX, sResXB,
353 sResAX, wtNow, mAtmp[4], mBtmp[4], multVP[4], multVV[4][4];
356 bool findBeamComb(
int idAin,
int idBin,
double mAin,
double mBin);
373 SigmaMBR() : s(), sigSD(), sigDD(), sigCD(), eps(), alph(), beta0gev(),
374 beta0mb(), sigma0mb(), sigma0gev(), m2min(), dyminSDflux(),
375 dyminDDflux(), dyminCDflux(), dyminSD(), dyminDD(), dyminCD(),
376 dyminSigSD(), dyminSigDD(), dyminSigCD(), a1(), a2(), b1(), b2(),
377 sdpmax(), ddpmax(), dpepmax() {};
383 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double );
386 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
false);
389 virtual bool calcDiff(
int ,
int ,
double sIn,
double ,
double );
395 virtual double dsigmaSD(
double xi,
double t,
bool =
true,
int step = 0);
398 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int step = 0);
401 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
405 virtual double mMinCD() {
return sqrt(m2min);}
410 static const int NINTEG, NINTEG2;
411 static const double FFA1, FFA2, FFB1, FFB2;
414 double s, sigSD, sigDD, sigCD, eps, alph, beta0gev,
415 beta0mb, sigma0mb, sigma0gev, m2min, dyminSDflux, dyminDDflux,
416 dyminCDflux, dyminSD, dyminDD, dyminCD, dyminSigSD, dyminSigDD,
417 dyminSigCD, a1, a2, b1, b2, sdpmax, ddpmax, dpepmax;
437 SigmaABMST() : ispp(), dampenGap(), useBMin(), modeSD(), modeDD(), modeCD(),
438 s(), facEl(), m2minp(), m2minm(), alp0(), alpt(), s0(), c0(), ygap(),
439 ypow(), expPygap(), multSD(), powSD(), multDD(), powDD(), multCD(),
440 powCD(), mMinCDnow(), bMinSD(), bMinDD(), bMinCD() {};
446 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double );
449 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
450 bool onlyPomerons =
false) {
451 return facEl *
pow2(abs(amplitude( t, useCoulomb, onlyPomerons)));}
454 virtual bool calcDiff(
int idAin,
int idBin,
double sIn,
double ,
double );
457 virtual double dsigmaSD(
double xi,
double t,
bool =
true ,
int = 0);
460 virtual double dsigmaDD(
double xi1,
double xi2,
double t,
int = 0);
463 virtual double dsigmaCD(
double xi1,
double xi2,
double t1,
double t2,
467 virtual double mMinCD() {
return mMinCDnow;}
472 static const bool MCINTDD;
473 static const int NPOINTSTSD, NPOINTSTDD, NPOINTMCDD, NPOINTMCCD;
474 static const double EPSI[], ALPP[], NORM[], SLOPE[], FRACS[], TRIG[],
475 LAM2P, BAPPR[], LAM2FF, MRES[4], WRES[4], CRES[4],
476 AFAC[4], BFAC[4], CFAC[4], PPP[4], EPS[2], APR[2],
477 CPI[6], CNST[5], XIDIVSD, DXIRAWSD, DLNXIRAWSD,
478 XIDIVDD, DXIRAWDD, DLNXIRAWDD, BMCINTDD, BMCINTCD;
481 bool ispp, dampenGap, useBMin;
482 int modeSD, modeDD, modeCD;
483 double s, facEl, m2minp, m2minm, alp0[2], alpt[3], s0, c0,
484 ygap, ypow, expPygap, multSD, powSD, multDD, powDD,
485 multCD, powCD, mMinCDnow, bMinSD, bMinDD, bMinCD;
488 complex amplitude(
double t,
bool useCoulomb =
false,
489 bool onlyPomerons =
false) ;
492 complex sModAlp(
double sMod,
double alpha) {
493 return exp(
complex( 0., -0.5 * M_PI * alpha)) * pow( sMod, alpha); }
496 virtual double dsigmaSDcore(
double xi,
double t);
499 double dsigmaSDintT(
double xi,
double tMinIn,
double tMaxIn);
502 double dsigmaSDintXiT(
double xiMinIn,
double xiMaxIn,
double tMinIn,
506 double dsigmaDDintMC();
509 double dsigmaDDintT(
double xi1,
double xi2,
double tMinIn,
double tMaxIn);
512 double dsigmaDDintXi2T(
double xi1,
double xi2MinIn,
double xi2MaxIn,
513 double tMinIn,
double tMaxIn);
516 double dsigmaDDintXi1Xi2T(
double xi1MinIn,
double xi1MaxIn,
517 double xi2MinIn,
double xi2MaxIn,
double tMinIn,
double tMaxIn);
520 double dsigmaCDintMC();
539 tAbsMin = infoPtrIn->
settingsPtr->parm(
"SigmaElastic:tAbsMin"); }
542 virtual bool calcTotEl(
int idAin,
int idBin,
double sIn,
double ,
double );
545 virtual double dsigmaEl(
double t,
bool useCoulomb =
false,
bool =
false) {
546 return facEl *
pow2(abs(amplitude( t, useCoulomb))); }
551 static const double EPS1[], ALPP[], NORM[], BRPP[], KRPP[], LAM2FF;
558 complex amplitude(
double t,
bool useCoulomb =
false) ;
561 complex sModAlp(
double sMod,
double alpha) {
562 return exp(
complex( 0., -0.5 * M_PI * alpha)) * pow( sMod, alpha); }
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
SigmaMBR()
Constructor.
Definition: SigmaTotal.h:373
std::complex< double > complex
Convenient typedef for double precision complex numbers.
Definition: PythiaComplex.h:17
static const double ALPHAEM
alpha_em(0).
Definition: SigmaTotal.h:114
bool isExpEl
Store total and elastic cross section properties.
Definition: SigmaTotal.h:57
bool flag(string keyIn)
Give back current value, with check that key exists.
Definition: Settings.cc:1478
SigmaTotal()
Constructor.
Definition: SigmaTotal.h:146
Definition: PhysicsBase.h:27
virtual bool splitDiff()
Possibility to separate xi and t choices for diffraction.
Definition: SigmaTotal.h:75
bool tryCoulomb
Add Coulomb corrections to the elastic cross section.
Definition: SigmaTotal.h:121
pair< double, double > tRange(double sIn, double s1In, double s2In, double s3In, double s4In)
Definition: SigmaTotal.h:210
SigmaABMST()
Constructor.
Definition: SigmaTotal.h:437
double dsigmaDD(double xi1, double xi2, double t, int step=0)
Differential double diffractive cross section.
Definition: SigmaTotal.h:195
Definition: SigmaTotal.h:141
virtual double dsigmaElCoulomb(double t)
Coulomb contribution to the differential elastic cross sections.
Definition: SigmaTotal.cc:121
virtual bool addCoulomb()
Add Coulomb corrections to the elastic and total cross sections.
Definition: SigmaTotal.cc:67
virtual bool calcTotEl(int, int, double, double, double)
Definition: SigmaTotal.h:54
virtual bool initCoulomb(Settings &settings, ParticleData *particleDataPtrIn)
Initialize Coulomb correction parameters.
Definition: SigmaTotal.cc:46
pair< double, double > tRange(double sIn, double s1In, double s2In, double s3In, double s4In)
Definition: SigmaTotal.h:91
double dsigmaCD(double xi1, double xi2, double t1, double t2, int step=0)
Differential central diffractive cross section.
Definition: SigmaTotal.h:199
Definition: SigmaTotal.h:529
virtual void init(Info *)=0
Store pointers and initialize data members.
SigmaSaSDL()
Constructor.
Definition: SigmaTotal.h:299
double mMinCD()
Minimal central diffractive mass.
Definition: SigmaTotal.h:203
int idA
Initialization data, normally only set once.
Definition: SigmaTotal.h:118
Definition: SigmaTotal.h:242
Definition: SigmaTotal.h:294
virtual double mMinCD()
Minimal central diffractive mass.
Definition: SigmaTotal.h:336
virtual double mMinCD()
Minimal central diffractive mass.
Definition: SigmaTotal.h:405
virtual double dsigmaEl(double, bool=false, bool=false)
Differential elastic cross section, d(sigma_el) / dt.
Definition: SigmaTotal.h:61
virtual double dsigmaEl(double t, bool useCoulomb=false, bool onlyPomerons=false)
Differential elastic cross section.
Definition: SigmaTotal.h:449
double sigXB
Store diffractive cross sections. Possibly also sigmaND.
Definition: SigmaTotal.h:68
double dsigmaEl(double t, bool useCoulomb=false, bool onlyPomerons=false)
Differential elastic cross section.
Definition: SigmaTotal.h:176
Definition: SigmaTotal.h:33
double pFormFac(double tIn)
Commonly used proton form factor.
Definition: SigmaTotal.h:107
virtual bool splitDiff()
In MBR choice of xi and t values are separated.
Definition: SigmaTotal.h:392
virtual double dsigmaDD(double, double, double, int=0)
Definition: SigmaTotal.h:79
double sigmaXB() const
Integrated diffractive cross sections.
Definition: SigmaTotal.h:181
virtual bool calcTot(int, int, double)
Calculate total cros section only. Only implemented for SigmaSaSDL.
Definition: SigmaTotal.h:50
virtual bool splitDiff()
Possibility to separate xi and t choices for diffraction.
Definition: SigmaTotal.h:192
static const double TABSREF
Reference scale for nominal definition of t slope.
Definition: SigmaTotal.h:114
Definition: SigmaTotal.h:432
bool hasSigmaTot()
Confirm that initialization worked.
Definition: SigmaTotal.h:161
ParticleData * particleDataPtr
Pointer to the particle data table.
Definition: SigmaTotal.h:129
virtual bool calcDiff(int, int, double sIn, double, double)
Calculate integrated diffractive cross sections.
Definition: SigmaTotal.h:262
SigmaTotAux()
Constructor.
Definition: SigmaTotal.h:38
SigmaRPP()
Constructor.
Definition: SigmaTotal.h:534
virtual double dsigmaEl(double t, bool useCoulomb=false, bool=false)
Differential elastic cross section.
Definition: SigmaTotal.h:545
Rndm * rndmPtr
Pointer to the random number generator.
Definition: SigmaTotal.h:132
static const double MPROTON
Proton and pion masses, and their squares. Euler's constant.
Definition: SigmaTotal.h:114
virtual double mMinCD()
Minimal central diffractive mass.
Definition: SigmaTotal.h:467
virtual double mMinCD()
Minimal central diffractive mass.
Definition: SigmaTotal.h:87
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
Definition: SigmaTotal.h:368
double dsigmaSD(double xi, double t, bool isXB=true, int step=0)
Differential single diffractive cross section.
Definition: SigmaTotal.h:188
double sigmaTot()
Total and integrated elastic cross sections.
Definition: SigmaTotal.h:164
virtual ~SigmaTotAux()
Destructor.
Definition: SigmaTotal.h:44
virtual void init(Info *infoPtrIn)
Initialize data members.
Definition: SigmaTotal.h:537
virtual double dsigmaCD(double, double, double, double, int)
Definition: SigmaTotal.h:83
virtual bool calcDiff(int, int, double, double, double)
Definition: SigmaTotal.h:65
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
static const int NPOINTS
Constants: could only be changed in the code itself.
Definition: SigmaTotal.h:113
Settings * settingsPtr
Pointer to the settings database.
Definition: Info.h:80
virtual ~SigmaTotal()
Destructor.
Definition: SigmaTotal.h:151
virtual double mMinCD()
Minimal central diffractive mass.
Definition: SigmaTotal.h:276
SigmaTotOwn()
Constructor.
Definition: SigmaTotal.h:247
static const double CONVERTEL
Conversion coefficients = 1/(16pi) * (mb <-> GeV^2).
Definition: SigmaTotal.h:114
virtual double dsigmaSD(double, double, bool=true, int=0)
Definition: SigmaTotal.h:72
Definition: Settings.h:195
bool calcTotEl(int idAin, int idBin, double sIn, double mAin, double mBin)
Total and elastic cross section.
Definition: SigmaTotal.h:172
double sqrtpos(const double &x)
Avoid problem with negative square root argument (from roundoff).
Definition: PythiaStdlib.h:191