23 |
c common/dbg/DEBUG |
c common/dbg/DEBUG |
24 |
|
|
25 |
parameter (dinf=1.d15) !just a huge number... |
parameter (dinf=1.d15) !just a huge number... |
26 |
|
parameter (dinfneg=-dinf) ! just a huge negative number... |
27 |
|
|
28 |
|
double precision NX, NY ! EM GCC4.7 |
29 |
c------------------------------------------------------------------------ |
c------------------------------------------------------------------------ |
30 |
c variables used in the tracking procedure (mini and its subroutines) |
c variables used in the tracking procedure (mini and its subroutines) |
31 |
c |
c |
47 |
c DATA ALMAX/dinf,dinf,1.,dinf,dinf/ !limits on alpha vector components |
c DATA ALMAX/dinf,dinf,1.,dinf,dinf/ !limits on alpha vector components |
48 |
c DATA ALMIN/-dinf,-dinf,-1.,-dinf,-dinf/ !" |
c DATA ALMIN/-dinf,-dinf,-1.,-dinf,-dinf/ !" |
49 |
DATA ALMAX/dinf,dinf,1.,dinf,dinf/ !limits on alpha vector components |
DATA ALMAX/dinf,dinf,1.,dinf,dinf/ !limits on alpha vector components |
50 |
DATA ALMIN/-dinf,-dinf,-1.,-dinf,-dinf/ !" |
DATA ALMIN/dinfneg,dinfneg,-1.,dinfneg,dinfneg/ !" |
51 |
|
|
52 |
c$$$ DIMENSION DAL(5) !increment of vector alfa |
c$$$ DIMENSION DAL(5) !increment of vector alfa |
53 |
DIMENSION CHI2DD_R(4,4),CHI2D_R(4) !hessiano e gradiente di chi2 |
DIMENSION CHI2DD_R(4,4),CHI2D_R(4) !hessiano e gradiente di chi2 |
144 |
CHI2=0 |
CHI2=0 |
145 |
|
|
146 |
if(TRKDEBUG) print*,'guess: ',al |
if(TRKDEBUG) print*,'guess: ',al |
147 |
if(TRKDEBUG) print*,'mini2: step ',istep,chi2,1./AL(5) |
if(TRKDEBUG) print*,'mini2: step ',istep,chi2,AL(5) |
148 |
|
|
149 |
* |
* |
150 |
* ----------------------- |
* ----------------------- |
254 |
ENDDO |
ENDDO |
255 |
ENDIF |
ENDIF |
256 |
|
|
257 |
if(TRKDEBUG) print*,'mini2: step ',istep,chi2,1./AL(5) |
if(TRKDEBUG) print*,'mini2: step ',istep,chi2,AL(5) |
258 |
|
|
259 |
c$$$ PRINT*,'DAL ',(DAL(K),K=1,5) |
c$$$ PRINT*,'DAL ',(DAL(K),K=1,5) |
260 |
c$$$ PRINT*,'CHI2DOLD ',(CHI2DOLD(K),K=1,5) |
c$$$ PRINT*,'CHI2DOLD ',(CHI2DOLD(K),K=1,5) |
421 |
* --------------------------------------------- |
* --------------------------------------------- |
422 |
*------------------------------------------------------------* |
*------------------------------------------------------------* |
423 |
c$$$ ALTOL(5) = DSQRT(DELETA1**2+DELETA2**2*AL(5)**2)/FACT |
c$$$ ALTOL(5) = DSQRT(DELETA1**2+DELETA2**2*AL(5)**2)/FACT |
424 |
|
IF(FACT.EQ.0)THEN |
425 |
|
IFAIL=1 |
426 |
|
RETURN |
427 |
|
ENDIF |
428 |
ALTOL(5) = DSQRT((DELETA1*AVRESX)**2+DELETA2**2*AL(5)**2)/FACT |
ALTOL(5) = DSQRT((DELETA1*AVRESX)**2+DELETA2**2*AL(5)**2)/FACT |
429 |
ALTOL(1) = ALTOL(5)/DELETA1 |
ALTOL(1) = ALTOL(5)/DELETA1 |
430 |
ALTOL(2) = ALTOL(1) |
ALTOL(2) = ALTOL(1) |
561 |
* ------------------------------------ |
* ------------------------------------ |
562 |
* Reduced chi^2 |
* Reduced chi^2 |
563 |
CHI2 = CHI2/dble(ndof) |
CHI2 = CHI2/dble(ndof) |
|
|
|
564 |
c print*,'mini2: chi2 ',chi2 |
c print*,'mini2: chi2 ',chi2 |
565 |
|
|
566 |
11 CONTINUE |
11 CONTINUE |
567 |
|
|
568 |
if(TRKDEBUG) print*,'mini2: -ok- ',istep,chi2,1./AL(5) |
if(TRKDEBUG) print*,'mini2: -ok- ',istep,chi2,AL(5) |
569 |
|
|
570 |
NSTEP=ISTEP ! ***PP*** |
NSTEP=ISTEP ! ***PP*** |
571 |
|
|
1137 |
|
|
1138 |
subroutine guess() |
subroutine guess() |
1139 |
|
|
1140 |
c IMPLICIT DOUBLE PRECISION (A-H,O-Z) |
IMPLICIT DOUBLE PRECISION (A-H,O-Z) ! EM GCC4.7 |
1141 |
|
|
1142 |
include 'commontracker.f' !tracker general common |
include 'commontracker.f' !tracker general common |
1143 |
include 'common_mini_2.f' !common for the tracking procedure |
include 'common_mini_2.f' !common for the tracking procedure |
1144 |
|
|
1145 |
REAL*4 XP(NPLANES),ZP(NPLANES),AP(NPLANES),RP(NPLANES) |
REAL*8 XP(NPLANES),ZP(NPLANES),AP(NPLANES),RP(NPLANES) ! EM GCC4.7 |
1146 |
REAL*4 CHI,XC,ZC,RADIUS |
REAL*4 CHI,XC,ZC,RADIUS |
1147 |
* ---------------------------------------- |
* ---------------------------------------- |
1148 |
* Y view |
* Y view |