API

PartonDensity.BernsteinDirichletPDFParamsType
struct BernsteinDirichletPDFParams <: AbstractPDFParams

Bernstein polynomial specification of input PDF parameters. Dirichlet-style treament.

Constructors:

  • BernsteinDirichletPDFParams(; fields...)

Fields:

  • param_type::Int64: Default: BERNSTEINDIRICHLETTYPE

  • seed::Int64: Default: 0

  • weights::Vector{Float64}: Default: ones(9)

  • θ::Vector{Float64}: Default: rand(MersenneTwister(seed), Dirichlet(weights))

  • bspoly_params::Vector{Vector{Int64}}: Default: [[0, 3], [0, 4], [1, 4]]

  • bspoly_params_d::Vector{Vector{Int64}}: Default: bspoly_params

  • initial_U::Vector{Float64}: Default: ones(length(bspoly_params) - 2)

  • initial_D::Vector{Float64}: Default: ones(length(bspolyparamsd) - 2)

  • U_list::Vector{Float64}: Default: getUDlist(θ[1], 2, initialU, bspolyparams)

  • D_list::Vector{Float64}: Default: getUDlist(θ[2], 1, initialD, bspolyparams_d)

  • λ_g1::Float64

  • λ_g2::Float64

  • K_g::Float64

  • λ_q::Float64

  • K_q::Float64

PartonDensity.BernsteinPDFParamsType
struct BernsteinPDFParams <: AbstractPDFParams

Bernstein polynomial specification of input PDF parameters. Valence-style treatment.

Constructors:

  • BernsteinPDFParams(; fields...)

Fields:

  • param_type::Int64: Default: BERNSTEIN_TYPE

  • bspoly_params::Vector{Vector{Int64}}: Default: [[0, 3], [0, 4], [1, 4], [0, 5]]

  • bspoly_params_d::Vector{Vector{Int64}}: Default: bspoly_params

  • U_weights::Vector{Float64}: Default: zeros(length(bspoly_params))

  • D_weights::Vector{Float64}: Default: zeros(length(bspoly_params))

  • λ_g1::Float64

  • λ_g2::Float64

  • K_g::Float64

  • λ_q::Float64

  • K_q::Float64

  • seed::Int64: Default: 0

  • weights::Vector{Float64}: Default: ones(7)

  • U_list::Vector{Float64}: Default: getdirichletUD(Uweights, 2, seed, bspolyparams)

  • D_list::Vector{Float64}: Default: getdirichletUD(Dweights, 1, seed, bspolyparams)

  • θ::Vector{Float64}: Default: getdirichletsamples(Ulist, Dlist, seed, weights, bspoly_params)

PartonDensity.DirichletPDFParamsType
struct DirichletPDFParams <: AbstractPDFParams

Full Dirichlet specification of input PDF parameters.

Constructors:

  • DirichletPDFParams(; fields...)

Fields:

  • param_type::Int64: Default: DIRICHLET_TYPE

  • θ::AbstractVector{T} where T<:Real

  • K_u::Real

  • λ_u::Real: Default: (θ[1] * (K_u + 1)) / (2 - θ[1])

  • K_d::Real

  • λ_d::Real: Default: (θ[2] * (K_d + 1)) / (1 - θ[2])

  • λ_g1::Real

  • λ_g2::Real

  • K_g::Real

  • λ_q::Real

  • K_q::Real

PartonDensity.ValencePDFParamsType
struct ValencePDFParams <: AbstractPDFParams

Valence specification of input PDF parameters.

Constructors:

  • ValencePDFParams(; fields...)

Fields:

  • param_type::Int64: Default: VALENCE_TYPE

  • λ_u::Real

  • K_u::Real

  • λ_d::Real

  • K_d::Real

  • λ_g1::Real

  • λ_g2::Real

  • K_g::Real

  • λ_q::Real

  • K_q::Real

  • θ::AbstractVector{T} where T<:Real

PartonDensity._fun_xsec_iMethod
_fun_xsec_i(ix iq)

Input function for cross section spline. Must be wrapped for interface to SPLINT.

PartonDensity.dd_xsecnc_xq2Method
dd_xsecnc_xq2(charge, x_bin_cen, q2_bin_cen)

Double differential cross section for all x and q2 bins. NB: modifications needed to include pol and order.

PartonDensity.dd_xsecnc_xq2_iMethod
dd_xsecnc_xq2_i(charge, md,  x, q2)

Double differential cross section for single x and q2 values. NB: modifications needed to include pol and order.

PartonDensity.f2_loMethod
f2_lo(x, q2)

Calculate the f2_lo structure function term. To be run after the evolution of PDFs with QCDNUM.

PartonDensity.fl_loMethod
fl_lo(x, q2)

Calculate the fl_lo structure function term. To be run after the evolution of PDFs with QCDNUM.

PartonDensity.forward_modelFunction
forward_model(pdf_params, qcdnum_grid, splint_params, quark_coeffs, sys_err_params, MD)

Go from input PDF parameters to the expected number of events in bins.

PartonDensity.forward_model_initMethod
forward_model_init(qcdnum_grid, qcdnum_params)

Initialise forward model. Initialises QCDNUM and builds weight tables to save time in subsequent iterations.

PartonDensity.get_scaled_θMethod
get_scaled_θ(λ_u, K_u, λ_d, K_d, θ_tmp)

Given a set of Dirichlet samples, θ_tmp, scale according to the valence params. Relevant for ValencePDFParams.

PartonDensity.get_θ_valMethod
get_θ_val(rng, λ_u, K_u, λ_d, K_d, weights)

Given valance shape parameters and weights, get samples θ that are correctly scaled. Relevant for ValencePDFParams

Optional RNG parameter.

PartonDensity.pd_write_simMethod
pd_write_sim(file_name, pdf_params, sim_data)

Store the simulation truth and simulated data in an HDF5 file.

PartonDensity.plot_data_spaceFunction
plot_data_space(pdf_params, sim_data, samples,
                qcdnum_params, splint_params, quark_coeffs, md)

Compare truth and posterior samples in the data space.

PartonDensity.x_dv_xMethod
x_dv_x(x, λ_d, K_d)

Momentum density of d valence component. Beta function Ad x^λd (1 - x)^Kd Ad is set by λd and Kd.

PartonDensity.x_g_xMethod
    x_g_x(x, λ_g1, λ_g2, K_g, K_q, w1, w2)

Momentum density of gluon component. Ag1 x^λg1 (1 - x)^Kg + Ag2 x^λg2 (1 - x)^Kq Amplitudes are set by weights w1 and w2.

PartonDensity.x_q_xMethod
x_q_x(x, λ_q, K_q, w)

Momentum density of non-valence quark component. Aq x^λq (1 - x)^K_q Amplitude is set by weight w

PartonDensity.x_uv_xMethod
x_uv_x(x, λ_u, K_u)

Momentum density of u valence component. Beta function Au x^λu (1-x)^Ku Au is set by λu and Ku.

PartonDensity.xf3_loMethod
xf3_lo(x, q2)

Calculate the xf3_lo structure function term. To be run after the evolution of PDFs with QCDNUM.