C   23/03/97 703231223  MEMBER NAME  JEOSUM2  (SOURCE)      FORTRAN
C   19/02/80 002200259  MEMBER NAME  @CHK     (SOURCE)      FORTRAN
C        CHECK NEW ROUTINES
      DIMENSION IF(29)
      E=15.
      R=350.*SQRT(2.)
      YY=425
      DO 40 JY=1,29
      YY=YY-5.
      XX=275.
      DO 30 JX=1,29
      XX=XX+5.
      RR=XX*XX+YY*YY
      DR=SQRT((XX-350.)**2+(YY-350.)**2)
      DDR=0.
      IF(ABS(DR).GT.0.) DDR=(SQRT(RR)-R)/DR
      CALL POSEND(E,0.1*DR,DDR,FACT,&30)
      IF(JX)=FACT*1000.+0.5
30    CONTINUE
      WRITE(6,900) IF
900   FORMAT(29I4)
40    CONTINUE
      STOP
      END
C   09/03/79 002200411  MEMBER NAME  @CHKRTN  (SOURCE)      FORTRAN
C        CHECK NEW ROUTINES
      DIMENSION IF(29),A(15)
      EQUIVALENCE (A(1),IBE)
      DATA A/15*0./
      CALL LGINIT
      ZE=1522.
      ZE2=ZE*ZE
      IBE=1
      DO 40 I=10,20,5
      E=I
      DEP0=SHMAX(E*1000.,1)
      WRITE(6,950) E,DEP0
 950  FORMAT(' E,DEP=',2F12.3)
      YY=425
      DO 20 JY=1,29
      YY=YY-5.
      XX=275.
      DO 10 JX=1,29
      XX=XX+5.
      R=XX*XX+YY*YY
      RZ=SQRT(ZE2+R)
      R=SQRT(R)
      DEP=DEP0*ZE/RZ
      A(2)=E
      A(11)=ZE/RZ
      A(9)=XX/RZ
      A(10)=YY/RZ
      A(4)=XX
      A(5)=YY
      CALL LGECOR(A,DEP,IFLAG)
      IF(JX)=100.*E/A(2)
10    CONTINUE
      WRITE(6,900) IF
900   FORMAT(29I4)
20    CONTINUE
40    CONTINUE
      STOP
      END
C   10/03/79 209031402  MEMBER NAME  @LGHIST  (SOURCE)      FORTRAN
C
C    S.YAMADA   09-03-79  10:25
C     LAST MODIFICATION   09-03-79  23:25
C
C---- SIMPLE TEST PROGRAM FOR LGANAL FOR REAL DATA.
C
C
      IMPLICIT INTEGER *2 (H)
C
      COMMON /BCS/ IDATA(6000)
      DIMENSION  RDATA(6000),HDATA(12000)
      EQUIVALENCE (IDATA(1),RDATA(1)), (HDATA(1),IDATA(1))
C
      COMMON /CWORK/ LNG,HNORD,HNORML,HPOINT(4),HLGADC(2,2000),
     1               LGCL(3),LNGCL,NPNT(4),IDENT(2),NCLST,NCLBEC(3),
     2               ETOT(4),NNEUT,EGAM(4),IFLAG(5),NWPCL,CLMPRP(801)
      DIMENSION  MAPCL(51), HLGAD1(1000)
      EQUIVALENCE (MAPCL(1),CLMPRP(1)), (HLGADC(1,1),HLGAD1(1))
C
      COMMON /CLGPRM/ ITH,MAXCLS,IRLTHD,IRLTH2,IRLTH3
      COMMON /CLGMSB/ AMSGVL(5)
      DIMENSION MSGVAL(5)
      EQUIVALENCE (AMSGVL(1),MSGVAL(1))
      COMMON /CTPCNS/ EBMGEV, BKGAUS
C
C---- INITIALIZATION
      CALL BINT(6000,4000,500,0)
