      function histsum(n1,n2,h) ! bernd berg aug 15 2007. sums histogram.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      dimension h(n1:n2)
      histsum=zero
      do i=n1,n2
        histsum=histsum+h(i)
      end do
      return
      end
