242 |
IDCAND = icand !fitted track-candidate |
IDCAND = icand !fitted track-candidate |
243 |
ifail=0 !error flag in chi2 computation |
ifail=0 !error flag in chi2 computation |
244 |
jstep=0 !# minimization steps |
jstep=0 !# minimization steps |
245 |
|
iprint=0 |
246 |
call mini_2(jstep,ifail) |
if(DEBUG)iprint=1 |
247 |
|
call mini2(jstep,ifail,iprint) |
248 |
if(ifail.ne.0) then |
if(ifail.ne.0) then |
249 |
if(DEBUG)then |
if(DEBUG)then |
250 |
print *, |
print *, |
251 |
$ '*** MINIMIZATION FAILURE *** (mini_2) ' |
$ '*** MINIMIZATION FAILURE *** (mini2) ' |
252 |
$ ,iev |
$ ,iev |
253 |
endif |
endif |
254 |
chi2=-chi2 |
chi2=-chi2 |
1709 |
goto 10 |
goto 10 |
1710 |
endif |
endif |
1711 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1712 |
|
* cut on multiplicity (X VIEW) |
1713 |
|
* ---------------------------------------------------- |
1714 |
|
if(mult(icx).ge.mult_x_max)then |
1715 |
|
cl_single(icx)=0 |
1716 |
|
goto 10 |
1717 |
|
endif |
1718 |
|
* ---------------------------------------------------- |
1719 |
* cut BAD (X VIEW) |
* cut BAD (X VIEW) |
1720 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1721 |
badseed=BAD(VIEW(icx),nvk(MAXS(icx)),nst(MAXS(icx))) |
badseed=BAD(VIEW(icx),nvk(MAXS(icx)),nst(MAXS(icx))) |
1761 |
goto 20 |
goto 20 |
1762 |
endif |
endif |
1763 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1764 |
|
* cut on multiplicity (X VIEW) |
1765 |
|
* ---------------------------------------------------- |
1766 |
|
if(mult(icy).ge.mult_y_max)then |
1767 |
|
cl_single(icy)=0 |
1768 |
|
goto 20 |
1769 |
|
endif |
1770 |
|
* ---------------------------------------------------- |
1771 |
* cut BAD (Y VIEW) |
* cut BAD (Y VIEW) |
1772 |
* ---------------------------------------------------- |
* ---------------------------------------------------- |
1773 |
badseed=BAD(VIEW(icy),nvk(MAXS(icy)),nst(MAXS(icy))) |
badseed=BAD(VIEW(icy),nvk(MAXS(icy)),nst(MAXS(icy))) |
3013 |
enddo |
enddo |
3014 |
ifail=0 !error flag in chi^2 computation |
ifail=0 !error flag in chi^2 computation |
3015 |
jstep=0 !number of minimization steps |
jstep=0 !number of minimization steps |
3016 |
call mini_2(jstep,ifail) |
iprint=0 |
3017 |
|
if(DEBUG)iprint=1 |
3018 |
|
call mini2(jstep,ifail,iprint) |
3019 |
if(ifail.ne.0) then |
if(ifail.ne.0) then |
3020 |
if(DEBUG)then |
if(DEBUG)then |
3021 |
print *, |
print *, |
3022 |
$ '*** MINIMIZATION FAILURE *** ' |
$ '*** MINIMIZATION FAILURE *** ' |
3023 |
$ //'(mini_2 in clouds_to_ctrack)' |
$ //'(mini2 in clouds_to_ctrack)' |
3024 |
endif |
endif |
3025 |
chi2=-chi2 |
chi2=-chi2 |
3026 |
endif |
endif |
3769 |
|
|
3770 |
c good2=1!.true. |
c good2=1!.true. |
3771 |
chi2_nt(ntr) = sngl(chi2) |
chi2_nt(ntr) = sngl(chi2) |
3772 |
nstep_nt(ntr) = 0!nstep |
nstep_nt(ntr) = nstep |
3773 |
|
|
3774 |
phi = al(4) !(4) |
phi = al(4) !(4) |
3775 |
sinth = al(3) !(4) |
sinth = al(3) !(4) |