--- DarthVader/TrackerLevel2/src/F77/tricircle.f 2006/05/19 13:15:56 1.1 +++ DarthVader/TrackerLevel2/src/F77/tricircle.f 2006/11/21 17:12:59 1.2 @@ -56,9 +56,15 @@ double precision tmp1,tmp2,tmp(npoints) !temp variables + logical DEBUG + real pigr !3.1415... pigr=ACOS(-1.) + + DEBUG = .false. + if(eflag.eq.1)DEBUG = .true. + eflag = 0 @@ -135,25 +141,31 @@ jfail=0 call DFACT(3,a,3,ir,ifail,deta,jfail) if(ifail.eq.-1) then - print*,'tricircle: ERROR: singular matrix A:' - do i=1,3 - print*,(a(i,j),j=1,3) - enddo + if(DEBUG)then + print*,'tricircle: ERROR: singular matrix A:' + do i=1,3 + print*,(a(i,j),j=1,3) + enddo + endif eflag=1 endif if(jfail.eq.-1) then - print* - $ ,'tricircle: ERROR: matrix A: determinant too small?' - do i=1,3 - print*,(d(i,j),j=1,3) - enddo + if(DEBUG)then + print* + $ ,'tricircle: ERROR: matrix A: determinant too small?' + do i=1,3 + print*,(d(i,j),j=1,3) + enddo + endif eflag=1 elseif(jfail.eq.1) then - print* + if(DEBUG)then + print* $ ,'tricircle: ERROR: matrix A: determinant too large?' - do i=1,3 - print*,(d(i,j),j=1,3) - enddo + do i=1,3 + print*,(d(i,j),j=1,3) + enddo + endif eflag=1 endif @@ -161,25 +173,31 @@ jfail=0 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 + endif eflag=1 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 + endif eflag=1 elseif(jfail.eq.1) then + if(DEBUG)then print* $ ,'tricircle: ERROR: matrix D: determinant too large?' do i=1,3 print*,(d(i,j),j=1,3) enddo + endif eflag=1 endif @@ -187,25 +205,31 @@ jfail=0 call DFACT(3,e,3,ir,ifail,dete,jfail) if(ifail.eq.-1) then + if(DEBUG)then print*,'tricircle: ERROR: singular matrix E:' do i=1,3 print*,(e(i,j),j=1,3) enddo + endif eflag=1 endif if(jfail.eq.-1) then + if(DEBUG)then print* $ ,'tricircle: ERROR: matrix E: determinant too small?' do i=1,3 print*,(e(i,j),j=1,3) enddo + endif eflag=1 elseif(jfail.eq.1) then + if(DEBUG)then print* $ ,'tricircle: ERROR: matrix E: determinant too large?' do i=1,3 print*,(e(i,j),j=1,3) enddo + endif eflag=1 endif @@ -214,25 +238,31 @@ call DFACT(3,f,3,ir,ifail,detf,jfail) c ifail=-1 !??? if(ifail.eq.-1) then + if(DEBUG)then print*,'tricircle: ERROR: singular matrix F:' do i=1,3 print*,(f(i,j),j=1,3) enddo + endif eflag=1 endif if(jfail.eq.-1) then + if(DEBUG)then print* $ ,'tricircle: ERROR: matrix F: determinant too small?' do i=1,3 print*,(f(i,j),j=1,3) enddo + endif eflag=1 elseif(jfail.eq.1) then + if(DEBUG)then print* $ ,'tricircle: ERROR: matrix F: determinant too large?' do i=1,3 print*,(f(i,j),j=1,3) enddo + endif eflag=1 endif