FREFIT COMMENTS
*-- Author :    I.O. Skillicorn   27/09/96
      SUBROUTINE FREFIT
*     REFIT TRACK MODEL INCLUDING PLANARS                                                                     
*     this routine updates the radial-based track parameters                                                  
*     using planar data. both phi-z and r-z are updated.                                                      
*     planars alone define r-z                                                                                
*KEEP,FRDIMS.                                                                                                 
*KEEP,FH1WORK.                                                                                                
*    Planar geometry                                                                                          
*                                                                                                             
*    Radial geometry                                                                                          
*                                                                                                             
*    Radial data...                                                                                           
*                                                                                                             
*    Planar Data                                                                                              
*                                                                                                             
*    Pointers into DIGI bank for IOS labelled hits                                                            
*                                                                                                             
*    Track segment data                                                                                       
*                                                                                                             
*    Fit data                                                                                                 
*                                                                                                             
*                                                                                                             
*KEEP,FPTVTX.                                                                                                 
**the common/VERTEX/ becomes /VERTVV/ (in analogy to /VERTFF/) on the                                         
** 17/6/91, since it is in conflict with the VERTEX module (g.bernardi)                                       
** (note that all these common names should start by F in this deck...)                                       
*KEEP,FRH3FT.                                                                                                 
*     Common for RETRAC results (SJM)                                                                         
*KEEP,FPPRAM.                                                                                                 
C                                                                                                             
C---  MAXSEG is maximum number of segments per supermodule                                                    
C---  MAXCON is maximum number of amibiguous segments associatable with                                       
C---         one segment                                                                                      
C---  LIMSTO is maximum number of 2 cluster planes intersections to be                                        
C---         stored per supermodule                                                                           
C---  MSEGLM is maximum number of clusters that can be found before                                           
C---         connectivity considered                                                                          
C---  MAXCLU is maximum number of clusters that can be found after                                            
C---         forming non-connected set    MUST BE 50 IF RUN WITH OLD RCW                                      
C---         (cluster = 3/4 digits found in a straight line in one                                            
C---          4-wire orientation)                                                                             
C                                                                                                             
C---                                                                                                          
*KEEP,FPLSEG.                                                                                                 
C---                                                                                                          
C---                                                                                                          
*KEEP,FPTFLG.                                                                                                 
*KEEP,FPTPAR.                                                                                                 
*KEEP,FDIFLG.                                                                                                 
*KEND.                                                                                                        
*     Common for track parameter errors...                                                                    
*     Common for segment numbers...                                                                           
*     COMMON FOR IOS PLANAR LINK                                                                              
C     THE SIGN OF THE PLANAR DRIFT IS FILLED IN FTADD                                                         
C     COMMON FOR RADIALS ASSOCIATED WITH PLANAR TRACKS                                                        
C     PLANAR SEGMENTS ASSOCIATED  WITH RADIALS                                                                
*     Local arrays...                                                                                         
C     PLANARS                                                                                                 
      CALL FTLFTW(XX,YY,WP,IC,0,2,RS,RI,D1,D2,D3,D4)
C     PLANARS                                                                                                 
C     RADIALS                                                                                                 
C     RADIUS DEFINED BY  radials                                                                              
C     REFIT PHI-Z INCLUDING planars                                                                           
C     WRITE(*,*)I,phzg(I),rpcosg(I)                                                                           
      CALL FTLFTW(XX,YY,WP,IC,0,2,PS,PI,D1,D2,D3,D4)
C     WRITE(*,*)I,phzg(I),rpcosg(I)                                                                           
*