C
      CALL LGINIT
      BKGAUS = 0.01
      ITH = 45
C
      NEV = 0
C
        DO 1000 N=1,300
C
C----   CHECK TIME
        IF( NTIME(DUM).LT.200 ) GO TO 100
C
        DATA NUNITI/1/
        CALL BREAD(NUNITI,&1000,&200)
C
        CALL KALIBR
        CALL CLOC( NPR,    'ALGN',1 )
        IF( NPR.GT. 0 ) GO TO 1
C
        CALL LGCALB(&1000)
C       LG-HIT MAP
    1   CALL LGHITM(JDMP)
        IF(JDMP.EQ.0) GO TO 30
        DATA JDCNT/0/
        JDCNT = JDCNT+1
        IF(JDCNT.GT.3) GO TO 30
                    WRITE(6,6666) N
 6666               FORMAT('0======== N=',I3,' ========')
                    CALL HPRS( 'HEAD',0)
                    CALL LGADCD(2,8)
                    CALL HPRS( 'ALGL',0)
C                   CALL BPRS( 'ALGN',1)
C                   CALL BPRS( 'ALGN',1)
C
   30   CALL LGANAL
C
C----   DUMP THE RESULTS
C       CALL LGSHOW
C       CALL LGADCD(2,5)
C----   SECOND STEP ANALYSIS
C       POINTERS OF THE NECESSARY BANKS
        NPPATR = 0
        NPR = 0
        NPCL = 0
        IPP = IBLN('PATR')
        NPPATR = IDATA(IPP)
C----   SHIFT NPPATR BY 1 TO SKIP THE BANK-DESCRIPTER WORD.
C----   TAKE ONLY 2-TRACK EVENTS
        IF( IDATA(NPPATR+2).NE.2) GO TO 20
        NEV = NEV+1
C
        CALL CLOC( NPR,    'ALGN',1 )
        CALL BLOC( NPCL,   'LGCL',1, &90)
        GO TO 10
C
C----   SOME BANK IS MISSING
   90   MSGVAL(1) =  NPPATR
        MSGVAL(2) =  NPR
        MSGVAL(3) =  NPCL
        CALL LGMESG( 1, 2 )
        GO TO 20
C
   10   CONTINUE
C***    CALL LGCDIR( NPPATR, NPR, NPCL )
        CALL LGHIST( NPCL )
C
C
   20   CALL BSLT
        CALL BDLG
C
 1000   CONTINUE
      GO TO 100
  200 MSGVAL(1) = N
      CALL LGMESG( 1,1 )
  100 WRITE(6,6100) N,NEV
 6100 FORMAT('0 NO.OF READ AND PLOTTED EVENTS=',2I6)
      CALL LGHITL
      CALL HISTDO
      STOP
      END
C
C/////////////////////////////////////////////////////
C
C
C---- DUMMY ENERGY CORRECTION
      SUBROUTINE LGECOR(ADATA,DEP,IFLAG)
C
C  THIS PROGRAM CALCULATE THE INCIDENT ENERGY
      IFLAG=0
      RETURN
C************************************
      ENTRY LGECR0(NVR)
C
C  VERSION NUMBER (DATE)   79 03 12    DUMMY SUB.
C
      DATA IVR/790312/
      NVR=IVR
      RETURN
      END
C   14/12/79 912140748  MEMBER NAME  @LGPROD  (SOURCE)      FORTRAN
C
C    S.YAMADA   09-03-79  10:25
C     LAST MODIFICATION   09-03-79  23:25
C
C---- SIMPLE TEST PROGRAM FOR LGANAL FOR REAL DATA.
C
C
      IMPLICIT INTEGER *2 (H)
C
      COMMON /BCS/ IDATA(24000)
      DIMENSION  ADATA(24000),HDATA(48000)
      EQUIVALENCE (IDATA(1),ADATA(1)), (HDATA(1),IDATA(1))
