!-----------------------------------------------------------------------
!  PSGLSA -- CALL UP CROSS SECTION FIT FOR IMPURITY IMPACT IONIZATION/CX
!
real(fp) FUNCTION psglsa8(ZER,IZH,IZIMP)
 
 
! Modified:
! 09/29/94 TBT Added Lithium
!
!  INPUT
!   ZER -- COLLISION ENERGY IN EV/AMU
!   IZH -- ATOM TO BE IONIZED - 1 FOR HYDROGEN, 2 FOR HELIUM, 3 for Lithium
!   IZIMP -- ION DOING THE IONIZING -- 6 FOR CARBON, 8 FOR OXYGEN
!            FULLY STRIPPED LIGHT IMPURITIES -- SEE REFS IN CALLED
!            SUBFUNCTIONS
!
!  OUTPUT
!   PSGLSA -- CROSS SECTION, CM**2
!
!============
! idecl:  explicitize implicit INTEGER declarations:
  use iso_c_binding, only: fp => c_double
  IMPLICIT NONE
  INTEGER izh,izimp
!============
! idecl:  explicitize implicit REAL declarations:
  real(fp) zer,zans,psghc8,psgho8,psghec8,psgheo8
!============
  IF(IZH.EQ.1) THEN
     IF(IZIMP.EQ.6) THEN
        ZANS=psghc8(ZER)
     ELSE IF(IZIMP.EQ.8) THEN
        ZANS=psgho8(ZER)
     ELSE
        CALL bad_exit ! ILLEGAL VALUE OF IZIMP
     ENDIF
  ELSE IF(IZH.EQ.2) THEN
     IF(IZIMP.EQ.6) THEN
        ZANS=psghec8(ZER)
     ELSE IF(IZIMP.EQ.8) THEN
        ZANS=psgheo8(ZER)
     ELSE
        CALL bad_exit ! ILLEGAL VALUE OF IZIMP
     ENDIF
  ELSE IF(IZH.EQ.3) THEN                  ! Fudge:  use H0 data!?!
     IF(IZIMP.EQ.6) THEN
        ZANS=psghc8(ZER)
     ELSE IF(IZIMP.EQ.8) THEN
        ZANS=psgho8(ZER)
     ELSE
        CALL bad_exit ! ILLEGAL VALUE OF IZIMP
     ENDIF
  ELSE
     CALL bad_exit ! ILLEGAL VALUE OF IZH
  ENDIF
  !
  psglsa8=ZANS
  RETURN
END FUNCTION psglsa8
! 21Jun2001 fgtok -s r8_precision.sub foo.tab "r8con.csh conversion"
! 21Jun2001 fgtok
