120 |
ISTEP=0 !num. steps to minimize chi^2 |
ISTEP=0 !num. steps to minimize chi^2 |
121 |
JFAIL=0 !error flag |
JFAIL=0 !error flag |
122 |
|
|
123 |
c elena-------- |
if(TRKDEBUG) print*,'guess: ',al |
|
CHI2 = 0 |
|
|
c elena-------- |
|
124 |
if(TRKDEBUG) print*,'mini2: step ',istep,chi2,1./AL(5) |
if(TRKDEBUG) print*,'mini2: step ',istep,chi2,1./AL(5) |
125 |
|
|
126 |
* |
* |
465 |
+ +((XV(I)-XM(I))**2+(YV(I)-YM(I))**2)/RESY(i)**2 |
+ +((XV(I)-XM(I))**2+(YV(I)-YM(I))**2)/RESY(i)**2 |
466 |
+ *( (1-XGOOD(I))*YGOOD(I) ) |
+ *( (1-XGOOD(I))*YGOOD(I) ) |
467 |
ENDDO |
ENDDO |
468 |
|
c print*,'CHISQ ',chi2 |
469 |
* ------------------------------------------------ |
* ------------------------------------------------ |
470 |
* |
* |
471 |
* calculation of derivatives (dX/dAL_fa and dY/dAL_fa) |
* calculation of derivatives (dX/dAL_fa and dY/dAL_fa) |
640 |
VOUT(6)=-1.*DSQRT(1.-AL_P(3)**2) |
VOUT(6)=-1.*DSQRT(1.-AL_P(3)**2) |
641 |
IF(AL_P(5).NE.0.) VOUT(7)=DABS(1./AL_P(5)) |
IF(AL_P(5).NE.0.) VOUT(7)=DABS(1./AL_P(5)) |
642 |
IF(AL_P(5).EQ.0.) VOUT(7)=1.E8 |
IF(AL_P(5).EQ.0.) VOUT(7)=1.E8 |
643 |
|
|
644 |
|
c$$$ print*,'POSXY ',vout |
645 |
|
|
646 |
DO I=1,nplanes |
DO I=1,nplanes |
647 |
step=vout(3)-zv(i) |
step=vout(3)-zv(i) |
648 |
10 DO J=1,7 |
10 DO J=1,7 |