C   04/06/81 106211108  MEMBER NAME  ANGBARSP (SOURCE)      FORTRAN
      SUBROUTINE ANGBAR(ENERGY,ANGLE,FACT,*)
C     ANGLE DEPENDENCE FOR BARREL COUNTERS
C     ENERGY   INPUT ENERGY IN GEV
C     ANGLE    INCIDENT ANGLE IN DEG
C     FACT     CORRECTION FACTOR   FACT=EOBS/EINC
C                        WRITTEN BY H.TAKEDA  15/02/80
C                        TYPED BY Y.WATANABE  19/02/80
C          SPECIAL VERSION FOR OLSSON         04/06/81
C             INCLUDE THE ENERGY CORRECTION OF J.N.73.
      DIMENSION BANG(8),BENG(3),COR(8,3)
      DATA BANG/0.,10.,20.,30.,40.,50.,60.,180./
      DATA BENG/0.,1.,5./
      DATA COR /8*1.,
     1          1., 0.976, 0.938, 0.932, 0.930, 3*0.929,
     1          1., 0.996, 0.962, 0.932, 0.914, 0.906, 2*0.904/
      DATA IERR1,IERR2,IERCNT/0,0,5/
      FACT=1.
C         CHECK FOR BAD INPUTS
      IF(ENERGY.GT.0.) GO TO 10
      IERR1=IERR1+1
      IF(IERR1.GT.IERCNT) RETURN1
      WRITE(6,600) ENERGY
600   FORMAT('0 **NEG. ENERGY INTO LGECOR(ANGBAR) E=',F10.3)
      RETURN1
C
10    IF(ANGLE.GE.0. .AND. ANGLE.LE.180.) GO TO 20
      IERR2=IERR2+1
      IF(IERR2.GT.IERCNT) RETURN1
      WRITE(6,610) ANGLE
610   FORMAT('0 **BAD ANGLE INTO LGECOR(ANGBAR) ANGLE=',F10.3)
      RETURN1
20    J=ANGLE/10.+2
      IF(J.GT.8) J=8
      APORT=(ANGLE -BANG(J-1))/(BANG(J)-BANG(J-1))
C
      IF(ENERGY.GT.5.) GO TO 30
      I=2
      IF(ENERGY.GT.1.) I=3
      EPORT=(ENERGY-BENG(I-1))/(BENG(I)-BENG(I-1))
C
      FACT1=COR(J-1,I-1)+EPORT*(COR(J-1,I)-COR(J-1,I-1))
      FACT2=COR(J  ,I-1)+EPORT*(COR(J  ,I)-COR(J  ,I-1))
      GO TO 40
30    FACT1=COR(J-1,3)
      FACT2=COR(J,3)
C
40    FACT=FACT1+APORT*(FACT2-FACT1)
      IF(ENERGY.LT.2.0) FACT=FACT*(1.-0.846/EXP(4.27*ENERGY))
C        SPECIAL LOW ENERGY CORRECTION BASED ON J.N. 73.
      RETURN
      END
