-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a type `InPhaseSpacePoint`, which is a partially specialized version of a `PhaseSpacePoint`. It can be used to dispatch in places where only the incoming part of a phase space is required. Construction of PhaseSpacePoints now allows empty tuples for either incoming or outgoing phase spaces. --------- Co-authored-by: Uwe Hernandez Acosta <[email protected]> Co-authored-by: Uwe Hernandez Acosta <[email protected]> Co-authored-by: AntonReinhard <[email protected]>
- Loading branch information
1 parent
67b966c
commit c768a57
Showing
24 changed files
with
909 additions
and
943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,12 @@ | ||
|
||
########### | ||
# Total probability | ||
########### | ||
|
||
# total probability on a phase space point | ||
# based on coordinates | ||
function _total_probability( | ||
proc::AbstractProcessDefinition, | ||
model::AbstractModelDefinition, | ||
phase_space_def::AbstractPhasespaceDefinition, | ||
in_phase_space::AbstractVector{T}, | ||
) where {T<:Real} | ||
in_momenta = _generate_incoming_momenta(proc, model, phase_space_def, in_phase_space) | ||
return _total_probability(proc, model, phase_space_def, in_momenta) | ||
end | ||
|
||
# total probability on several phase space points | ||
function _total_probability( | ||
proc::AbstractProcessDefinition, | ||
model::AbstractModelDefinition, | ||
phase_space_def::AbstractPhasespaceDefinition, | ||
in_phase_space::AbstractMatrix{T}, | ||
) where {T<:AbstractPhasespaceElement} | ||
res = Vector{eltype(T)}(undef, size(in_phase_space, 2)) | ||
for i in 1:size(in_phase_space, 2) | ||
res[i] = _total_probability( | ||
proc, model, phase_space_def, view(in_phase_space, :, i) | ||
) | ||
end | ||
return res | ||
end | ||
|
||
""" | ||
total_probability( | ||
proc::AbstractProcessDefinition, | ||
model::AbstractModelDefinition, | ||
phase_space_def::AbstractPhasespaceDefinition, | ||
in_phase_space::AbstractMatrix{T}, | ||
) where {T<:QEDbase.AbstractFourMomentum} | ||
Return the total probability of a given model and process combination, evaluated at the particle momenta. | ||
""" | ||
function total_probability( | ||
proc::AbstractProcessDefinition, | ||
model::AbstractModelDefinition, | ||
phase_space_def::AbstractPhasespaceDefinition, | ||
in_phase_space::AbstractVecOrMat{T}, | ||
) where {T<:QEDbase.AbstractFourMomentum} | ||
_check_in_phase_space_dimension(proc, model, in_phase_space) | ||
|
||
return _total_probability(proc, model, phase_space_def, in_phase_space) | ||
end | ||
|
||
""" | ||
total_probability( | ||
proc::AbstractProcessDefinition, | ||
model::AbstractModelDefinition, | ||
phase_space_def::AbstractPhasespaceDefinition, | ||
in_phase_space::AbstractMatrix{T}, | ||
) where {T<:Real} | ||
total_probability(in_psp::InPhaseSpacePoint) | ||
Return the total probability of a given model and process combination, evaluated at the coordinates. | ||
Return the total probability of a given [`InPhaseSpacePoint`](@ref). | ||
""" | ||
function total_probability( | ||
proc::AbstractProcessDefinition, | ||
model::AbstractModelDefinition, | ||
phase_space_def::AbstractPhasespaceDefinition, | ||
in_phase_space::AbstractVecOrMat{T}, | ||
) where {T<:Real} | ||
_check_in_phase_space_dimension(proc, model, in_phase_space) | ||
|
||
return _total_probability(proc, model, phase_space_def, in_phase_space) | ||
function total_probability(in_psp::InPhaseSpacePoint) | ||
return _total_probability(in_psp) | ||
end |
Oops, something went wrong.