(file) Return to h_track_fit.f CVS log (file) (dir) Up to [HallC] / Analyzer / HTRACKING

Diff for /Analyzer/HTRACKING/h_track_fit.f between version 1.7 and 1.10

version 1.7, 1995/01/27 20:26:50 version 1.10, 1995/08/30 16:11:39
Line 9 
Line 9 
 *                              remove minuit. Make fit linear *                              remove minuit. Make fit linear
 *                              still does not do errors properly *                              still does not do errors properly
 * $Log$ * $Log$
   * Revision 1.10  1995/08/30 16:11:39  cdaq
   * (JRA) Don't fill single_residual arrray
   *
   * Revision 1.9  1995/05/22  19:39:31  cdaq
   * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts"
   *
   * Revision 1.8  1995/04/06  19:32:58  cdaq
   * (JRA) Rename residuals variables
   *
 * Revision 1.7  1995/01/27 20:26:50  cdaq * Revision 1.7  1995/01/27 20:26:50  cdaq
 * (JRA) Remove Mack's personal focalplane diceamatic (z slicer) code * (JRA) Remove Mack's personal focalplane diceamatic (z slicer) code
 * *
Line 33 
Line 42 
 * *
 * *
       implicit none       implicit none
       include "gen_data_structures.cmn"        include "hms_data_structures.cmn"
       include "hms_tracking.cmn"       include "hms_tracking.cmn"
       include "hms_geometry.cmn"       include "hms_geometry.cmn"
       external H_DPSIFUN       external H_DPSIFUN
Line 48 
Line 57 
       integer*4 itrack                        ! track loop index       integer*4 itrack                        ! track loop index
       integer*4 ihit,ierr       integer*4 ihit,ierr
       integer*4 hit,plane       integer*4 hit,plane
       integer*4 i,j,k                             ! loop index        integer*4 i,j                             ! loop index
 *      real*4 z_slice *      real*4 z_slice
  
       real*8   H_DPSIFUN       real*8   H_DPSIFUN
Line 59 
Line 68 
       real*8 TT(hnum_fpray_param)       real*8 TT(hnum_fpray_param)
       real*8 AA(hnum_fpray_param,hnum_fpray_param)       real*8 AA(hnum_fpray_param,hnum_fpray_param)
       real*8 dray(hnum_fpray_param)       real*8 dray(hnum_fpray_param)
       real*8 error(hnum_fpray_param)  *      real*8 error(hnum_fpray_param)
       real*4 chi2,dummychi2       real*4 chi2,dummychi2
       parameter (dummychi2 = 1.E4)       parameter (dummychi2 = 1.E4)
 *     array to remap hplane_coeff to param number *     array to remap hplane_coeff to param number
Line 71 
Line 80 
       ierr=0       ierr=0
 *  initailize residuals *  initailize residuals
  
         do plane=1,HDC_NUM_PLANES
       do itrack=1,HNTRACKS_MAX       do itrack=1,HNTRACKS_MAX
         do plane=1,HMAX_NUM_DC_PLANES            hdc_double_residual(itrack,plane)=1000
           hdc_residual(itrack,plane)=1000            hdc_single_residual(itrack,plane)=1000
           hdc_sing_res(itrack,plane)=1000  
           hdc1_sing_res(plane)=1000  
           hdc2_sing_res(plane)=1000  
           hdc1_dbl_res(plane)=1000  
           hdc2_dbl_res(plane)=1000  
   
         enddo         enddo
   c fill the 1d arrays from the 2d arrays for good track (in h_physics)
   c        hdc_sing_res(plane)=1000
           hdc_dbl_res(plane)=1000
       enddo       enddo
  
   
 *     test for no tracks *     test for no tracks
       if(HNTRACKS_FP.ge.1) then       if(HNTRACKS_FP.ge.1) then
         do itrack=1,HNTRACKS_FP         do itrack=1,HNTRACKS_FP
Line 143 
Line 149 
                 plane=HDC_PLANE_NUM(hit)                 plane=HDC_PLANE_NUM(hit)
  
 * note chi2 is single precision * note chi2 is single precision
                 hdc_sing_res(itrack,plane)=                  hdc_single_residual(itrack,plane)=
      &               (HDC_WIRE_COORD(hit)      &               (HDC_WIRE_COORD(hit)
      &               -hplane_coeff(remap(1),plane)*ray(1)      &               -hplane_coeff(remap(1),plane)*ray(1)
      &               -hplane_coeff(remap(2),plane)*ray(2)      &               -hplane_coeff(remap(2),plane)*ray(2)
      &               -hplane_coeff(remap(3),plane)*ray(3)      &               -hplane_coeff(remap(3),plane)*ray(3)
      &               -hplane_coeff(remap(4),plane)*ray(4))      &               -hplane_coeff(remap(4),plane)*ray(4))
                 chi2=chi2+((hdc_sing_res(itrack,plane))**2                  chi2=chi2+((hdc_single_residual(itrack,plane))**2
      &               )/(hdc_sigma(plane)*hdc_sigma(plane))      &               )/(hdc_sigma(plane)*hdc_sigma(plane))
 *djm  
                 if(itrack.eq.1 .and. plane.ge.1 .and. plane.le.6)  * Fill single_residual array.  Note that due to ihit loop, the plane
      &               hdc1_sing_res(plane) = hdc_sing_res(itrack,plane)  * will always contain a wire on the track being examined.
                 if(itrack.eq.2 .and. plane.ge.7 .and. plane.le.12)  c                hdc_sing_res(plane) = hdc_single_residual(itrack,plane)
      &               hdc2_sing_res(plane) = hdc_sing_res(itrack,plane)  
               enddo               enddo
             endif             endif
  
Line 218 
Line 223 
                 hit=HNTRACK_HITS(itrack+1,ihit+1)                 hit=HNTRACK_HITS(itrack+1,ihit+1)
                 plane=HDC_PLANE_NUM(hit)                 plane=HDC_PLANE_NUM(hit)
                 pos=H_DPSIFUN(ray1,plane)                 pos=H_DPSIFUN(ray1,plane)
                 hdc_residual(itrack,plane)=HDC_WIRE_COORD(hit)-pos                  hdc_double_residual(itrack,plane)=HDC_WIRE_COORD(hit)-pos
 * djm 8/31/94 stuff this variable into 1d array we can register * djm 8/31/94 stuff this variable into 1d array we can register
                 hdc2_dbl_res(plane) = hdc_residual(1,plane)                  hdc_dbl_res(plane) = hdc_double_residual(1,plane)
  
               enddo               enddo
  
Line 232 
Line 237 
                 hit=HNTRACK_HITS(itrack-1,ihit+1)                 hit=HNTRACK_HITS(itrack-1,ihit+1)
                 plane=HDC_PLANE_NUM(hit)                 plane=HDC_PLANE_NUM(hit)
                 pos=H_DPSIFUN(ray2,plane)                 pos=H_DPSIFUN(ray2,plane)
                 hdc_residual(itrack,plane)=HDC_WIRE_COORD(hit)-pos                  hdc_double_residual(itrack,plane)=HDC_WIRE_COORD(hit)-pos
 * djm 8/31/94 stuff this variable into 1d array we can register * djm 8/31/94 stuff this variable into 1d array we can register
                 hdc1_dbl_res(plane) = hdc_residual(2,plane)                  hdc_dbl_res(plane) = hdc_double_residual(2,plane)
  
               enddo               enddo
             endif                       ! end plane ge 7             endif                       ! end plane ge 7


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.10

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0