--- DarthVader/TrackerLevel2/src/F77/analysissubroutines.f 2009/12/14 10:51:40 1.43 +++ DarthVader/TrackerLevel2/src/F77/analysissubroutines.f 2014/01/16 15:29:50 1.45 @@ -1379,8 +1379,8 @@ iv1=iside iv2=mod(iside,4)+1 * straight line passing trhough two consecutive vertexes - AA = (yvv(iv1)-yvv(iv2))/(xvv(iv1)-xvv(iv2)) - BB = yvv(iv1) - AA*xvv(iv1) + AA = REAL((yvv(iv1)-yvv(iv2))/(xvv(iv1)-xvv(iv2))) !EM GCC4.7 + BB = REAL(yvv(iv1) - AA*xvv(iv1)) !EM GCC4.7 * point along the straight line closer to the track xoo = (xPAM+AA*yPAM-AA*BB)/(1+AA**2) yoo = AA*xoo + BB @@ -1392,8 +1392,8 @@ iv1=iside iv2=mod(iside,4)+1 * straight line passing trhough two consecutive vertexes - AA = (xvv(iv1)-xvv(iv2))/(yvv(iv1)-yvv(iv2)) - BB = xvv(iv1) - AA*yvv(iv1) + AA = REAL((xvv(iv1)-xvv(iv2))/(yvv(iv1)-yvv(iv2))) !EM GCC4.7 + BB = REAL(xvv(iv1) - AA*yvv(iv1)) !EM GCC4.7 * point along the straight line closer to the track yoo = (yPAM+AA*xPAM-AA*BB)/(1+AA**2) xoo = AA*yoo + BB @@ -1976,9 +1976,9 @@ c call xyz_PAM(icx1,icy1,is1,'COG2','COG2',0.,0.)!(1) c call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.) !(1) call xyz_PAM(icx1,icy1,is1,PFAdef,PFAdef,0.,0.,0.,0.) - xm1=xPAM - ym1=yPAM - zm1=zPAM + xm1=REAL(xPAM) !EM GCC4.7 + ym1=REAL(yPAM) !EM GCC4.7 + zm1=REAL(zPAM) !EM GCC4.7 do ip2=(ip1+1),nplanes !loop on planes - COPPIA 2 c$$$ print*,'(2) ip ',ip2 @@ -1999,9 +1999,9 @@ c $ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.) !(1) call xyz_PAM $ (icx2,icy2,is2,PFAdef,PFAdef,0.,0.,0.,0.) - xm2=xPAM - ym2=yPAM - zm2=zPAM + xm2=REAL(xPAM) !EM GCC4.7 + ym2=REAL(yPAM) !EM GCC4.7 + zm2=REAL(zPAM) !EM GCC4.7 * --------------------------------------------------- * both couples must have a y-cluster @@ -2042,7 +2042,7 @@ * tg(th_yz) alfayz2(ndblt)=(ym1-ym2)/(zm1-zm2) * y0 (cm) - alfayz1(ndblt)=alfayz2(ndblt)*(zini-zm1)+ym1 + alfayz1(ndblt)=alfayz2(ndblt)*(REAL(zini)-zm1)+ym1 ! EM GCC4.7 zm1, ym1 and alfayz1/2 are REAL **** -----------------------------------------------**** **** reject non phisical couples **** @@ -2105,9 +2105,9 @@ call xyz_PAM $ (icx3,icy3,is3,PFAdef,PFAdef $ ,0.,0.,0.,0.) - xm3=xPAM - ym3=yPAM - zm3=zPAM + xm3=REAL(xPAM) !EM GCC4.7 + ym3=REAL(yPAM) !EM GCC4.7 + zm3=REAL(zPAM) !EM GCC4.7 * find the circle passing through the three points @@ -2144,7 +2144,7 @@ DET=SZZ*S1-SZ*SZ AX=(SZX*S1-SZ*SSX)/DET BX=(SZZ*SSX-SZX*SZ)/DET - X0 = AX*ZINI+BX + X0 = AX*REAL(ZINI)+BX ! EM GCC4.7 endif @@ -2183,14 +2183,16 @@ if(radius.ne.0.and.xc.lt.0)then *************POSITIVE DEFLECTION - alfaxz1(ntrpt) = xc+sqrt(radius**2-(ZINI-zc)**2) - alfaxz2(ntrpt) = (ZINI-zc)/sqrt(radius**2-(ZINI-zc)**2) - alfaxz3(ntrpt) = 1/radius + alfaxz1(ntrpt) = xc+sqrt(radius**2-(REAL(ZINI)-zc)**2) !EM GCC4.7 + alfaxz2(ntrpt) = (REAL(ZINI)-zc)/ + $ sqrt(radius**2-(REAL(ZINI)-zc)**2) !EM GCC4.7 + alfaxz3(ntrpt) = 1/radius else if(radius.ne.0.and.xc.ge.0)then *************NEGATIVE DEFLECTION - alfaxz1(ntrpt) = xc-sqrt(radius**2-(ZINI-zc)**2) - alfaxz2(ntrpt) = -(ZINI-zc)/sqrt(radius**2-(ZINI-zc)**2) - alfaxz3(ntrpt) = -1/radius + alfaxz1(ntrpt) = xc-sqrt(radius**2-(REAL(ZINI)-zc)**2) + alfaxz2(ntrpt) = -(REAL(ZINI)-zc)/ + $ sqrt(radius**2-(REAL(ZINI)-zc)**2) !EM GCC4.7 + alfaxz3(ntrpt) = -1/radius else if(radius.eq.0)then *************straight fit alfaxz1(ntrpt) = X0 @@ -3104,7 +3106,7 @@ enddo enddo - RCHI2_STORE(ntracks)=chi2 + RCHI2_STORE(ntracks)=REAL(chi2) * -------------------------------- * STORE candidate TRACK INFO - end @@ -3172,6 +3174,12 @@ character*10 PFA common/FINALPFA/PFA + double precision xmm,rxmm,xmm_A,xmm_B !EM GCC4.7 + double precision ymm,rymm,ymm_A,ymm_B !EM GCC4.7 + double precision zmm,zmm_A,zmm_B !EM GCC4.7 + double precision clincnewc !EM GCC4.7 + double precision clincnew !EM GCC4.7 + real k(6) DATA k/1.099730,0.418900,0.220939,0.220907,0.418771,1.100674/ @@ -3390,8 +3398,8 @@ idm = id dedxmmx = sgnl(icx)/mip(VIEW(icx),LADDER(icx)) !(1)(2) dedxmmy = sgnl(icy)/mip(VIEW(icy),LADDER(icy)) !(1)(2) - clincnewc=10*sqrt(rymm**2+rxmm**2 - $ +RCHI2_STORE(ibest)*k(ip)*(cov(1,1)+cov(2,2))) + clincnewc=10.*dsqrt(rymm**2+rxmm**2 + $ +DBLE(RCHI2_STORE(ibest)*k(ip)*(cov(1,1)+cov(2,2)))) ! EM GCC4.7 endif 1188 continue enddo !end loop on couples on plane icp @@ -3559,12 +3567,14 @@ if(iclm.ne.0)then if(mod(VIEW(iclm),2).eq.0)then clincnew= - $ 20* - $ sqrt(rxmm**2+RCHI2_STORE(ibest)*k(ip)*cov(1,1)) + $ 20.* !EM GCC4.7 + $ dsqrt(rxmm**2 + + $ DBLE(RCHI2_STORE(ibest)*k(ip))*cov(1,1)) else if(mod(VIEW(iclm),2).ne.0)then clincnew= - $ 10* - $ sqrt(rymm**2+RCHI2_STORE(ibest)*k(ip)*cov(2,2)) + $ 10.* !EM GCC4.7 + $ dsqrt(rymm**2 + + $ DBLE(RCHI2_STORE(ibest)*k(ip))*cov(2,2)) endif if(distmin.le.clincnew)then @@ -3813,7 +3823,7 @@ character*10 PFA common/FINALPFA/PFA - real sinth,phi,pig + real sinth,phi,pig, npig ! EM GCC4.7 integer ssensor,sladder pig=acos(-1.) @@ -3823,8 +3833,8 @@ chi2_nt(ntr) = sngl(chi2) nstep_nt(ntr) = nstep * ------------------------------------- - phi = al(4) - sinth = al(3) + phi = REAL(al(4)) + sinth = REAL(al(3)) if(sinth.lt.0)then sinth = -sinth phi = phi + pig @@ -3903,10 +3913,11 @@ C cltrx(ip,ntr) = 0 cltry(ip,ntr) = 0 - if( - $ xgood_nt(ip,ntr).eq.1.and.ygood_nt(ip,ntr).eq.1 - $ .and. - $ id.ne.0)then +c$$$ if( +c$$$ $ xgood_nt(ip,ntr).eq.1.and.ygood_nt(ip,ntr).eq.1 +c$$$ $ .and. +c$$$ $ id.ne.0)then + if(id.ne.0)then !patch 30/12/09 c >>> is a couple cltrx(ip,ntr) = clx(nplanes-ip+1,icp_cp(id)) @@ -3946,7 +3957,9 @@ ypu(ip,ntr) = corr endif - elseif(icl.ne.0)then +c$$$ elseif(icl.ne.0)then + endif !patch 30/12/09 + if(icl.ne.0)then !patch 30/12/09 cl_used(icl) = 1 !tag used clusters @@ -4044,8 +4057,8 @@ do is=1,2 c call xyz_PAM(icl,0,is,'COG1',' ',0.,0.) c call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.) - call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.,0.,0.) - xs(is,nclsx) = (xPAM_A+xPAM_B)/2 + call xyz_PAM(icl,0,is,PFAdef,' ',0.,0.,0.,0.) + xs(is,nclsx) = REAL((xPAM_A+xPAM_B)/2.) ! EM GCC4.7 enddo else !=== Y views nclsy = nclsy + 1 @@ -4060,8 +4073,8 @@ do is=1,2 c call xyz_PAM(0,icl,is,' ','COG1',0.,0.) c call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.) - call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.,0.,0.) - ys(is,nclsy) = (yPAM_A+yPAM_B)/2 + call xyz_PAM(0,icl,is,' ',PFAdef,0.,0.,0.,0.) + ys(is,nclsy) = REAL((yPAM_A+yPAM_B)/2.) ! EM GCC4.7 enddo endif endif