C --- procedure for elastic scattering---------------
C--- differential cross section (DCS) dsigma/domega---
      SUBROUTINE ANGLSCAT(NO,NTET,GRAD,NW,EEL,
     *       NLV,LV,REDEL,IMDEL,RES,RES2)
      INTEGER   NO,NW,NLV,NTET,LV(NLV)
       REAL*8  PI,A,B,C,COT,A1,
     *   TET(NTET),GRAD(NTET),KAP,EEL(NW),
     *   IMDEL(NW,NLV),REDEL(NW,NLV),RES(NTET),RES2(NTET)

	PI=3.141 592 653
C	DO 1 I=0,3
C	B=0.
C	Do 2 J=1,9
C        B=B+0.18
C        COT=DCOS(B)
C	C=FPLG(I,0,COT)
C	WRITE(6,3) I,J,B,COT,C
C   3    FORMAT(' I J ANG COS P(COS) ', 2I3,3E15.8) 
C  2	CONTINUE
C  1	CONTINUE
 	  WRITE(6,10)
  10    FORMAT(/10X,'ANGLE DISTRIBUTION IN ELASTIC SCATTERING'/
     *   '     ERy          REDELs         REDELp  ',   
     *   '       REDELd           REDELf')
       DO 15 I=1,NW
       WRITE(6,21) EEL(I),(REDEL(I,J),J=1,NLV)
  21    FORMAT(5E15.8)
  20   CONTINUE
  15   CONTINUE
        WRITE(6,25)
  25    FORMAT('    EELRy          IMDELs        IMDELp    ',  
     *        '       IMDELd         IMDELf ')
       DO 30 I=1,NW
       WRITE(6,36) EEL(I),(IMDEL(I,J),J=1,NLV)
  36     FORMAT (5E15.8)
  35   CONTINUE
  30   CONTINUE
	II=NO
	KAP=DSQRT(EEL(II))
       WRITE(6,37)EEL(II),KAP 
  37    FORMAT (/5X,'E= ',E15.8,3X,'KAPPA',E15.8//
     *    25X,'a0**2 sr-1'/
     *   3X,'angle_rad',2X,'angle_degr',2X,'DCS1') 
      DO 50 JJ=1, NTET
	TET(JJ)=PI*GRAD(JJ)/180
       COT=DCOS(TET(JJ))
	A=0.
      A1=0.
      DO 60 I2=1,NLV
	C=FPLG(LV(I2),0,COT)
      DO 70 I1=1,NLV
       	B=FPLG(LV(I1),0,COT)
         A=A+DFLOAT(2*LV(I1)+1)*DFLOAT(2*LV(I2)+1)*
     *   DEXP(-IMDEL(II,I1)-IMDEL(II,I2))*C*B*
     *   (DCOS(REDEL(II,I2)-REDEL(II,I1))*
     *   (DSIN(REDEL(II,I2))*DSIN(REDEL(II,I1))*
     *    DCOSH(IMDEL(II,I2))*DCOSH(IMDEL(II,I1))+
     *    DCOS(REDEL(II,I2))*DCOS(REDEL(II,I1))*
     *    DSINH(IMDEL(II,I2))*DSINH(IMDEL(II,I1)))-
     *    DSIN(REDEL(II,I2)-REDEL(II,I1))*
     *   (DCOS(REDEL(II,I2))*DSIN(REDEL(II,I1))*
     *    DSINH(IMDEL(II,I2))*DCOSH(IMDEL(II,I1))-
     *    DCOS(REDEL(II,I1))*DSIN(REDEL(II,I2))*
     *    DSINH(IMDEL(II,I1))*DCOSH(IMDEL(II,I2))))
C	WRITE(6,75) I1,I2,TET(JJ),COT,B,C,A
C 75	 FORMAT(2I3,'TET,COT',2F10.5,'B,C,A',3E15.8)
C         A1=A1+(DFLOAT(2*LV(I1)+1)*(DFLOAT(2*LV(I2)+1)*
C     *      (DEXP(-IMDEL(II,I1))*DSIN(2.*REDEL(II,I1))*B)**2
C         A1=A1+(DFLOAT(2*LV(I2)+1)*
C     *   (1.-DEXP(-IMDEL(II,I2))*DCOS(2.*REDEL(II,I2)))*B)**2

 70    CONTINUE 
 60    CONTINUE
       RES(JJ)=A/EEL(II)
       RES2(JJ)=A1/EEL(II)/4.
       WRITE (6,150)TET(JJ),GRAD(JJ),RES(JJ)
 150    FORMAT( 2F10.5,E15.8)
 50    CONTINUE      
C  40   CONTINUE
       RETURN
       END
