      SUBROUTINE TPIRSL (KAPPA,NI,DDUM,W,TR,TI)
C *** SEE R H LANDAU, PROGRAM LPOTT, 1981
C     CALC OF PIN PHASES  AND AMPLITUDES WITH ROWE,SALOMON,LANDAU
C     FORMULA, OR LANDAU S FOR HIGHER L
      IMPLICIT REAL*8 (A-H,I,K,M,O-Z)
      DIMENSION A(14), B(14), C(14), XX(14), W0(14), Q0(14), GAM(14)
C       USE ROWE,SALOMON,LANDAU FOR LOW E S,P,D13,D15;LANDAU FOR OTHERS
C
      DATA MPI,MN,PI,KOLD/139.578E+0,938.903,3.141593E+0,0./,
     1 A/-11.2,-2.91,11.4,16.8,-5.7,-1.31,11.2E-13,-3.15E-12,
     2 8.31E-18,5.46E-17,0.109,0.112,-38.26E-18,7.43E-18/,
     3 B/-30.7,3.45,-15.4,-35.4,25.4,1.22,-0.369E-14,0.118E-13,
     4 -0.363E-19,-0.236E-18,-0.031,-0.270,0.205E-18,-0.222E-19/,
     5 C/21.,-1.5,7.2,27.,-29.,-0.4,0.,0.,0.,0.,0.003,0.19,0.,0./,
     6 XX/.31,.22,.99,.44,.61,.23,0.,0.,0.,0.,.54,.43,0.,0./,
     7 W0/1655.,1850.,1233.,1550.,1435.,1815.,0.,0.,0.,0.,
     8 1525.,1670.,0.,0./,
     9 Q0/550.,678.,228.,477.,393.,656.,0.,0.,0.,0.,459.,560.,0.,0./,
     A GAM/170.,200.,116.,105.,230.,255.,0.,0.,0.,0.,125.,155.,0.,0./
      IF (ABS(KAPPA-KOLD).LT.1.E-03) GO TO 10
      KOLD = KAPPA
      RHL = KAPPA*KAPPA
      IF (KAPPA.EQ.0.) KAPPA = 1.E-10
      EPIKAP = SQRT(MPI*MPI+RHL)
      ENKAP = SQRT(MN*MN+RHL)
      W = EPIKAP+ENKAP
      S = W*W
      FACTOR = (-1./KAPPA)*W/4./PI/PI/EPIKAP/ENKAP
      Q = KAPPA/MPI
      Q2 = Q*Q
      Q4 = Q2*Q2
C     DETERMINE L VALUE FOR FORMULA
 10   IF ((NI.EQ.1).OR.(NI.EQ.4)) L = 0
      IF ((NI.EQ.2).OR.(NI.EQ.3).OR.(NI.EQ.5).OR.(NI.EQ.6)) L = 1
      IF ((NI.EQ.7).OR.(NI.EQ.8).OR.(NI.EQ.11).OR.(NI.EQ.12)) L = 2
      IF ((NI.EQ.9).OR.(NI.EQ.10).OR.(NI.EQ.13).OR.(NI.EQ.14)) L = 3
      JJ = 2*L+1
      IF ((NI.EQ.7).OR.(NI.EQ.8).OR.(NI.EQ.9).OR.(NI.EQ.10).OR.(NI.EQ.13
     1).OR.(NI.EQ.14)) GO TO 20
      RHL = Q0(NI)/MPI
      DEL = (Q**JJ)*(A(NI)*1.E-2+B(NI)*Q2*1.E-3+C(NI)*Q4*1.E-4+XX(NI)*
     1GAM(NI)*W0(NI)/(RHL**JJ)/(W0(NI)*W0(NI)-S))
      DDUM = ATAN(DEL)
      GO TO 30
C     NO SALOMON FIT, USE OLD RHL FIT
 20   DDUM = (A(NI)+B(NI)*KAPPA)*(KAPPA**JJ)*PI/180.
 30   TR = 0.5*FACTOR*SIN(2.*DDUM)
      TI = 0.5*FACTOR*(1.-COS(2.*DDUM))
      RETURN
      END