C
      COMMON /CLGMSB/ MSGVAL(5)
C
C---- INITIALIZATION
      DATA NUNITO,RPATR,RHEAD,RALGN,RLGCL/2,4HPATR,4HHEAD,4HALGN,4HLGCL/
      CALL BINT(24000,4000,500,0)
      CALL BINT1(200,100,10,0)
      CALL BWRO( NUNITO, 1558, 2)
C
      CALL LGINIT
C
        DO 1000 N=1,99999
        NTIM=JUHR(2)
        IF(NTIM.EQ.2) GO TO 300
C
        DATA NUNITI/1/
        CALL BREAD(NUNITI,&200,&200)
          IPNPHD = IBLN(RHEAD)
          NPHD = IDATA(IPNPHD)
          IF(NPHD.LE.0) GO TO 20
          NHPHD = NPHD+NPHD
C         HEXP=HDATA(NHPHD+ 9)
C         HRUN=HDATA(NHPHD+10)
C
          IPP = IBLN(RPATR)
          NPPR = IDATA(IPP)
        CALL LGANAL
C
C----   SECOND STEP ANALYSIS
C       POINTERS OF THE NECESSARY BANKS
        NPR = 0
        NPCL = 0
C----   SHIFT NPPATR BY 1 TO SKIP THE BANK-DESCRIPTER WORD IF IT'S THERE
        CALL CLOC( NPR,    RALGN,1)
        CALL CLOC( NPCL,   RLGCL,1)
        IF(NPCL) 90,90,10
C
C----   SOME BANK IS MISSING
   90   MSGVAL(1) =  NPPR
        MSGVAL(2) =  NPR
        MSGVAL(3) =  NPCL
        CALL LGMESG( 1, 2 )
        GO TO 20
C
   10   CALL LGCDIR( NPPR, NPR, NPCL )
20      CONTINUE
        CALL BSLW
        CALL BWRITE(NUNITO)
        CALL BSLT
        CALL BDLG
C
 1000   CONTINUE
      GO TO 100
  200 MSGVAL(1) = N
      CALL LGMESG( 1,1 )
      GO TO 100
300   WRITE(6,6200) N,(HDATA(HNPHD+J),J=9,11)
6200  FORMAT(' TIME OUT AT REC#,EXP#,RUN#,EV#',10I6)
100   CONTINUE
      CALL BMLT(0,DUMMY)
      CALL BWRITE(NUNITO)
      CALL BSLT
      CALL BDLG
      STOP
      END
C   09/03/79 008180717  MEMBER NAME  @LGTEST                FORTRAN
C
C    S.YAMADA   09-03-79  10:25
C     LAST MODIFICATION   09-03-79  23:25
C
C---- SIMPLE TEST PROGRAM FOR LGANAL FOR REAL DATA.
C
C
      IMPLICIT INTEGER *2 (H)
C
      COMMON /BCS/ IDATA(24000)
      DIMENSION  ADATA(24000),HDATA(48000)
      EQUIVALENCE (IDATA(1),ADATA(1)), (HDATA(1),IDATA(1))
C
#include "clgwork1.for"
C
      COMMON /CLGPRM/ ITH,MAXCLS,IRLTHD,IRLTH2,IRLTH3, ZVRTX,DZ
C
      COMMON /CLGMSB/ MSGVAL(5)
      COMMON /CTPCNS/ EBMGEV, BKGAUS
      DATA HRAN/0/
C
C---- INITIALIZATION
      DATA NUNITO,RPATR,RHEAD,RALGN,RLGCL/2,4HPATR,4HHEAD,4HALGN,4HLGCL/
      DATA RTRIG/4HTRIG/
      CALL BINT(24000,4000,500,0)
      CALL BINT1(200,100,10,0)
