Closed szabo137 closed 2 weeks ago
Is this still relevant, especially with QEDjl-project/QEDbase.jl#73 ?
Indeed, this is not relevant anymore. We decided against the setup concept but used the phase space implementation instead (cf. QEDjl-project/QEDprocesses.jl#51 )
This issue is related to QEDjl-project/QEDprocesses.jl#3.
Problem statement
In the calculation of differential cross sections, there are situations, where for a fixed
initPS
the cross sections is calculated for severalfinalPS
. Therefore, the size-check of theinitPS
only needs to be performed once.Suggested solution
One could introduce the concept of a setup for a certain quantity, say the differential cross section. In the initialization step for such a setup, the fixed parameters, like process, model, initPS, could be checked once. Then the actual quantity, i.e. the differential cross section, could be calculated via a computation function, which only takes an instance of the setup and the remaining arguments, i.e. the
finalPS
.Suggested implementation
General setup interface
I suggest calling the root type
AbstractSetup
, and the following interface functions to be implemented.Abstact process setup
I suggest having a dedicated abstract subtype for process-related setups:
AbstractProcessSetup<:AbstractSetup
. For concrete subtypes ofAbstractProcessSetup
, the following interface functions should be implemented:The
_compute
method is different from the general interface functioncompute
, since one wants a version of it, without any size checks.Using the interface above, one could provide generic implementations for the following functions.
In order to fulfil the general setup interface above, one could provide the following generic implementations, only using the interface functions of
AbstractProcessSetup
.