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

File: [HallC] / Analyzer / T20 / t_hms.f (download)
Revision: 1.1, Fri May 23 19:51:35 1997 UTC (27 years, 4 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_hms(ABORT,err)
*--------------------------------------------------------
* $Log: t_hms.f,v $
* Revision 1.1  1997/05/23 20:51:35  saw
* Initial revision
*
*
      IMPLICIT NONE
      SAVE

       character*(*) here
       parameter (here= 't_hms')

       logical ABORT
       character*(*) err
      

       INCLUDE 'gen_data_structures.cmn'
       INCLUDE 'hms_data_structures.cmn'
       INCLUDE 't20_data_structures.cmn'
       INCLUDE 'gen_constants.par'
       INCLUDE 't20_hms.cmn'
	include 'hms_tracking.cmn'
	include 'gen_event_info.cmn'
	include 't20_misc.cmn'
      integer*4 ihit
       
*      GPBEAM : beam momentun (GEV/C)
*      HSENERGY : Lab total energy of chosen track in GeV
*      HSDELTA : Spectrometer delta of chosen track
*      HSYP_TAR : hstheta = htheta_lab*pi/180. - hsyp_tar
*      HSTHETA : Lab Scattering angle in radians
     
	if (hntracks_fp.gt.0) then	!need at least one HMS track
          tsinhtheta = sin(hstheta/2.)
          te_v = sqrt(Gpbeam*Gpbeam + mass_electron*mass_electron)
          thms_td1 = te_v - hsenergy
          thms_td2 = te_v*(1. - 1./(1. + 2.*te_v*tsinhtheta**2/tpartmass))
          tq2 = 2.*tpartmass*thms_td1
	else
          tsinhtheta = 0.
          te_v = 0.
          thms_td1 = 0.
          thms_td2 = 0.
          tq2 = 0.
	endif
	do ihit=1,HMISC_TOT_HITS
		if(HMISC_RAW_ADDR1(ihit).eq.1) then	! hight precision tdc
			if(HMISC_RAW_ADDR2(ihit).eq.10) hr_start_hms=HMISC_RAW_DATA(ihit)
		endif
	enddo
	

        return
        end

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