LHAPDF C++ wrapper  5.4
LHAPDFWrap.h
1 #ifndef LHAPDFWRAP_H
2 #define LHAPDFWRAP_H
3 
4 #include <string>
5 #include <vector>
6 
7 // WARNING! This C++ interface is deprecated in favour of the
8 // interface declared in LHAPDF/LHAPDF.h
9 
10 // This class is a wrapper around the LHAPDF package for parton
11 // distribution functions of the proton.
12 //
13 // Originally by Stefan Gieseke.
14 // Adapted for LHAPDFv4 by Mike Whalley.
15 // Adapted for LHAPDFv5 by Craig Group/Mike Whalley.
16 // Fortran portability and interface improvements by Andy Buckley.
17 
18 
20 
21 
42 class LHAPDFWrap {
43 
44 public:
46  LHAPDFWrap();
47 
50  LHAPDFWrap(const std::string& name);
51 
54  LHAPDFWrap(const std::string& name, int memset);
55 
60  LHAPDFWrap(int nset, const std::string& name);
61 
66  LHAPDFWrap(int nset, const std::string& name, int memset);
67 
72  std::vector<double> xfx(double x, double Q);
73 
79  double xfx(double x, double Q, int fl);
80 
81  std::vector<double> xfxp(double x, double Q, double P2, int ip);
82  double xfxp(double x, double Q, double P2, int ip, int fl);
83 
84  std::vector<double> xfxa(double x, double Q, double a);
85  double xfxa(double x, double Q, double a, int fl);
86 
87  std::vector<double> xfxphoton(double x, double Q);
88  double xfxphoton(double x, double Q, int fl);
89 
91  void initPDFSet(const std::string& name);
92 
94  void initPDFSetByName(const std::string& name);
95 
97  void initPDF(int memset);
98 
100  void getDescription();
101 
103  int numberPDF();
104 
106  double alphasPDF(double Q);
107 
108  int getOrderPDF();
109 
111  int getOrderAlphaS();
112 
114  double getQMass(int f);
115 
117  double getThreshold(int f);
118 
120  int getNf();
121 
123  double getLam4(int m);
124 
126  double getLam5(int m);
127 
128  double getXmin(int m);
129  double getXmax(int m);
130  double getQ2min(int m);
131  double getQ2max(int m);
132 
133  void extrapolate();
134 
135  // Additional functions for when more than 1 PDF set is being stored in memory
136 
137  // Returns a vector xf(x, Q) with index 0 < i < 12.
138  // 0..5 = tbar, ..., ubar, dbar;
139  // 6 = g;
140  // 7..12 = d, u, ..., t
141  std::vector<double> xfxM(int nset, double x, double Q);
142 
143  // Returns xf(x, Q) for flavour fl - this time the flavour encoding
144  // is as in the LHAPDF manual...
145  // -6..-1 = tbar,...,ubar, dbar
146  // 1..6 = duscbt
147  // 0 = g
148  double xfxM(int nset, double x, double Q, int fl);
149 
150  std::vector<double> xfxpM(int nset, double x, double Q, double P2, int ip);
151  double xfxpM(int nset, double x, double Q, double P2, int ip, int fl);
152 
153  std::vector<double> xfxaM(int nset, double x, double Q, double a);
154  double xfxaM(int nset, double x, double Q, double a, int fl);
155 
156  std::vector<double> xfxphotonM(int nset, double x, double Q);
157  double xfxphotonM(int nset, double x, double Q, int fl);
158 
160  void initPDFSetM(int nset, const std::string& name);
161 
163  void initPDFSetByNameM(int nset, const std::string& name);
164 
166  void initPDFM(int nset, int memset);
167 
169  void getDescriptionM(int nset);
170 
172  int numberPDFM(int nset);
173 
175  double alphasPDFM(int nset, double Q);
176 
177  int getOrderPDFM(int nset);
178 
180  int getOrderAlphaSM(int nset);
181 
183  double getQMassM(int nset, int f);
184 
186  double getThresholdM(int nset, int f);
187 
189  int getNfM(int nset);
190 
192  double getLam4M(int nset, int m);
193 
195  double getLam5M(int nset, int m);
196 
197  double getXminM(int nset, int m);
198  double getXmaxM(int nset, int m);
199  double getQ2minM(int nset, int m);
200  double getQ2maxM(int nset, int m);
201 
202 };
203 
204 #endif
std::vector< double > xfx(double x, double Q)
int getOrderAlphaSM(int nset)
Perturbative order of parton evolution and respectively.
int numberPDFM(int nset)
Number of subsets available in the current distribution.
void initPDFSet(const std::string &name)
The PDF set by name, see subdir &#39;PDFset&#39; of LHAPDFv2 for choices.
double getThresholdM(int nset, int f)
Threshold for flavour f.
Definition: LHAPDFWrap.h:42
double getLam4(int m)
Value of QCD lambda4 for member m.
void getDescriptionM(int nset)
Prints a brief description of the current PDF set to stdout.
double alphasPDFM(int nset, double Q)
used by the current PDF.
LHAPDFWrap()
Do-nothing constructor.
double getQMass(int f)
Quark mass used for flavour f.
void initPDFSetByNameM(int nset, const std::string &name)
The PDF set by name, see subdir &#39;PDFset&#39; of LHAPDFv2 for choices.
int numberPDF()
Number of subsets available in the current distribution.
double getLam5(int m)
Value of QCD lambda5 for member m.
double getLam4M(int nset, int m)
Value of QCD lambda4 for member m.
double alphasPDF(double Q)
used by the current PDF.
int getNf()
Number of flavours used in the current PDF set.
int getOrderAlphaS()
Perturbative order of parton evolution and respectively.
double getLam5M(int nset, int m)
Value of QCD lambda5 for member m.
double getQMassM(int nset, int f)
Quark mass used for flavour f.
void initPDFSetM(int nset, const std::string &name)
The PDF set by name, see subdir &#39;PDFset&#39; of LHAPDFv2 for choices.
int getNfM(int nset)
Number of flavours used in the current PDF set.
void initPDFSetByName(const std::string &name)
The PDF set by name, see subdir &#39;PDFset&#39; of LHAPDFv2 for choices.
double getThreshold(int f)
Threshold for flavour f.
void getDescription()
Prints a brief description of the current pdf set to stdout.
void initPDFM(int nset, int memset)
The choice of PDF subset out of one distribution.
void initPDF(int memset)
The choice of PDF subset out of one distribution.