diff --git a/brem.f b/brem.f index 018f5fc4..b3a5b6eb 100644 --- a/brem.f +++ b/brem.f @@ -61,19 +61,19 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! direct initial electron - aprod= 1.d0 + aprod= 1.e0 bei= aprod*(-1./(2.*pi))*log(ak/de) dbei= aprod*(1./(2.*pi*de)) ! direct final electron - aprod= 1.d0 + aprod= 1.e0 bef= aprod*(-1./(2.*pi))*log(akp/de) dbef= aprod*(1./(2.*pi*de)) ! e-e interference - aprod= -1.d0 + aprod= -1.e0 adot= ak*akp*(1.-cos(eang)) alpha= 2.*ame**2-2.*adot ar1= 0.5+sqrt(adot**2-ame**4)/alpha @@ -89,19 +89,19 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! initial p direct - aprod= 1.d0 + aprod= 1.e0 bpi= aprod*(-1./(2.*pi))*log(am/de) dbpi= aprod*(1./(2.*pi*de)) ! final p direct - aprod= 1.d0 + aprod= 1.e0 bpf= aprod*(-1./(2.*pi))*log(ape/de) dbpf= aprod*(1/(2.*pi*de)) ! p-p interference - aprod= -1.d0 + aprod= -1.e0 adot= am*ape alpha= 2.*am**2-2.*adot ar1= 0.5+sqrt(adot**2-am**4)/alpha @@ -113,7 +113,7 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! ei-pi interference - aprod= -1.d0 + aprod= -1.e0 adot= ak*am alpha= am**2+ame**2-2.*adot ar1= (am**2-adot+sqrt(adot**2-(ame*am)**2))/alpha @@ -125,7 +125,7 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! ef-pf interference - aprod= -1.d0 + aprod= -1.e0 adot= akp*ape-akp*ap*cos(eang+pang) alpha= am**2+ame**2-2.*adot ar1= (am**2-adot+sqrt(adot**2-(ame*am)**2))/alpha @@ -137,7 +137,7 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! ei-pf interference - aprod= 1.d0 + aprod= 1.e0 adot= ak*ape-ak*ap*cos(pang) alpha= am**2+ame**2-2.*adot ar1= (am**2-adot+sqrt(adot**2-(ame*am)**2))/alpha @@ -149,7 +149,7 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! ef-pi interference - aprod= 1.d0 + aprod= 1.e0 adot= akp*am alpha= am**2+ame**2-2.*adot ar1= (am**2-adot+sqrt(adot**2-(ame*am)**2))/alpha @@ -189,7 +189,7 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) write(6,*)' bzz= ',bzz write(6,*)' bhard= ',bhard write(6,*)' total= ',bsoft+bhard - write(6,*)' exp= ',1.-dexp(-1.*(bsoft))*(1.-bhard) + write(6,*)' exp= ',1.-exp(-1.*(bsoft))*(1.-bhard) write(6,*)' ' write(6,*)' ultra-relativistic limit' call srad(ak,akp,eang,q2,ame,am,ap,de,produce_output) @@ -204,7 +204,7 @@ real*8 function brem(ein,eout,egamma,radiate_proton,bsoft,bhard,dbsoft) ! ......... the derivative has dimension 1/[energy] --> convert back to MeV dbsoft = dbsoft/1000. if (exponentiate) then - brem = -dbsoft/dexp(bsoft) + brem = -dbsoft/exp(bsoft) else brem = 1.-dbsoft endif @@ -293,7 +293,7 @@ real*8 function spence(ax) real*8 ax,bx - bx= dabs(ax) + bx= abs(ax) ! ... N.B. Have replaced the former calculation (commented out) with an ! ... approximate expression -- saves a WHALE of CPU! @@ -409,10 +409,10 @@ real*8 function bremos(egamma, ! photon energy p_i%e = mp ! ... check energy-momentum conservation -! e_check= dabs(k_f%e+p_f%e-k_i%e-p_i%e) -! x_check= dabs(k_f%x+p_f%x-k_i%x-p_i%x) -! y_check= dabs(k_f%y+p_f%y-k_i%y-p_i%y) -! z_check= dabs(k_f%z+p_f%z-k_i%z-p_i%z) +! e_check= abs(k_f%e+p_f%e-k_i%e-p_i%e) +! x_check= abs(k_f%x+p_f%x-k_i%x-p_i%x) +! y_check= abs(k_f%y+p_f%y-k_i%y-p_i%y) +! z_check= abs(k_f%z+p_f%z-k_i%z-p_i%z) ! ! if((e_check.gt.0.0001).or.(x_check.gt.0.0001).or. ! + (y_check.gt.0.0001).or.(z_check.gt.0.0001)) then @@ -433,17 +433,17 @@ real*8 function bremos(egamma, ! photon energy ! ... electron terms ! ........ direct initial electron - aprod= 1.d0 + aprod= 1.e0 bei= aprod*(-1./twopi)*log(k_i%e/de) dbei= aprod*(-1./twopi)*(-1./de) ! ........ direct final electron - aprod= 1.d0 + aprod= 1.e0 bef= aprod*(-1./twopi)*log(k_f%e/de) dbef= aprod*(-1./twopi)*(-1./de) ! ........ e-e interference - aprod= -1.d0 + aprod= -1.e0 adot= k_i%e*k_f%e-k_i%x*k_f%x-k_i%y*k_f%y-k_i%z*k_f%z alpha= 2.*ame**2-2.*adot ar1= 0.5+sqrt(4.*adot**2-4.*ame**4)/(2.*alpha) @@ -457,17 +457,17 @@ real*8 function bremos(egamma, ! photon energy if (radiate_proton) then ! ........ initial p direct - aprod= 1.d0 + aprod= 1.e0 bpi= aprod*(-1./twopi)*log(p_i%e/de) dbpi= aprod*(-1./twopi)*(-1./de) ! ........ final p direct - aprod= 1.d0 + aprod= 1.e0 bpf= aprod*(-1./twopi)*log(p_f%e/de) dbpf= aprod*(-1./twopi)*(-1./de) ! ........ p-p interference - aprod= -1.d0 + aprod= -1.e0 adot= p_i%e*p_f%e-p_i%x*p_f%x-p_i%y*p_f%y-p_i%z*p_f%z alpha= ami**2+amf**2-2.*adot ar1= (2.*amf**2-2.*adot+sqrt(4.*adot**2-4.*(ami*amf)**2))/(2.*alpha) @@ -477,7 +477,7 @@ real*8 function bremos(egamma, ! photon energy if (produce_output) write(6,*) ar1,ar2 ! ........ ei-pi interference - aprod= -1.d0 + aprod= -1.e0 adot= k_i%e*p_i%e-k_i%x*p_i%x-k_i%y*p_i%y-k_i%z*p_i%z alpha= ami**2+ame**2-2.*adot ar1= (2.*ami**2-2.*adot+sqrt(4.*adot**2-4.*(ame*ami)**2))/(2.*alpha) @@ -487,7 +487,7 @@ real*8 function bremos(egamma, ! photon energy if (produce_output) write(6,*) ar1,ar2 ! ........ ef-pf interference - aprod= -1.d0 + aprod= -1.e0 adot= k_f%e*p_f%e-k_f%x*p_f%x-k_f%y*p_f%y-k_f%z*p_f%z alpha= amf**2+ame**2-2.*adot ar1= (2.*amf**2-2.*adot+sqrt(4.*adot**2-4.*(ame*amf)**2))/(2.*alpha) @@ -497,7 +497,7 @@ real*8 function bremos(egamma, ! photon energy if (produce_output) write(6,*) ar1,ar2 ! ........ ei-pf interference - aprod= 1.d0 + aprod= 1.e0 adot= k_i%e*p_f%e-k_i%x*p_f%x-k_i%y*p_f%y-k_i%z*p_f%z alpha= amf**2+ame**2-2.*adot ar1=(2.*amf**2-2.*adot+sqrt(4.*adot**2-4.*(ame*amf)**2))/(2.*alpha) @@ -507,7 +507,7 @@ real*8 function bremos(egamma, ! photon energy if (produce_output) write(6,*) ar1,ar2 ! ........ ef-pi interference - aprod= 1.d0 + aprod= 1.e0 adot= k_f%e*p_i%e-k_f%x*p_i%x-k_f%y*p_i%y-k_f%z*p_i%z alpha= ami**2+ame**2-2.*adot ar1=(2.*ami**2-2.*adot+sqrt(4.*adot**2-4.*(ame*ami)**2))/(2.*alpha) @@ -548,11 +548,11 @@ real*8 function bremos(egamma, ! photon energy write(6,*)' bzz= ',bzz write(6,*)' bhard= ',bhard write(6,*)' total= ',1-bsoft-bhard - write(6,*)' exp= ',dexp(-1.*(bsoft))*(1.-bhard) + write(6,*)' exp= ',exp(-1.*(bsoft))*(1.-bhard) write(6,*)' 1-bhard= ',1-bhard - write(6,*)' exps= ',dexp(-1.*(bsoft)) - write(6,*)' expse= ',dexp(-1.*b) - write(6,*)' expsp= ',dexp(-1.*(bz+bzz)) + write(6,*)' exps= ',exp(-1.*(bsoft)) + write(6,*)' expse= ',exp(-1.*b) + write(6,*)' expsp= ',exp(-1.*(bz+bzz)) write(6,*)' ' write(6,*)' Schwinger Result' bsch= 2.*e2/pi*((log(k_i%e/de)-13./12.)*(log(q2/ame**2)-1.)+17./36.) @@ -564,7 +564,7 @@ real*8 function bremos(egamma, ! photon energy ! ......... the derivative has dimension 1/[energy] --> convert back to MeV dbsoft = dbsoft/1000. !convert back to MeV if (exponentiate) then - bremos = -dbsoft/dexp(bsoft) + bremos = -dbsoft/exp(bsoft) else bremos = 1.-dbsoft endif diff --git a/dbase.f b/dbase.f index d8cd052d..59a8acfc 100644 --- a/dbase.f +++ b/dbase.f @@ -483,8 +483,8 @@ subroutine dbase_read(H) if (doing_pion .or. doing_kaon .or. doing_delta .or. > (cuts%Em%min.eq.cuts%Em%max) ) then - cuts%Em%min = -1.d6 - cuts%Em%max = 1.d6 + cuts%Em%min = -1.e6 + cuts%Em%max = 1.e6 endif if (abs(deForest_flag).gt.1) stop 'Idiot! check setting of deForest_flag' @@ -559,9 +559,9 @@ subroutine dbase_read(H) tmpfile='benharsf_12.dat' endif ! Choos proton or neutron spectral function based on targ.Mtar_struck - if (abs(targ%Mtar_struck-Mp).le.1.d-6) then + if (abs(targ%Mtar_struck-Mp).le.1.e-6) then call sf_lookup_init(tmpfile,.true.) !proton S.F. - else if (abs(targ%Mtar_struck-Mn).le.1.d-6) then + else if (abs(targ%Mtar_struck-Mn).le.1.e-6) then call sf_lookup_init(tmpfile,.false.) !neutron S.F. else write(6,*) 'targ%Mtar_struck = ',targ%Mtar_struck diff --git a/enerloss_new.f b/enerloss_new.f index 90a160c9..3cc875fc 100644 --- a/enerloss_new.f +++ b/enerloss_new.f @@ -21,12 +21,12 @@ subroutine enerloss_new(len,dens,zeff,aeff,epart,mpart,typeflag,Eloss) beta = sqrt(1.-1./gamma**2) if(zeff.eq.1) then !Ionization potential in MeV - I = 21.8d-06 + I = 21.8e-06 else - I = (16.*zeff**0.9)*1.0d-06 + I = (16.*zeff**0.9)*1.0e-06 endif - hnup = 28.816d-06*sqrt(dens*zeff/aeff) !plasma frequency + hnup = 28.816e-06*sqrt(dens*zeff/aeff) !plasma frequency log10bg = log(beta*gamma)/log(10.) CO=log(hnup)-log(I)+0.5 @@ -45,9 +45,9 @@ subroutine enerloss_new(len,dens,zeff,aeff,epart,mpart,typeflag,Eloss) if (thick.le.0.) then Eloss = 0. else - Eloss_mp = 0.1536d-03 * zeff/aeff * thick * ( 19.26 + + Eloss_mp = 0.1536e-03 * zeff/aeff * thick * ( 19.26 + & log(thick/dens) ) - Eloss_mp_new = 0.1536d-03 * zeff/aeff *thick/beta**2* ( + Eloss_mp_new = 0.1536e-03 * zeff/aeff *thick/beta**2* ( & log(me/I**2) + 1.063 + 2.*log(gamma*beta) + & log(0.1536*zeff/aeff*thick/beta**2)-beta**2-denscorr) c write(6,*) 'ELOSS',Eloss_mp,Eloss_mp_new @@ -56,7 +56,7 @@ subroutine enerloss_new(len,dens,zeff,aeff,epart,mpart,typeflag,Eloss) Eloss_mp = Eloss_mp_new*1000. chsi = 0.307075/2.*zeff/aeff*thick/beta**2 if(typeflag.eq.1)then - x=abs(gauss1(10.0d0)) + x=abs(gauss1(10.0e0)) elseif(typeflag.eq.2)then x=3 elseif(typeflag.eq.3)then diff --git a/init.f b/init.f index 0ab20d95..080f9edd 100644 --- a/init.f +++ b/init.f @@ -12,7 +12,7 @@ subroutine target_init(using_Eloss,using_Coulomb,the_cent,thp_cent, logical using_Eloss, using_Coulomb real*8 zero - parameter (zero=0.0d0) !double precision zero for subroutines calls. + parameter (zero=0.0e0) !double precision zero for subroutines calls. ! The radiation length of the target @@ -225,7 +225,7 @@ subroutine limits_init(H) > targ%Coulomb%max + dE_edge_test pp%min = (1.+SPedge%p%delta%min/100.)*spec%p%P - dE_edge_test pp%max = (1.+SPedge%p%delta%max/100.)*spec%p%P + dE_edge_test - pp%min = max(0.001d0,pp%min) !avoid p=0 (which can lead to div by zero)( + pp%min = max(0.001e0,pp%min) !avoid p=0 (which can lead to div by zero)( edge%p%E%min = sqrt(pp%min**2 + Mh2) edge%p%E%max = sqrt(pp%max**2 + Mh2) @@ -296,7 +296,7 @@ subroutine limits_init(H) slop%total%Em%used = slop_Ebeam + slop_Ee + slop_Ep + dE_edge_test edge%Em%min = cuts%Em%min - slop%total%Em%used edge%Em%max = cuts%Em%max + slop%total%Em%used - edge%Em%min = max(0.d0,edge%Em%min) + edge%Em%min = max(0.e0,edge%Em%min) endif ! Edges on Em, Pm, etc... VERTEXedge.* values are vertex limits. edge.* values @@ -460,7 +460,7 @@ subroutine limits_init(H) gen%sumEgen%min = gen%sumEgen%min - dE_edge_test gen%sumEgen%max = gen%sumEgen%max + dE_edge_test - gen%sumEgen%min = max(0.d0,gen%sumEgen%min) + gen%sumEgen%min = max(0.e0,gen%sumEgen%min) ! ... E arm GENERATION limits from sumEgen. ! ... Not used for doing_hyd_elast, but define for the hardwired histograms. @@ -524,9 +524,9 @@ subroutine limits_init(H) H%gen%p%yptar%bin = (gen%p%yptar%max-gen%p%yptar%min)/float(nHbins) H%gen%p%xptar%bin = (gen%p%xptar%max-gen%p%xptar%min)/float(nHbins) H%gen%Em%min = VERTEXedge%Em%min - H%gen%Em%bin = (max(100.d0,VERTEXedge%Em%max) - VERTEXedge%Em%min)/float(nHbins) + H%gen%Em%bin = (max(100.e0,VERTEXedge%Em%max) - VERTEXedge%Em%min)/float(nHbins) H%gen%Pm%min = VERTEXedge%Pm%min - H%gen%Pm%bin = (max(100.d0,VERTEXedge%Pm%max) - VERTEXedge%Pm%min)/float(nHbins) + H%gen%Pm%bin = (max(100.e0,VERTEXedge%Pm%max) - VERTEXedge%Pm%min)/float(nHbins) H%geni%e%delta%min = H%gen%e%delta%min H%geni%e%yptar%min = H%gen%e%yptar%min @@ -663,7 +663,7 @@ subroutine radc_init_ev (main,vertex) ! modifications to vertex.* variables in later calls. real*8 zero - parameter (zero=0.0d0) !double precision zero for subroutine calls. + parameter (zero=0.0e0) !double precision zero for subroutine calls. ! Compute some quantities that will be needed for rad corr on this event diff --git a/jacobians.f b/jacobians.f index c89cda12..f9c8e0dc 100644 --- a/jacobians.f +++ b/jacobians.f @@ -54,11 +54,11 @@ subroutine transform_to_cm(vertex,main, * f's and fer indicate fermi momenta, s, star or cm CM system tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z - if(tcos-1..gt.0..and.tcos-1..lt.1.d-8)tcos=1.0 + if(tcos-1..gt.0..and.tcos-1..lt.1.e-8)tcos=1.0 tsin=sqrt(1.-tcos**2) tfcos = pferx*vertex%uq%x+pfery*vertex%uq%y+pferz*vertex%uq%z - if(tfcos-1..gt.0..and.tfcos-1..lt.1.d-8)tfcos=1.0 + if(tfcos-1..gt.0..and.tfcos-1..lt.1.e-8)tfcos=1.0 tfsin=sqrt(1.-tfcos**2) cospq = cos(main%phi_pq) @@ -118,7 +118,7 @@ subroutine transform_to_cm(vertex,main, * DJG: Boost virtual photon to CM. - zero =0.d0 + zero =0.e0 call loren(gstar,bstarx,bstary,bstarz,vertex%nu, > zero,zero,vertex%q,nustar,qstarx,qstary,qstarz,qstar) diff --git a/last.kumac b/last.kumac deleted file mode 100644 index ae9df337..00000000 --- a/last.kumac +++ /dev/null @@ -1,3 +0,0 @@ -*** Begin of history file: Thu Jun 19 09:54:52 2008 -exit -*** End of history file: Thu Jun 19 09:54:54 2008 diff --git a/mt19937.f b/mt19937.f index b28ed168..d918ae89 100644 --- a/mt19937.f +++ b/mt19937.f @@ -154,9 +154,9 @@ double precision function grnd() y=ieor(y,ishft(y,-18)) if(y.lt.0) then - grnd=(dble(y)+2.0d0**32)/(2.0d0**32-1.0d0) + grnd=(dble(y)+2.0e0**32)/(2.0e0**32-1.0e0) else - grnd=dble(y)/(2.0d0**32-1.0d0) + grnd=dble(y)/(2.0e0**32-1.0e0) endif return diff --git a/physics_pion.f b/physics_pion.f index fd1bab8f..48b2bbe7 100644 --- a/physics_pion.f +++ b/physics_pion.f @@ -70,7 +70,7 @@ real*8 function peepi(vertex,main) * complete_ev where possible. WORSE YET, WE CHANGE UNITS OF MAIN.W,... HERE!!! tfcos = pferx*vertex%uq%x+pfery*vertex%uq%y+pferz*vertex%uq%z - if(tfcos-1..gt.0..and.tfcos-1..lt.1.d-8)tfcos=1.0 + if(tfcos-1..gt.0..and.tfcos-1..lt.1.e-8)tfcos=1.0 tfsin=sqrt(1.-tfcos**2) s = (vertex%nu+efer)**2-(vertex%q+pfer*tfcos)**2-(pfer*tfsin)**2 @@ -108,11 +108,11 @@ real*8 function peepi(vertex,main) * IF low_w_flag is set. * NOTE: s, t, mtar, and Q2 must be converted to GeV first. -c ntup.sigcm1 = sig_blok(thetacm,phicm,main%t/1.d6,vertex%q2/1.d6,s/1%d6,main.epsilon, +c ntup.sigcm1 = sig_blok(thetacm,phicm,main%t/1.e6,vertex%q2/1.e6,s/1%e6,main.epsilon, c > targ%Mtar_struck/1000.,which_pion) CDG Change default to PARAM04 - this works better at larger Q2 - ntup%sigcm1 = sig_param04(thetacm,phicm,main%t/1.d6,vertex%q2/1.d6,s/1.d6,main%epsilon, + ntup%sigcm1 = sig_param04(thetacm,phicm,main%t/1.e6,vertex%q2/1.e6,s/1.e6,main%epsilon, > targ%Mtar_struck/1000.,which_pion) sigma_eepi = ntup%sigcm1 @@ -120,8 +120,8 @@ real*8 function peepi(vertex,main) * For low w, use multipole expansion as default cross section model. if(low_w_flag) then - ntup%sigcm2 = sig_multipole(k_eq,efer,qstar,tfcos,ppicm,s/1.d6,thetacm, - > phicm,main%epsilon,final_state,vertex%q2/1.d6,targ%Mtar_struck/1000.,pfer,mh) + ntup%sigcm2 = sig_multipole(k_eq,efer,qstar,tfcos,ppicm,s/1.e6,thetacm, + > phicm,main%epsilon,final_state,vertex%q2/1.e6,targ%Mtar_struck/1000.,pfer,mh) sigma_eepi = ntup%sigcm2 endif @@ -346,7 +346,7 @@ real*8 function sig_multipole(nu,efer,qstar,tfcos,ppicm,s_gev,thetacm, !the four terms together. DJG sig219=(sigt+eps*sigl+eps*cos(2.*phicm)*sigtt - > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.d0 + > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.e0 * DJG: sig219 is dsig/dOmega_cm - convert to dsig/dtdphi_cm * DJG: using dt/dcos_cm = 2*ppicm*qcm @@ -415,7 +415,7 @@ real*8 function sig_blok(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion) sigtt=sigtt/(0.3+q2_gev) sig219=(sigt+eps*sigl+eps*cos(2.*phicm)*sigtt - > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.d0 + > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.e0 * GMH: Brauel scaled all his data to W=2.19 GeV, so rescale by 1/(W**2-mp**2)**2 * HPB: factor 15.333 therefore is value of (W**2-mp**2)**2 at W=2.19 @@ -466,7 +466,7 @@ real*8 function sig_param04(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion sig219=(sigt+eps*sigl+eps*cos(2.*phicm)*sigtt - > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.d0 + > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.e0 * GMH: Brauel scaled all his data to W=2.19 GeV, so rescale by 1/(W**2-mp**2)**2 * HPB: factor 15.333 therefore is value of (W**2-mp**2)**2 at W=2.19 diff --git a/physics_proton.f b/physics_proton.f index ff7c139a..152adeaf 100644 --- a/physics_proton.f +++ b/physics_proton.f @@ -80,9 +80,9 @@ real*8 function deForest(ev) if (sin_gamma.ne.0) cos_phi=(ev%uq%y*(ev%uq%y*ev%up%z-ev%uq%z*ev%up%y) > - ev%uq%x*(ev%uq%z*ev%up%x-ev%uq%x*ev%up%z)) > / sin_gamma / sqrt(1.-ev%uq%z**2) - if (abs(cos_phi).gt.1.) then !set to +/-1, warn if >1.d-10 + if (abs(cos_phi).gt.1.) then !set to +/-1, warn if >1.e-10 cos_phi = sign(1.0,cos_phi) - if ( (abs(cos_phi)-1.) .gt. 1.d-10) write(6,*) + if ( (abs(cos_phi)-1.) .gt. 1.e-10) write(6,*) > 'WARNING: deForest give cos_phi = ',cos_phi,' at event',nevent endif @@ -147,8 +147,8 @@ subroutine fofa_best_fit(qsquar,GE,GM) mu_p = 2.793 - Q2 = -qsquar*(hbarc**2.)*1.d-6 - Q = sqrt(max(Q2,0.d0)) + Q2 = -qsquar*(hbarc**2.)*1.e-6 + Q = sqrt(max(Q2,0.e0)) Q3 = Q**3. Q4 = Q**4. diff --git a/radc.f b/radc.f index 37775156..77b03196 100644 --- a/radc.f +++ b/radc.f @@ -82,7 +82,7 @@ subroutine basicrad(itail,Egamma_lo,Egamma_hi,Egamma,weight,val_reciprocal) ! in full BASICRAD prescription weight = c(itail)/g(itail) * (power_hi-power_lo) - + if(itail.eq.4)itail=0 return end @@ -483,7 +483,7 @@ subroutine generate_rad(main,vertex,orig,success) ! ... adjust the e'/hadron momenta (if they radiated significantly) orig%e%E = vertex%e%E - Egamma_used(2) - if(orig%e%E.le.0d0) then + if(orig%e%E.le.0e0) then if (debug(4)) write(6,*)'gen_rad: Negative electron energy -failed' return endif @@ -538,7 +538,7 @@ real*8 function peaked_rad_weight(vertex,Egamma, type(event):: vertex real*8 zero - parameter (zero=0.0d0) !double precision zero for subroutine calls + parameter (zero=0.0e0) !double precision zero for subroutine calls basicrad_val_reciprocal=basicrad_val_reciprocal+0. !avoid unused variable error ! Compute a more precise value for the radiative probability at the @@ -749,7 +749,7 @@ real*8 function spen(x) y = 1.0 s = 0.0 i = 0 - do while (i.le.100 .and. abs(y).gt.abs(s)*1.d-4) + do while (i.le.100 .and. abs(y).gt.abs(s)*1.e-4) i = i+1 y = x*y s = s+y/float(i**2) diff --git a/rho_decay.f b/rho_decay.f index f6bcee8f..48c0be19 100644 --- a/rho_decay.f +++ b/rho_decay.f @@ -38,7 +38,7 @@ subroutine rho_decay(orig,p_spec,epsilon,success) logical success - parameter (ctaurho=1.31467d-13) + parameter (ctaurho=1.31467e-13) C ============================= Executable Code ================================ C Calulate R = sigmaL/sigmaT diff --git a/rho_physics.f b/rho_physics.f index d07701f8..1f77b397 100644 --- a/rho_physics.f +++ b/rho_physics.f @@ -96,11 +96,11 @@ real*8 function peerho(vertex,main) * f's and fer indicate fermi momenta, s, star or cm CM system tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z - if(tcos-1..gt.0..and.tcos-1..lt.1.d-8)tcos=1.0 + if(tcos-1..gt.0..and.tcos-1..lt.1.e-8)tcos=1.0 tsin=sqrt(1.-tcos**2) tfcos = pferx*vertex%uq%x+pfery*vertex%uq%y+pferz*vertex%uq%z - if(tfcos-1..gt.0..and.tfcos-1..lt.1.d-8)tfcos=1.0 + if(tfcos-1..gt.0..and.tfcos-1..lt.1.e-8)tfcos=1.0 tfsin=sqrt(1.-tfcos**2) epsi = 1./(1.+2*(1.+vertex%nu**2/vertex%Q2)*tan(vertex%e%theta/2.)**2) @@ -108,11 +108,11 @@ real*8 function peerho(vertex,main) s = (vertex%nu+efer)**2-(vertex%q+pfer*tfcos)**2-(pfer*tfsin)**2 nu = (s-(efer**2-pfer**2))/2./(efer-pfer*tfcos) !equiv pho energy(MeV) - s = s/1.d6 !CONVERT TO (GeV)**2 + s = s/1.e6 !CONVERT TO (GeV)**2 main%w = sqrt(s) t = vertex%Q2-Mrho2+2.*vertex%nu*vertex%p%E-2.*vertex%p%P*vertex%q*tcos - t = t/1.d6 !CONVERT TO (GeV/c)**2 + t = t/1.e6 !CONVERT TO (GeV/c)**2 main%t = t @@ -168,7 +168,7 @@ real*8 function peerho(vertex,main) * DJG: Boost virtual photon to CM. - zero =0.d0 + zero =0.e0 call loren(gstar,bstarx,bstary,bstarz,vertex%nu, > zero,zero,vertex%q,nustar,qstarx,qstary,qstarz,qstar) @@ -229,7 +229,7 @@ real*8 function peerho(vertex,main) ! DJG need tprime and tmin here ! DJG Need an overall minus sign since we calculate -t above. - tmin = -( ((-Q2_g-mrho2/1.d6-(targ%mtar_struck/1000.)**2+ + tmin = -( ((-Q2_g-mrho2/1.e6-(targ%mtar_struck/1000.)**2+ > (targ%mtar_struck/1000.)**2)/(2.*sqrt(s)))**2- > ((qstar-ppicm)/1000.)**2 ) @@ -257,7 +257,7 @@ real*8 function peerho(vertex,main) cdeltatau = hbarc/(sqrt(vertex%nu**2+vertex%Q2+mrho2)-vertex%nu) !in fm! if(cdeltatau.lt.2.0) then - brho = 4.4679 + 8.6106*dlog10(cdeltatau) + brho = 4.4679 + 8.6106*log10(cdeltatau) else brho = 7.0 endif diff --git a/semi_dilution.f b/semi_dilution.f index 510e1163..cd1a631e 100644 --- a/semi_dilution.f +++ b/semi_dilution.f @@ -87,7 +87,7 @@ real*8 function semi_dilution(vertex,main) first=.FALSE. endif - s = (2.*vertex%Ein*mp + mp**2)/1.d6 !convert to GeV2 + s = (2.*vertex%Ein*mp + mp**2)/1.e6 !convert to GeV2 xbj = vertex%Q2/2./mp/vertex%nu if(xbj.gt.1.0) then write(6,*) 'XBj is too large!', xbj @@ -97,9 +97,9 @@ real*8 function semi_dilution(vertex,main) C DJG convert some stuff to GeV - Q2gev = vertex%q2/1.d6 + Q2gev = vertex%q2/1.e6 Qgev = sqrt(Q2gev) - pt2gev = vertex%pt2/1.d6 + pt2gev = vertex%pt2/1.e6 C Get the PDFs ipart=1 @@ -252,7 +252,7 @@ real*8 function semi_dilution(vertex,main) c 1 *cos(vertex.theta_pq) -c sigma_eepiX = sigsemi*jacobian/1.d6 +c sigma_eepiX = sigsemi*jacobian/1.e6 c main.davejac = jacobian c ntup.sigcm = sighad diff --git a/semi_physics.f b/semi_physics.f index b0c08b9c..67241db5 100644 --- a/semi_physics.f +++ b/semi_physics.f @@ -124,7 +124,7 @@ real*8 function peepiX(vertex,vertex0,main,survivalprob,doing_cent) Epz = vertex0%ue%z*Eprime if(sigc_flag.eq.0) then ! binning in z kcent = vertex0%zhad - pt2 = sigc_kin_ind*1.d6 + pt2 = sigc_kin_ind*1.e6 zhad = 0.0 do i=1,sigc_nbin klo = sigc_kin_min+(i-1)*(sigc_kin_max-sigc_kin_min)/sigc_nbin @@ -139,9 +139,9 @@ real*8 function peepiX(vertex,vertex0,main,survivalprob,doing_cent) pt2 = 0.0 do i=1,sigc_nbin klo = sigc_kin_min+(i-1)*(sigc_kin_max-sigc_kin_min)/sigc_nbin - klo = klo*1.d6 + klo = klo*1.e6 khi = sigc_kin_min+i*(sigc_kin_max-sigc_kin_min)/sigc_nbin - khi = khi*1.d6 + khi = khi*1.e6 if(vertex%pt2.gt.klo .and. vertex%pt2.le.khi) then pt2 = klo + (khi-klo)/2. endif @@ -153,9 +153,9 @@ real*8 function peepiX(vertex,vertex0,main,survivalprob,doing_cent) write(6,*) 'Central Kinematics:' write(6,*) 'Ebeam (GeV):',Eb/1000 write(6,*) 'nu (GeV) :',nu/1000 - write(6,*) 'Q2 (GeV2) :',Q2/1d6 + write(6,*) 'Q2 (GeV2) :',Q2/1e6 if(sigc_flag.eq.0) then - write(6,*) 'Pt2 (GeV2) :',pt2/1d6 + write(6,*) 'Pt2 (GeV2) :',pt2/1e6 write(6,*) 'Binning in z from',sigc_kin_min, > 'to',sigc_kin_max elseif(sigc_flag.eq.1) then @@ -200,7 +200,7 @@ real*8 function peepiX(vertex,vertex0,main,survivalprob,doing_cent) cthpq = cos(vertex%theta_pq) endif - sx = (2.*Eb*mtar + mtar**2)/1.d6 !convert to GeV2 + sx = (2.*Eb*mtar + mtar**2)/1.e6 !convert to GeV2 if(do_fermi) then ! xbj = Q2/(2 P.q) xbj = Q2/2./(efer*nu - abs(pfer)*(pferx*qx + pfery*qy + pferz*qz)) if(.not.doing_cent) then @@ -222,9 +222,9 @@ real*8 function peepiX(vertex,vertex0,main,survivalprob,doing_cent) C DJG convert some stuff to GeV - Q2gev = Q2/1.d6 + Q2gev = Q2/1.e6 Qgev = sqrt(Q2gev) - pt2gev = pt2/1.d6 + pt2gev = pt2/1.e6 C Get the PDFs if(first) then @@ -424,8 +424,8 @@ real*8 function peepiX(vertex,vertex0,main,survivalprob,doing_cent) jacobian = 1./(nu/1000.)*2.*(phad/1000.)**2*cthpq -C The 1.d6 converts from microbarn/GeV^2 to microbarn/MeV^2 - sigma_eepiX = sigsemi*jacobian/1.d6 +C The 1.e6 converts from microbarn/GeV^2 to microbarn/MeV^2 + sigma_eepiX = sigsemi*jacobian/1.e6 * Note that there is an additional factor 'fac' included with the fermi-smeared cross diff --git a/sf_lookup.f b/sf_lookup.f index d6299ee2..7c97356c 100644 --- a/sf_lookup.f +++ b/sf_lookup.f @@ -184,7 +184,7 @@ subroutine sf_lookup(Em,Pm,SF) logsf=(sf1 + (Em-Em1)*(sf2-sf1)/(Em2-Em1)) SF=logsf - if (SF.lt.1.d-20) SF=0 + if (SF.lt.1.e-20) SF=0 return end diff --git a/simc.f b/simc.f index 11d2ec53..9956cce4 100644 --- a/simc.f +++ b/simc.f @@ -36,7 +36,7 @@ program simc type(sums_twoarm):: sumerr, sumerr2, aveerr, resol real*8 one - parameter (one=1.0d0) !double precision 1 for subroutine calls + parameter (one=1.0e0) !double precision 1 for subroutine calls real*8 grnd real*8 ang_targ_earm,ang_targ_parm @@ -203,7 +203,7 @@ program simc if (mod(ntried,ninform).eq.1) then write (6,'(1x,a,i9,a,i8,a,e11.4)') 'Generating Event', > ntried, ' ... ', nevent,' successes so far - Monitor:', - > wtcontribute*luminosity/ntried + > wtcontribute*luminosity/ntried if (ntried.ge.5000) ninform = 20000 endif @@ -827,7 +827,7 @@ subroutine report(iun,timestring1,timestring2,central,contrib, write(iun,'(9x,a12,'' = '',2(f15.4,2x),2x,a5)') 'yptar', > central%e%yptar, central%p%yptar, 'mr' - write(iun,'(17x,a10,'' = '',f15.4,2x,a9)') 'Q2',central%Q2/1.d6,'(GeV/c)^2' + write(iun,'(17x,a10,'' = '',f15.4,2x,a9)') 'Q2',central%Q2/1.e6,'(GeV/c)^2' write(iun,'(17x,a10,'' = '',f15.4,2x,a9)') 'q', central%q, 'MeV/c' write(iun,'(17x,a10,'' = '',f15.4,2x,a9)') 'nu', > central%nu, 'MeV' @@ -917,7 +917,7 @@ subroutine report(iun,timestring1,timestring2,central,contrib, write(iun,'(12x,''Ncontribute = '',i10)') ncontribute write(iun,'(12x,''Nco_no_rad_prot= '',i10)') ncontribute_no_rad_proton write(iun,'(12x,''-> %no_rad_prot= '',f10.3)') - > (100.*ncontribute_no_rad_proton/max(dble(ncontribute),0.1d0)) + > (100.*ncontribute_no_rad_proton/max(dble(ncontribute),0.1e0)) write(iun,'(/1x,''INTEGRATED WEIGHTS (number of counts in delta/Em cuts!):'')') write(iun,'(1x,'' MeV: wtcontr= '',e16.8)') wtcontribute/nevent @@ -1068,7 +1068,7 @@ subroutine report(iun,timestring1,timestring2,central,contrib, > contrib%tru%p%yptar%lo*1000., contrib%tru%p%yptar%hi*1000.,'mr' write(iun,9917) 'P arm xptar', edge%p%xptar%min*1000., edge%p%xptar%max*1000., > contrib%tru%p%xptar%lo*1000., contrib%tru%p%xptar%hi*1000., 'mr' - write(iun,9917) 'Em', max(-999999.999d0,edge%Em%min), min(999999.999d0,edge%Em%max), + write(iun,9917) 'Em', max(-999999.999e0,edge%Em%min), min(999999.999e0,edge%Em%max), > contrib%tru%Em%lo, contrib%tru%Em%hi, 'MeV' write(iun,9917) 'Pm', 0., 0., contrib%tru%Pm%lo, > contrib%tru%Pm%hi, 'MeV' @@ -1288,7 +1288,7 @@ subroutine calculate_central(central,vertex0) if(doing_semi) then write(6,*) 'central event' - write(6,*) 'Pt',sqrt(vertex0%pt2)/1.d3 + write(6,*) 'Pt',sqrt(vertex0%pt2)/1.e3 write(6,*) 'z', vertex0%zhad write(6,*) 'lab cross section (nb/Gev2/sr2)',central%sigcc*1000.0*1000.0*1000.0 endif @@ -1328,7 +1328,7 @@ subroutine montecarlo(orig,main,recon,success) real*8 zhadron real*8 zero - parameter (zero=0.0d0) !double precision zero for subroutine calls + parameter (zero=0.0e0) !double precision zero for subroutine calls ! Prepare the event for the Monte Carlo's and/or spectrometer cuts diff --git a/target.f b/target.f index 4be46829..8ee9b3fd 100644 --- a/target.f +++ b/target.f @@ -18,7 +18,7 @@ subroutine trip_thru_target (narm, zpos, energy, theta, Eloss, radlen, s_Al = 0.0 liquid = targ%Z.lt.2.4 - if (abs(zpos) .gt. (targ%length/2.+1.d-5)) then + if (abs(zpos) .gt. (targ%length/2.+1.e-5)) then write(6,*) 'call to trip_thru_target has |zpos| > targ.length/2.' write(6,*) 'could be numerical error, or could be error in target offset' write(6,*) 'zpos=',zpos,' targ%length/2.=',targ%length/2. @@ -273,7 +273,7 @@ subroutine extreme_trip_thru_target(ebeam, the, thp, pe, pp, z, m) logical liquid real*8 zero - parameter (zero=0.0d0) !double precision zero for subroutine calls + parameter (zero=0.0e0) !double precision zero for subroutine calls !Given limiting values for the electron/proton angles, the z-position in the !target, and beta for the proton, determine min and max losses in target (and @@ -477,9 +477,9 @@ subroutine extreme_trip_thru_target(ebeam, the, thp, pe, pp, z, m) ! Extreme multiple scattering. Use nominal beam energy rather than minimum ! (should be close enough) - call extreme_target_musc(ebeam,1.d0, + call extreme_target_musc(ebeam,1.e0, > targ%teff(1)%max,targ%musc_max(1),targ%musc_nsig_max) - call extreme_target_musc(pe%min,1.d0, + call extreme_target_musc(pe%min,1.e0, > targ%teff(2)%max,targ%musc_max(2),targ%musc_nsig_max) call extreme_target_musc(pp%min,betap%min, > targ%teff(3)%max,targ%musc_max(3),targ%musc_nsig_max) diff --git a/trg_track.f b/trg_track.f index b83a8e2b..a9a6935a 100644 --- a/trg_track.f +++ b/trg_track.f @@ -771,7 +771,7 @@ subroutine track_to_tgt(delta,y,dx,dy,frx,fry,mom,mass,ctheta, vel = abs(mom)/sqrt(mom**2+mass**2)*cc eng = sign(1.,mom)*sqrt(mom**2+mass**2) - mom_0 = mom/(1.d0+delta/100.d0) + mom_0 = mom/(1.e0+delta/100.e0) vT(1) = -fry + 100.*dx vT(2) = y + 100.*dy @@ -833,7 +833,7 @@ subroutine track_to_tgt(delta,y,dx,dy,frx,fry,mom,mass,ctheta, call mc_shms_recon(delta,dy,dx,y,xxd,arm) endif - mom = mom_0*(1.d0+delta/100.d0) + mom = mom_0*(1.e0+delta/100.e0) vel = abs(mom)/sqrt(mom**2+mass**2)*cc eng = sign(1.,mom)*sqrt(mom**2+mass**2)