00001 #ifndef LHAPDFWRAP_H 00002 #define LHAPDFWRAP_H 00003 00004 #include <string> 00005 #include <vector> 00006 00007 // WARNING! This C++ interface is deprecated in favour of the 00008 // interface declared in LHAPDF/LHAPDF.h 00009 00010 // This class is a wrapper around the LHAPDF package for parton 00011 // distribution functions of the proton. 00012 // 00013 // Originally by Stefan Gieseke. 00014 // Adapted for LHAPDFv4 by Mike Whalley. 00015 // Adapted for LHAPDFv5 by Craig Group/Mike Whalley. 00016 // Fortran portability and interface improvements by Andy Buckley. 00017 00018 00020 00021 00042 class LHAPDFWrap { 00043 00044 public: 00046 LHAPDFWrap(); 00047 00050 LHAPDFWrap(const std::string& name); 00051 00054 LHAPDFWrap(const std::string& name, int memset); 00055 00060 LHAPDFWrap(int nset, const std::string& name); 00061 00066 LHAPDFWrap(int nset, const std::string& name, int memset); 00067 00072 std::vector<double> xfx(double x, double Q); 00073 00079 double xfx(double x, double Q, int fl); 00080 00081 std::vector<double> xfxp(double x, double Q, double P2, int ip); 00082 double xfxp(double x, double Q, double P2, int ip, int fl); 00083 00084 std::vector<double> xfxa(double x, double Q, double a); 00085 double xfxa(double x, double Q, double a, int fl); 00086 00087 std::vector<double> xfxphoton(double x, double Q); 00088 double xfxphoton(double x, double Q, int fl); 00089 00091 void initPDFSet(const std::string& name); 00092 00094 void initPDFSetByName(const std::string& name); 00095 00097 void initPDF(int memset); 00098 00100 void getDescription(); 00101 00103 int numberPDF(); 00104 00106 double alphasPDF(double Q); 00107 00108 int getOrderPDF(); 00109 00111 int getOrderAlphaS(); 00112 00114 double getQMass(int f); 00115 00117 double getThreshold(int f); 00118 00120 int getNf(); 00121 00123 double getLam4(int m); 00124 00126 double getLam5(int m); 00127 00128 double getXmin(int m); 00129 double getXmax(int m); 00130 double getQ2min(int m); 00131 double getQ2max(int m); 00132 00133 void extrapolate(); 00134 00135 // Additional functions for when more than 1 PDF set is being stored in memory 00136 00137 // Returns a vector xf(x, Q) with index 0 < i < 12. 00138 // 0..5 = tbar, ..., ubar, dbar; 00139 // 6 = g; 00140 // 7..12 = d, u, ..., t 00141 std::vector<double> xfxM(int nset, double x, double Q); 00142 00143 // Returns xf(x, Q) for flavour fl - this time the flavour encoding 00144 // is as in the LHAPDF manual... 00145 // -6..-1 = tbar,...,ubar, dbar 00146 // 1..6 = duscbt 00147 // 0 = g 00148 double xfxM(int nset, double x, double Q, int fl); 00149 00150 std::vector<double> xfxpM(int nset, double x, double Q, double P2, int ip); 00151 double xfxpM(int nset, double x, double Q, double P2, int ip, int fl); 00152 00153 std::vector<double> xfxaM(int nset, double x, double Q, double a); 00154 double xfxaM(int nset, double x, double Q, double a, int fl); 00155 00156 std::vector<double> xfxphotonM(int nset, double x, double Q); 00157 double xfxphotonM(int nset, double x, double Q, int fl); 00158 00160 void initPDFSetM(int nset, const std::string& name); 00161 00163 void initPDFSetByNameM(int nset, const std::string& name); 00164 00166 void initPDFM(int nset, int memset); 00167 00169 void getDescriptionM(int nset); 00170 00172 int numberPDFM(int nset); 00173 00175 double alphasPDFM(int nset, double Q); 00176 00177 int getOrderPDFM(int nset); 00178 00180 int getOrderAlphaSM(int nset); 00181 00183 double getQMassM(int nset, int f); 00184 00186 double getThresholdM(int nset, int f); 00187 00189 int getNfM(int nset); 00190 00192 double getLam4M(int nset, int m); 00193 00195 double getLam5M(int nset, int m); 00196 00197 double getXminM(int nset, int m); 00198 double getXmaxM(int nset, int m); 00199 double getQ2minM(int nset, int m); 00200 double getQ2maxM(int nset, int m); 00201 00202 }; 00203 00204 #endif