C     CALL BWRO( NUNITO, 1558, 2)
C        SET UP POINTERS BEFOREHAND
          IPHEAD = IBLN(RHEAD)
          IPTRIG = IBLN(RTRIG)
          IPPATR = IBLN(RPATR)
          IPALGN= IBLN(RALGN)
          IPLGCL= IBLN(RLGCL)
C
      CALL LGINIT
C     ITH = 45
C
C
        DO 1000 N=1,50
C       NTIM=JUHR(2)
C       IF(NTIM.EQ.2) GO TO 300
C
        DATA NUNITI/1/
        CALL BREAD(NUNITI,&200,&200)
C----   TEMPORARY SUBROUTINE TO MODIFY THE M.C. 'PATR' FORMAT.
C
C        CALL HPRS(RHEAD,0)
          NPHEAD = IDATA(IPHEAD)
          IF(NPHEAD.LE.0) GO TO 20
          NHHEAD = NPHEAD+NPHEAD
          HEXP=HDATA(NHHEAD+ 9)
          HRUN=HDATA(NHHEAD+10)
          CALL KALIB2
          HRAN=HRUN
        NPTRIG=IDATA(IPTRIG)
        IF(NPTRIG.LT.1) GO TO 20
        HBIT  =HDATA(NPTRIG+NPTRIG+10)
      WRITE(6,6000) N,HEXP,HRUN,HDATA(NHHEAD+11),HBIT
 6000 FORMAT(1H0,20(1H*),'REC#,EXP,RUN,EV#,TRG',4I6,Z8,50(1H*),/)
C
C
C----     TEST DUMP
         CALL PRALGN(0,0,10)
C        CALL PRALGN(1,0,10)
         CALL LGCALB(&20)
         CALL PRALGN(1,0,10)
C     IF(II.EQ.II) GO TO 20
C     PRALGN(I,J,K); I;0='ALGL'/0, 1='ALGN'/1
C                    J;0=NODECODING, 1=CRATE-SLOT, 2=IPHI-Z
C                    K=NO. DATA TO BE PRINTED PER LINE
          NPPATR = IDATA(IPPATR)
C       CALL PRLGCL
        CALL LGANAL
C
C----   DUMP THE RESULTS
CCCC    CALL LGSHOW
C       CALL LGADCD(2,5)
C       CALL PRALGN(1,0,10)
C       CALL PRALGN(1,2,10)
C
C----   CLUSTER DUMP
C       CALL PRLGCL
C
C----   SECOND STEP ANALYSIS
C       POINTERS OF THE NECESSARY BANKS
        NPALGN =IDATA(IPALGN)
        NPLGCL=IDATA(IPLGCL)
        IF(NPLGCL) 90,90,10
C
C----   SOME BANK IS MISSING
   90   MSGVAL(1) =  NPPATR
        MSGVAL(2) =  NPALGN
        MSGVAL(3) =  NPLGCL
        CALL LGMESG( 1, 2 )
        GO TO 20
C
   10   CALL LGCDIR( NPPATR, NPALGN, NPLGCL )
C
C       CALL BPRS(RPATR,NNN)
C       PRINT INNER DET.CHARGE TRACK TRACING RESULT
        CALL PRCLGC
C----   PRINT CHARGE AND LG-CLUSTER MATCHING TABLE
C       CALL PRITOL(3)
CCC     CALL PRCLGC
C       CALL PRLGCL
C       CALL LGESHW
        CALL PRLGCL
C----               PRINT 'PATR'
C                   NNN = IDATA(NPPR-2)
C                   CALL BPRS(RPATR,NNN)
C
20      CONTINUE
C       CALL BSLW
C       CALL BFIXP
C       CALL BWRITE(NUNITO)
        CALL BSLT
        CALL BDLG
C
 1000   CONTINUE
C//////////////
CCCC  CALL TMLOG(0)
C//////////////
      GO TO 100
  200 MSGVAL(1) = N
      CALL LGMESG( 1,1 )
      GO TO 100
