      REAL FUNCTION tele(XDUMMY)
*********************************************************
*                                                       *
* This file was generated by HUWFUN.                    *
*                                                       *
*********************************************************
*
*     Ntuple Id:      10   
*     Ntuple Title:   Event
*     Creation:       18/08/95 00.00.53
*
*********************************************************
*
      LOGICAL         CHAIN
      CHARACTER*128   CFILE
      INTEGER         IDNEVT,NCHEVT,ICHEVT
      REAL            VIDN1,VIDN2,VIDN3,VIDN(10)
*
      COMMON /PAWIDN/ IDNEVT,VIDN1,VIDN2,VIDN3,VIDN
      COMMON /PAWCHN/ CHAIN, NCHEVT, ICHEVT
      COMMON /PAWCHC/ CFILE
*
*--   Ntuple Variable Declarations
*
      REAL TDC(8),HSIG(40),HETA(40),HXLO(40),FKEYDA(32),VIGADA(128)
      INTEGER NRUN,IEVT,TIME,DATE,TIMREL,NUMSOB,NUMEVT,NEVTB,ITDC(8),NH
     + ,ICOD(40),INUM(40),ICHA(40),IXYF(40),AKEYRAW(256,1),AKEYBIN(3,1)
*
      COMMON /PAWCR4/ NRUN,IEVT,TIME,DATE,TIMREL,NUMSOB,NUMEVT,NEVTB
     + ,ITDC,TDC,NH,ICOD,INUM,ICHA,IXYF,HSIG,HETA,HXLO,FKEYDA,AKEYRAW
     + ,AKEYBIN,VIGADA
*

*
*--   Enter user code here
*
      IF( IDNEVT.EQ.1) THEN
c...+....1....+....2....+....3....+....4....+....5....+....6....+....7.
C      CALL HBOOK2(101,'Telescope x_0 x_1',600,1.,600.,600,1.,600.,0.)
      CALL HBOOK2(102,'Telescope x_0 x_2',600,1.,600.,600,1.,600.,0.)
      CALL HBOOK2(103,'Telescope x_0 x_3',600,1.,600.,600,1.,600.,0.)
C      CALL HBOOK2(106,'Telescope y_0 y_1',600,1.,600.,600,1.,600.,0.)
      CALL HBOOK2(107,'Telescope y_0 y_2',600,1.,600.,600,1.,600.,0.)
      CALL HBOOK2(108,'Telescope y_0 y_3',600,1.,600.,600,1.,600.,0.)
         
      ENDIF
      DO 10 I=1,NH

         IF(ICOD(I).NE.2) GOTO 10
         IF(INUM(I).NE.1) GOTO 10
            IF(IXYF(I).EQ.0) S1X=ICHA(I)
            IF(IXYF(I).EQ.1) S1Y=ICHA(I)

         DO 20 J=1,NH

            IF(ICOD(J).NE.2) GOTO 20
            IF(INUM(J).EQ.2) THEN
               IF(IXYF(J).EQ.0) S2X=ICHA(J)
               IF(IXYF(J).EQ.1) S2Y=ICHA(J)

            ELSEIF(INUM(J).EQ.3) THEN
               IF(IXYF(J).EQ.0) S3X=ICHA(J)
               IF(IXYF(J).EQ.1) S3Y=ICHA(J)

            ELSEIF(INUM(J).EQ.4) THEN
               IF(IXYF(J).EQ.0) S4X=ICHA(J)
               IF(IXYF(J).EQ.1) S4Y=ICHA(J)

            ENDIF

            CALL HFILL(101,S1X,S2X,1.)
            CALL HFILL(102,S1X,S3X,1.)
            CALL HFILL(103,S1X,S4X,1.)
            CALL HFILL(106,S1Y,S2Y,1.)
            CALL HFILL(107,S1Y,S3Y,1.)
            CALL HFILL(108,S1Y,S4Y,1.)


 20      CONTINUE
 10   CONTINUE




      tele = 1.
*
      END
