FFCORR COMMENTS
*-- Author : Stephen Burke
      SUBROUTINE FFCORR(JPL,SVEC,ZNOM,VXYZ,DEVT0,BZ,DCORR)
**********************************************************************                                        
*                                                                    *                                        
* Calculate the corrections for track angle, time-of-flight,         *                                        
* signal propagation time and magnetic field variation.              *                                        
*                                                                    *                                        
* INPUT:                                                             *                                        
*   JPL is the plane number                                          *                                        
*   SVEC is the state vector at plane JPL                            *                                        
*   ZNOM is the nominal z vertex                                     *                                        
*   VXYZ is the event vertex position                                *                                        
*   DEVT0 is the event T0 correction                                 *                                        
*   BZ is the z component of the field                                                                        
*                                                                    *                                        
* OUTPUT:                                                            *                                        
*   DCORR is the correction to the drift distance                    *                                        
*                                                                    *                                        
**********************************************************************                                        
* Estimates for Vdrift from SJM for '94 running; variation is less than                                       
* Nominal drift velocity = 35 km/sec; c = 30 cm/nsec                                                          
* Some nominal geometry                                                                                       
* Nominal magnetic field                                                                                      
* Estimates for radial Lorenz angle from SJM for '94 running; error is 1                                      
*KEEP,FKNPL.                                                                                                  
*                                                                                                             
* Per-track values can go in H1WORK; note that LTRUE and LFIRST must                                          
* be set at least per event.                                                                                  
*                                                                                                             
* This is about 36k words long; the remaining common blocks are                                               
* about 3.6k in total. Some of this could be in /H1WORK/, but the                                             
* blocks would have to be reorganised.                                                                        
*                                                                                                             
* /FKPROJ/                                                                                                    
* /FKFILT/                                                                                                    
* /FKSMTH/                                                                                                    
* /FKINT/                                                                                                     
* /FKRSID/                                                                                                    
* /FKTRUE/                                                                                                    
* /FKDBG/                                                                                                     
*KEEP,FKCONS.                                                                                                 
*KEEP,FKPROJ.                                                                                                 
*KEEP,FKSMTH.                                                                                                 
*KEEP,FKRSID.                                                                                                 
*KEEP,FKTRUE.                                                                                                 
*KEEP,FKMEAS.                                                                                                 
*KEEP,FFSTEE.                                                                                                 
*KEEP,FFGEO.                                                                                                  
*KEEP,FFDBG.                                                                                                  
*KEEP,FKDBG.                                                                                                  
*KEEP,FKINT.                                                                                                  
*KEEP,FRLORA.                                                                                                 
*KEEP,BCS.                                                                                                    
*KEEP,CNSTBF.                                                                                                 
*KEEP,FTANG.                                                                                                  
*     Statement functions for track angle corrections...                                                      
*     (assumes COMMON FRLORA present)                                                                         
*                                                                                                             
*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                                             
*KEEP,STFCLW.                                                                                                 
* statement functions acting on the BOS COMMON LW                                                             
*     index of element before row number LWROW                                                                
*     index of L-th element of row number LWROW                                                               
*     L-th integer element of the LWROW'th row in bank with index LND                                         
*     L-th real element of the LWROW'th row in bank with index LND                                            
*                                                                                                             
*KEEP,FTFUNCT.                                                                                                
*     Statement functions for RADIAL Chamber data access.                                                     
*     Using Channel Number J                                                                                  
*     Module, Wedge-pair and Z-plane numbers...                                                               
*     Statement function for obtaining WEDGE numbers(0-47) of                                                 
*     wires at plus and minus ends of Cell numbers                                                            
*     Statement function for obtaining IOS wire number (1-36)                                                 
*     Statement functions for PLANAR Chamber data access.                                                     
*     Using Channel Number J                                                                                  
*     Module, orientation, W-cell and Z-plane numbers...                                                      
*     IPSMD in range 0:8 Planar module number.                                                                
*                                                                                                             
*     IOS wire number (runs from 0 to 36)                                                                     
* SB plane numbers (1-72) from cell number                                                                    
* Module, orientation, wire and (typical) cell number from plane                                              
* number in the range 1-72 (planars, radials and combined)                                                    
*KEND.                                                                                                        
**********************************************************************                                        
*                                                                                                             
* Time-of-flight correction                                                                                   
*                                                                                                             
* This is rather arbitrary ...                                                                                
*                                                                                                             
* Track-angle correction                                                                                      
*                                                                                                             
* Allow for negative drifts!                                                                                  
*                                                                                                             
* Propagation time correction (planars only)                                                                  
*                                                                                                             
* Predicted (absolute) drift and radius                                                                       
*                                                                                                             
* Magnetic field correction                                                                                   
*                                                                                                             
      CALL HFILL(100+IRP(JPL),DTRANG,0.,1.)                                                            
      CALL HFILL(102+IRP(JPL),TRANG,0.,1.)                                                             
      CALL HFILL(105,DDEVT,0.,1.)                                                                      
      CALL HFILL(105+IRP(JPL),DTOF,0.,1.)                                                              
      IF (IRP(JPL).EQ.1) CALL HFILL(108,DPROP,0.,1.)                                                   
      CALL HFILL(108+IRP(JPL),DDBF,0.,1.)                                                              
      CALL HFILL(110+IRP(JPL),BMID,0.,1.)                                                              
      CALL HFILL(112+IRP(JPL),DCORR,0.,1.)                                                             
*