c real function acorr_correct(hmass)
c
c This function implements the correction to the Aleph Likelihood Ratio
c from unmodelled correlations.  The routine is designed to give the
c relative -2ln(Q) shift needed to apply the correlation correction.
c
c Usage: for mass x, compute -2ln(Q), then add acorr_correct(X).  Use
c corrected value to compute observed confidence levels.
c
c For subdivision into channels, apply this correction only to the
c high energy four jet observation.
c

      real function acorr_correct(hmass)

      real hmass

      real lmass,umass

      integer imass
      real correction(21)
c original correction file
c      data correction /
c     &  0.666374,  0.883885,  1.024470,  0.815374,
c     &  0.799346,  0.772891,  1.007650,  0.782116,
c     &  1.051520,  1.064910,  0.994155,  0.965693,
c     &  0.656753,  0.673115,  0.304671,  0.227496,
c     &  0.220466, -0.002277, -0.270425,  0.772732,
c     &  0.619805,  0.525475,  0.346202,  0.665548,
c     &  0.484921,  0.764132,  0.510200,  0.847021,
c     &  0.994291,  1.415960,  0.992335,  0.709006,
c     &  0.365468,  0.297951,  0.434967,  0.317950,
c     &  0.180017,  0.222323,  0.244046,  0.170635,
c     &  0.160877/

c higher precision correction file
c      data correction /
c     &   0.414384,  0.631713,  0.791011,  0.583824,
c     &   0.582496,  0.561190,  0.801980,  0.591566,
c     &   0.870110,  0.861605,  0.787017,  0.773420,
c     &   0.463167,  0.494812,  0.133068,  0.076439,
c     &   0.071080, -0.143647, -0.407072,  0.639188,
c     &   0.501242,  0.428569,  0.259378,  0.584466,
c     &   0.412561,  0.698033,  0.445736,  0.793188,
c     &   0.938460,  1.369940,  0.951009,  0.674742,
c     &   0.333144,  0.268646,  0.407160,  0.293470,
c     &   0.157978,  0.198695,  0.219783,  0.144013,
c     &   0.132501/

c very high precision, fixed correction file
c      data correction /
c     &   0.390553,  0.637526,  0.695908,  0.606190,
c     &   0.547641,  0.513299,  0.797832,  0.588225,
c     &   0.806271,  0.809775,  0.780149,  0.775209,
c     &   0.461037,  0.486782,  0.145395,  0.087936,
c     &   0.120529, -0.149177, -0.453426,  0.645379,
c     &   0.500324,  0.454337,  0.261506,  0.583587,
c     &   0.397456,  0.696057,  0.443974,  0.795168,
c     &   0.929987,  1.371640,  0.954158,  0.679071,
c     &   0.334668,  0.260535,  0.412112,  0.296082,
c     &   0.160056,  0.194254,  0.214673,  0.145286,
c     &   0.028419/

c final results, correction for 4.00
      data correction /
     &  2.57673,  2.21260,  1.59823,  2.00187,
     &  1.80772,  1.61358,  1.38455,  0.85668,
     &  0.47615,  0.44429,  1.34985,  0.92872,
     &  1.32309,  0.79749,  0.39063,  0.72589,
     &  0.35056,  0.00754, -0.01587,  0.07193,
     &  0.19276/





      acorr_correct = 0.

      if (hmass.lt.100.) goto 999
      if (hmass.gt.120.) goto 999
      if (hmass.eq.120.) then
        acorr_correct = correction(21)
        goto 999
      endif

      imass = (hmass-99.)

      lmass = (float(imass)-1.) + 100.
      umass = lmass + 1.

      acorr_correct = correction(imass)  *(umass-hmass) +
     &                correction(imass+1)*(hmass-lmass)

 999  continue
      return
      end
