C   08/01/79 C9010801   MEMBER NAME  LGNMBR   (JADELGS)     FORTRAN
      SUBROUTINE LGNMBR(XYZ,NGLASS)
C
C     S.YAMADA   09-10-78  10:20  COPIED FROM LGSOURCE ON 08-01-79
C     LAST MODIFICATION  09-01-79  20:15
C
C---- CALCULATE THE GLASS NUMBER OF COORDINATE XYZFOR THE BARREL PART.
C
      DIMENSION XYZ(3)
      COMMON /CLGDMS/ X0,RADIUS(6),RADSX0(6),THX0(4),
     1                ZEND(2),ZENDX0(2),ZWID(2),ZGAP(2),PHWID(2),
     2                ZECAP(4),ZECAPX(4),THECPX(2),
     3                ECXLST(24), ECYLST(24)
      DATA PHIDEV/7.47998E-2/
C
      NGLASS = -1
      PHI = ATAN2(XYZ(2),XYZ(1))
      IF(PHI.LT.0.) PHI = PHI+6.283184
      IPHI = PHI/PHIDEV
      IF(IPHI.GE.84) IPHI = IPHI-84
C
      IZ =(XYZ(3)-ZENDX0(1))/(ZWID(2)+ZGAP(2))
      IF(IZ.LT.0.OR.IZ.GT.31) RETURN
      NGLASS = IZ+32*IPHI
      RETURN
      END