300   WRITE(6,6200) N,(HDATA(HNPHD+J),J=9,11)
6200  FORMAT(' TIME OUT AT REC#,EXP#,RUN#,EV#',10I6)
100   CONTINUE
C     CALL BMLT(0,DUMMY)
C     CALL BFIXP
C     CALL BWRITE(NUNITO)
      CALL BSLT
      CALL BDLG
      STOP
      END
C   29/04/82 208252238  MEMBER NAME  @LGTOFCL (SOURCE)      FORTRAN
C
C        MAIN ROUTINE FOR LG-TOF CALIBRATION
C
C     S.YAMADA  29-04-82   09:40
C     LAST MODIFICATION  24-08-82   18:10
C
      IMPLICIT INTEGER*2 (H)
C
      COMMON //BSPACE(35000)
      COMMON /BCS/ IDATA(40000)
      DIMENSION ADATA(40000)
      INTEGER *2 HDATA(80000)
      EQUIVALENCE (IDATA(1),ADATA(1)), (HDATA(1),IDATA(1))
      DATA LDATA/40000/
C
      COMMON /CTPMCT/ ICREC,MAXREC, NRUN,NRUN1,NRUN2,KRUN1,KRUN2,
     $                NTLEFT,NTOUT
C
      DATA ISTART/0/, ITD/0/
C
C---- INPUT UNIT=IUNIT,  OUTPUT UNIT=JUNIT
      IUNIT=1
      JUNIT=2
C
C---- SET THE RUN EXP-NUMBER RANGE TO BE COPIED.
C     NORMAL SEQUENCE IS ASSUMED.
      READ(5,500) MAXREC,NRUN1,NRUN2,MESG, ITD
  500 FORMAT(5I10)
C
      WRITE(6,602) MAXREC,NRUN1,NRUN2
  602 FORMAT('0*********** INPUT CONDITIONS ***********',
     $        /' MAXREC=',I10,'      NRUN1,NRUN2=',2I10)
C
      ICREC = 0
      ICRECO = 0
      JCREC = 0
      JCRECO = 0
      KRUN2 = 0
      CALL HBOOK1(1,'BTDC$',100,0.,2000.,0)
      CALL HBOOK2(20,'BADC VS ETOTB$',100,0.,40.,52,0.,2080.,0)
      CALL HBOOK2(22,'ETOTB(GEV) VS BTDC(CH)$',100,0.,2000.,50,0.,50.,0)
      CALL HBOOK2(2,'BADC VS BTDC$',100,0.,2000.,50,0.,2500.,0)
      CALL HBPROY(2,0)
      CALL HBOOK2(10, 'ETOTB VS CORRECTED TOF$',
     $                              100,-20.,20.,50,0.,50.,0)
      CALL HBPROX(10,0)
      CALL HSQUEZ( 3HYES )
C
      CALL BINT(LDATA,2000,1000,0)
CC    CALL BWRO( JUNIT, 1558, 2)
C
 1000 IF(ICREC.GE.MAXREC .AND. JCREC.GE.MAXREC ) GO TO 300
C
C----    CHECK TIME
      NTLEFT = NTIME(DUM)
      IF(NTLEFT.LT.100) GO TO 400
C
      CALL BREAD(IUNIT,&1001,&100)
      ICREC=ICREC+1
C
C          SET THE LAST RUN NO.
      CALL BLOC( NPHD, 'HEAD', 0, &1002 )
      NPHD2 = 2*NPHD
      NRUN=HDATA(NPHD2+9)*100000+HDATA(NPHD2+10)
C
      IF( NRUN.LT.NRUN1 ) GO TO 1010
      IF( NRUN.GT.NRUN2 ) GO TO 200
      IF( NRUN.EQ.KRUN2 ) GO TO 2000
      IF( KRUN1.EQ.0 ) GO TO 10
