      subroutine hec_his_evt1
c
c routine to fill histograms each event 
c
      implicit none
c
      include 'hec_par.inc'     ! shared parameters
      include 'hec_datacard.inc'! datacard values
      include 'hec_geo.inc'     ! geometry correspondence tables 
      include 'hec_his_sys.inc' ! system histogram common
      include 'hec_search.inc'  ! search common
c
c local variables
c
      integer ic
c
c initialize arrays that must be reset for each event
c
c sig_sum -- signal sum in a depth
c sum_sigma -- sum from all channels above # sigma
c sum_sigma_hv -- sum from all channels above # sigma, HV corrected
c
      call vzero(sig_sum,i_z_max)   
      call vzero(sum_sigma,3)   
      call vzero(sum_sigma_hv,3)   
c
c first loop over channels and fill all event-by-event histos
c valid for each channel 
c
      do ic = 1, i_adc_used
c
c skip disconnected channels
c
        if(ic_connected(ic))then
c
           if(his_srch_flg .eq. 0 .or. hec_s_chan(ic)) then
              call hec_his_evt_hfill_ch(ic)
           endif
c
        endif
c
      enddo
c
c now fill histos that are not for each channel 
c
      call hec_his_evt_hfill
c
      return
      end







