pub struct Pdf { /* private fields */ }Expand description
Wrapper to an LHAPDF object of the type LHAPDF::PDF.
Implementations§
Source§impl Pdf
impl Pdf
Sourcepub fn with_lhaid(lhaid: i32) -> Result<Self>
pub fn with_lhaid(lhaid: i32) -> Result<Self>
Sourcepub fn with_setname_and_member(setname: &str, member: i32) -> Result<Self>
pub fn with_setname_and_member(setname: &str, member: i32) -> Result<Self>
Sourcepub fn with_setname_and_nmem(setname_nmem: &str) -> Result<Self>
pub fn with_setname_and_nmem(setname_nmem: &str) -> Result<Self>
Create a new PDF with the given PDF set name and member ID as a single string.
The format of the setname_nmem string is <setname>/<nmem> where <nmem> must be
parseable as a positive integer. The / character is not permitted in set names due to
clashes with Unix filesystem path syntax.
If no /<nmem> is given, member number 0 will be used.
§Errors
TODO
Sourcepub fn xfx_q2(&self, id: i32, x: f64, q2: f64) -> f64
pub fn xfx_q2(&self, id: i32, x: f64, q2: f64) -> f64
Get the PDF x * f(x) value at x and q2 for the given PDG ID.
§Panics
If the value of either x or q2 is not within proper boundaries this method will panic.
Sourcepub fn alphas_q2(&self, q2: f64) -> f64
pub fn alphas_q2(&self, q2: f64) -> f64
Value of of the strong coupling at q2 used by this PDF.
§Panics
If the value of q2 is not within proper boundaries this method will panic.
Sourcepub fn set_force_positive(&mut self, mode: i32)
pub fn set_force_positive(&mut self, mode: i32)
Set whether the PDF will only return positive (definite) values or not.
Sourcepub fn force_positive(&mut self) -> i32
pub fn force_positive(&mut self) -> i32
Check whether the PDF is set to only return positive (definite) values or not.
This is to avoid overshooting in to negative values when interpolating/extrapolating PDFs that sharply decrease towards zero. 0 = unforced, 1 = forced positive, 2 = forced positive definite (>= 1e-10).
Sourcepub fn set_flavors(&mut self, flavors: &[i32])
pub fn set_flavors(&mut self, flavors: &[i32])
Manually set/override the list of flavours defined by this Pdf set.