API
PartonDensity.input_pdf_map — Constantinput_pdf_mapThe relevant mapping for use with QCDNUM and get_input_pdf_func.
PartonDensity.AbstractPDFParams — Typeabstract type PartonDensity.AbstractPDFParamsAbstract type for any PDF parametrisation.
PartonDensity.BernsteinDirichletPDFParams — Typestruct BernsteinDirichletPDFParams <: AbstractPDFParamsBernstein polynomial specification of input PDF parameters. Dirichlet-style treament.
Constructors:
BernsteinDirichletPDFParams(; fields...)
Fields:
param_type::Int64: Default: BERNSTEINDIRICHLETTYPEseed::Int64: Default: 0weights::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_paramsinitial_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::Float64K_g::Float64λ_q::Float64K_q::Float64
PartonDensity.BernsteinPDFParams — Typestruct BernsteinPDFParams <: AbstractPDFParamsBernstein polynomial specification of input PDF parameters. Valence-style treatment.
Constructors:
BernsteinPDFParams(; fields...)
Fields:
param_type::Int64: Default: BERNSTEIN_TYPEbspoly_params::Vector{Vector{Int64}}: Default: [[0, 3], [0, 4], [1, 4], [0, 5]]bspoly_params_d::Vector{Vector{Int64}}: Default: bspoly_paramsU_weights::Vector{Float64}: Default: zeros(length(bspoly_params))D_weights::Vector{Float64}: Default: zeros(length(bspoly_params))λ_g1::Float64λ_g2::Float64K_g::Float64λ_q::Float64K_q::Float64seed::Int64: Default: 0weights::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.DirichletPDFParams — Typestruct DirichletPDFParams <: AbstractPDFParamsFull Dirichlet specification of input PDF parameters.
Constructors:
DirichletPDFParams(; fields...)
Fields:
param_type::Int64: Default: DIRICHLET_TYPEθ::AbstractVector{T} where T<:RealK_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::RealK_g::Realλ_q::RealK_q::Real
PartonDensity.QuarkCoefficients — TypeQuarkCoefficientsQuark coefficients for structure function calculations.
PartonDensity.ValencePDFParams — Typestruct ValencePDFParams <: AbstractPDFParamsValence specification of input PDF parameters.
Constructors:
ValencePDFParams(; fields...)
Fields:
param_type::Int64: Default: VALENCE_TYPEλ_u::RealK_u::Realλ_d::RealK_d::Realλ_g1::Realλ_g2::RealK_g::Realλ_q::RealK_q::Realθ::AbstractVector{T} where T<:Real
PartonDensity.Init_sys — MethodInit_sys()Reads various systematic errors and feeds them for further use
PartonDensity._fun_xsec_i — Method_fun_xsec_i(ix iq)Input function for cross section spline. Must be wrapped for interface to SPLINT.
PartonDensity.dd_xsecnc_xq2 — Methoddd_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_i — Methoddd_xsecnc_xq2_i(charge, x, q2)Double differential cross section for single x and q2 values. NB: modifications needed to include pol and order.
PartonDensity.f2_lo — Methodf2_lo(x, q2)Calculate the f2_lo structure function term. To be run after the evolution of PDFs with QCDNUM.
PartonDensity.fl_lo — Methodfl_lo(x, q2)Calculate the fl_lo structure function term. To be run after the evolution of PDFs with QCDNUM.
PartonDensity.forward_model — Functionforward_model(pdf_params, qcdnum_grid,
splint_params, quark_coeffs, sys_err_params)Go from input PDF parameters to the expected number of events in bins.
PartonDensity.forward_model_init — Methodforward_model_init(qcdnum_grid, qcdnum_params)Initialise forward model. Initialises QCDNUM and builds weight tables to save time in subsequent iterations. Must be called prior to first instance of forward_model().
PartonDensity.get_bin_info — Methodget_bin_info(n, quiet)Get the bin egdes of the ZEUS detector space for a given bin number, n.
PartonDensity.get_likelihood — Functionget_likelihood(pdf_params)Get a suitable likelihood for a given PDF parametrisation.
PartonDensity.get_prior — Functionget_prior(pdf_params)Get a suitable prior for a given PDF parametrisation.
PartonDensity.get_scaled_θ — Methodget_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_θ_val — Methodget_θ_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.int_xtotx — Functionint_xtotx(pdf_params)Total integrated momentum density. Should equal 1.
PartonDensity.nc_propagator — Methodnc_propagator(q2, x)PartonDensity.pd_read_sim — Methodpd_read_sim(file_name)Read in the simulated truth and simulated data from HDF5 file.
PartonDensity.pd_write_sim — Methodpd_write_sim(file_name, pdf_params, sim_data)Store the simulation truth and simulated data in an HDF5 file.
PartonDensity.plot_data_space — Functionplot_data_space(pdf_params, sim_data, samples, qcdnum_grid,
qcdnum_params, splint_params, quark_coeffs)Compare truth and posterior samples in the data space.
PartonDensity.plot_model_space — Functionplot_model_space(pdf_params, samples)Compare truth and posterior samples in the model space.
PartonDensity.rxsecnc_xq2 — Methodrxsecnc_xq2(x, q2)Reduced cross section for all bins.
PartonDensity.rxsecnc_xq2_i — Methodrxsecnc_xq2_i(charge, x, q2, F2, xF3, FL)Reduced cross section for single x, q2.
PartonDensity.x_dv_x — Methodx_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_x — Method 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_x — Methodx_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_x — Methodx_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_lo — Methodxf3_lo(x, q2)Calculate the xf3_lo structure function term. To be run after the evolution of PDFs with QCDNUM.
PartonDensity.xtotx — Functionx_total_x(x, pdf_params)Total momentum density.