PartonDensity¶
- class madspace.PartonDensity(*args, **kwargs)¶
Bases:
FunctionGeneratorParton-density interpolation as a compute-graph function.
Interpolates a PdfGrid at the sampled \((x, q)\), returning \(x f(x, q)\) for the requested flavours; the numerical output agrees with LHAPDF to double precision [1] (Sec. 3.2.3 of [2]). With a CustomPdf, the user-supplied library is called once per requested flavour instead.
batchis the leading batch dimension.Arguments
x–float, shape(batch,)– momentum fraction.q–float, shape(batch,)– factorization scale.flavor_index–int, shape(batch,)– which flavour to return. Present only whendynamic_pidis true.
Returns
pdf–float, shape(batch,)whendynamic_pidis true, otherwise(batch, len(pids))– the interpolatedx f(x, q).
References
[1] A. Buckley et al., “LHAPDF6: parton density access in the LHC precision era”, https://arxiv.org/abs/1412.7420
[2] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895 (Sec. 3.2.3)
Overloaded function.
__init__(self: madspace._madspace_py.PartonDensity, grid: madspace._madspace_py.PdfGrid, pids: collections.abc.Sequence[typing.SupportsInt], dynamic_pid: bool = False, prefix: str = ‘’) -> None
- Parameters:
grid – The parton-density grid to interpolate.
pids – PDG ids of the flavours to return.
dynamic_pid – If true, a single flavour selected per event by the
flavor_indexargument is returned.prefix – Prefix for the grid global names.
__init__(self: madspace._madspace_py.PartonDensity, custom_pdf: madspace._madspace_py.CustomPdf, pids: collections.abc.Sequence[typing.SupportsInt], beam_index: typing.SupportsInt, dynamic_pid: bool = False) -> None
- Parameters:
custom_pdf – The user-supplied parton density.
pids – PDG ids of the flavours to return.
beam_index – Index of the beam (0 or 1), passed to the library.
dynamic_pid – If true, a single flavour selected per event by the
flavor_indexargument is returned.