C   23/08/85 508241143  MEMBER NAME  MCTAGC   (S)           FORTRAN
C--------------------------------------------------------------------
C   15/03/84 403152025  MEMBER NAME  MCTAGC   (S)           FORTRAN
C
C
C   GIVEN DX,DY,Z = DIRECTION COSINES OF TRACK
C     AND Z - WORK OUT X,Y OF TRACK
C
C USED IN JADE TAGG MC (A.J.FINCH'S VERSION)
C
C 15/3/84
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
       SUBROUTINE MCTAGC(DX,DY,DZ,X,Y,Z)
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
       DATA ILIMIT/10/
       DATA IWRITE/0/
C
       IF(DZ.EQ.0)GOTO 1
       R = Z/DZ
       X = R*DX
       Y = R*DY
C GOSH THAT WAS HARD
       RETURN
  1    X= 0
       Y = 0
       IWRITE = IWRITE  + 1
       IF(IWRITE.GT.ILIMIT)WRITE(6,600)DX,DY,DZ,Z
 600   FORMAT(' PROBLEM IN MCTAGC DX,DY,DZ,Z ',4(2X,F8.3))
       RETURN
       END
