C -----total cross section--------
      SUBROUTINE CROSST (NC,NW1,K,K1,OMEGA,
     * SMC1,SMC2,CHAN,X,Y1,Y2,OM,Z1,Z2)
      INTEGER K(NC),K1(NC),N,I,J,J1,
     *   NC,NW1,CHAN(NC)
      REAL *8 KVINT,SUM1,SUM2,
     *   OMEGA(NC,*),SMC1(NC,*),SMC2(NC,*),
     *   X(NW1),Y1(NW1),Y2(NW1),
     *   OM(NC*NW1),Z1(NC*NW1),Z2(NC*NW1)
C-------------------------------------------
      N=NC*NW1

      DO 60 J=1,N
      OM(J)=0.D 00
 60   CONTINUE
C     DO 70 J=1,K(1)-K1(1)
C     OM(J)=OMEGA(1,J+K1(1))
C70   CONTINUE
C     J=K(1)-K1(1)+1
       J=1
       DO 90 I=1,NC
       DO 100 JJ=K1(I)+1,K(I)
       IF((OMEGA(I,JJ).EQ.OMEGA(I+1,JJ).AND.I.LT.NC))GOTO 90
       IF(CHAN(I).NE.0) THEN
       OM(J)=OMEGA(I,JJ)
        J=J+1
        END IF
 100   CONTINUE
  90    CONTINUE
C------------------------
      DO 140 J=1,N
C      WRITE(6,85) J,OM(J)
C85    FORMAT(' J',I5,' OM(J) ',E15.8)
      IF(OM(J).GT.0.D 00) THEN
      Z1(J)=0.D 00
      Z2(J)=0.D 00
      DO 120 I=1,NC
      J1=K(I)-K1(I)
      DO 130 JJ=1,J1
      X(JJ)=OMEGA(I,K1(I)+JJ)
      Y1(JJ)=SMC1(I,K1(I)+JJ)
      Y2(JJ)=SMC2(I,K1(I)+JJ)
130   CONTINUE
      SUM1=0.D 00
      SUM2=0.D 00
C     WRITE(6,121)J,I,X(1),X(J1)
C121   FORMAT(' j,i,x1,xn',2I3,2E15.8)
      IF(OM(J).LT.X(1).OR.OM(J).GT.X(J1)) GOTO 120
      IF(OM(J).GT.X(1).AND.OM(J).LT.X(J1)) THEN
      SUM1=KVINT(OM(J),X,Y1,1,J1)
      SUM2=KVINT(OM(J),X,Y2,1,J1)
C      WRITE(6,133)J,I,OM(J),SUM1,SUM2
C133   FORMAT(' kvint j i om sum1 sum2 ',2I3,3E15.8)
      END IF
      IF(OM(J).EQ.X(1)) THEN
      SUM1=Y1(1)
      SUM2=Y2(1)
C      WRITE(6,132)J,I,OM(J),SUM1,SUM2
C132   FORMAT(' j,i,om,sum1,sum2 ',2I3,3E15.8)
      END IF
      IF(OM(J).EQ.X(J1)) THEN
      SUM1=Y1(J1)
      SUM2=Y2(J1 )
C      WRITE(6,134)J,I,OM(J),SUM1,SUM2
C134   FORMAT(' j,i,om,sum1,sum2 ',2I3,3E15.8)
      END IF
      IF(CHAN(I).NE.0) THEN
      Z1(J)=Z1(J)+SUM1
      Z2(J)=Z2(J)+SUM2
      END IF
C122      WRITE(6,131)J,I,OM(J),Z1(J),Z2(J)
C131   FORMAT(' j,i om,z1,z2 ',2I3,3E15.8)
120   CONTINUE
      END IF
140   CONTINUE
      WRITE(6,145)(CHAN(I),I=1,NC)
      WRITE(*,145)(CHAN(I),I=1,NC)
145   FORMAT('   PHOTON E       TOTAL CROSS SECTION '/
     *       '                IN  CHANNELS',10I3/    
     *       '   E,RY           LFORM            VFORM')
      DO 150 J=1,N
      IF(OM(J).GT.0.D 00.AND.Z1(J).GT.0.D 00
     *  .AND.Z2(J).GT.0.D 00) THEN
      WRITE(6,155) OM(J),Z1(J),Z2(J)
      WRITE(*,155) OM(J),Z1(J),Z2(J)
      END IF
150   CONTINUE
155   FORMAT(2X,F10.5,5X,2E15.8)
      END
