Probability and Cross Section
Interface
QEDbase._incident_flux — Function
_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.
QEDbase._matrix_element — Function
_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.
QEDbase._matrix_element_square — Function
_matrix_element_square(psp::AbstractPhaseSpacePoint)Function that returns an SVector of squared matrix elements for the given AbstractPhaseSpacePoint. This function has a default implementation that uses _matrix_element and can be implemented instead of that function.
QEDbase._matrix_element_square_sum — Function
_matrix_element_square_sum(psp::AbstractPhaseSpacePoint)Function that returns the sum of squared matrix elements for a given AbstractPhaseSpacePoint. This function has a default implementation that uses _matrix_element_square and can be implemented instead of that function.
Differential and total probability
QEDbase.differential_probability — Function
differential_probability(phase_space_point::AbstractPhaseSpacePoint)If the given phase spaces are physical, return differential probability evaluated on a phase space point. Zero otherwise.
sourceQEDbase.unsafe_differential_probability — Function
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.
sourceQEDbase.total_probability — Function
total_probability(in_psp::AbstractInPhaseSpacePoint)Return the total probability of a given AbstractInPhaseSpacePoint.
Differential and total cross section
QEDbase.differential_cross_section — Function
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.
sourceQEDbase.unsafe_differential_cross_section — Function
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.
sourceQEDbase.total_cross_section — Function
total_cross_section(in_psp::AbstractInPhaseSpacePoint)Return the total cross section for a given AbstractInPhaseSpacePoint.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.