Probability and Cross Section

Interface

QEDbase._incident_fluxFunction
_incident_flux(in_psp::InPhaseSpacePoint{PROC,MODEL}) where {
    PROC <: AbstractProcessDefinition,
    MODEL <: AbstractModelDefinition,
}

Interface function which returns the incident flux of the given scattering process for a given InPhaseSpacePoint.

source
QEDbase._matrix_elementFunction
_matrix_element(PhaseSpacePoint{PROC,MODEL}) where {
    PROC <: AbstractProcessDefinition,
    MODEL <: AbstractModelDefinition,
}

Interface function which returns an SVector of scattering matrix elements for each spin and polarization combination of proc. Any of this function, _matrix_element_square, or [_matrix_element_square_sum] have to be implemented for a process and model.

source

Differential and total probability

QEDbase.differential_probabilityFunction
differential_probability(phase_space_point::AbstractPhaseSpacePoint)

If the given phase spaces are physical, return differential probability evaluated on a phase space point. Zero otherwise.

source
QEDbase.unsafe_differential_probabilityFunction
unsafe_differential_probability(phase_space_point::AbstractPhaseSpacePoint)

Return differential probability evaluated on a phase space point without checking if the given phase space(s) are physical.

source

Differential and total cross section

QEDbase.differential_cross_sectionFunction
differential_cross_section(phase_space_point::PhaseSpacePoint)

If the given phase spaces are physical, return differential cross section evaluated on a phase space point. Zero otherwise.

source
QEDbase.unsafe_differential_cross_sectionFunction
unsafe_differential_cross_section(phase_space_point::AbstractPhaseSpacePoint)

Return the differential cross section evaluated on a phase space point without checking if the given phase space is physical.

source

Vectorized interface

Additionally to the scalar implementations, for the differential probabilities and cross section, vectorized implementations are provided. These are implemented using KernelAbstractions.jl for arbitrary phase space points. This allows easy usage of GPUs from multiple vendors. If a better vectorized version is available (or necessary because of compilation issues), the non-kernel version should be specialized, and implement all of the 4 functions.

QEDbase.differential_probability!Function
function differential_probability!(
    dest::AbstractVector,
    phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint},
)

Vectorized version of differential_probability, writing the differential probability for each element in phase_space_points to the corresponding index in dest.

By default, this calls a generic KernelAbstractions kernel which dispatches to differential_probability, allowing the use of any of its backends (CPU, CUDA, AMDGPU, Metal, oneAPI). This function can be specialized for specific processes. This should only be necessary when there is a specific reason to do so. Generally, implementing the basic process interface (see AbstractProcessDefinition) should be sufficient.

source
QEDbase.differential_probability_kernel!Function
@kernel function differential_probability_kernel!(
    dest::AbstractVector,
    @Const(phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint}),
)

Broadcasting kernel definition using KernelAbstractions.jl for abstract phasespace points. This dispatches to the scalar implementation of differential_probability and expects the given dest to contain the result type of that call on the given phase space points. This function is dispatched to by differential_probability! and should not be specialized (i.e. don't add methods to it). If a different implementation is required, specialize differential_probability! instead.

Warn

For performance reasons, this is tagged inbounds = true. In the kernel call, make sure that ndrange = is set correctly (for example length(psps)) and that the given vectors have the same length.

source
QEDbase.unsafe_differential_probability!Function
function unsafe_differential_probability!(
    dest::AbstractVector,
    phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint},
)

Vectorized version of unsafe_differential_probability, writing the differential probability for each element in phase_space_points to the corresponding index in dest.

By default, this calls a generic KernelAbstractions kernel which dispatches to unsafe_differential_probability, allowing the use of any of its backends (CPU, CUDA, AMDGPU, Metal, oneAPI). This function can be specialized for specific processes. This should only be necessary when there is a specific reason to do so. Generally, implementing the basic process interface (see AbstractProcessDefinition) should be sufficient.

source
QEDbase.unsafe_differential_probability_kernel!Function
@kernel function unsafe_differential_probability_kernel!(
    dest::AbstractVector,
    @Const(phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint}),
)

Broadcasting kernel definition using KernelAbstractions.jl for abstract phasespace points. This dispatches to the scalar implementation of unsafe_differential_probability and expects the given dest to contain the result type of that call on the given phase space points. This function is dispatched to by unsafe_differential_probability! and should not be specialized (i.e. don't add methods to it). If a different implementation is required, specialize unsafe_differential_probability! instead.

Warn

For performance reasons, this is tagged inbounds = true. In the kernel call, make sure that ndrange = is set correctly (for example length(psps)) and that the given vectors have the same length.

source
QEDbase.differential_cross_section!Function
function differential_cross_section!(
    dest::AbstractVector,
    phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint},
)

Vectorized version of differential_cross_section, writing the differential cross section for each element in phase_space_points to the corresponding index in dest.

By default, this calls a generic KernelAbstractions kernel which dispatches to differential_cross_section, allowing the use of any of its backends (CPU, CUDA, AMDGPU, Metal, oneAPI). This function can be specialized for specific processes. This should only be necessary when there is a specific reason to do so. Generally, implementing the basic process interface (see AbstractProcessDefinition) should be sufficient.

source
QEDbase.differential_cross_section_kernel!Function
@kernel function differential_cross_section_kernel!(
    dest::AbstractVector,
    @Const(phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint}),
)

Broadcasting kernel definition using KernelAbstractions.jl for abstract phasespace points. This dispatches to the scalar implementation of differential_cross_section and expects the given dest to contain the result type of that call on the given phase space points. This function is dispatched to by differential_cross_section! and should not be specialized (i.e. don't add methods to it). If a different implementation is required, specialize differential_cross_section! instead.

Warn

For performance reasons, this is tagged inbounds = true. In the kernel call, make sure that ndrange = is set correctly (for example length(psps)) and that the given vectors have the same length.

source
QEDbase.unsafe_differential_cross_section!Function
function unsafe_differential_cross_section!(
    dest::AbstractVector,
    phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint},
)

Vectorized version of unsafe_differential_cross_section, writing the differential cross section for each element in phase_space_points to the corresponding index in dest.

By default, this calls a generic KernelAbstractions kernel which dispatches to unsafe_differential_cross_section, allowing the use of any of its backends (CPU, CUDA, AMDGPU, Metal, oneAPI). This function can be specialized for specific processes. This should only be necessary when there is a specific reason to do so. Generally, implementing the basic process interface (see AbstractProcessDefinition) should be sufficient.

source
QEDbase.unsafe_differential_cross_section_kernel!Function
@kernel function unsafe_differential_cross_section_kernel!(
    dest::AbstractVector,
    @Const(phase_space_points::AbstractVector{<:AbstractPhaseSpacePoint}),
)

Broadcasting kernel definition using KernelAbstractions.jl for abstract phasespace points. This dispatches to the scalar implementation of unsafe_differential_cross_section and expects the given dest to contain the result type of that call on the given phase space points. This function is dispatched to by unsafe_differential_cross_section! and should not be specialized (i.e. don't add methods to it). If a different implementation is required, specialize unsafe_differential_cross_section! instead.

Warn

For performance reasons, this is tagged inbounds = true. In the kernel call, make sure that ndrange = is set correctly (for example length(psps)) and that the given vectors have the same length.

source