21 #ifndef Pythia8_PartonDistributions_H
22 #define Pythia8_PartonDistributions_H
26 #include "ParticleData.h"
27 #include "PythiaStdlib.h"
40 PDF(
int idBeamIn = 2212) {idBeam = idBeamIn; idBeamAbs = abs(idBeam);
41 setValenceContent(); idSav = 9; xSav = -1.; Q2Sav = -1.;
42 xu = 0.; xd = 0.; xs = 0.; xubar = 0.; xdbar = 0.; xsbar = 0.; xc = 0.;
43 xb = 0.; xg = 0.; xlepton = 0.; xgamma = 0.; xuVal = 0.; xuSea = 0.;
44 xdVal = 0.; xdSea = 0.; isSet =
true; isInit =
false;}
50 bool isSetup() {
return isSet;}
53 void newValenceContent(
int idVal1In,
int idVal2In) {
54 idVal1 = idVal1In; idVal2 = idVal2In;}
57 virtual void setExtrapolate(
bool) {}
60 double xf(
int id,
double x,
double Q2);
63 double xfVal(
int id,
double x,
double Q2);
64 double xfSea(
int id,
double x,
double Q2);
69 int idBeam, idBeamAbs, idSav, idVal1, idVal2;
71 double xu, xd, xs, xubar, xdbar, xsbar, xc, xb, xg, xlepton, xgamma,
72 xuVal, xuSea, xdVal, xdSea;
76 void setValenceContent();
79 virtual void xfUpdate(
int id,
double x,
double Q2) = 0;
92 LHAPDF(
int idBeamIn,
string setName,
int member,
int nSetIn = 1,
93 Info* infoPtr = 0) :
PDF(idBeamIn), nSet(nSetIn)
94 {init( setName, member, infoPtr);}
97 void setExtrapolate(
bool extrapol);
102 void init(
string setName,
int member,
Info* infoPtr);
105 void xfUpdate(
int ,
double x,
double Q2);
113 static string latestSetName;
114 static int latestMember, latestNSet;
128 GRV94L(
int idBeamIn = 2212) :
PDF(idBeamIn) {}
133 void xfUpdate(
int ,
double x,
double Q2);
136 double grvv (
double x,
double n,
double ak,
double bk,
double a,
137 double b,
double c,
double d);
138 double grvw (
double x,
double s,
double al,
double be,
double ak,
139 double bk,
double a,
double b,
double c,
double d,
double e,
double es);
140 double grvs (
double x,
double s,
double sth,
double al,
double be,
141 double ak,
double ag,
double b,
double d,
double e,
double es);
155 CTEQ5L(
int idBeamIn = 2212) :
PDF(idBeamIn) {}
160 void xfUpdate(
int ,
double x,
double Q2);
181 MSTWpdf(
int idBeamIn = 2212,
int iFitIn = 1,
string xmlPath =
"../xmldoc/",
182 Info* infoPtr = 0) :
PDF(idBeamIn) {init( iFitIn, xmlPath, infoPtr);}
187 static const int np, nx, nq, nqc0, nqb0;
188 static const double xmin, xmax, qsqmin, qsqmax, xxInit[65], qqInit[49];
191 int iFit, alphaSorder, alphaSnfmax;
192 double mCharm, mBottom, alphaSQ0, alphaSMZ, distance, tolerance,
193 xx[65], qq[49], c[13][64][48][5][5];
196 void init(
int iFitIn,
string xmlPath,
Info* infoPtr);
199 void xfUpdate(
int ,
double x,
double Q2);
202 double parton(
int flavour,
double x,
double q);
203 double parton_interpolate(
int flavour,
double xxx,
double qqq);
204 double parton_extrapolate(
int flavour,
double xxx,
double qqq);
207 int locate(
double xx[],
int n,
double x);
208 double polderivative1(
double x1,
double x2,
double x3,
double y1,
209 double y2,
double y3);
210 double polderivative2(
double x1,
double x2,
double x3,
double y1,
211 double y2,
double y3);
212 double polderivative3(
double x1,
double x2,
double x3,
double y1,
213 double y2,
double y3);
233 CTEQ6pdf(
int idBeamIn = 2212,
int iFitIn = 1,
string xmlPath =
"../xmldoc/",
234 Info* infoPtr = 0) :
PDF(idBeamIn) {init( iFitIn, xmlPath, infoPtr);}
239 static const double EPSILON, XPOWER;
242 int iFit, order, nQuark, nfMx, mxVal, nX, nT, nG,
243 iGridX, iGridQ, iGridLX, iGridLQ;
244 double lambda, mQ[7], qIni, qMax, tv[26], xMin, xv[202], upd[57773],
245 xvpow[202], xMinEps, xMaxEps, qMinEps, qMaxEps, fVec[5],
246 tConst[9], xConst[9], xLast, qLast;
249 void init(
int iFitIn,
string xmlPath,
Info* infoPtr);
252 void xfUpdate(
int id,
double x,
double Q2);
255 double parton6(
int iParton,
double x,
double q);
258 double polint4F(
double xgrid[],
double fgrid[],
double xin);
274 PDF(idBeamIn), m_infoPtr(infoPtrIn) {}
279 static const double ALPHAEM, Q2MAX, Q20, A, B, C;
282 void xfUpdate(
int ,
double x,
double Q2);
285 double phiFunc(
double x,
double Q);
302 GRVpiL(
int idBeamIn = 221) :
PDF(idBeamIn) {}
307 void xfUpdate(
int ,
double x,
double Q2);
320 PomFix(
int idBeamIn = 990,
double PomGluonAIn = 0.,
321 double PomGluonBIn = 0.,
double PomQuarkAIn = 0.,
322 double PomQuarkBIn = 0.,
double PomQuarkFracIn = 0.,
323 double PomStrangeSuppIn = 0.) :
PDF(idBeamIn),
324 PomGluonA(PomGluonAIn), PomGluonB(PomGluonBIn),
325 PomQuarkA(PomQuarkAIn), PomQuarkB(PomQuarkBIn),
326 PomQuarkFrac(PomQuarkFracIn), PomStrangeSupp(PomStrangeSuppIn)
332 double PomGluonA, PomGluonB, PomQuarkA, PomQuarkB, PomQuarkFrac,
333 PomStrangeSupp, normGluon, normQuark;
339 void xfUpdate(
int ,
double x,
double);
355 PomH1FitAB(
int idBeamIn = 990,
int iFit = 1,
double rescaleIn = 1.,
356 string xmlPath =
"../xmldoc/",
Info* infoPtr = 0) :
PDF(idBeamIn)
357 {rescale = rescaleIn; init( iFit, xmlPath, infoPtr);}
363 double rescale, xlow, xupp, dx, Q2low, Q2upp, dQ2;
364 double gluonGrid[100][30];
365 double quarkGrid[100][30];
368 void init(
int iFit,
string xmlPath,
Info* infoPtr);
371 void xfUpdate(
int ,
double x,
double );
387 PomH1Jets(
int idBeamIn = 990,
double rescaleIn = 1.,
388 string xmlPath =
"../xmldoc/",
Info* infoPtr = 0) :
PDF(idBeamIn)
389 {rescale = rescaleIn; init( xmlPath, infoPtr);}
397 double gluonGrid[100][88];
398 double singletGrid[100][88];
399 double charmGrid[100][88];
402 void init(
string xmlPath,
Info* infoPtr);
405 void xfUpdate(
int id,
double x,
double );
418 Lepton(
int idBeamIn = 11) :
PDF(idBeamIn) {}
423 static const double ALPHAEM, ME, MMU, MTAU;
426 void xfUpdate(
int id,
double x,
double Q2);
447 void xfUpdate(
int ,
double ,
double ) {xlepton = 1; xgamma = 0.;}
466 void xfUpdate(
int ,
double ,
double ) {xlepton = 2; xgamma = 0.;}
474 #endif // Pythia8_PartonDistributions_H