C   14/03/84            MEMBER NAME  GGCLSD   (S)           FORTRAN
C   25/06/78 C9032701   MEMBER NAME  GGCLSD   (GAMTSTS)     FORTRAN
      SUBROUTINE GGCLSD
C
C     H.WRIEDT      30-11-78
C     LAST MODIFICATION   27-03-79  09:20
C
C     ORIGINALLY WRITTEN AS 'LGCLSD' BY S.YAMADA
C     AS TO BE FOUND ON YAMLGSRC.S
C
C---- DUMP CLUSTERS
C---- IF(MAP.NE.0) HCLMAP IS PRINTED.
C
      IMPLICIT INTEGER*2 (H)
C
      COMMON /CWORK/ IWORK1(500),
     &               ID,HTRACK(3),HCLST,HCLBEC(2),HNCLST,HCOL,HTYPE,HER,
     &               HCORR,HPBLAT,HDUMIN(2),HSCAL(36),HWORD(2),ACOLAN,
     &               ETOT(3),ENTOT(3),IWORK3(16),HCLMAP(2,51),
     &               CLSPRP(13,51)
C***  COMMON /CGGCLS/ NCLST,NCLBEC(2),HCLMAP(2,51),CLSPRP(10,51),ACOLAN,
C*** &                LCOLIN
      DIMENSION HCLSPR(26,51)
      EQUIVALENCE (HCLSPR(1,1),CLSPRP(1,1))
C--   RAD:  360/2*PI
C--   RAD2: RAD**2
      DATA RAD/57.2958/, RAD2/3282.81/
C
      COMMON/ CGGVRN/ NVRSN(20)
      DATA NVCODE/178120713/
      NVRSN(19) = NVCODE
C
      IF (HCLST.LE.0) RETURN
      WRITE(6,600) HCLST,HCLBEC
  600 FORMAT('0 FORWARD DETECCTORS LEAD GLASS CLUSTER DUMP',
     1      /'  NO.OF CLUSTERS=',I3,'  FORWARD DETECTOR(-Z) (',
     2      I3,')  FORWARD DETECTOR(+Z) (',I3,')')
      WRITE(6,601) ((HCLMAP(I,K),I=1,2),K=1,HCLST)
  601 FORMAT(' CLUSTER MAP',/' ',10(5(I5,2X,I5,3X),/' '))
C
C---- DUMP EACH CLUSTER PROPERTIES
C
      WRITE(6,603)
  603 FORMAT(' CLUSTER PROPERTIES',
     1  /' NO. MEMBR JBC ENERGY(GEV) SIG.EN  AV.X(MM)    AV.Y(MM)',3X,
     2    'SIG.X      SIG.Y   ',
     3     '   COS X  COS Y  COS Z   THE(DEG) (MRAD) PHI(DEG)')
      CON = RAD
      CON2 = RAD2
        DO 1 N=1,HCLST
        LNG = HCLMAP(2,N)-HCLMAP(1,N)+1
        IF (HCLSPR(2,N).EQ.0) GOTO 2
        THE = ARCOS(CLSPRP(13,N))
        THEDEG = RAD*THE
        IF (THEDEG.GT.10.) THE = 3.14159-THE
        THEMIL = 1.E+3*THE
        PHI = RAD*ATAN2(CLSPRP(12,N),CLSPRP(11,N))
        WRITE(6,602) N,LNG,HCLSPR(2,N),
     1             (CLSPRP(K,N),K=5,13),THEDEG,THEMIL,PHI
  602   FORMAT(' ',I2,2I5,F11.3,3X,F6.3,2E12.3,2E11.3,3F7.3,3F8.1)
        GOTO 1
  2     WRITE(6,605) N,LNG,HCLSPR(2,N)
  605   FORMAT(' ',I2,2I5,5X,'*****   WHOLE CLUSTER CONSISTS OF ILLEGAL'
     &             ,' COMPONENT NUMBERS   *****')
    1   CONTINUE
      ACORAD = 1.E+3*ACOLAN
      WRITE(6,604) ACORAD
  604 FORMAT(' ACOLLINEARITY ANGLE:',F8.1,' MRAD')
      RETURN
      END
