QEDjl-project / QEDprocesses.jl

[WIP]: QEDprocesses.jl: Modeling of scattering processes for QED.jl
MIT License
1 stars 3 forks source link

Add conversion system for phase-space element types #49

Closed szabo137 closed 2 weeks ago

szabo137 commented 3 months ago

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 #43.

Originally posted by @AntonReinhard in https://github.com/QEDjl-project/QEDprocesses.jl/pull/39#pullrequestreview-1962852551

AntonReinhard commented 2 weeks ago

With the full implementation of the PhaseSpacePoint type, this is solved now. See #51, #63, and #68. It serves as a common internal representation of phase space points, and any representations can be converted to it in a specific constructor.