Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR provides an implementation of the model and process interface, which is also combined with an interface for differential and total cross-sections. # The model definition interface In this PR, the model interface describes only static information, i.e. there is only one un-parameterized base type and a convenient interface function: ```julia AbstractModelDefinition fundamental_interaction_type(::AbstractModelDefiniton) ``` # The process definition interface In this PR, the process interface describes only static information about a scattering process. Here, a scattering process should be seen in a generic way, which forms a physical scattering process, if it is combined with a model definition above. The process definition interface is defined as ```julia AbstractProcessDefinition #base type for processes incoming_particles(::AbstractProcessDefinition) # return tuple of incoming particle-like outgoing_particles(::AbstractProcessDefinition) # return tuple of outgoing particle-like ``` Here, *particle-like* stands for subtypes of `AbstractParticleType`, so the static instances of particles. Additionally, in this PR, the following process related functions are implemented ```julia number_incoming_particles(::AbstractProcessDefinition) # number of incoming particles-like number_outgoing_particles(::AbstractProcessDefinition) # number of outgoing particles-like ``` # Cross sections Based in the interface funcitons for process and model definition, this PR also provides an interface for differential and total cross sections. This interface is definied my the following two functions: ```julia _differential_cross_section( proc_def::AbstractProcessDefinition, model_def::AbstractModelDefinition, initPS::AbstractVector{T}, finalPS::AbstractVector{T}, ) where {T<:QEDbase.AbstractFourMomentum} _total_cross_section( proc_def::AbstractProcessDefinition, model_def::AbstractModelDefinition, initPS::AbstractVector{T}, ) where {T<:QEDbase.AbstractFourMomentum} end ``` where `initPS` and `finalPS` are vectors containing the four-momenta of the incoming and outgoing particles, respectively. The leading `_` indicates, that the functions are not exported, and that no input-validation is applied. Additionally, there are versions of `_differential_cross_section` and `_total_cross_section`, which evaluate the respective quantity on a set of phase space points, i.e. a matrix of four-momenta, where the columns represent the momenta of the incoming or outgoing particles and the rows represent the different phase space points. Currently, only serial execution of the respective loops is implemented. # Testing The unit-tests for the interface have the following structure: * a full test implementation of every interface * a partitial test implementation of every interface (dedicated for failing the interface, the are indicated by an appended `_FAIL`) * a test for every interface function * a test for every derived function * a test for every break of the interface # Final remarks The `README.md` is updated to include a small section on how-to build the documentation locally. --------- Co-authored-by: Uwe Hernandez Acosta <[email protected]> Co-authored-by: Tom Jungnickel <[email protected]>
- Loading branch information