Skip to content

Commit

Permalink
Add (possibly temporary) fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonReinhard committed May 21, 2024
1 parent b3a8536 commit db547ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/cross_sections.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ function unsafe_differential_cross_section(phase_space_point::PhaseSpacePoint)
phase_space_point.proc,
phase_space_point.model,
phase_space_point.ps_def,
momentum.(phase_space_point.in_particles),
momentum.(phase_space_point.out_particles),
momenta(phase_space_point, Incoming()),
momenta(phase_space_point, Outgoing()),
)
end

Expand Down Expand Up @@ -280,8 +280,8 @@ function differential_cross_section(phase_space_point::PhaseSpacePoint)
phase_space_point.proc,
phase_space_point.model,
phase_space_point.ps_def,
momentum.(phase_space_point.in_particles),
momentum.(phase_space_point.out_particles),
momenta(phase_space_point, Incoming()),
momenta(phase_space_point, Outgoing()),
)
end

Expand Down
8 changes: 8 additions & 0 deletions src/phase_spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,14 @@ struct PhaseSpacePoint{
end
end

function momenta(psp::PhaseSpacePoint, ::Incoming)
return QEDbase._as_svec(momentum.(psp.in_particles))
end

function momenta(psp::PhaseSpacePoint, ::Outgoing)
return QEDbase._as_svec(momentum.(psp.out_particles))
end

# recursion termination: success
@inline _recursive_type_check(t::Tuple{}, p::Tuple{}, dir::ParticleDirection) = nothing

Expand Down
8 changes: 4 additions & 4 deletions src/probabilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ function unsafe_differential_probability(phase_space_point::PhaseSpacePoint)
phase_space_point.proc,
phase_space_point.model,
phase_space_point.ps_def,
momentum.(phase_space_point.in_particles),
momentum.(phase_space_point.out_particles),
momenta(phase_space_point, Incoming()),
momenta(phase_space_point, Outgoing()),
)
end

Expand Down Expand Up @@ -230,8 +230,8 @@ function differential_probability(phase_space_point::PhaseSpacePoint)
phase_space_point.proc,
phase_space_point.model,
phase_space_point.ps_def,
momentum.(phase_space_point.in_particles),
momentum.(phase_space_point.out_particles),
momenta(phase_space_point, Incoming()),
momenta(phase_space_point, Outgoing()),
)
end

Expand Down

0 comments on commit db547ef

Please sign in to comment.