--- DarthVader/TrackerLevel2/src/F77/functionspfa.f 2013/03/12 11:02:02 1.27 +++ DarthVader/TrackerLevel2/src/F77/functionspfa.f 2014/01/16 15:29:54 1.28 @@ -57,7 +57,8 @@ subroutine idtoc(ipfa,cpfa) integer ipfa - character*10 cpfa +c character*10 cpfa + character*4 cpfa ! EM GCC4.7 CPFA='COG4' if(ipfa.eq.0)CPFA='ETA' @@ -74,8 +75,9 @@ end *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** real function effectiveangle(ang,iview,bbb) - + include 'commontracker.f' + real tgtemp effectiveangle = 0. @@ -89,7 +91,7 @@ if(iview.eq.12) angx = -1. * ang if(iview.eq.12) by = -1. * bbb cc tgtemp = tan(ang*acos(-1.)/180.) + pmuH_h*by*0.00001 !ORRORE!! - tgtemp = tan(angx*acos(-1.)/180.) + pmuH_h*by*0.00001 + tgtemp = tan(angx*acos(-1.)/180.) + REAL(pmuH_h*by*0.00001) ! EM GCC4.7 pmuH_h is double precision but all the others are real... elseif(mod(iview,2).eq.1)then c ================================================= @@ -98,7 +100,7 @@ c here bbb is the x component of the m.filed angy = ang bx = bbb - tgtemp = tan(angy*acos(-1.)/180.)+pmuH_e*bx*0.00001 + tgtemp = tan(angy*acos(-1.)/180.)+real(pmuH_e*bx*0.00001) ! EM GCC4.7 pmuH_h is double precision but all the others are real... endif effectiveangle = 180.*atan(tgtemp)/acos(-1.) @@ -120,7 +122,7 @@ c here bbb is the y component of the m.field by = bbb if(iview.eq.12) by = -1. * bbb - fieldcorr = -1. * 0.5*pmuH_h*by*0.00001*SiDimZ/pitchX + fieldcorr = -1. * 0.5*REAL(pmuH_h*by*0.00001*SiDimZ/pitchX) ! EM GCC4.7 pmuH_h is double precision but all the others are real... elseif(mod(iview,2).eq.1)then c ================================================= @@ -128,7 +130,7 @@ c ================================================= c here bbb is the x component of the m.filed bx = bbb - fieldcorr = 0.5*pmuH_e*bx*0.00001*SiDimZ/pitchY + fieldcorr = 0.5*real(pmuH_e*bx*0.00001*SiDimZ/pitchY) ! EM GCC4.7 pmuH_h is double precision but all the others are real... endif @@ -147,9 +149,9 @@ character*4 PFAtt include 'commontracker.f' include 'level1.f' - - corr = 0 - res = 0 + real corr, res ! EM GCC4.7 + corr = 0. + res = 0. if(ic.le.0)return @@ -164,8 +166,8 @@ if(PFAtt.eq.'COG1')then - corr = 0 - res = 1e-4*pitchX/sqrt(12.)!!res + corr = 0. + res = REAL(1e-4*pitchX/sqrt(12.))!!res EM GCC4.7 elseif(PFAtt.eq.'COG2')then @@ -233,7 +235,7 @@ if( nsatstrips(ic).gt.0 )then c corr = cog(4,ic) corr = digsat(ic) - res = pitchX*1e-4/sqrt(12.) + res = REAL(pitchX*1e-4/sqrt(12.)) !EM GCC4.7 cc cc=cog(4,ic) c$$$ print*,ic,' *** ',cc c$$$ print*,ic,' *** ',res @@ -250,7 +252,7 @@ if(PFAtt.eq.'COG1')then corr = 0 - res = 1e-4*pitchY/sqrt(12.)!res + res = REAL(1e-4*pitchY/sqrt(12.))!res EM GCC4.7 elseif(PFAtt.eq.'COG2')then @@ -316,7 +318,7 @@ if( nsatstrips(ic).gt.0 )then c corr = cog(4,ic) corr = digsat(ic) - res = pitchY*1e-4/sqrt(12.) + res = REAL(pitchY*1e-4/sqrt(12.)) ! EM GCC4.7 cc cc=cog(4,ic) c$$$ print*,ic,' *** ',cc c$$$ print*,ic,' *** ',res @@ -530,7 +532,7 @@ include 'level1.f' include 'calib.f' - riseta = 0 + riseta = 0. c if(mod(int(VIEW(ic)),2).eq.1)then !Y-view if(mod(iview,2).eq.1)then !Y-view @@ -1135,8 +1137,8 @@ * ========================= iv=VIEW(ic) - if(mod(iv,2).eq.1)incut=incuty - if(mod(iv,2).eq.0)incut=incutx + if(mod(iv,2).eq.1)incut=NINT(incuty) ! incut is implicitly INTEGER, incuty is REAL + if(mod(iv,2).eq.0)incut=NINT(incutx) ! incut is implicitly INTEGER, incutx is REAL istart = INDSTART(IC) istop = TOTCLLENGTH if(ic.lt.NCLSTR1)istop=INDSTART(IC+1)-1 @@ -1221,11 +1223,11 @@ if(mod(int(VIEW(ic)),2).eq.1)then !Y-view si = 8.4 !average good-strip noise f = 4. !average bad-strip noise: f*si - incut=incuty + incut=NINT(incuty) else !X-view si = 3.9 !average good-strip noise f = 6. !average bad-strip noise: f*si - incut=incutx + incut=NINT(incutx) endif fbad_cog = 1. @@ -1410,11 +1412,11 @@ include 'calib.f' if(mod(int(VIEW(ic)),2).eq.1)then !Y-view - incut = incuty - pitch = pitchY / 1.e4 + incut = NINT(incuty) ! EM GCC4.7 + pitch = REAL(pitchY / 1.e4) else !X-view - incut = incutx - pitch = pitchX / 1.e4 + incut = NINT(incutx) ! EM GCC4.7 + pitch = REAL(pitchX / 1.e4) endif func = 100000. @@ -1605,7 +1607,7 @@ if(mod(int(iview),2).eq.1)then !Y-view - pitch = pitchY / 1.e4 + pitch = REAL(pitchY / 1.e4) !EM GCC 4.7 if(ncog.eq.0)then if( abs(angle).ge.e2fay.and.abs(angle).le.e2tay )then @@ -1622,7 +1624,7 @@ else !X-view - pitch = pitchX / 1.e4 + pitch = REAL(pitchX / 1.e4) ! EM GCC4.7 if(ncog.eq.0)then if( abs(angle).ge.e2fax.and.abs(angle).le.e2tax )then @@ -1741,6 +1743,7 @@ FUNCTION risxeta2(x) + DOUBLE PRECISION HQUADF ! EM GCC4.7 DOUBLE PRECISION V( 1) INTEGER NPAR, NDIM, IMQFUN, I, J DOUBLE PRECISION HQDJ, VV, VCONST @@ -1826,12 +1829,13 @@ 20 CONTINUE IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) - risxeta2=HQUADF* 1e-4 + risxeta2=REAL(HQUADF* 1e-4) ! EM GCC4.7 all computation here are done in double precision but the function returns REAL since it is undefined and it is used in the code in single precision variables END *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** FUNCTION risxeta3(x) + DOUBLE PRECISION HQUADF ! EM GCC4.7 DOUBLE PRECISION V( 1) INTEGER NPAR, NDIM, IMQFUN, I, J DOUBLE PRECISION HQDJ, VV, VCONST @@ -1917,11 +1921,12 @@ 20 CONTINUE IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) - risxeta3 = HQUADF* 1e-4 + risxeta3 = REAL(HQUADF* 1e-4) ! EM GCC4.7 all computation here are done in double precision but the function returns REAL since it is undefined and it is used in the code in single precision variables END *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** FUNCTION risxeta4(x) + DOUBLE PRECISION HQUADF ! EM GCC4.7 DOUBLE PRECISION V( 1) INTEGER NPAR, NDIM, IMQFUN, I, J DOUBLE PRECISION HQDJ, VV, VCONST @@ -2007,11 +2012,12 @@ 20 CONTINUE IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) - risxeta4=HQUADF* 1e-4 + risxeta4=REAL(HQUADF* 1e-4) ! EM GCC4.7 all computation here are done in double precision but the function returns REAL since it is undefined and it is used in the code in single precision variables END *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** FUNCTION risyeta2(x) + DOUBLE PRECISION HQUADF ! EM GCC4.7 DOUBLE PRECISION V( 1) INTEGER NPAR, NDIM, IMQFUN, I, J DOUBLE PRECISION HQDJ, VV, VCONST @@ -2079,12 +2085,13 @@ 20 CONTINUE IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) - risyeta2=HQUADF* 1e-4 + risyeta2=REAL(HQUADF* 1e-4) ! EM GCC4.7 all computation here are done in double precision but the function returns REAL since it is undefined and it is used in the code in single precision variables END *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** FUNCTION risy_cog(x) + DOUBLE PRECISION HQUADF ! EM GCC4.7 DOUBLE PRECISION V( 1) INTEGER NPAR, NDIM, IMQFUN, I, J DOUBLE PRECISION HQDJ, VV, VCONST @@ -2146,11 +2153,12 @@ 20 CONTINUE IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) - risy_cog=HQUADF* 1e-4 + risy_cog=REAL(HQUADF* 1e-4) ! EM GCC4.7 all computation here are done in double precision but the function returns REAL since it is undefined and it is used in the code in single precision variables END *** * * * *** * * * *** * * * *** * * * *** * * * *** * * * *** FUNCTION risx_cog(x) + DOUBLE PRECISION HQUADF ! EM GCC4.7 DOUBLE PRECISION V( 1) INTEGER NPAR, NDIM, IMQFUN, I, J DOUBLE PRECISION HQDJ, VV, VCONST @@ -2227,7 +2235,7 @@ 20 CONTINUE IF (IMQFUN .EQ. 2) HQUADF = VCONST * EXP (HQUADF) - risx_cog = HQUADF * 1e-4 + risx_cog = REAL(HQUADF * 1e-4) ! EM GCC4.7 all computation here are done in double precision but the function returns REAL since it is undefined and it is used in the code in single precision variables END