diff --git a/src/coordinate_map/cached.jl b/src/coordinate_map/cached.jl index 0b5242c..006bbca 100644 --- a/src/coordinate_map/cached.jl +++ b/src/coordinate_map/cached.jl @@ -66,7 +66,10 @@ out_coord_map(out_coords) """ struct CoordinateMapCached{ - P<:AbstractProcessDefinition,M<:AbstractModelDefinition,PSL<:AbstractPhaseSpaceLayout,TM + P<:AbstractProcessDefinition, + M<:AbstractModelDefinition, + PSL<:QEDbase.AbstractPhaseSpaceLayout, + TM, } <: AbstractCoordinateMap proc::P model::M @@ -77,36 +80,38 @@ end function CoordinateMapCached( proc::AbstractProcessDefinition, model::AbstractModelDefinition, - psl::AbstractInPhaseSpaceLayout, + psl::QEDbase.AbstractInPhaseSpaceLayout, in_coords::NTuple{N,T}, ) where {N,T<:Real} - in_moms = build_momenta(proc, model, psl, in_coords) + in_moms = QEDbase.build_momenta(proc, model, psl, in_coords) return CoordinateMapCached(proc, model, psl, in_moms) end function CoordinateMapCached( proc::AbstractProcessDefinition, model::AbstractModelDefinition, - psl::AbstractOutPhaseSpaceLayout, + psl::QEDbase.AbstractOutPhaseSpaceLayout, in_coords::NTuple{N,T}, ) where {N,T<:Real} - in_moms = build_momenta(proc, model, in_phase_space_layout(psl), in_coords) + in_moms = QEDbase.build_momenta( + proc, model, QEDbase.in_phase_space_layout(psl), in_coords + ) return CoordinateMapCached(proc, model, psl, in_moms) end # make the transform callable: for in_psl maps return the cached @inline function ( coord_map::CoordinateMapCached{P,M,PSL} -)() where {P,M,PSL<:AbstractInPhaseSpaceLayout} +)() where {P,M,PSL<:QEDbase.AbstractInPhaseSpaceLayout} return getfield(coord_map, :in_moms) end # make the transform callable: for out_psl maps @inline function (coord_map::CoordinateMapCached{P,M,PSL})( out_coords::Tuple -) where {P,M,PSL<:AbstractOutPhaseSpaceLayout} +) where {P,M,PSL<:QEDbase.AbstractOutPhaseSpaceLayout} in_moms = coord_map.in_moms - return build_momenta( + return QEDbase.build_momenta( coord_map.proc, coord_map.model, in_moms, coord_map.psl, out_coords ) end diff --git a/src/coordinate_map/map.jl b/src/coordinate_map/map.jl index 3f047d9..f9cdf4f 100644 --- a/src/coordinate_map/map.jl +++ b/src/coordinate_map/map.jl @@ -66,7 +66,7 @@ coord_map(in_coords, out_coords) and momentum conservation for the process. """ -struct CoordinateMap{P,M,PSL<:AbstractPhaseSpaceLayout} <: AbstractCoordinateMap +struct CoordinateMap{P,M,PSL<:QEDbase.AbstractPhaseSpaceLayout} <: AbstractCoordinateMap proc::P model::M psl::PSL @@ -75,17 +75,22 @@ end # make the transform callable @inline function (coord_map::CoordinateMap{P,M,PSL})( in_coords::Tuple -) where {P,M,PSL<:AbstractInPhaseSpaceLayout} - return build_momenta(coord_map.proc, coord_map.model, coord_map.psl, in_coords) +) where {P,M,PSL<:QEDbase.AbstractInPhaseSpaceLayout} + return QEDbase.build_momenta(coord_map.proc, coord_map.model, coord_map.psl, in_coords) end # make the transform callable @inline function (coord_map::CoordinateMap{P,M,PSL})( in_coords::Tuple, out_coords::Tuple -) where {P,M,PSL<:AbstractOutPhaseSpaceLayout} - in_moms = build_momenta( - coord_map.proc, coord_map.model, in_phase_space_layout(coord_map.psl), in_coords +) where {P,M,PSL<:QEDbase.AbstractOutPhaseSpaceLayout} + in_moms = QEDbase.build_momenta( + coord_map.proc, + coord_map.model, + QEDbase.in_phase_space_layout(coord_map.psl), + in_coords, ) return in_moms, - build_momenta(coord_map.proc, coord_map.model, in_moms, coord_map.psl, out_coords) + QEDbase.build_momenta( + coord_map.proc, coord_map.model, in_moms, coord_map.psl, out_coords + ) end diff --git a/src/coordinates/multivariate.jl b/src/coordinates/multivariate.jl index b69ea88..f453fb4 100644 --- a/src/coordinates/multivariate.jl +++ b/src/coordinates/multivariate.jl @@ -41,7 +41,7 @@ function CoordinateSet{N}(coords::AbstractUnivariateCoordinate...) where {N} end CoordinateSet(coords::AbstractUnivariateCoordinate...) = CoordinateSet(coords) -phase_space_dimension(::CoordinateSet{N}) where {N} = N +QEDbase.phase_space_dimension(::CoordinateSet{N}) where {N} = N BivariateCoordiantes(coords::Tuple) = CoordinateSet{2}(coords) TrivariateCoordiantes(coords::Tuple) = CoordinateSet{3}(coords) diff --git a/src/phase_space_layouts/in_channel/two_body/general.jl b/src/phase_space_layouts/in_channel/two_body/general.jl index 5dece6d..96c6b85 100644 --- a/src/phase_space_layouts/in_channel/two_body/general.jl +++ b/src/phase_space_layouts/in_channel/two_body/general.jl @@ -22,4 +22,4 @@ processes can be modeled flexibly and accurately within phase space calculations - [`AbstractTwoBodyRestSystem`](@ref): A subtype representing two-body systems where one particle is at rest. """ -abstract type AbstractTwoBodyInPhaseSpaceLayout <: AbstractInPhaseSpaceLayout end +abstract type AbstractTwoBodyInPhaseSpaceLayout <: QEDbase.AbstractInPhaseSpaceLayout end diff --git a/test/coordinates.jl b/test/coordinates.jl index 519afb2..3cb21ae 100644 --- a/test/coordinates.jl +++ b/test/coordinates.jl @@ -62,7 +62,7 @@ end @testset "utility" begin @test coordinate_names(test_coord_set) == COORD_NAMES - @test phase_space_dimension(test_coord_set) == DIM + @test QEDbase.phase_space_dimension(test_coord_set) == DIM end @testset "error handling" begin diff --git a/test/test_implementation/test_phase_space_layout.jl b/test/test_implementation/test_phase_space_layout.jl index ca187b5..d3ea100 100644 --- a/test/test_implementation/test_phase_space_layout.jl +++ b/test/test_implementation/test_phase_space_layout.jl @@ -1,7 +1,7 @@ ### Trivial phase-space layouts # maps all components onto four momenta -struct TrivialInPSL <: AbstractInPhaseSpaceLayout end +struct TrivialInPSL <: QEDbase.AbstractInPhaseSpaceLayout end @inline QEDbase.phase_space_dimension( proc::AbstractProcessDefinition, ::AbstractModelDefinition, ::TrivialInPSL @@ -14,7 +14,7 @@ struct TrivialInPSL <: AbstractInPhaseSpaceLayout end end # maps componets of N-1 particles onto four-momenta and uses energy-momentum conservation -struct TrivialOutPSL <: AbstractOutPhaseSpaceLayout{TrivialInPSL} +struct TrivialOutPSL <: QEDbase.AbstractOutPhaseSpaceLayout{TrivialInPSL} in_psl::TrivialInPSL end