--- DarthVader/TrackerLevel2/src/F77/analysissubroutines.f 2007/08/31 14:56:52 1.31 +++ DarthVader/TrackerLevel2/src/F77/analysissubroutines.f 2007/09/04 15:44:49 1.32 @@ -688,6 +688,9 @@ real stripx,stripy + double precision xi,yi,zi + double precision xi_A,yi_A,zi_A + double precision xi_B,yi_B,zi_B double precision xrt,yrt,zrt double precision xrt_A,yrt_A,zrt_A double precision xrt_B,yrt_B,zrt_B @@ -701,15 +704,15 @@ resxPAM = 0 resyPAM = 0 - xPAM = 0. - yPAM = 0. - zPAM = 0. - xPAM_A = 0. - yPAM_A = 0. - zPAM_A = 0. - xPAM_B = 0. - yPAM_B = 0. - zPAM_B = 0. + xPAM = 0.D0 + yPAM = 0.D0 + zPAM = 0.D0 + xPAM_A = 0.D0 + yPAM_A = 0.D0 + zPAM_A = 0.D0 + xPAM_B = 0.D0 + yPAM_B = 0.D0 + zPAM_B = 0.D0 c print*,'## xyz_PAM: ',icx,icy,sensor,PFAx,PFAy,angx,angy if(sensor.lt.1.or.sensor.gt.2)then @@ -819,9 +822,9 @@ $ ' WARNING: false X strip: strip ',stripx endif endif - xi = acoordsi(stripx,viewx) - yi = acoordsi(stripy,viewy) - zi = 0. + xi = dcoordsi(stripx,viewx) + yi = dcoordsi(stripy,viewy) + zi = 0.D0 c------------------------------------------------------------------------ c (xrt,yrt,zrt) = rototranslated coordinates in the silicon sensor frame @@ -856,13 +859,13 @@ yPAM = dcoord(yrt,viewy,nldy,sensor) / 1.d4 zPAM = ( zrt + z_mech_sensor(nplx,nldx,sensor)*1000. ) / 1.d4 - xPAM_A = 0. - yPAM_A = 0. - zPAM_A = 0. - - xPAM_B = 0. - yPAM_B = 0. - zPAM_B = 0. + xPAM_A = 0.D0 + yPAM_A = 0.D0 + zPAM_A = 0.D0 + + xPAM_B = 0.D0 + yPAM_B = 0.D0 + zPAM_B = 0.D0 elseif( $ (icx.ne.0.and.icy.eq.0).or. @@ -882,7 +885,7 @@ nldx = nldy viewx = viewy + 1 - yi = acoordsi(stripy,viewy) + yi = dcoordsi(stripy,viewy) xi_A = edgeY_d - SiDimX/2 yi_A = yi @@ -913,7 +916,7 @@ $ ' WARNING: false X strip: strip ',stripx endif endif - xi = acoordsi(stripx,viewx) + xi = dcoordsi(stripx,viewx) xi_A = xi yi_A = edgeX_d - SiDimY/2 @@ -986,9 +989,9 @@ c in PAMELA reference system c------------------------------------------------------------------------ - xPAM = 0. - yPAM = 0. - zPAM = 0. + xPAM = 0.D0 + yPAM = 0.D0 + zPAM = 0.D0 xPAM_A = dcoord(xrt_A,viewx,nldx,sensor) / 1.d4 yPAM_A = dcoord(yrt_A,viewy,nldy,sensor) / 1.d4 @@ -1097,10 +1100,10 @@ xm(ip) = xPAM ym(ip) = yPAM zm(ip) = zPAM - xm_A(ip) = 0. - ym_A(ip) = 0. - xm_B(ip) = 0. - ym_B(ip) = 0. + xm_A(ip) = 0.D0 + ym_A(ip) = 0.D0 + xm_B(ip) = 0.D0 + ym_B(ip) = 0.D0 c zv(ip) = zPAM @@ -1220,7 +1223,7 @@ * ******************************************************************************** - real function distance_to(XPP,YPP) + real function distance_to(rXPP,rYPP) include 'common_xyzPAM.f' @@ -1229,9 +1232,14 @@ * ( i.e. distance/resolution ) * ----------------------------------- + real rXPP,rYPP + double precision XPP,YPP double precision distance,RE double precision BETA,ALFA,xmi,ymi + XPP=DBLE(rXPP) + YPP=DBLE(rYPP) + * ---------------------- if ( + xPAM.eq.0.and. @@ -1358,17 +1366,17 @@ data c1/1.,0.,0.,1./ data c2/1.,-1.,-1.,1./ data c3/1.,1.,0.,0./ - real*8 yvvv,xvvv + double precision yvvv,xvvv double precision xi,yi,zi double precision xrt,yrt,zrt real AA,BB - real yvv(4),xvv(4) + double precision yvv(4),xvv(4) * tollerance to consider the track inside the sensitive area real ptoll data ptoll/150./ !um - external nviewx,nviewy,acoordsi,dcoord + external nviewx,nviewy,dcoordsi,dcoord nplpt = nplPAM !plane viewx = nviewx(nplpt) @@ -1383,15 +1391,15 @@ c------------------------------------------------------------------------ c (xi,yi,zi) = mechanical coordinates in the silicon sensor frame c------------------------------------------------------------------------ - if(((mod(int(stripx+0.5)-1,1024)+1).le.3) - $ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... +c if(((mod(int(stripx+0.5)-1,1024)+1).le.3) +c $ .or.((mod(int(stripx+0.5)-1,1024)+1).ge.1022)) then !X has 1018 strips... c if((stripx.le.3).or.(stripx.ge.1022)) then !X has 1018 strips... c print*,'whichsensor: ', c $ ' WARNING: false X strip: strip ',stripx - endif - xi = acoordsi(stripx,viewx) - yi = acoordsi(stripy,viewy) - zi = 0. +c endif + xi = dcoordsi(stripx,viewx) + yi = dcoordsi(stripy,viewy) + zi = 0.D0 c------------------------------------------------------------------------ c (xrt,yrt,zrt) = rototranslated coordinates in the silicon sensor frame c------------------------------------------------------------------------