QEDjl-project / QEDprocesses.jl

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

Update differential cross section interface #57

Closed szabo137 closed 1 month ago

szabo137 commented 1 month ago

As we discussed offline, we should update the cross-section interface to use the phase space point introduced in #51. This will change the signature of all interface functions.

This can be seen as an extension of #46 .

Suggested interface

The new interface could look like this: (PSP == PhaseSpacePoint)

_incident_flux(::PSP{CustomProcessDefinition,CustomModelDefinition})
_matrix_element(::PSP{CustomProcessDefinition,CustomModelDefinition})
_averaging_norm(::CustromProcess)
_is_in_phasespace(::PSP{CustomProcessDefinition,CustomModelDefinition})
_phase_space_factor(::PSP{CustomProcessDefinition,CustomModelDefinition,CustromPhaseSpaceDefinion})

If these functions are implemented, the following functions are built up using the interface:

unsafe_differential_probability(::PSP{CustomProcessDefinition,CustomModelDefinition,CustromPhaseSpaceDefinion})
differential_probability(::PSP{CustomProcessDefinition,CustomModelDefinition,CustromPhaseSpaceDefinion})
unsafe_differential_cross_section(::PSP{CustomProcessDefinition,CustomModelDefinition,CustromPhaseSpaceDefinion})
differential_cross_section(::PSP{CustomProcessDefinition,CustomModelDefinition,CustromPhaseSpaceDefinion})

The input validation can be dropped, because this is checked on the construction of the PSP.

Further changes

Following the suggestions in #46, one could drop the support of vectors of vectors of four-momenta in the form of a matrix but use Julia's broadcasting instead, e.g.

list_of_psp::Vector{PSP{...}} = ...
differential_cross_section.(list_of_psp)

Consequently, we could fully drop the support for the five-argument versions (e.g. differential_cross_section(proc, model, ps_def, in_ps, out_ps)) of the probabilities and cross sections in favor of the PSP.

szabo137 commented 1 month ago

Solved by #59 Closed.