Module timezero_mod

module timezero_mod

        ! Uses
    use precision_mod
    use physicalconstants_mod
    use det_geom_mod
    use chambers_mod
    use namelist_mod
    use unp_mod
    use tdc_mod
    use unpmc_mod

        ! Variables
    real (kind=r4), public :: timezero_costheta
    real (kind=R4), public :: timezero_ustof
    real (kind=R4), public :: timezero_dstof
    integer (kind=i4), private, PARAMETER :: IDH_T0_DC = 100000
    integer (kind=i4), private, PARAMETER :: IDH_T0_PC = 200000
    integer (kind=i4), private, PARAMETER :: IDH_T0_DC_ALL_U = 99998
    integer (kind=i4), private, PARAMETER :: IDH_T0_COSTHETA = 100020
    integer (kind=i4), private, PARAMETER :: IDH_T0_DC_ALL_V = 99999
    integer (kind=I4), public :: NumBins
    logical, public :: timezero_beam_positron = .FALSE.

        ! Interfaces
    private interface HMAX

        ! Subroutines and functions
    public subroutine defineTimeZerohists ()
    public subroutine TimeZeroHists ()

end module timezero_mod

Description of Variables

timezero_costheta

real (kind=r4), public :: timezero_costheta
Abs value of costheta from FG or helix fitter

timezero_ustof

real (kind=R4), public :: timezero_ustof

timezero_dstof

real (kind=R4), public :: timezero_dstof

IDH_T0_DC

integer (kind=i4), private, PARAMETER :: IDH_T0_DC = 100000

IDH_T0_PC

integer (kind=i4), private, PARAMETER :: IDH_T0_PC = 200000

IDH_T0_DC_ALL_U

integer (kind=i4), private, PARAMETER :: IDH_T0_DC_ALL_U = 99998

IDH_T0_COSTHETA

integer (kind=i4), private, PARAMETER :: IDH_T0_COSTHETA = 100020

IDH_T0_DC_ALL_V

integer (kind=i4), private, PARAMETER :: IDH_T0_DC_ALL_V = 99999

NumBins

integer (kind=I4), public :: NumBins

timezero_beam_positron

logical, public :: timezero_beam_positron = .FALSE.

Description of Interfaces

HMAX

private interface HMAX
    function HMAX (i)
        integer (kind=4) :: i
        real (kind=4) :: HMAX
    end function HMAX
end interface HMAX

Description of Subroutines and Functions

defineTimeZerohists

public subroutine defineTimeZerohists ()
    ! Calls: HBOOK1, HBOOK2, hbook1, hbook2
end subroutine defineTimeZerohists

TimeZeroHists

public subroutine TimeZeroHists ()
    ! Calls: FillMCp_cos, hf1, hf2, kerror
end subroutine TimeZeroHists
============================================================          
   Dec 2004                
   Sun-Chong Wang 
   April 2002                                      
  -----------------------------------------------------

   This is a user subroutine for filling time zero  histograms.
  ============================================================          

Author: Art Olin