pub struct LumiCache<'a> { /* private fields */ }
Expand description
A cache for evaluating PDFs. Methods like Grid::convolute
accept instances of this struct
instead of the PDFs themselves.
Implementations
sourceimpl<'a> LumiCache<'a>
impl<'a> LumiCache<'a>
sourcepub fn with_two(
pdg1: i32,
xfx1: &'a mut dyn FnMut(i32, f64, f64) -> f64,
pdg2: i32,
xfx2: &'a mut dyn FnMut(i32, f64, f64) -> f64,
alphas: &'a mut dyn FnMut(f64) -> f64
) -> Self
pub fn with_two(
pdg1: i32,
xfx1: &'a mut dyn FnMut(i32, f64, f64) -> f64,
pdg2: i32,
xfx2: &'a mut dyn FnMut(i32, f64, f64) -> f64,
alphas: &'a mut dyn FnMut(f64) -> f64
) -> Self
Construct a luminosity cache with two PDFs, xfx1
and xfx2
. The types of hadrons the
PDFs correspond to must be given as pdg1
and pdg2
. The function to evaluate the
strong coupling must be given as alphas
. The grid that the cache will be used with must
be given as grid
; this parameter determines which of the initial states are hadronic, and
if an initial states is not hadronic the corresponding ‘PDF’ is set to xfx = x
. If some
of the PDFs must be charge-conjugated, this is automatically done in this function.
sourcepub fn with_one(
pdg: i32,
xfx: &'a mut dyn FnMut(i32, f64, f64) -> f64,
alphas: &'a mut dyn FnMut(f64) -> f64
) -> Self
pub fn with_one(
pdg: i32,
xfx: &'a mut dyn FnMut(i32, f64, f64) -> f64,
alphas: &'a mut dyn FnMut(f64) -> f64
) -> Self
Construct a luminosity cache with a single PDF xfx
. The type of hadron the PDF
corresponds to must be given as pdg
. The function to evaluate the strong coupling must be
given as alphas
. The grid that the cache should be used with must be given as grid
;
this parameter determines which of the initial states are hadronic, and if an initial
states is not hadronic the corresponding ‘PDF’ is set to xfx = x
. If some of the PDFs
must be charge-conjugated, this is automatically done in this function.
sourcepub fn xfx1(&mut self, pdg_id: i32, ix1: usize, imu2: usize) -> f64
pub fn xfx1(&mut self, pdg_id: i32, ix1: usize, imu2: usize) -> f64
Return the PDF (multiplied with x
) for the first initial state.
sourcepub fn xfx2(&mut self, pdg_id: i32, ix2: usize, imu2: usize) -> f64
pub fn xfx2(&mut self, pdg_id: i32, ix2: usize, imu2: usize) -> f64
Return the PDF (multiplied with x
) for the second initial state.
sourcepub fn alphas(&mut self, imu2: usize) -> f64
pub fn alphas(&mut self, imu2: usize) -> f64
Return the strong coupling for the renormalization scale set with LumiCache::set_grids
,
in the grid mu2_grid
at the index imu2
.