Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(in) | :: | eta | |||
real(kind=rp), | intent(in) | :: | g |
FUNCTION fRE_H(eta,g)
REAL(rp), INTENT(IN) :: eta ! pitch angle in degrees
REAL(rp), INTENT(IN) :: g ! Relativistic gamma factor
REAL(rp) :: fRE_H
REAL(rp) :: D
REAL(rp) :: g0
REAL(rp) :: g1
REAL(rp) :: f0
REAL(rp) :: f1
REAL(rp) :: m
REAL(rp) :: feta
REAL(rp) :: A
INTEGER :: index
index = MINLOC(ABS(h_params%g - g),1)
! index of gamma supplied to function in Hollmann input gamma range
D = h_params%g(index) - g
! linear interpolation of Hollmann input gamma range to gamma supplied
! to function
if (D.GT.0) then
f0 = h_params%fRE_E(index-1)
g0 = h_params%g(index-1)
f1 = h_params%fRE_E(index)
g1 = h_params%g(index)
else
f0 = h_params%fRE_E(index)
g0 = h_params%g(index)
f1 = h_params%fRE_E(index+1)
g1 = h_params%g(index+1)
end if
m = (f1-f0)/(g1-g0)
fRE_H = f0 + m*(g - g0)
! end of linear interpolation, fRE_H is evaluation of input Hollmann energy
! distribution PDF at gamma supplied to function
A = (2.0_rp*h_params%E/(h_params%Zeff + 1.0_rp))*(g**2 - 1.0_rp)/g
A = A*h_params%A_fact
feta = A*EXP(-A*(1.0_rp - COS(deg2rad(eta))))/(1.0_rp - EXP(-2.0_rp*A)) ! MRC
! feta = 0.5_rp*A*EXP(A*COS(deg2rad(eta)))/SINH(A) ! MRC
fRE_H = fRE_H*feta
END FUNCTION fRE_H