/[PAMELA software]/DarthVader/TrackerLevel2/src/F77/mini.f
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/F77/mini.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by pam-fi, Fri Dec 5 08:26:47 2008 UTC revision 1.26 by mocchiut, Thu Jan 16 15:29:56 2014 UTC
# Line 23  c      logical DEBUG Line 23  c      logical DEBUG
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
# Line 44  c      DATA XGOOD,YGOOD/nplanes*1.,nplan Line 47  c      DATA XGOOD,YGOOD/nplanes*1.,nplan
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
# Line 141  c$$$      DELETA2 = 0.016/0.3/0.4/0.4451 Line 144  c$$$      DELETA2 = 0.016/0.3/0.4/0.4451
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  *     -----------------------  *     -----------------------
# Line 251  c$$$            CHI2D(I)=CHI2D(I)*COST Line 254  c$$$            CHI2D(I)=CHI2D(I)*COST
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)
# Line 418  c$$$     $        ISTEPMAX Line 421  c$$$     $        ISTEPMAX
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)
# Line 554  c$$$               DAL(I)=0. Line 561  c$$$               DAL(I)=0.
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    
# Line 1131  c$$$      print*,'POSXY (dopo) ',vout Line 1137  c$$$      print*,'POSXY (dopo) ',vout
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

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.23