pub struct LumiEntry { /* private fields */ }
Expand description

This structure represents an entry of a luminosity function. Each entry consists of a tuple, which contains, in the following order, the PDG id of the first incoming parton, then the PDG id of the second parton, and finally a numerical factor that will multiply the result for this specific combination.

Implementations

Constructor for LumiEntry. Note that entry must be non-empty, otherwise this function panics.

Examples

Ordering of the arguments doesn’t matter:

use pineappl::lumi::LumiEntry;

let entry1 = LumiEntry::new(vec![(2, 2, 1.0), (4, 4, 1.0)]);
let entry2 = LumiEntry::new(vec![(4, 4, 1.0), (2, 2, 1.0)]);

// checks that the ordering doesn't matter
assert_eq!(entry1, entry2);

Same arguments are merged together:

use pineappl::lumi::LumiEntry;

let entry1 = LumiEntry::new(vec![(1, 1, 1.0), (1, 1, 3.0), (3, 3, 1.0), (1, 1, 6.0)]);
let entry2 = LumiEntry::new(vec![(1, 1, 10.0), (3, 3, 1.0)]);

assert_eq!(entry1, entry2);
Panics

Creating an entry with content panics:

use pineappl::lumi::LumiEntry;

let _ = LumiEntry::new(vec![]);

Translates entry into a different basis using translator.

Examples
use pineappl::lumi::LumiEntry;
use pineappl::lumi_entry;

let entry = LumiEntry::translate(&lumi_entry![103, 11, 1.0], &|evol_id| match evol_id {
    103 => vec![(2, 1.0), (-2, -1.0), (1, -1.0), (-1, 1.0)],
    _ => vec![(evol_id, 1.0)],
});

assert_eq!(entry, lumi_entry![2, 11, 1.0; -2, 11, -1.0; 1, 11, -1.0; -1, 11, 1.0]);

Returns a tuple representation of this entry.

Examples
use pineappl::lumi_entry;
use pineappl::lumi::LumiEntry;

let entry = lumi_entry![4, 4, 1.0; 2, 2, 1.0];

assert_eq!(entry.entry(), [(2, 2, 1.0), (4, 4, 1.0)]);

Creates a new object with the initial states transposed.

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