34 #ifndef Pythia8_PartonDistributions_H
35 #define Pythia8_PartonDistributions_H
37 #include "Pythia8/Basics.h"
38 #include "Pythia8/Info.h"
39 #include "Pythia8/MathTools.h"
40 #include "Pythia8/ParticleData.h"
41 #include "Pythia8/PythiaStdlib.h"
42 #include "Pythia8/SharedPointers.h"
55 PDF(
int idBeamIn = 2212) : idBeam(idBeamIn), idBeamAbs(abs(idBeam)),
56 idVal1(), idVal2(), xsVal(), xcVal(), xbVal(), xsSea(), xcSea(), xbSea()
57 { setValenceContent();
58 idSav = 9; xSav = -1.; Q2Sav = -1.;
59 xu = 0.; xd = 0.; xs = 0.; xubar = 0.; xdbar = 0.; xsbar = 0.; xc = 0.;
60 xb = 0.; xg = 0.; xlepton = 0.; xgamma = 0.; xuVal = 0.; xuSea = 0.;
61 xdVal = 0.; xdSea = 0.; isSet =
true; isInit =
false;
62 hasGammaInLepton =
false; }
68 virtual bool isSetup() {
return isSet;}
71 virtual void newValenceContent(
int idVal1In,
int idVal2In) {
72 idVal1 = idVal1In; idVal2 = idVal2In;}
75 virtual void setExtrapolate(
bool) {}
78 virtual double xf(
int id,
double x,
double Q2);
81 virtual double xfVal(
int id,
double x,
double Q2);
82 virtual double xfSea(
int id,
double x,
double Q2);
85 virtual bool insideBounds(
double,
double) {
return true;}
88 virtual double alphaS(
double) {
return 1.;}
91 virtual double mQuarkPDF(
int) {
return -1.;}
94 virtual int nMembers() {
return 1;}
98 double centralPDF, errplusPDF, errminusPDF, errsymmPDF, scalePDF;
99 vector<double> pdfMemberVars;
100 PDFEnvelope() : centralPDF(-1.0), errplusPDF(0.0), errminusPDF(0.0),
101 errsymmPDF(0.0), scalePDF(-1.0), pdfMemberVars(0.0) {};
105 virtual void calcPDFEnvelope(
int,
double,
double,
int) {}
106 virtual void calcPDFEnvelope(pair<int,int>, pair<double,double>,
double,
108 virtual PDFEnvelope getPDFEnvelope() {
return PDFEnvelope(); }
111 virtual double gammaPDFxDependence(
int,
double) {
return 0.; }
114 virtual double gammaPDFRefScale(
int) {
return 0.; }
117 virtual int sampleGammaValFlavor(
double) {
return 0.; }
120 virtual double xfIntegratedTotal(
double) {
return 0.; }
123 virtual double xGamma() {
return 1.; }
126 virtual void xPom(
double = -1.0) {}
129 virtual double xfFlux(
int ,
double ,
double ) {
return 0.; }
130 virtual double xfApprox(
int ,
double ,
double ) {
return 0.; }
131 virtual double xfGamma(
int ,
double ,
double ) {
return 0.; }
132 virtual double intFluxApprox() {
return 0.; }
133 virtual bool hasApproxGammaFlux() {
return false; }
136 virtual double getXmin() {
return 0.; }
137 virtual double getXhadr() {
return 0.; }
138 virtual double sampleXgamma(
double ) {
return 0.; }
139 virtual double sampleQ2gamma(
double ) {
return 0.; }
142 virtual double xfMax(
int id,
double x,
double Q2) {
return xf(
id, x, Q2); }
145 virtual double xfSame(
int id,
double x,
double Q2) {
return xf(
id, x, Q2); }
148 virtual void setVMDscale(
double = 1.) {}
156 int idBeam, idBeamAbs, idSav, idVal1, idVal2;
158 double xu, xd, xs, xubar, xdbar, xsbar, xc, xb, xg, xlepton, xgamma,
159 xuVal, xuSea, xdVal, xdSea;
163 double xsVal, xcVal, xbVal, xsSea, xcSea, xbSea;
166 bool hasGammaInLepton;
169 void setValenceContent();
172 virtual void xfUpdate(
int id,
double x,
double Q2) = 0;
175 void printErr(
string errMsg, Info* infoPtr = 0) {
176 if (infoPtr !=0) infoPtr->errorMsg(errMsg);
177 else cout << errMsg << endl;
186 class LHAPDF :
public PDF {
191 LHAPDF(
int idIn,
string pSet, Info* infoPtrIn);
195 bool isSetup() {
return pdfPtr !=
nullptr ? pdfPtr->isSetup() :
false;}
198 void newValenceContent(
int idVal1In,
int idVal2In) {
199 if (pdfPtr !=
nullptr) pdfPtr->newValenceContent(idVal1In, idVal2In);}
202 void setExtrapolate(
bool extrapolate) {
203 if (pdfPtr !=
nullptr) pdfPtr->setExtrapolate(extrapolate);}
206 double xf(
int id,
double x,
double Q2) {
207 return pdfPtr !=
nullptr ? pdfPtr->xf(
id, x, Q2) : 0;}
210 double xfVal(
int id,
double x,
double Q2) {
211 return pdfPtr !=
nullptr ? pdfPtr->xfVal(
id, x, Q2) : 0;}
212 double xfSea(
int id,
double x,
double Q2) {
213 return pdfPtr !=
nullptr ? pdfPtr->xfSea(
id, x, Q2) : 0;}
216 bool insideBounds(
double x,
double Q2) {
217 return pdfPtr !=
nullptr ? pdfPtr->insideBounds(x, Q2) :
true;}
220 double alphaS(
double Q2) {
221 return pdfPtr !=
nullptr ? pdfPtr->alphaS(Q2) : 1.;}
224 double mQuarkPDF(
int idIn) {
225 return pdfPtr !=
nullptr ? pdfPtr->mQuarkPDF(idIn) : -1.;}
229 return pdfPtr !=
nullptr ? pdfPtr->nMembers() : 1;}
233 void calcPDFEnvelope(
int idNow,
double xNow,
double Q2Now,
int valSea) {
234 if (pdfPtr !=
nullptr)
235 pdfPtr->calcPDFEnvelope(idNow, xNow, Q2Now, valSea);}
236 void calcPDFEnvelope(pair<int,int> idNows, pair<double,double> xNows,
237 double Q2Now,
int valSea) {
238 if (pdfPtr !=
nullptr) pdfPtr->calcPDFEnvelope(idNows,xNows,Q2Now,valSea);}
239 PDFEnvelope getPDFEnvelope() {
240 return pdfPtr !=
nullptr ? pdfPtr->getPDFEnvelope() : PDFEnvelope();}
245 void setValenceContent() {
if (pdfPtr !=
nullptr)
246 pdfPtr->setValenceContent();}
249 void xfUpdate(
int id,
double x,
double Q2) {
250 if (pdfPtr !=
nullptr) pdfPtr->xfUpdate(
id, x, Q2);}
253 typedef PDF* NewPDF(
int,
string,
int, Info*);
254 typedef void DeletePDF(PDF*);
270 class LHAGrid1 :
public PDF {
275 LHAGrid1(
int idBeamIn = 2212,
string pdfWord =
"void",
276 string xmlPath =
"../share/Pythia8/xmldoc/", Info* infoPtr = 0)
277 : PDF(idBeamIn), doExtraPol(false), nx(), nq(), nqSub(), xMin(), xMax(),
278 qMin(), qMax(), pdfVal(), pdfGrid(), pdfSlope(NULL) {
279 init( pdfWord, xmlPath, infoPtr); };
282 LHAGrid1(
int idBeamIn, istream& is, Info* infoPtr = 0)
283 : PDF(idBeamIn), doExtraPol(false), nx(), nq(), nqSub(), xMin(), xMax(),
284 qMin(), qMax(), pdfVal(), pdfGrid(), pdfSlope(NULL) {
285 init( is, infoPtr); };
288 ~LHAGrid1() {
for (
int iid = 0; iid < 12; ++iid) {
289 for (
int iq = 0; iq < nq; ++iq)
delete[] pdfGrid[iid][iq];
290 delete[] pdfGrid[iid]; }
291 if (pdfSlope) {
for (
int iid = 0; iid < 12; ++iid)
delete[] pdfSlope[iid];
292 delete[] pdfSlope;} };
295 void setExtrapolate(
bool doExtraPolIn) {doExtraPol = doExtraPolIn;}
303 double xMin, xMax, qMin, qMax, pdfVal[12];
304 vector<double> xGrid, lnxGrid, qGrid, lnqGrid, qDiv;
305 double** pdfGrid[12];
309 void init(
string pdfSet,
string pdfdataPath, Info* infoPtr);
312 void init( istream& is, Info* infoPtr);
315 void xfUpdate(
int id,
double x,
double Q2);
318 void xfxevolve(
double x,
double Q2);
327 class GRV94L :
public PDF {
332 GRV94L(
int idBeamIn = 2212) : PDF(idBeamIn) {}
337 void xfUpdate(
int ,
double x,
double Q2);
340 double grvv (
double x,
double n,
double ak,
double bk,
double a,
341 double b,
double c,
double d);
342 double grvw (
double x,
double s,
double al,
double be,
double ak,
343 double bk,
double a,
double b,
double c,
double d,
double e,
double es);
344 double grvs (
double x,
double s,
double sth,
double al,
double be,
345 double ak,
double ag,
double b,
double d,
double e,
double es);
354 class CTEQ5L :
public PDF {
359 CTEQ5L(
int idBeamIn = 2212) : PDF(idBeamIn) {}
364 void xfUpdate(
int ,
double x,
double Q2);
380 class MSTWpdf :
public PDF {
385 MSTWpdf(
int idBeamIn = 2212,
int iFitIn = 1,
386 string pdfdataPath =
"../share/Pythia8/pdfdata/", Info* infoPtr = 0)
387 : PDF(idBeamIn), iFit(), alphaSorder(), alphaSnfmax(), mCharm(), mBottom(),
388 alphaSQ0(), alphaSMZ(), distance(), tolerance(), xx(), qq(),
389 c() {init( iFitIn, pdfdataPath, infoPtr);}
392 MSTWpdf(
int idBeamIn, istream& is, Info* infoPtr = 0)
393 : PDF(idBeamIn), iFit(), alphaSorder(), alphaSnfmax(), mCharm(), mBottom(),
394 alphaSQ0(), alphaSMZ(), distance(), tolerance(), xx(), qq(),
395 c() {init( is, infoPtr);}
400 static const int np, nx, nq, nqc0, nqb0;
401 static const double xmin, xmax, qsqmin, qsqmax, xxInit[65], qqInit[49];
404 int iFit, alphaSorder, alphaSnfmax;
405 double mCharm, mBottom, alphaSQ0, alphaSMZ, distance, tolerance,
406 xx[65], qq[49], c[13][64][48][5][5];
409 void init(
int iFitIn,
string pdfdataPath, Info* infoPtr);
412 void init( istream& is, Info* infoPtr);
415 void xfUpdate(
int ,
double x,
double Q2);
418 double parton(
int flavour,
double x,
double q);
419 double parton_interpolate(
int flavour,
double xxx,
double qqq);
420 double parton_extrapolate(
int flavour,
double xxx,
double qqq);
423 int locate(
double xx[],
int n,
double x);
424 double polderivative1(
double x1,
double x2,
double x3,
double y1,
425 double y2,
double y3);
426 double polderivative2(
double x1,
double x2,
double x3,
double y1,
427 double y2,
double y3);
428 double polderivative3(
double x1,
double x2,
double x3,
double y1,
429 double y2,
double y3);
449 class CTEQ6pdf :
public PDF {
454 CTEQ6pdf(
int idBeamIn = 2212,
int iFitIn = 1,
double rescaleIn = 1.,
455 string pdfdataPath =
"../share/Pythia8/pdfdata/", Info* infoPtr = 0)
456 : PDF(idBeamIn), doExtraPol(false), iFit(), order(), nQuark(), nfMx(),
457 mxVal(), nX(), nT(), nG(), iGridX(), iGridQ(), iGridLX(), iGridLQ(),
458 rescale(rescaleIn), lambda(), mQ(), qIni(), qMax(), tv(), xMin(), xv(),
459 upd(), xvpow(), xMinEps(), xMaxEps(), qMinEps(), qMaxEps(), fVec(),
460 tConst(), xConst(), dlx(), xLast(),
461 qLast() {init( iFitIn, pdfdataPath, infoPtr);}
464 CTEQ6pdf(
int idBeamIn, istream& is,
bool isPdsGrid =
false,
465 Info* infoPtr = 0) : PDF(idBeamIn), doExtraPol(false), iFit(),
466 order(), nQuark(), nfMx(), mxVal(), nX(), nT(), nG(), iGridX(), iGridQ(),
467 iGridLX(), iGridLQ(), rescale(), lambda(), mQ(), qIni(), qMax(), tv(),
468 xMin(), xv(), upd(), xvpow(), xMinEps(), xMaxEps(), qMinEps(), qMaxEps(),
469 fVec(), tConst(), xConst(), dlx(), xLast(),
470 qLast() { init( is, isPdsGrid, infoPtr); }
473 void setExtrapolate(
bool doExtraPolIn) {doExtraPol = doExtraPolIn;}
478 static const double EPSILON, XPOWER;
482 int iFit, order, nQuark, nfMx, mxVal, nX, nT, nG,
483 iGridX, iGridQ, iGridLX, iGridLQ;
484 double rescale, lambda, mQ[7], qIni, qMax, tv[26], xMin, xv[202], upd[57773],
485 xvpow[202], xMinEps, xMaxEps, qMinEps, qMaxEps, fVec[5],
486 tConst[9], xConst[9], dlx, xLast, qLast;
489 void init(
int iFitIn,
string pdfdataPath, Info* infoPtr);
492 void init( istream& is,
bool isPdsGrid, Info* infoPtr);
495 void xfUpdate(
int id,
double x,
double Q2);
498 double parton6(
int iParton,
double x,
double q);
501 double polint4F(
double xgrid[],
double fgrid[],
double xin);
511 class ProtonPoint :
public PDF {
516 ProtonPoint(
int idBeamIn = 2212, Info* infoPtrIn = 0)
517 : PDF(idBeamIn), infoPtr(infoPtrIn) {}
522 static const double ALPHAEM, Q2MAX, Q20, A, B, C;
525 void xfUpdate(
int ,
double x,
double Q2);
528 double phiFunc(
double x,
double Q);
540 class GRVpiL :
public PDF {
545 GRVpiL(
int idBeamIn = 211,
double rescaleIn = 1.) :
546 PDF(idBeamIn) {rescale = rescaleIn;}
549 void setVMDscale(
double rescaleIn = 1.) {rescale = rescaleIn;}
557 void xfUpdate(
int ,
double x,
double Q2);
565 class PomFix :
public PDF {
570 PomFix(
int idBeamIn = 990,
double PomGluonAIn = 0.,
571 double PomGluonBIn = 0.,
double PomQuarkAIn = 0.,
572 double PomQuarkBIn = 0.,
double PomQuarkFracIn = 0.,
573 double PomStrangeSuppIn = 0.) : PDF(idBeamIn),
574 PomGluonA(PomGluonAIn), PomGluonB(PomGluonBIn),
575 PomQuarkA(PomQuarkAIn), PomQuarkB(PomQuarkBIn),
576 PomQuarkFrac(PomQuarkFracIn), PomStrangeSupp(PomStrangeSuppIn),
577 normGluon(), normQuark() { init(); }
582 double PomGluonA, PomGluonB, PomQuarkA, PomQuarkB, PomQuarkFrac,
583 PomStrangeSupp, normGluon, normQuark;
589 void xfUpdate(
int ,
double x,
double);
600 class PomH1FitAB :
public PDF {
605 PomH1FitAB(
int idBeamIn = 990,
int iFit = 1,
double rescaleIn = 1.,
606 string pdfdataPath =
"../share/Pythia8/pdfdata/", Info* infoPtr = 0)
607 : PDF(idBeamIn), doExtraPol(false), nx(), nQ2(), rescale(rescaleIn), xlow(),
608 xupp(), dx(), Q2low(), Q2upp(), dQ2(), gluonGrid(), quarkGrid()
609 { init( iFit, pdfdataPath, infoPtr); }
612 PomH1FitAB(
int idBeamIn,
double rescaleIn, istream& is,
613 Info* infoPtr = 0) : PDF(idBeamIn), doExtraPol(false), nx(), nQ2(),
614 rescale(rescaleIn), xlow(),xupp(), dx(), Q2low(), Q2upp(), dQ2(),
615 gluonGrid(), quarkGrid() { init( is, infoPtr); }
618 void setExtrapolate(
bool doExtraPolIn) {doExtraPol = doExtraPolIn;}
625 double rescale, xlow, xupp, dx, Q2low, Q2upp, dQ2;
626 double gluonGrid[100][30];
627 double quarkGrid[100][30];
630 void init(
int iFit,
string pdfdataPath, Info* infoPtr);
633 void init( istream& is, Info* infoPtr);
636 void xfUpdate(
int ,
double x,
double );
647 class PomH1Jets :
public PDF {
652 PomH1Jets(
int idBeamIn = 990,
int iFit = 1,
double rescaleIn = 1.,
653 string pdfdataPath =
"../share/Pythia8/pdfdata/", Info* infoPtr = 0)
654 : PDF(idBeamIn), doExtraPol(false), rescale(rescaleIn), xGrid(), Q2Grid(),
655 gluonGrid(), singletGrid(), charmGrid()
656 {init( iFit, pdfdataPath, infoPtr);}
659 PomH1Jets(
int idBeamIn,
double rescaleIn, istream& is,
660 Info* infoPtr = 0) : PDF(idBeamIn), doExtraPol(false),
661 rescale(rescaleIn), xGrid(), Q2Grid(), gluonGrid(), singletGrid(),
662 charmGrid() { init( is, infoPtr); }
665 void setExtrapolate(
bool doExtraPolIn) {doExtraPol = doExtraPolIn;}
674 double gluonGrid[100][88];
675 double singletGrid[100][88];
676 double charmGrid[100][88];
679 void init(
int iFit,
string pdfdataPath, Info* infoPtr);
682 void init( istream& is, Info* infoPtr);
685 void xfUpdate(
int id,
double x,
double );
693 class PomHISASD :
public PDF {
698 PomHISASD(
int idBeamIn, PDFPtr ppdf, Settings & settings,
699 Info* infoPtrIn = 0) : PDF(idBeamIn), pPDFPtr(ppdf),
700 xPomNow(-1.0), hixpow(4.0), newfac(1.0) {
702 hixpow = settings.parm(
"PDF:PomHixSupp");
703 if ( settings.mode(
"Angantyr:SASDmode") == 3 ) newfac =
704 log(settings.parm(
"Beams:eCM")/settings.parm(
"Diffraction:mMinPert"));
705 if ( settings.mode(
"Angantyr:SASDmode") == 4 ) newfac = 0.0;
712 void xPom(
double xpom = -1.0) { xPomNow = xpom; }
732 void xfUpdate(
int ,
double x,
double Q2);
740 class Lepton :
public PDF {
745 Lepton(
int idBeamIn = 11) : PDF(idBeamIn), m2Lep(), Q2maxGamma(),
746 infoPtr(), rndmPtr() {}
749 Lepton(
int idBeamIn,
double Q2maxGammaIn, Info* infoPtrIn)
750 : PDF(idBeamIn), m2Lep() { Q2maxGamma = Q2maxGammaIn;
751 infoPtr = infoPtrIn; rndmPtr = infoPtrIn->rndmPtr; }
754 double sampleQ2gamma(
double Q2min)
755 {
return Q2min * pow(Q2maxGamma / Q2min, rndmPtr->flat()); }
760 static const double ALPHAEM, ME, MMU, MTAU;
763 void xfUpdate(
int id,
double x,
double Q2);
766 double m2Lep, Q2maxGamma;
780 class LeptonPoint :
public PDF {
785 LeptonPoint(
int idBeamIn = 11) : PDF(idBeamIn) {}
790 void xfUpdate(
int ,
double ,
double ) {xlepton = 1; xgamma = 0.;}
799 class NeutrinoPoint :
public PDF {
804 NeutrinoPoint(
int idBeamIn = 12) : PDF(idBeamIn) {}
809 void xfUpdate(
int ,
double ,
double ) {xlepton = 2; xgamma = 0.;}
819 class CJKL :
public PDF {
824 CJKL(
int idBeamIn = 22, Rndm* rndmPtrIn = 0 ) : PDF(idBeamIn) {
825 rndmPtr = rndmPtrIn; }
828 double gammaPDFxDependence(
int id,
double);
829 double gammaPDFRefScale(
int);
832 int sampleGammaValFlavor(
double Q2);
835 double xfIntegratedTotal(
double Q2);
840 static const double ALPHAEM, Q02, Q2MIN, Q2REF, LAMBDA, MC, MB;
846 void xfUpdate(
int ,
double x,
double Q2);
849 double pointlikeG(
double x,
double s);
850 double pointlikeU(
double x,
double s);
851 double pointlikeD(
double x,
double s);
852 double pointlikeC(
double x,
double s,
double Q2);
853 double pointlikeB(
double x,
double s,
double Q2);
856 double hadronlikeG(
double x,
double s);
857 double hadronlikeSea(
double x,
double s);
858 double hadronlikeVal(
double x,
double s);
859 double hadronlikeC(
double x,
double s,
double Q2);
860 double hadronlikeB(
double x,
double s,
double Q2);
873 class Lepton2gamma :
public PDF {
878 Lepton2gamma(
int idBeamIn,
double m2leptonIn,
double Q2maxGamma,
879 PDFPtr gammaPDFPtrIn, Info* infoPtrIn)
880 : PDF(idBeamIn), m2lepton(m2leptonIn), Q2max(Q2maxGamma), xGm(),
881 sampleXgamma(true), gammaPDFPtr(gammaPDFPtrIn),rndmPtr(infoPtrIn->rndmPtr),
882 infoPtr(infoPtrIn) { hasGammaInLepton =
true; }
885 void xfUpdate(
int id,
double x,
double Q2);
886 double xGamma() {
return xGm; }
887 double xfMax(
int id,
double x,
double Q2);
888 double xfSame(
int id,
double x,
double Q2);
891 double sampleQ2gamma(
double Q2min)
892 {
return Q2min * pow(Q2max / Q2min, rndmPtr->flat()); }
897 static const double ALPHAEM, Q2MIN;
898 double m2lepton, Q2max, xGm;
918 class GammaPoint :
public PDF {
923 GammaPoint(
int idBeamIn = 22) : PDF(idBeamIn) {}
928 void xfUpdate(
int ,
double ,
double ) { xgamma = 1.;}
948 static const double ALPHAEM, Q20;
951 void xfUpdate(
int ,
double x,
double Q2);
967 Nucleus2gamma(
int idBeamIn,
double bMinIn,
double mNucleonIn) :
968 PDF(idBeamIn), a(), z(), bMin(bMinIn), mNucleon(mNucleonIn)
974 static const double ALPHAEM;
980 void xfUpdate(
int ,
double x,
double Q2);
986 double bMin, mNucleon;
999 EPAexternal(
int idBeamIn,
double m2In, PDFPtr gammaFluxPtrIn,
1000 PDFPtr gammaPDFPtrIn,
Info* infoPtrIn) :
PDF(idBeamIn), m2(m2In),
1001 Q2max(), Q2min(), xMax(), xMin(), xHadr(), norm(), xPow(), xCut(), norm1(),
1002 norm2(), integral1(), integral2(), bmhbarc(), gammaFluxPtr(gammaFluxPtrIn),
1003 gammaPDFPtr(gammaPDFPtrIn), infoPtr(infoPtrIn),
1004 rndmPtr(infoPtrIn->rndmPtr), settingsPtr(infoPtrIn->settingsPtr) {
1005 hasGammaInLepton =
true; init(); }
1008 void xfUpdate(
int ,
double x,
double Q2);
1011 double xfFlux(
int id,
double x,
double Q2 = 1.);
1012 double xfGamma(
int id,
double x,
double Q2);
1013 double xfApprox(
int id,
double x,
double Q2);
1014 double intFluxApprox();
1017 bool hasApproxGammaFlux() {
return true; }
1020 double getXmin() {
return xMin; }
1021 double getXhadr() {
return xHadr; }
1024 double sampleXgamma(
double xMinIn);
1025 double sampleQ2gamma(
double )
1026 {
return Q2min * pow(Q2max / Q2min, rndmPtr->flat()); }
1034 static const double ALPHAEM;
1035 double m2, Q2max, Q2min, xMax, xMin, xHadr, norm, xPow, xCut,
1036 norm1, norm2, integral1, integral2, bmhbarc;
1040 PDFPtr gammaFluxPtr;
1050 Settings* settingsPtr;
1058 class nPDF :
public PDF {
1063 nPDF(
int idBeamIn = 2212, PDFPtr protonPDFPtrIn = 0) : PDF(idBeamIn), ruv(),
1064 rdv(), ru(), rd(), rs(), rc(),
rb(), rg(), a(), z(), za(), na(),
1065 protonPDFPtr() { initNPDF(protonPDFPtrIn); }
1068 void xfUpdate(
int id,
double x,
double Q2);
1071 virtual void rUpdate(
int,
double,
double) = 0;
1074 void initNPDF(PDFPtr protonPDFPtrIn = 0);
1077 int getA() {
return a;}
1078 int getZ() {
return z;}
1082 void setMode(
double zaIn) { za = zaIn; na = 1. - za; }
1083 void resetMode() { za = double(z)/double(a); na = double(a-z)/double(a); }
1089 double ruv, rdv, ru, rd, rs, rc,
rb, rg;
1099 PDFPtr protonPDFPtr;
1108 class Isospin :
public nPDF {
1113 Isospin(
int idBeamIn = 2212, PDFPtr protonPDFPtrIn = 0)
1114 : nPDF(idBeamIn, protonPDFPtrIn) {}
1117 void rUpdate(
int ,
double ,
double ) {}
1124 class EPS09 :
public nPDF {
1129 EPS09(
int idBeamIn = 2212,
int iOrderIn = 1,
int iSetIn = 1,
1130 string pdfdataPath =
"../share/Pythia8/pdfdata/",
1131 PDFPtr protonPDFPtrIn = 0, Info* infoPtrIn = 0)
1132 : nPDF(idBeamIn, protonPDFPtrIn), iSet(), iOrder(), grid(),
1133 infoPtr(infoPtrIn) { init(iOrderIn, iSetIn, pdfdataPath);}
1136 void rUpdate(
int id,
double x,
double Q2);
1139 void setErrorSet(
int iSetIn) {iSet = iSetIn;}
1144 static const double Q2MIN, Q2MAX, XMIN, XMAX, XCUT;
1145 static const int Q2STEPS, XSTEPS;
1149 double grid[31][51][51][8];
1155 void init(
int iOrderIn,
int iSetIn,
string pdfdataPath);
1158 double polInt(
double* fi,
double* xi,
int n,
double x);
1165 class EPPS16 :
public nPDF {
1170 EPPS16(
int idBeamIn = 2212,
int iSetIn = 1,
1171 string pdfdataPath =
"../share/Pythia8/pdfdata/",
1172 PDFPtr protonPDFPtrIn = 0, Info* infoPtrIn = 0)
1173 : nPDF(idBeamIn, protonPDFPtrIn), iSet(), grid(), logQ2min(),
1174 loglogQ2maxmin(), logX2min(), infoPtr(infoPtrIn)
1175 { init(iSetIn, pdfdataPath); }
1178 void rUpdate(
int id,
double x,
double Q2);
1181 void setErrorSet(
int iSetIn) {iSet = iSetIn;}
1186 static const double Q2MIN, Q2MAX, XMIN, XMAX, XCUT;
1187 static const int Q2STEPS, XSTEPS, NINTQ2, NINTX, NSETS;
1191 double grid[41][31][80][8];
1192 double logQ2min, loglogQ2maxmin, logX2min;
1198 void init(
int iSetIn,
string pdfdataPath);
1201 double polInt(
double* fi,
double* xi,
int n,
double x);
1208 #endif // Pythia8_PartonDistributions_H