Description
In #39 the evaluation of diffCS on coordinates was added, which is essentially just a wrapper around the evaluation on four-momenta. This includes a conversion of a vector of reals (referred to as coordinates) to a vector of four-momenta by using the function _generate_momenta
. As @AntonReinhard suggests, we should extend this idea to a full conversion system, which takes phase-space points with any element type and converts them into four-momenta. For four-momenta itself, the conversion is then just the identity.
The wrapper could then look like
function diffCS(ps::AbstactVector{T}) where {T}
input_momenta = convert_phase_space_point(ps,SFourMomentum)
return _diffCS_kernel(input_momenta)
end
where _diffCS_kernel
is the internal version of diffCS
evaluated only on four-momenta and using the differential cross-section interface (see #38 for detail).
An open question is the treatment of phase space definition in this context; This issue is therefore somewhat related to QEDjl-project/QEDbase.jl#139.
Originally posted by @AntonReinhard in #39 (review)