      SUBROUTINE NOINTER(IGOOD)
C-
C-   Created  20-OCT-1994   MIRKO BOEZIO
C-
      INCLUDE 'INTEST.TXT'
C      
      REAL BAR(2,NPLAV)
      REAL RIL(NCHA/2)
      INTEGER IBAR(2,NPLAV)
      INTEGER NPIANI
      COMMON/ ANGOLO / BAR, IBAR
      SAVE / ANGOLO /
      COMMON / GENERAL / RIG, RMASS
      SAVE / GENERAL /
C
      NPIANI = 0
C
      EMAX = 2. * (RIG * RIG + RMASS * RMASS) / (RIG * RIG)
C
      IF (RIG.NE.0) NPIANI = INT( ANINT( 9. + LOG(ABS(RIG)) ) )
C
      IF ( NPIANI.gt.NPLA ) NPIANI = NPLA
      IF ( NPIANI.lt.1 )  NPIANI = 1
C
      DO K = 1,NCHA/2
         RIL(K) = 1000.
      ENDDO
C
      NGIR = 0
      IBAD = 0
      IGOOD = 0
      DO M = 1,2
        DO J = 1,NPIANI
          DO K = 1,NGIR
            RIL(K) = 1000.
          ENDDO
C
          NNN = 0
          BB = BAR(M,J)
C
C EM: IF TRACK EXIT THE CALORIMETER DO NOT CONSIDER THAT PLANE
C
          IF (BB.LT.-6..OR.BB.GT.246.) GOTO 5
C
C END EM
C
          NGIR = NCL(M,J)
          IF (NGIR.EQ.0) GOTO 5
          IF (NGIR.GT.1) IBAD = IBAD + 1
          IF (NGIR.GT.1) GOTO 5
          DO L = 1,NGIR
            RIL(L) = ABS(CLUS(M,J,L) - BB)
          ENDDO
          MM = NCHA/2
          LK = LVMIN(RIL,MM)
C
          IF (RIL(LK).LE.4.AND.CLUS(M,J,LK+NCHA/2).LT.EMAX) 
     &         IGOOD = IGOOD + J
C
    5     CONTINUE
C
        ENDDO
      ENDDO
C

c  999 RETURN
      RETURN
      END