C
C---     NEW  RUN
      NEVIN  = ICREC-ICRECO-1
      NEVOUT = JCREC-JCRECO
      IF(MESG.GT.0) WRITE(6,600) KRUN2,ICRECO,NEVIN,NEVOUT,JCREC
  600 FORMAT(' RUN#',I8,' ICREC=',I7,'  EV.READ=',I6,' EV.WRITTEN=',
     $               I5,' JCREC=',I6)
C
C---  LG-TOF CALIBRATION OUTPUT
      IF(SUM.LE.0.) SUM = 1.0
      AVT = STDC/SUM
      WRITE(6,606) KRUN2, SUM,STDC,AVT
  606 FORMAT(' KRUN2=',I10,'  SUM,STDC,=',2F10.2,10X,'AVTOF=',F10.3,/)
      IF( SUM.GT.1. .AND. ABS( AVT-AVTO ).GT.50.0 )   CALL HPRINT(1)
      LRUN = HDATA(NPHD2+10)
      CALL HFILL(100,LRUN,AVT,1.0)
      SUM = 0.
      STDC = 0.
      AVTO = AVT
      CALL HRESET(1)
C---- BIG CHANGE BOUNDARY
      IF( KRUN2.NE.2010241 .AND. KRUN2.NE.2010263 .AND.
     *    KRUN2.NE.2010361 ) GO TO 10
C---- GET THE AVERAGE OF THE GROUP
      IF( BIGSUM.LE.0. ) BIGSUM = 1.0
      BIGAV = BIGTDC/BIGSUM
      WRITE(6,620 ) KRUN2, BIGSUM, BIGAV
  620 FORMAT('0BIG AVERAGE TILL RUN',I10,'   SUM=',F10.1,'  AV=',F10.2)
      BIGSUM = 0.
      BIGTDC = 0.
C---
   10 KRUN2 = NRUN
      ICRECO = ICREC
      JCRECO = JCREC
      IF( ISTART ) 20,20,2000
C---     NEW EVENT BEFORE ANY ANALYSIS.  REMEMBER THE FIRST RUN #.
   20               KRUN1 = NRUN
C----      SET UP FOR HITOGRAM FOR AV.TOF
           LRUN1 = HDATA(NPHD2+10)
           LRUN2 = LRUN1+500
           CALL HBOOK2(100,'AV.TOF VS RUN NO.$',100,LRUN1,LRUN2,
     *                                          60,700.,1300.,0)
           BIGSUM = 0.
           BIGTDC = 0.
                    ISTART = 1
C
C************  EVENT HIST ***************
 2000 CONTINUE
C---- CHECK TRIGGER
      NPTRG = IDATA( IBLN('TRIG') )
      JT1ACP = HDATA( 2*NPTRG+8 )
      JTB = MOD(JT1ACP,4096)/2048
      IF( JTB.NE.1 )                         GO TO 1010
C---- CHECK BARREL TDC
      NPATST = IDATA( IBLN('ATST') )*2
      BADC = HDATA(NPATST+4)
      BTDC = HDATA(NPATST+17)
      CBTDC = BTDC+280.0-70.0*(2.0-0.001*BADC)**2
        SUM = SUM+1.0
        STDC = STDC+CBTDC
        BIGSUM = BIGSUM+1.0
        BIGTDC = BIGTDC+CBTDC
      CALL HFILL( 1, CBTDC, BADC, 1.0)
      CALL HFILL( 2, CBTDC, BADC, 1.0)
C---- CORRELATION OF ETOTB AND BADC
      NPCL = IDATA( IBLN('LGCL') )
      ETOTB = ADATA( NPCL+12 )
      CALL HFILL(20,ETOTB, BADC, 1.0 )
      CALL HFILL(22, BTDC,ETOTB, 1.0)
C---- ALREADY CORRECTED ONE
      CALL LGBTDC( CTDC, JFLAG )
      IF( JFLAG.LE.0 ) CALL HFILL( 10, CTDC, ETOTB, 1.0 )
