forked from QEDjl-project/QEDprocesses.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiff_cross_section.jl
30 lines (24 loc) · 1.06 KB
/
diff_cross_section.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
########################
# differential and total cross sections.
#
# This file contains default implementations for differential
# cross sections based on the scattering process interface
########################
"""
unsafe_differential_cross_section(phase_space_point::PhaseSpacePoint)
Return the differential cross section evaluated on a phase space point without checking if the given phase space is physical.
"""
function unsafe_differential_cross_section(phase_space_point::PhaseSpacePoint)
I = 1 / (4 * _incident_flux(phase_space_point))
return I * unsafe_differential_probability(phase_space_point)
end
"""
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.
"""
function differential_cross_section(phase_space_point::PhaseSpacePoint)
if !_is_in_phasespace(phase_space_point)
return zero(eltype(_momentum_type(phase_space_point)))
end
return unsafe_differential_cross_section(phase_space_point)
end