|
|
module omega_amplitude |
|
omega_prec, which can be whatever
the Fortran compiler supports. NB: the support libraries have not
yet been tuned to give reliable answers for amplitudes with gauge
cancellations in single precision.
use omega_kinds use omega95 use omega_parameters implicit none private |
|
public :: amplitude, amplitude_f, amplitude_1, amplitude_2 |
public :: symmetry |
amplitude is always divided
by the square root of the Bose/Fermi symmetry factor for identical
particles in the final state, as required for phase space
integration of the squared matrix element and differential cross
section.
|
A(i1i2® f1f2...) (17) |
symmetry function can be used to recover the ``true''
scattering amplitude A for checking Ward identities, etc.
pure function true_amplitude (k, s, f) result (a)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: s, f
complex(kind=omega_prec) :: a
a = symmetry (f) * amplitude (k, s, f)
end function true_amplitude
|
public :: amplitude_nonzero, amplitude_f_nonzero, &
amplitude_1_nonzero, amplitude_2_nonzero
|
public :: spin_sum_sqme, spin_sum_sqme_1, sum_sqme
public :: spin_sum_sqme_nonzero, spin_sum_sqme_1_nonzero, &
sum_sqme_nonzero
|
public :: scatter, scatter_nonzero |
public :: scatter_diagonal, scatter_diagonal_nonzero |
public :: allocate_zero
public :: multiplicities, multiplicities_in, multiplicities_out
public :: number_particles, &
number_particles_in, number_particles_out
public :: number_spin_states, &
number_spin_states_in, number_spin_states_out, &
spin_states, spin_states_in, spin_states_out
public :: number_flavor_states, &
number_flavor_states_in, number_flavor_states_out, &
flavor_states, flavor_states_in, flavor_states_out
public :: number_flavor_zeros, &
number_flavor_zeros_in, number_flavor_zeros_out, &
flavor_zeros, flavor_zeros_in, flavor_zeros_out
public :: create, reset, destroy
|
|
subroutine create () end subroutine create subroutine reset () end subroutine reset subroutine destroy () end subroutine destroy |
interface allocate_zero
module procedure allocate_zero_1, allocate_zero_2
end interface
|
subroutine allocate_zero_1 (zero)
integer, dimension(:,:), pointer :: zero
end subroutine allocate_zero_index
|
subroutine allocate_zero_2 (zero)
integer, dimension(:,:,:,:), pointer :: zero
end subroutine allocate_zero_index_inout
|
|
pure function number_particles () result (n)
integer :: n
end function number_particles
pure function number_particles_in () result (n)
integer :: n
end function number_particles_in
pure function number_particles_out () result (n)
integer :: n
end function number_particles_out
|
ith helicity combination.
pure function number_spin_states () result (n)
integer :: n
end function number_spin_states
pure subroutine spin_states (s)
integer, dimension(:,:), intent(inout) :: s
end subroutine spin_states
|
pure function number_spin_states_in () result (n)
integer :: n
end function number_spin_states_in
pure subroutine spin_states_in (s)
integer, dimension(:,:), intent(inout) :: s
end subroutine spin_states_in
|
pure function number_spin_states_out () result (n)
integer :: n
end function number_spin_states_out
pure subroutine spin_states_out (s)
integer, dimension(:,:), intent(inout) :: s
end subroutine spin_states_out
|
ith helicity combination.
pure function number_flavor_states () result (n)
integer :: n
end function number_flavor_states
pure subroutine flavor_states (f)
integer, dimension(:,:), intent(inout) :: f
end subroutine flavor_states
|
pure function number_flavor_states_in () result (n)
integer :: n
end function number_flavor_states_in
pure subroutine flavor_states_in (f)
integer, dimension(:,:), intent(inout) :: f
end subroutine flavor_states_in
|
pure function number_flavor_states_out () result (n)
integer :: n
end function number_flavor_states_out
pure subroutine flavor_states_out (f)
integer, dimension(:,:), intent(inout) :: f
end subroutine flavor_states_out
|
pure function number_flavor_zeros () result (n)
integer :: n
end function number_flavor_zeros
pure subroutine flavor_zeros (f)
integer, dimension(:,:), intent(inout) :: f
end subroutine flavor_zeros
|
pure function number_flavor_zeros_in () result (n)
integer :: n
end function number_flavor_zeros_in
pure subroutine flavor_zeros_in (f)
integer, dimension(:,:), intent(inout) :: f
end subroutine flavor_zeros_in
|
pure function number_flavor_zeros_out () result (n)
integer :: n
end function number_flavor_zeros_out
pure subroutine flavor_zeros_out (f)
integer, dimension(:,:), intent(inout) :: f
end subroutine flavor_zeros_out
|
pure subroutine multiplicities (a)
integer, dimension(:), intent(inout) :: a
end subroutine multiplicities
|
pure subroutine multiplicities_in (a)
integer, dimension(:), intent(inout) :: a
end subroutine multiplicities_in
|
pure subroutine multiplicities_out (a)
integer, dimension(:), intent(inout) :: a
end subroutine multiplicities_out
|
|
k(0:3,1) and
k(0:3,2) are the incoming momenta, k(0:3,3:) are the
outgoing momenta. All momenta are the physical momenta,
i. e. forward time-like or light-like. The signs of the incoming
momenta are flipped internally. Unless asked by a commandline
parameter, O'Mega will not check the validity of the momenta.
pure function amplitude (k, s, f) result (amp)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: s, f
complex(kind=omega_prec) :: amp
end function amplitude
|
amplitude (k, s, flavors(:,f)), where
flavors has been filled by flavor_states:
pure function amplitude_f (k, s, f) result (amp)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: s
integer, intent(in) :: f
complex(kind=omega_prec) :: amp
end function amplitude_f
|
amplitude (k, spins(:,s), flavors(:,f)), where
spins has been filled by spin_states and
flavors has been filled by flavor_states:
pure function amplitude_1 (k, s, f) result (amp)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, intent(in) :: s, f
complex(kind=omega_prec) :: amp
end function amplitude_1
|
amplitude_1, but with separate incoming and
outgoing particles:
pure function amplitude_2 &
(k, s_in, f_in, s_out, f_out) result (amp)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, intent(in) :: s_in, f_in, s_out, f_out
complex(kind=omega_prec) :: amp
end function amplitude_2
|
intent(in), but we
need to update the counter for vanishing amplitudes.
allocate_zero will allocate the correct size.
pure subroutine amplitude_nonzero (amp, k, s, f, zero, n)
complex(kind=omega_prec), intent(out) :: amp
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: s, f
integer, dimension(:,:), intent(inout) :: zero
integer, intent(in) :: n
end subroutine amplitude_nonzero
|
pure subroutine amplitude_1_nonzero (amp, k, s, f, zero, n)
complex(kind=omega_prec), intent(out) :: amp
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, intent(in) :: s, f
integer, dimension(:,:), intent(inout) :: zero
integer, intent(in) :: n
end subroutine amplitude_1_nonzero
|
pure subroutine amplitude_f_nonzero &
(amp, k, s, f, zero, n)
complex(kind=omega_prec), intent(out) :: amp
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: s
integer, intent(in) :: f
integer, dimension(:,:), intent(inout) :: zero
integer, intent(in) :: n
end subroutine amplitude_f_nonzero
|
allocate_zero will allocate the correct size.
pure subroutine amplitude_2_nonzero &
(amp, k, s_in, f_in, s_out, f_out, zero, n)
complex(kind=omega_prec), intent(out) :: amp
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, intent(in) :: s_in, f_in, s_out, f_out
integer, dimension(:,:,:,:), intent(inout) :: zero
integer, intent(in) :: n
end subroutine amplitude_2_nonzero
|
pure function symmetry (f) result (s)
real(kind=omega_prec) :: s
integer, dimension(:), intent(in) :: f
end function symmetry
|
|
pure function spin_sum_sqme (k, f, smask) result (amp2)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: f
logical, dimension(:), intent(in), optional :: smask
real(kind=omega_prec) :: amp2
end function spin_sum_sqme
|
pure function spin_sum_sqme_1 (k, f, smask) result (amp2)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, intent(in) :: f
logical, dimension(:), intent(in), optional :: smask
real(kind=omega_prec) :: amp2
end function spin_sum_sqme_1
|
pure function sum_sqme (k, smask, fmask) result (amp2)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
logical, dimension(:), intent(in), optional :: smask, fmask
real(kind=omega_prec) :: amp2
end function sum_sqme
|
pure subroutine spin_sum_sqme_nonzero (amp2, k, f, zero, n, smask)
real(kind=omega_prec), intent(out) :: amp2
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:), intent(in) :: f
integer, dimension(:,:), intent(inout) :: zero
integer, intent(in) :: n
logical, dimension(:), intent(in), optional :: smask
end subroutine spin_sum_sqme_nonzero
|
pure subroutine spin_sum_sqme_1_nonzero (amp2, k, f, zero, n, smask)
real(kind=omega_prec), intent(out) :: amp2
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, intent(in) :: f
integer, dimension(:,:), intent(inout) :: zero
integer, intent(in) :: n
logical, dimension(:), intent(in), optional :: smask
end subroutine spin_sum_sqme_1_nonzero
|
pure subroutine sum_sqme_nonzero (amp2, k, zero, n, smask, fmask)
real(kind=omega_prec), intent(out) :: amp2
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
integer, dimension(:,:), intent(inout) :: zero
integer, intent(in) :: n
logical, dimension(:), intent(in), optional :: smask, fmask
end subroutine sum_sqme_masked_nonzero
|
|
| r'ff' = |
|
Tfi rii' Tf'i'* (19) |
pure subroutine scatter_correlated (k, rho_in, rho_out)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
complex(kind=omega_prec), dimension(:,:,:,:), &
intent(in) :: rho_in
complex(kind=omega_prec), dimension(:,:,:,:), &
intent(inout) :: rho_out
end subroutine scatter_correlated
|
pure subroutine scatter_correlated_nonzero &
(k, rho_in, rho_out, zero, n)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
complex(kind=omega_prec), dimension(:,:,:,:), &
intent(in) :: rho_in
complex(kind=omega_prec), dimension(:,:,:,:), &
intent(inout) :: rho_out
integer, dimension(:,:,:,:), intent(inout) :: zero
integer, intent(in) :: n
end subroutine scatter_correlated_nonzero
|
| r'f = |
|
Tfi ri Tfi* = |
|
|Tfi|2 ri (20) |
pure subroutine scatter_diagonal (k, rho_in, rho_out)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
real(kind=omega_prec), dimension(:,:), intent(in) :: rho_in
real(kind=omega_prec), dimension(:,:), intent(inout) :: rho_out
end subroutine scatter_diagonal
|
pure subroutine scatter_diagonal_nonzero &
(k, rho_in, rho_out, zero, n)
real(kind=omega_prec), dimension(0:,:), intent(in) :: k
real(kind=omega_prec), dimension(:,:), intent(in) :: rho_in
real(kind=omega_prec), dimension(:,:), intent(inout) :: rho_out
integer, dimension(:,:,:,:), intent(inout) :: zero
integer, intent(in) :: n
end subroutine scatter_diagonal_nonzero
|
end module omega_amplitude |
pure can be
disabled as well.
|
|
|