Struct lhapdf::Pdf

source ·
pub struct Pdf { /* private fields */ }
Expand description

Wrapper to an LHAPDF object of the type LHAPDF::PDF.

Implementations§

source§

impl Pdf

source

pub fn with_lhaid(lhaid: i32) -> Result<Self>

Constructor. Create a new PDF with the given lhaid ID code.

Errors

TODO

source

pub fn with_setname_and_member(setname: &str, member: i32) -> Result<Self>

Constructor. Create a new PDF with the given PDF setname and member ID.

Errors

TODO

source

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 / where 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 / is given, member number 0 will be used.

Errors

TODO

source

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.

source

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.

source

pub fn set(&self) -> PdfSet

Get the info class that actually stores and handles the metadata.

source

pub fn x_min(&mut self) -> f64

Minimum valid x value for this PDF.

source

pub fn x_max(&mut self) -> f64

Maximum valid x value for this PDF.

source

pub fn set_force_positive(&mut self, mode: i32)

Set whether the PDF will only return positive (definite) values or not.

source

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).

source

pub fn flavors(&self) -> Vec<i32>

List of flavours defined by this Pdf set.

source

pub fn set_flavors(&mut self, flavors: &[i32])

Manually set/override the list of flavours defined by this Pdf set.

Trait Implementations§

source§

impl Debug for Pdf

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Send for Pdf

source§

impl Sync for Pdf

Auto Trait Implementations§

§

impl RefUnwindSafe for Pdf

§

impl Unpin for Pdf

§

impl UnwindSafe for Pdf

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.