FUNCTION fRE_H_pitch(params,eta,g,EPHI,ne,Te,nAr0,nAr1,nAr2,nAr3,nD,nD1)
TYPE(KORC_PARAMS), INTENT(IN) :: params
REAL(rp), INTENT(IN) :: eta ! pitch angle in degrees
REAL(rp), INTENT(IN) :: g ! Relativistic gamma factor
REAL(rp), INTENT(IN) :: EPHI,ne,Te,nAr0,nAr1,nAr2,nAr3,nD,nD1
REAL(rp) :: fRE_H_pitch
REAL(rp) :: A
REAL(rp) :: E_G,nf,pdm,Z_brac
REAL(rp) :: CLog0,CLogee,CLogei,E_CH,k=5._rp,VTe
CLog0=14.9_rp - LOG(1E-20_rp*ne*params%cpp%density)/2._rp + &
LOG(1E-3_rp*Te*params%cpp%temperature/C_E)
VTe=sqrt(2._rp*Te*params%cpp%temperature/C_ME)
CLogee=CLog0+log(1+(2*(g-1)/(VTe/C_C)**2)**(k/2._rp))/k
pdm=C_C*sqrt(g**2-1)
CLogei=CLog0+log(1+(2*pdm/VTe)**k)/k
!write(6,*) 'ne',ne*params%cpp%density,'Te',Te*params%cpp%temperature/C_E
!write(6,*) 'VTe',VTe,'pdm',pdm
!write(6,*) 'CLog0',CLog0,'CLogee',CLogee,'CLogei',CLogei
nf=nAr0*18+nAr1*17+nAr2*16+nAr3*15+nD
Z_brac=((nAr0+nAr1+nAr2+nAr3)*18**2+(nD+nD1))/nf &
*(CLogei/CLogee)
E_CH=nf*C_E**3*CLogee/(4*C_PI*C_E0**2*C_ME*C_C**2)
E_G=abs(EPHI)/E_CH
A = (2.0_rp*E_G/(Z_brac + 1.0_rp))*(g**2 - 1.0_rp)/g
A = A*h_params%A_fact
!write(6,*) 'EPHI',EPHI*params%cpp%Eo,'E_CH',E_CH*params%cpp%Eo,'Z_brac',Z_brac,'nf',nf*params%cpp%density
fRE_H_pitch = A*EXP(-A*(1.0_rp - COS(deg2rad(eta))))/ &
(1.0_rp - EXP(-2.0_rp*A))
!write(6,*) 'fRE_H_pitch',fRE_H_pitch
END FUNCTION fRE_H_pitch