Struct lhapdf::PdfSet

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

Class for PDF set metadata and manipulation.

Implementations§

source§

impl PdfSet

source

pub fn new(setname: &str) -> Result<Self>

Constructor from a set name.

Errors

If the PDF set with the specified name was not found an error is returned.

source

pub fn entry(&self, key: &str) -> Option<String>

Retrieve a metadata string by key name.

source

pub fn error_type(&self) -> String

Get the type of PDF errors in this set (replicas, symmhessian, hessian, custom, etc.).

source

pub fn mk_pdfs(&self) -> Vec<Pdf>

Make all the PDFs in this set.

source

pub fn uncertainty( &self, values: &[f64], cl: f64, alternative: bool ) -> Result<PdfUncertainty>

Calculate central value and error from vector values with appropriate formulae for this set.

Warning: The values vector corresponds to the members of this PDF set and must be ordered accordingly.

In the Hessian approach, the central value is the best-fit “values[0]” and the uncertainty is given by either the symmetric or asymmetric formula using eigenvector PDF sets.

If the PDF set is given in the form of replicas, by default, the central value is given by the mean and is not necessarily “values[0]" for quantities with a non-linear dependence on PDFs, while the uncertainty is given by the standard deviation.

The argument cl is used to rescale uncertainties to a particular confidence level (in percent); a negative number will rescale to the default CL for this set. The default value in LHAPDF is 100*erf(1/sqrt(2))=68.268949213709, corresponding to 1-sigma uncertainties.

If the PDF set is given in the form of replicas, then the argument alternative equal to true (default in LHAPDF: false) will construct a confidence interval from the probability distribution of replicas, with the central value given by the median.

For a combined set, a breakdown of the separate PDF and parameter variation uncertainties is available. The parameter variation uncertainties are computed from the last 2*n members of the set, with n the number of parameters.

Trait Implementations§

source§

impl Debug for PdfSet

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for PdfSet

§

impl !Send for PdfSet

§

impl !Sync for PdfSet

§

impl Unpin for PdfSet

§

impl UnwindSafe for PdfSet

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.