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

 1 cdaq  1.1       SUBROUTINE H_SELECT_BEST_TRACK(ABORT,err)
 2           *--------------------------------------------------------
 3           *-
 4           *-   Purpose and Methods : Select the best track through the HMS
 5           *-                              
 6           *-
 7           *-      Required Input BANKS
 8           *-
 9           *-      Output BANKS
10           *-
11           *-   Output: ABORT           - success or failure
12           *-         : err             - reason for failure, if any
13           *- 
14 cdaq  1.2 *- $Log: h_select_best_track.f,v $
15 cdaq  1.4 * Revision 1.3  1995/05/22  19:39:27  cdaq
16           * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts"
17           *
18 cdaq  1.3 * Revision 1.2  1995/02/23  13:31:01  cdaq
19           * (JRA) Adjust include file ordering
20           *
21 cdaq  1.2 * Revision 1.1  1995/01/31  21:33:54  cdaq
22           * Initial revision
23 cdaq  1.1 *-
24           *--------------------------------------------------------
25                 IMPLICIT NONE
26                 SAVE
27           *
28                 character*50 here
29                 parameter (here= 'H_SELECT_BEST_TRACK')
30           *
31                 logical ABORT
32                 character*(*) err
33           *
34 cdaq  1.3       INCLUDE 'hms_data_structures.cmn'
35 cdaq  1.1       INCLUDE 'gen_routines.dec'
36                 INCLUDE 'gen_constants.par'
37                 INCLUDE 'gen_units.par'
38                 INCLUDE 'hms_physics_sing.cmn'
39                 INCLUDE 'hms_calorimeter.cmn'
40 cdaq  1.2       INCLUDE 'hms_scin_parms.cmn'
41 cdaq  1.1       INCLUDE 'hms_scin_tof.cmn'
42           *
43           *     local variables 
44                 integer*4 goodtrack,track
45                 real*4 chi2perdeg,chi2min
46           *--------------------------------------------------------
47           *
48                 ABORT= .FALSE.
49                 err= ' '
50           *     Need to test to chose the best track
51                 HSNUM_FPTRACK = 0
52                 HSNUM_TARTRACK = 0
53                 if( HNTRACKS_FP.GT. 0) then
54                   chi2min= 1e10
55                   goodtrack = 0
56                   do track = 1, HNTRACKS_FP
57           
58                     if( HNFREE_FP(track).ge. hsel_ndegreesmin) then
59                       chi2perdeg = HCHI2_FP(track)/FLOAT(HNFREE_FP(track))
60                       if(chi2perdeg .lt. chi2min) then
61           *     simple particle id tests
62 cdaq  1.1               if(  ( HDEDX(track,1) .gt. hsel_dedx1min)  .and.
63                &             ( HDEDX(track,1) .lt. hsel_dedx1max)  .and.
64                &             ( HBETA(track)   .gt. hsel_betamin)   .and.
65                &             ( HBETA(track)   .lt. hsel_betamax)   .and.
66                &             ( HTRACK_ET(track) .gt. hsel_etmin)   .and.
67                &             ( HTRACK_ET(track) .lt. hsel_etmax)) then
68                           goodtrack = track
69 cdaq  1.4                 chi2min = chi2perdeg
70 cdaq  1.1               endif                     ! end test on track id
71                       endif                       ! end test on lower chisq
72                     endif                         ! end test on minimum number of degrees of freedom
73                   enddo                           ! end loop on track
74                   HSNUM_TARTRACK = goodtrack
75                   HSNUM_FPTRACK  = goodtrack
76                   if(goodtrack.eq.0) return       ! return if no valid tracks
77                 endif
78           
79                 return
80                 end

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