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

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

Return a mask suitable to pass as the order_mask parameter of Grid::convolute. 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), [true, false, false, false, false, false]);
// LO QCD
assert_eq!(Order::create_mask(&orders, 1, 0), [true, false, false, false, false, false]);
// LO
assert_eq!(Order::create_mask(&orders, 1, 1), [true, false, false, false, false, false]);
// NLO QCD
assert_eq!(Order::create_mask(&orders, 2, 0), [true, true, false, false, false, false]);
// NLO EW
assert_eq!(Order::create_mask(&orders, 0, 2), [true, false, true, false, false, false]);
// NNLO QCD
assert_eq!(Order::create_mask(&orders, 3, 0), [true, true, false, true, false, false]);
// NNLO EW
assert_eq!(Order::create_mask(&orders, 0, 3), [true, false, true, false, false, true]);

Although not shown in the example above, orders containing non-zero powers of logarithms are selected as well:

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, 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, true, false, false, false, false]);
// LO QCD
assert_eq!(Order::create_mask(&orders, 1, 0), [true, false, false, false, false, false, false]);
// LO
assert_eq!(Order::create_mask(&orders, 1, 1), [true, true, true, false, false, false, false]);

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.