lhapdf
is hosted by
Hepforge
,
IPPP Durham
LHAPDF
6.5.4
Loading...
Searching...
No Matches
/examples/compatibility.cc
// -*- C++ -*-
// LHAPDFv5/v6 compatibility example
#include "
LHAPDF/LHAPDF.h
"
#include <iostream>
int
main() {
const
double
x = 1e-3, Q = 200;
#if LHAPDF_MAJOR_VERSION == 6
LHAPDF::PDF
* pdf =
LHAPDF::mkPDF
(
"CT10nlo"
, 0);
std::cout <<
"xf_g = "
<< pdf->
xfxQ
(21, x, Q) << std::endl;
delete
pdf;
#else
LHAPDF::initPDFSet(
"CT10nlo"
, LHAPDF::LHGRID, 0);
std::cout <<
"xf_g = "
<< LHAPDF::xfx(x, Q, 0) << std::endl;
#endif
return
0;
}
LHAPDF.h
LHAPDF::PDF
PDF is the general interface for access to parton density information.
Definition
PDF.h:40
LHAPDF::PDF::xfxQ
double xfxQ(int id, double x, double q) const
Get the PDF xf(x) value at (x,q) for the given PID.
Definition
PDF.h:108
LHAPDF::mkPDF
PDF * mkPDF(const std::string &setname, size_t member)
Generated on Thu Sep 26 2024 15:19:26 for LHAPDF by
1.12.0