--- DarthVader/TrackerLevel2/src/F77/tricircle.f 2006/11/21 17:12:59 1.2 +++ DarthVader/TrackerLevel2/src/F77/tricircle.f 2014/01/17 12:56:52 1.6 @@ -51,8 +51,8 @@ integer ifail !=-1 if singular matrix error, =0 if not singular integer jfail !=0 if determinant can be evaluated, =-1 if determinat is probably too small, =+1 if too large - parameter (big=1.e4) !just a number greater than C(npoints,3) - double precision xxc(big),zzc(big),rrr(big) !centres and radii to be averaged + parameter (ibig=10000) !just a number greater than C(npoints,3) !EM GCC4.7 + double precision xxc(ibig),zzc(ibig),rrr(ibig) !centres and radii to be averaged double precision tmp1,tmp2,tmp(npoints) !temp variables @@ -174,20 +174,20 @@ call DFACT(3,d,3,ir,ifail,detd,jfail) if(ifail.eq.-1) then if(DEBUG)then - print*,'tricircle: ERROR: singular matrix D:' - do i=1,3 - print*,(d(i,j),j=1,3) - enddo + print*,'tricircle: ERROR: singular matrix D:' + do i=1,3 + print*,(d(i,j),j=1,3) + enddo endif eflag=1 - endif - if(jfail.eq.-1) then + endif + if(jfail.eq.-1) then if(DEBUG)then - print* - $ ,'tricircle: ERROR: matrix D: determinant too small?' - do i=1,3 - print*,(d(i,j),j=1,3) - enddo + print* + $ ,'tricircle: ERROR: matrix D: determinant too small?' + do i=1,3 + print*,(d(i,j),j=1,3) + enddo endif eflag=1 elseif(jfail.eq.1) then @@ -212,7 +212,7 @@ enddo endif eflag=1 - endif + endif if(jfail.eq.-1) then if(DEBUG)then print* @@ -296,9 +296,9 @@ zc=0. radius=0. do i=1,k - xc=xc+xxc(i) - zc=zc+zzc(i) - radius=radius+rrr(i) + xc=xc+REAL(xxc(i)) !EM GCC4.7 + zc=zc+REAL(zzc(i)) !EM GCC4.7 + radius=radius+REAL(rrr(i)) !EM GCC4.7 enddo xc=xc/k * scale !back to micrometers zc=zc/k * scale @@ -335,7 +335,7 @@ else tmp(i)=-tmp1 endif - residual(i)=tmp2 - tmp(i) + residual(i)=REAL(tmp2 - tmp(i)) !EM GCC4.7 chi=chi + residual(i)**2. c print*,dep(i) !??? c print*,indep(i) !??? @@ -347,7 +347,7 @@ c independent variable axis c------------------------------------------------------------------------ do i=1,npoints - angle(i)=(zc-indep(i)) / tmp(i) + angle(i)=REAL((zc-indep(i)) / tmp(i)) !EM GCC4.7 angle(i)=ATAN(angle(i)) !-pi/2 <= angle <= pi/2 angle(i)=angle(i)/pigr*180. enddo