version 1.1.2.18, 2010/01/13 02:52:49
|
version 1.1.2.19, 2010/01/28 04:22:35
|
|
|
| |
integer ngoodfpp1 | integer ngoodfpp1 |
| |
|
integer*4 nsimpletracks,ngooddrifttracks,trackingiterations,freehitcountiterations |
|
|
ABORT= .FALSE. | ABORT= .FALSE. |
err= ' ' | err= ' ' |
| |
|
|
c determine whether enough hits for tracking: | c determine whether enough hits for tracking: |
call h_fpp_tracking_freehitcount(dcset,sufficient_hits) | call h_fpp_tracking_freehitcount(dcset,sufficient_hits) |
c find the individual combination of one hit per plane which gives the smallest chi2 of drift tracking: | c find the individual combination of one hit per plane which gives the smallest chi2 of drift tracking: |
|
trackingiterations = 0 |
|
freehitcountiterations = 0 |
do while (sufficient_hits .and. (HFPP_N_tracks(DCset).lt.H_FPP_MAX_TRACKS)) | do while (sufficient_hits .and. (HFPP_N_tracks(DCset).lt.H_FPP_MAX_TRACKS)) |
| |
ntracksnew = 0 | ntracksnew = 0 |
|
|
c any_great = .false. | c any_great = .false. |
| |
c iterations = 0 | c iterations = 0 |
|
c trackingiterations = trackingiterations + 1 |
|
freehitcountiterations = freehitcountiterations + 1 |
|
|
do while(nhitsrequired.ge.hfpp_minsethits) | do while(nhitsrequired.ge.hfpp_minsethits) |
iterations = 0 | iterations = 0 |
nhitsintrack = 0 | nhitsintrack = 0 |
|
|
c $ nhitsrequired.lt. | c $ nhitsrequired.lt. |
c $ hfpp_track_nlayers(dcset,hfpp_n_tracks(dcset))) exit | c $ hfpp_track_nlayers(dcset,hfpp_n_tracks(dcset))) exit |
| |
|
nsimpletracks = 0 |
|
ngooddrifttracks = 0 |
|
trackingiterations = trackingiterations + 1 |
do while(nhitsintrack.gt.0) | do while(nhitsintrack.gt.0) |
| |
c if(iterations.gt.hfpp_maxcombos+1) then | c if(iterations.gt.hfpp_maxcombos+1) then |
|
|
return | return |
endif | endif |
| |
|
nsimpletracks = nsimpletracks+1 |
|
|
if(track_good) then ! track passes chi2 cut: | if(track_good) then ! track passes chi2 cut: |
|
ngooddrifttracks = ngooddrifttracks + 1 |
c calculate polar theta of this track in order to have the option to use theta instead of chi2 as track selection criterion: | c calculate polar theta of this track in order to have the option to use theta instead of chi2 as track selection criterion: |
c first transform to focal plane coordinates: | c first transform to focal plane coordinates: |
c slopes: | c slopes: |
|
|
c get the next free hit combo: | c get the next free hit combo: |
call h_fpp_tracking_nexthitcombo(dcset,nhitsrequired,nhitsintrack,hitcluster) | call h_fpp_tracking_nexthitcombo(dcset,nhitsrequired,nhitsintrack,hitcluster) |
enddo ! end loop while hitsintrack>0 | enddo ! end loop while hitsintrack>0 |
|
|
|
if( hfpp_n_tracks(dcset) .eq. 0 ) then |
|
hfpp_n_simple(dcset,1) = nsimpletracks |
|
hfpp_n_simple(dcset,2) = ngooddrifttracks |
|
endif |
|
|
c write(*,*) 'finished loop over hit combos' | c write(*,*) 'finished loop over hit combos' |
c at this point bestclusters contains the combination of one hit per plane with the best chi2: | c at this point bestclusters contains the combination of one hit per plane with the best chi2: |
if(.not. firsttry) then ! at least one track was found: add the best track to the track array: | if(.not. firsttry) then ! at least one track was found: add the best track to the track array: |