105 |
* ---------------------------------------------------------- |
* ---------------------------------------------------------- |
106 |
* changed in order to evaluate energy-dependent |
* changed in order to evaluate energy-dependent |
107 |
* tolerances on all 5 parameters |
* tolerances on all 5 parameters |
108 |
FACT=100. !scale factor to define tolerance on alfa |
cPP FACT=1.0e10 !scale factor to define tolerance on alfa |
109 |
c deflection error (see PDG) |
c deflection error (see PDG) |
110 |
DELETA1 = 0.01/0.3/0.4/0.4451**2*SQRT(720./(6.+4.)) |
DELETA1 = 0.01/0.3/0.4/0.4451**2*SQRT(720./(6.+4.)) |
111 |
DELETA2 = 0.016/0.3/0.4/0.4451*SQRT(0.4451/9.36) |
DELETA2 = 0.016/0.3/0.4/0.4451*SQRT(0.4451/9.36) |
267 |
ALTOL(3) = DSQRT(ALTOL(1)**2+ALTOL(2)**2)/44.51 |
ALTOL(3) = DSQRT(ALTOL(1)**2+ALTOL(2)**2)/44.51 |
268 |
ALTOL(4) = ALTOL(3) |
ALTOL(4) = ALTOL(3) |
269 |
|
|
270 |
|
c$$$ print*,' -- ',(DAL(I),ALTOL(I),' - ',i=1,5) !>>>> new step! |
271 |
|
|
272 |
*---- check tolerances: |
*---- check tolerances: |
273 |
c$$$ DO I=1,5 |
c$$$ DO I=1,5 |
274 |
c$$$ if(TRKVERBOSE)print*,i,' -- ',DAL(I),ALTOL(I) !>>>> new step! |
c$$$ if(TRKVERBOSE)print*,i,' -- ',DAL(I),ALTOL(I) !>>>> new step! |
275 |
c$$$ ENDDO |
c$$$ ENDDO |
276 |
c$$$ print*,'chi2 -- ',DCHI2 |
c$$$ print*,'chi2 -- ',DCHI2 |
277 |
|
|
278 |
IF(ISTEP.LT.3) GOTO 10 ! ***PP*** |
IF(ISTEP.LT.ISTEPMIN) GOTO 10 ! ***PP*** |
279 |
DO I=1,5 |
DO I=1,5 |
280 |
IF(ABS(DAL(I)).GT.ALTOL(I))GOTO 10 !>>>> new step! |
IF(ABS(DAL(I)).GT.ALTOL(I))GOTO 10 !>>>> new step! |
281 |
ENDDO |
ENDDO |
366 |
$ print*,'*** WARNING *** in mini n.dof = 0 (set to 1)' |
$ print*,'*** WARNING *** in mini n.dof = 0 (set to 1)' |
367 |
endif |
endif |
368 |
|
|
|
if(TRKDEBUG) print*,'mini2: -ok- ',istep,chi2,1./AL(5) |
|
|
|
|
369 |
* ------------------------------------ |
* ------------------------------------ |
370 |
* Reduced chi^2 |
* Reduced chi^2 |
371 |
CHI2 = CHI2/dble(ndof) |
CHI2 = CHI2/dble(ndof) |
374 |
|
|
375 |
11 CONTINUE |
11 CONTINUE |
376 |
|
|
377 |
|
if(TRKDEBUG) print*,'mini2: -ok- ',istep,chi2,1./AL(5) |
378 |
|
|
379 |
NSTEP=ISTEP ! ***PP*** |
NSTEP=ISTEP ! ***PP*** |
380 |
|
|
381 |
|
c$$$ print*,'>>>>> NSTEP = ',NSTEP |
382 |
|
|
383 |
RETURN |
RETURN |
384 |
END |
END |
385 |
|
|
640 |
c |
c |
641 |
DIMENSION AL_P(5) |
DIMENSION AL_P(5) |
642 |
* |
* |
643 |
DO I=1,nplanes |
cpp DO I=1,nplanes |
644 |
ZV(I)=ZM(I) ! |
cpp ZV(I)=ZM(I) ! |
645 |
ENDDO |
cpp ENDDO |
646 |
* |
* |
647 |
* set parameters for GRKUTA |
* set parameters for GRKUTA |
648 |
* |
* |
660 |
c$$$ print*,'POSXY (prima) ',vout |
c$$$ print*,'POSXY (prima) ',vout |
661 |
|
|
662 |
DO I=1,nplanes |
DO I=1,nplanes |
663 |
step=vout(3)-zv(i) |
cpp step=vout(3)-zv(i) |
664 |
|
step=vout(3)-zm(i) |
665 |
10 DO J=1,7 |
10 DO J=1,7 |
666 |
VECT(J)=VOUT(J) |
VECT(J)=VOUT(J) |
667 |
VECTINI(J)=VOUT(J) |
VECTINI(J)=VOUT(J) |
827 |
ENDDO |
ENDDO |
828 |
IFLAG=0 !no debug mode |
IFLAG=0 !no debug mode |
829 |
CALL TRICIRCLE(NP,XP,ZP,AP,RP,CHI,XC,ZC,RADIUS,IFLAG) |
CALL TRICIRCLE(NP,XP,ZP,AP,RP,CHI,XC,ZC,RADIUS,IFLAG) |
830 |
c print*,' circle: ',XC,ZC,RADIUS,' --- ',CHI,IFLAG |
|
831 |
|
c$$$ print*,' circle: ',XC,ZC,RADIUS,' --- ',CHI,IFLAG |
832 |
|
c$$$ print*,' XP ',(xp(i),i=1,np) |
833 |
|
c$$$ print*,' ZP ',(zp(i),i=1,np) |
834 |
|
c$$$ print*,' AP ',(ap(i),i=1,np) |
835 |
|
c$$$ print*,' XP ',(rp(i),i=1,np) |
836 |
|
|
837 |
IF(IFLAG.NE.0)GOTO 10 !straigth fit |
IF(IFLAG.NE.0)GOTO 10 !straigth fit |
838 |
if(CHI.gt.100)GOTO 10 !straigth fit |
c if(CHI.gt.100)GOTO 10 !straigth fit |
839 |
ARG = RADIUS**2-(ZINI-ZC)**2 |
ARG = RADIUS**2-(ZINI-ZC)**2 |
840 |
IF(ARG.LT.0)GOTO 10 !straigth fit |
IF(ARG.LT.0)GOTO 10 !straigth fit |
841 |
DC = SQRT(ARG) |
DC = SQRT(ARG) |
845 |
DEF=100./(RADIUS*0.3*0.43) |
DEF=100./(RADIUS*0.3*0.43) |
846 |
IF(XC.GT.0)DEF=-DEF |
IF(XC.GT.0)DEF=-DEF |
847 |
|
|
848 |
|
|
849 |
|
|
850 |
IF(ABS(X0).GT.30)THEN |
IF(ABS(X0).GT.30)THEN |
851 |
c$$$ PRINT*,'STRANGE GUESS: XC,ZC,R ',XC,ZC,RADIUS |
c$$$ PRINT*,'STRANGE GUESS: XC,ZC,R ',XC,ZC,RADIUS |
852 |
c$$$ $ ,' - CHI ',CHI,' - X0,AX,DEF ',X0,AX,DEF |
c$$$ $ ,' - CHI ',CHI,' - X0,AX,DEF ',X0,AX,DEF |