FQMONR COMMENTS
*-- Author :    Girish D. Patel   07/12/93
      SUBROUTINE FQMONR
**: FQMONR.......SM. Modifications for farm.                                                                  
**: FQMONR.......SM. Addition of alpha and T0 corrections.                                                    
*KEEP,FMOHIS.                                                                                                 
*KEEP,FMOLUN.                                                                                                 
*KEEP,FMORUN.                                                                                                 
*KEEP,FMOSUM.                                                                                                 
*     TOTL   total run luminosity (mb^-1)                                                                     
*     H1L    H1 gated run luminosity (mb^-1)                                                                  
*     RTIME  total run time (sec)                                                                             
*     REFF   run efficiency = (1 - dead_time/run_time)                                                        
*     ILRET  return flag: 0 - ok,  1 - no inf. found in H1DB                                                  
*KEEP,FMOSCA.                                                                                                 
*KEEP,FMOWRK.                                                                                                 
*     planar hit data...                                                                                      
*     radial hit data...                                                                                      
*KEEP,BCS.                                                                                                    
*KEEP,CNSTBF.                                                                                                 
*KEND.                                                                                                        
* integer*2 bos array                                                                                         
*KEEP,STFUNCT.                                                                                                
*     index of element before row number IROW                                                                 
*     index of L'th element  of row number IROW                                                               
*     L'th integer element of the IROW'th row of bank with index IND                                          
*     L'th real element of the IROW'th row of bank with index IND                                             
*KEND.                                                                                                        
*     function for time of flight correction.                                                                 
*       'event' banks                                                                                         
        IQFRRE = NAMIND('FRRE')
        IQFRRD = NAMIND('FRRD')
*       from database                                                                                         
        IQF0R8 = NAMIND('F0R8')
        IQF1RA = NAMIND('F1RA')
        IQF1RB = NAMIND('F1RB')
*                                                                                                             
*       Hit database to update overall (F0R8) and                                                             
*       wire-by-wire (F1RA/B) constants.                                                                      
*                                                                                                             
        CALL UGTBNK('F0R8',IND)
        CALL UGTBNK('F1RA',IND)
        CALL UGTBNK('F1RB',IND)
*     Initialise for this event. Zero arrays.                                                                 
      CALL VZERO( TTR(0,1,1),NW3 )                                                                     
      CALL VZERO( QQR(0,1,1),NW3 )                                                                     
      CALL VZERO( NHITR(0,1),NW2 )                                                                     
      CALL VZERO( RR(0,1,1),NW4 )                                                                      
         CALL SHSW(IHS(26),0,40.,1.)                                                                   
* statistics for run summary ...                                                                              
         CALL SHSW(IHS(26),0,28.,1.)                                                                   
         CALL SHSW(IHS(26),0,29.,1.)                                                                   
         CALL SHSW(IHS(26),0,30.,1.)                                                                   
         CALL SHSW(IHS(26),0,31.,1.)                                                                   
C                          FRRE BANK PRESENT - GO FOR IT !!!                                                  
C ATTEMPT TO READ WIRE NO., T AND Q FROM BANK                                                                 
C                                                                                                             
C               INDX IS THE ADDRESS OF THE END OF THE PREVIOUS RECORD                                         
C               IN 2-BYTE WORDS                                                                               
C                                CHECK CONTENTS ARE BELIEVABLE (?)                                            
C               EVERYTHING SHOULD BE OK - READ OUT CONTENTS                                                   
C                               LOOP OVER HITS IN QT OUTPUT BANK                                              
*        Extract wire dependent constants for Channel IWIRE...                                                
*        Determine alpha. Needed for correction to Drift time                                                 
*        as well as for radial coordinate.                                                                    
            CALL ERRLOG(100, 'W:FQMONR: Zero charge digi found')                                       
*                                                                                                             
*        Determine radial coordinate by charge divison                                                        
*                                                                                                             
*        Choose valid solution, add inner radius and apply                                                    
*        chg-div distortion correction (linear part only for now)                                             
**                                                                                                            
*        Correct drift time for wire-by-wire T0 and radius                                                    
         CALL FILLQR(IWIRE,FDT,FQ,RADIUS,ISGNW,IFLG2)
      CALL  SHS (IHS(28),0,FRT)                                                                        
        CALL FCHKQR
*                                                                                                             
*   END OF LOOP OVER EVENTS - COLLECT STATISTICS                                                              
*                                                                                                             
*                                                                                                             
*