Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update differential cross section interface #57

Closed
szabo137 opened this issue May 15, 2024 · 1 comment
Closed

Update differential cross section interface #57

szabo137 opened this issue May 15, 2024 · 1 comment
Assignees
Labels
05 - Enhancement Improvements of existing code
Milestone

Comments

@szabo137
Copy link
Member

szabo137 commented May 15, 2024

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 szabo137 added this to the Release-next milestone May 15, 2024
@szabo137 szabo137 added the 05 - Enhancement Improvements of existing code label May 15, 2024
This was referenced May 16, 2024
szabo137 added a commit that referenced this issue May 21, 2024
With this, we update the process and cross-section interface to adopt
the new phase space points. This solved #57.

# TODOs

- [x] update tests for process interface
- [x] update test implementation for processes
- [x] update process interface description
- [x] update tests for cross-section and probability
- [x] update building of cross sections and probabilities
- [x] update perturbative compton
- [x] old interface (incl. versions for vectors of inputs)
- [x] cleanup

---------

Co-authored-by: Uwe Hernandez Acosta <[email protected]>
Co-authored-by: Anton Reinhard <[email protected]>
@szabo137
Copy link
Member Author

Solved by #59
Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
05 - Enhancement Improvements of existing code
Projects
None yet
Development

No branches or pull requests

2 participants