      SUBROUTINE FIND_BEAMX_PERIOD_AND_HZ_FACTOR ()
C----------------------------------------------------------------------
C-
C-   Purpose and Methods : Find Beam Crossing Period and Factors for converting
C-                         count increment quantities to Hz
C-
C-   Inputs  : none
C-   Outputs : BEAM_CROSS_PERIOD, COUNT_TO_HZ, and COUNT_SBSC_TO_HZ
C-              in common block LV1_MPOOL_DERIVED.INC
C-   Controls: 
C-
C-   Created  25-AUG-1994   Philippe Laurens - MSU L1 Trigger
C-
C----------------------------------------------------------------------
      IMPLICIT NONE
      INCLUDE 'LV1_MPOOL.PARAMS'
      INCLUDE 'LV1_MPOOL_DERIVED.INC'
      INCLUDE 'LV1_MPOOL_RAW.INC'
C
      REAL RAW_PERIOD
C
      REAL BEAM_CROSSING_PERIOD
      EXTERNAL BEAM_CROSSING_PERIOD
C----------------------------------------------------------------------
C
C       Find Beam Crossing Period and Factors for converting to Hz
C
      BEAM_CROSS_PERIOD = BEAM_CROSSING_PERIOD( DELTA_TIME,
     &                                          DELTA_BEAM_CROSSING)
C
C       Find Factor for converting to Hz
C       For all DBSC quantities (i.e. for stuff from data block)
C
      IF (   (DELTA_BEAM_CROSSING .EQ. 0) 
     &  .OR. (BEAM_CROSS_PERIOD   .EQ. 0.) ) THEN
        COUNT_TO_HZ = 0.
      ELSE
        COUNT_TO_HZ = 1.0 / (BEAM_CROSS_PERIOD* DELTA_BEAM_CROSSING)
      ENDIF
C
C       Find Factor for converting to Hz
C       and for all SBSC quantities (i.e. the scalers explicitely read by TCC)
C
      IF (   (DELTA_VETO_CROSSING .EQ. 0) 
     &  .OR. (BEAM_CROSS_PERIOD   .EQ. 0.) ) THEN
        COUNT_SBSC_TO_HZ = 0.
      ELSE
        COUNT_SBSC_TO_HZ = 1.0 / (BEAM_CROSS_PERIOD*DELTA_VETO_CROSSING)
      ENDIF
C
C----------------------------------------------------------------------
  999 RETURN
      END