C
 2001 GO TO 1010
C
C---     READ ERROR ON INPUT DATA SET
 1001 CALL TPMESG(1)
      GO TO 1010
C
C----    HEADER IS MISSING
 1002 CALL TPMESG(2)
C
C----    ERASE ALL BANKS FOR THE NEXT EVENT.
 1010 CALL BSLT
      CALL BDLG
      GO TO 1000
C
  100 CALL TPMESG(21)
      GO TO 10000
  200 CALL TPMESG(22)
      GO TO 10000
  300 CALL TPMESG(23)
      GO TO 10000
  400 CALL TPMESG(24)
C
10000 CONTINUE
C---- GET THE AVERAGE OF THE GROUP
      IF( BIGSUM.LE.0. ) BIGSUM = 1.0
      BIGAV = BIGTDC/BIGSUM
      WRITE(6,620 ) KRUN2, BIGSUM, BIGAV
      NEVIN  = ICREC-ICRECO
      NEVOUT = JCREC-JCRECO
      IF(MESG.GT.0) WRITE(6,600) KRUN2,ICRECO,NEVIN,NEVOUT,JCREC
      CALL BSTA
      CALL HSQUEZ( 2HNO )
      CALL HPRINT(2)
      CALL HPRINT(10)
      CALL HPRINT(20)
      CALL HPRINT(22)
      CALL HPRINT(100)
      STOP
      END
C   16/02/79 107080122  MEMBER NAME  CDATA    (SOURCE)      FORTRAN
C
      COMMON /BCS/ IDATA(24000)
      DIMENSION ADATA(24000)
      INTEGER *2 HDATA(48000)
      EQUIVALENCE (IDATA(1),ADATA(1)), (HDATA(1),IDATA(1))
      DATA LDATA/24000/
C
C   16/02/79 107080122  MEMBER NAME  CLGKALB  (SOURCE)      FORTRAN
C     LHO'S GENERAL CONSTANT SCHEME
C     20/09/79.
      COMMON/CALIBR/NCAL(10000)
      INTEGER*2 HCAL(20000)
      EQUIVALENCE  (NCAL(1),HCAL(1))
C
C   16/02/79 107080122  MEMBER NAME  CLGWORK1 (SOURCE)      FORTRAN
C     USED IN LGANAL PART OF PROGRAMS
C        NO CUTS ON MAX FIRIED #CHANNELS (I.E. DIMENSION=2880)
C        CHANGE SIZE OF THE CLUSTER BANK TO 16.. 13/6/80
C        CHANGED BY Y.WATANABE ON 23/09/79. 00:30
      COMMON /CWORK/ LNG,HNORD,HNORML,HPOINT(4),HLGADC(2,2880),
     1               LGCL(3),LNGCL,NPNT(4),IDENT(2),NCLST,NCLBEC(3),
     2               ETOT(4),NNEUT,EGAM(4),IFLAG(5),NWPCL,
     3               MAPCL(81),  CLPRP(1280)
      INTEGER *2 HMAPCL(2,81)
      DIMENSION ICLSPR(16,80),CLSPRP(16,80), CLMPRP(1361)
      EQUIVALENCE (HMAPCL(1,1),MAPCL(1)), (CLMPRP(1),MAPCL(1))
      EQUIVALENCE (ICLSPR(1,1),CLPRP(1)),  (CLSPRP(1,1),CLPRP(1))
C
C   16/02/79 107080122  MEMBER NAME  CLGWORK2 (SOURCE)      FORTRAN
C     USED IN LGCDIR PART OF ANALYSIS
C     INCREASE UP TO 100 TRACKS ON 20/9/79
      COMMON /CWORK/ NCHCLS,NPOINT,MAPCCL(101),HCLADR(1600),
     $               NCHCL2,HCLIST(4,100),  NCLST2,HCLLSO(4,80)
      DATA NPMAX/1600/
