(file) Return to t_hodos.f CVS log (file) (dir) Up to [HallC] / Analyzer / T20

File: [HallC] / Analyzer / T20 / t_hodos.f (download)
Revision: 1.1, Tue Dec 1 20:56:31 1998 UTC (25 years, 9 months ago) by saw
Branch: MAIN
CVS Tags: spring03, sep-26-2002, sep-25-2002, sep-24-2002, sep-09-2002, sane, pionct, online07, online04, online03, oct1199, mduality, mar-24-2003, gep_online, gep3, fpi2, emc, e01004, bigcal, baryon, aug-12-2003, apr-02-2003, Initial-CVS-Release, HEAD, Extra_Shower_Tubes_on_HMS_not_SOS
Initial revision

      subroutine t_hodos(ABORT,err)
*
* $Log: t_hodos.f,v $
* Revision 1.1  1998/12/01 20:56:31  saw
* Initial revision
*
*--------------------------------------------------------
      IMPLICIT NONE
      SAVE
*
      character*12 here
      parameter (here= '')
*
      logical ABORT
      character*(*) err
*
      include 't20_data_structures.cmn'
      include 't20_tracking.cmn'
      include 't20_geometry.cmn'
      include 't20_track_histid.cmn'
      include 't20_bypass_switches.cmn'	
      include 't20_hodo.cmn'
*--------------------------------------------------------
c
      integer*4 ibar, ihit, iplane
      real*4 ribar, rch, rtdc
*      integer th_hodmaxbar(4) /30,30,24,24/
c      integer th_hodmaxbar(4) /60,60,60,60/	!temporary
      integer th_hodmaxbar(4)
      data th_hodmaxbar /60,60,60,60/                     !temporary

      ABORT= .FALSE.
      err= ' '

c----------------------------------------
c ** fill th*pl*_tdc_i(ibar): most recent TDC value for each bar, each plane
c ** fill th*pl*_tdc_all: for each plane, fill all tdc values into one hosto.

      do ibar=1,60
	th1p1_tdc_i(ibar)=0
	th1p2_tdc_i(ibar)=0
	th2p1_tdc_i(ibar)=0
	th2p2_tdc_i(ibar)=0
      enddo

      do ihit=1,thodo_tot_hits
	ibar=thodo_bar_num(ihit)
	ribar=float(ibar)
	iplane = thodo_plane_num(ihit)
	if (ibar.le.0.or.ibar.gt.th_hodmaxbar(iplane)) then
	  write(6,*) 'shpl1 ibar=',ibar
	else
	  rtdc= float(thodo_tdc_val(ihit))
	  rch = float((iplane-1)*30+ibar)	   !all 4 planes, offset by 30
	  call hf2(tidhod_allbars_vs_tdc,rch,rtdc,1.)!tdc vs bar for all 4 planes
	  if(iplane.eq.1)then
	    th1p1_tdc_i(ibar)=thodo_tdc_val(ihit)
	    call hf1(tidh1p1_tdc_all,ribar,1.)
	  endif
	  if(iplane.eq.2)then
	    th1p2_tdc_i(ibar)=thodo_tdc_val(ihit)
	    call hf1(tidh1p2_tdc_all,ribar,1.)
	  endif
	  if(iplane.eq.3)then
	    th2p1_tdc_i(ibar)=thodo_tdc_val(ihit)
	    call hf1(tidh2p1_tdc_all,ribar,1.)
	  endif
	  if(iplane.eq.4)then
	    th2p2_tdc_i(ibar)=thodo_tdc_val(ihit)
	    call hf1(tidh2p2_tdc_all,ribar,1.)
	  endif
 	endif
      enddo 
c----------------------------------------

      RETURN
      END
*********
*     Local Variables:
*     mode: fortran
*     fortran-if-indent: 2
*     fortran-do-indent: 2
*     End:


Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0