Struct pineappl::grid::Order

source ·
pub struct Order {
    pub alphas: u32,
    pub alpha: u32,
    pub logxir: u32,
    pub logxif: u32,
}
Expand description

Coupling powers for each grid.

Fields§

§alphas: u32

Exponent of the strong coupling.

§alpha: u32

Exponent of the electromagnetic coupling.

§logxir: u32

Exponent of the logarithm of the scale factor of the renomalization scale.

§logxif: u32

Exponent of the logarithm of the scale factor of the factorization scale.

Implementations§

source§

impl Order

source

pub const fn new(alphas: u32, alpha: u32, logxir: u32, logxif: u32) -> Self

Constructor. This function mainly exists to have a way of constructing Order that is less verbose.

source

pub fn create_mask( orders: &[Self], max_as: u32, max_al: u32, logs: bool ) -> Vec<bool>

Return a mask suitable to pass as the order_mask parameter of Grid::convolute, Grid::evolve or Grid::evolve_info. The selection of orders is controlled using the max_as and max_al parameters, for instance setting max_as = 1 and max_al = 0 selects the LO QCD only, max_as = 2 and max_al = 0 the NLO QCD; setting max_as = 3 and max_al = 2 would select all NLOs, and the NNLO QCD.

§Example

In the case of Drell—Yan, there are the following orders:

  • exactly one leading order (LO),
  • two next-to-leading orders (NLO), which are
    • the NLO QCD and
    • the NLO EW, and
  • three next-to-next-to-leading orders (NNLO),
    • the NNLO QCD,
    • the NNLO EW, and finally
    • the mixed NNLO QCD—EW.
use pineappl::grid::Order;

let orders = [
    Order::new(0, 2, 0, 0), //   LO        :          alpha^2
    Order::new(1, 2, 0, 0), //  NLO QCD    : alphas   alpha^2
    Order::new(0, 3, 0, 0), //  NLO  EW    :          alpha^3
    Order::new(2, 2, 0, 0), // NNLO QCD    : alphas^2 alpha^2
    Order::new(1, 3, 0, 0), // NNLO QCD—EW : alphas   alpha^3
    Order::new(0, 4, 0, 0), // NNLO EW     :          alpha^4
];

// LO EW
assert_eq!(Order::create_mask(&orders, 0, 1, false), [true, false, false, false, false, false]);
// LO QCD
assert_eq!(Order::create_mask(&orders, 1, 0, false), [true, false, false, false, false, false]);
// LO
assert_eq!(Order::create_mask(&orders, 1, 1, false), [true, false, false, false, false, false]);
// NLO QCD
assert_eq!(Order::create_mask(&orders, 2, 0, false), [true, true, false, false, false, false]);
// NLO EW
assert_eq!(Order::create_mask(&orders, 0, 2, false), [true, false, true, false, false, false]);
// NNLO QCD
assert_eq!(Order::create_mask(&orders, 3, 0, false), [true, true, false, true, false, false]);
// NNLO EW
assert_eq!(Order::create_mask(&orders, 0, 3, false), [true, false, true, false, false, true]);

Orders containing non-zero powers of logarithms can be selected as well if logs is set to true:

use pineappl::grid::Order;

let orders = [
    Order::new(0, 2, 0, 0), //  LO         :        alpha^2
    Order::new(1, 2, 0, 0), //  NLO QCD    : alphas alpha^2
    Order::new(1, 2, 1, 0), //  NLO QCD    : alphas alpha^2 logxif
    Order::new(0, 3, 0, 0), //  NLO  EW    :        alpha^3
    Order::new(0, 3, 1, 0), //  NLO  EW    :        alpha^3 logxif
];

assert_eq!(Order::create_mask(&orders, 0, 2, true), [true, false, false, true, true]);

For the more complicated example of top-pair production one can see the difference between the selection for different LOs:

use pineappl::grid::Order;

let orders = [
    Order::new(2, 0, 0, 0), //   LO QCD    : alphas^2
    Order::new(1, 1, 0, 0), //   LO QCD—EW : alphas   alpha
    Order::new(0, 2, 0, 0), //   LO  EW    :          alpha^2
    Order::new(3, 0, 0, 0), //  NLO QCD    : alphas^3
    Order::new(2, 1, 0, 0), //  NLO QCD—EW : alphas^2 alpha
    Order::new(1, 2, 0, 0), //  NLO QCD—EW : alphas   alpha^2
    Order::new(0, 3, 0, 0), //  NLO EW     :          alpha^3
];

// LO EW
assert_eq!(Order::create_mask(&orders, 0, 1, false), [false, false, true, false, false, false, false]);
// LO QCD
assert_eq!(Order::create_mask(&orders, 1, 0, false), [true, false, false, false, false, false, false]);
// LO
assert_eq!(Order::create_mask(&orders, 1, 1, false), [true, true, true, false, false, false, false]);

Trait Implementations§

source§

impl Clone for Order

source§

fn clone(&self) -> Order

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Order

source§

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

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

impl<'de> Deserialize<'de> for Order

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for Order

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Order

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Order

source§

fn eq(&self, other: &Order) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Order

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Order

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Order

source§

impl StructuralPartialEq for Order

Auto Trait Implementations§

§

impl RefUnwindSafe for Order

§

impl Send for Order

§

impl Sync for Order

§

impl Unpin for Order

§

impl UnwindSafe for Order

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,