FPOKER COMMENTS
*-- Author : Stephen J. Maxfield
      SUBROUTINE FPOKER
**: FPOKER 40000 SM. New routine for calibration checking.                                                    
**----------------------------------------------------------------------                                      
*KEEP,BCS.                                                                                                    
*KEEP,BOSMDL.                                                                                                 
C     ------BOSMDL                                                                                            
C     ------                                                                                                  
*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,FDIFLG.                                                                                                 
*KEND.                                                                                                        
*     COMMONs for planar found tracks                                                                         
*     Pointers to  radials associated with planar tracks                                                      
*     Tan of 1/2 wedge angle...                                                                               
*     Binning parameters for histograms...                                                                    
*     Statement functions for TABLE access...                                                                 
*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.                                                                                                        
*       Book LOOK histograms                                                                                  
*       Histograms for t-to-d...                                                                              
          CALL BHS(KHIS1, 0, 200, -DPMAX, DPMAX)                                                       
          CALL BHS(KHIS2, 0,  20, DLO, DHI)                                                            
*       Histograms for Lorentz angle...                                                                       
         CALL BHS(KHIS3, 0, 100, -50., 50.)                                                            
         CALL BHS(KHIS4, 0,  20, DLO, DHI)                                                             
*     NPP is number of planar-based tracks...                                                                 
*     Hit data...                                                                                             
      INFRLC = MLINK(IW,'FRLC',0)
*     Auxiliary hit data...                                                                                   
      INFAUX = MLINK(IW,'FAUX',0)
*     Loop over planar-based tracks...                                                                        
*     Which PLANAR supermodules have the hits on the track. Actually                                          
*     always have a full segments worth (9-12 hits) or none at all                                            
*     so this is overkill!                                                                                    
*     Loop over the radial hits on this track. Only mods 0 and 1                                              
*     Radial hit on this track?                                                                               
*     Accept 'sandwich' configurations only...                                                                
*       Get Phi and R at this wire plane from Phi-z R-z fit parameters.                                       
*       Limit radius range.                                                                                   
*         Predicted drift...corrected for stagger.                                                            
*         Predicted radius along wire direction (if no Lorenz angle)                                          
*         Get max allowed drift (Position of cathode plane less a                                             
*         3mm tolerance)...                                                                                   
*         ...and cut out region near cathode.                                                                 
*           Drift time, corrected for T0 and radius and pre-scaled                                            
*           by approx  from F0R8.                                                                          
*           ...and radius of hit at wire from Charge division                                                 
*           (Predicted radius at wire if no Lorentz angle) - (measured                                        
*           radius)                                                                                           
*           ...slope of DRR vs. predicted drift is tan(alpha).                                                
*           Fill histograms of slices in predicted drift.                                                     
              CALL SHS(2000+KBIN, 0, DTSCA)                                                            
              CALL SHS(3000+KBIN, 0, DRP)                                                              
              CALL SHS(10000+KBINL, 0, DRR)                                                            
              CALL SHS(11000+KBINL, 0, DRP)                                                            
*---------------                                                                                              
*     ...end loop over radial hits                                                                            
*     ...end loop over planar based tracks.                                                                   
*     Write(6,*) ' Fpoker hits', ITOTHT                                                                       
*