From ae02f983e779bb70d47e1d1217d268b8e4d185c1 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Thu, 17 Apr 2014 14:05:13 -0600 Subject: [PATCH 01/15] omega v1.0 --- Makefile | 16 ++- NtupleInit.f | 80 +++++++----- constants.inc | 12 +- dbase.f | 129 ++++++++++++++++++- event.f | 321 ++++++++++++++++++++++++++++++++++++++---------- init.f | 31 +++-- radc.f | 4 +- results_write.f | 80 +++++++----- simc.f | 82 +++++++++++-- simulate.inc | 26 ++-- 10 files changed, 603 insertions(+), 178 deletions(-) diff --git a/Makefile b/Makefile index f0eef32e..606f0f18 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ simcdir = . #Csoft = /group/c-gep/jones/Linux_fc8/ ## U Regina SETUP FLAGS -#simcdir = . -#Csoft = /home/huberg/r2d2/simc/ +simcdir = . +Csoft = /home/huberg/r2d2/simc/ ## THE REST SHOULD BE OK WITHOUT MODIFICATION. @@ -34,8 +34,8 @@ C = $(simcdir)/calo/ OBJ1 = target.o brem.o gauss1.o NtupleInit.o NtupleClose.o enerloss_new.o OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o -OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o -OBJ4 = results_write.o event.o mt19937.o jacobians.o +OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o +OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o results_write.o event.o mt19937.o jacobians.o OBJ5 = $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o OBJ6 = $(A)rotate_haxis.o $(A)rotate_vaxis.o $(A)locforunt.o OBJ7 = $(H)mc_hms.o $(H)mc_hms_hut.o $(H)mc_hms_recon.o @@ -50,7 +50,9 @@ my_objs = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ my_deps = $(my_objs:.o=.d) MYOS := $(subst -,,$(shell uname)) -CERNLIBS = -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lmathlib +#CERNLIBS = -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lmathlib +# static version + CERNLIBS = -Wl,-static -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lkernlib -lmathlib -Wl,-dy #For use with gfortran compiler # -fno-automatic - all program storage treated as static @@ -67,7 +69,9 @@ ifeq ($(MYOS),Linux) FFLAGS= $(INCLUDES) $(FFLAGSA) FFLAG1=$(FFLAGS) -c OTHERLIBS = -L$(LIBROOT) -lctp \ - -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib + -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib64 +# 64 vs 32 bit +# -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib FC := gfortran F77 := gfortran endif diff --git a/NtupleInit.f b/NtupleInit.f index 6e1b2957..d6d995de 100644 --- a/NtupleInit.f +++ b/NtupleInit.f @@ -94,71 +94,87 @@ subroutine NtupleInit(filename) NtupleTag(m) = 'thetapq' ! 32 m = m+1 NtupleTag(m) = 'phipq' ! 33 - if (doing_pion .or. doing_kaon .or. doing_delta) then + if (doing_pion .or. doing_kaon .or. doing_eep .or. doing_eepx + > .or. doing_delta .or. doing_Xphasespace) then m = m+1 - NtupleTag(m) = 'missmass' ! 34 + NtupleTag(m) = 'thetacm' ! 34 m = m+1 - NtupleTag(m) = 'mmnuc' ! 35 + NtupleTag(m) = 'missmass' ! 35 m = m+1 - NtupleTag(m) = 'phad' ! 36 + NtupleTag(m) = 'mmnuc' ! 36 m = m+1 - NtupleTag(m) = 't' ! 37 + NtupleTag(m) = 'phad' ! 37 m = m+1 - NtupleTag(m) = 'pmpar' ! 38 + NtupleTag(m) = 't' ! 38 m = m+1 - NtupleTag(m) = 'pmper' ! 39 + NtupleTag(m) = 'pmpar' ! 39 m = m+1 - NtupleTag(m) = 'pmoop' ! 40 + NtupleTag(m) = 'pmper' ! 40 m = m+1 - NtupleTag(m) = 'fry' ! 41 !+y is up. + NtupleTag(m) = 'pmoop' ! 41 m = m+1 - NtupleTag(m) = 'radphot' ! 42 + NtupleTag(m) = 'fry' ! 42 !+y is up. + m = m+1 + NtupleTag(m) = 'radphot' ! 43 + m = m+1 + NtupleTag(m) = 'pfermi' ! 44 + m = m+1 + NtupleTag(m) = 'siglab' ! 45 m = m+1 - NtupleTag(m) = 'pfermi' ! 43 + NtupleTag(m) = 'sigcm' ! 46 m = m+1 - NtupleTag(m) = 'siglab' ! 44 + NtupleTag(m) = 'Weight' ! 47 m = m+1 - NtupleTag(m) = 'sigcm' ! 45 + NtupleTag(m) = 'decdist' ! 48 m = m+1 - NtupleTag(m) = 'Weight' ! 46 + NtupleTag(m) = 'Mhadron' ! 49 m = m+1 - NtupleTag(m) = 'decdist' ! 47 + NtupleTag(m) = 'pdotqhat' ! 50 m = m+1 - NtupleTag(m) = 'Mhadron' ! 48 + NtupleTag(m) = 'Q2i' ! 51 m = m+1 - NtupleTag(m) = 'pdotqhat' ! 49 + NtupleTag(m) = 'Wi' ! 52 m = m+1 - NtupleTag(m) = 'Q2i' ! 50 + NtupleTag(m) = 'ti' ! 53 m = m+1 - NtupleTag(m) = 'Wi' ! 51 + NtupleTag(m) = 'thetapqi' ! 54 m = m+1 - NtupleTag(m) = 'ti' ! 52 + NtupleTag(m) = 'phipqi' ! 55 m = m+1 - NtupleTag(m) = 'phipqi' ! 53 + NtupleTag(m) = 'thetacmi' ! 56 + m = m+1 + NtupleTag(m) = 'PMsigned' ! 57 if(using_tgt_field) then m = m+1 - NtupleTag(m) = 'th_tarq' ! 54 + NtupleTag(m) = 'th_tarq' ! 58 m = m+1 - NtupleTag(m) = 'phitarq' ! 55 + NtupleTag(m) = 'phitarq' ! 59 m = m+1 - NtupleTag(m) = 'beta' ! 56 + NtupleTag(m) = 'beta' ! 60 m = m+1 - NtupleTag(m) = 'phis' ! 57 + NtupleTag(m) = 'phis' ! 61 m = m+1 - NtupleTag(m) = 'phic' ! 58 + NtupleTag(m) = 'phic' ! 62 m = m+1 - NtupleTag(m) = 'betai' ! 59 + NtupleTag(m) = 'betai' ! 63 m = m+1 - NtupleTag(m) = 'phisi' ! 60 + NtupleTag(m) = 'phisi' ! 64 m = m+1 - NtupleTag(m) = 'phici' ! 61 + NtupleTag(m) = 'phici' ! 65 endif if (doing_kaon) then m = m+1 - NtupleTag(m) = 'saghai' ! 54 + NtupleTag(m) = 'saghai' ! 58 or 66 m = m+1 - NtupleTag(m) = 'factor' ! 55 - endif + NtupleTag(m) = 'factor' ! 59 or 67 + else if (doing _eepx.or.doing_Xphasespace) then + m = m+1 + NtupleTag(m) = 'thetamq' ! 58 or 66 + m = m+1 + NtupleTag(m) = 'phimq' ! 59 or 67 + m=m+1 + NtupleTag(m) = 'minus_u' ! 60 or 68 + endif else if (doing_semi.or.doing_rho) then m = m+1 NtupleTag(m) = 'missmass' ! 34 <- Wprime for semi-inclusive folks diff --git a/constants.inc b/constants.inc index 4b358e2f..cd4b628d 100644 --- a/constants.inc +++ b/constants.inc @@ -10,7 +10,8 @@ ! ... some physical constants real*8 Me, Me2, Mp, Mp2, Mn, Mn2, Mpi, Mpi2, Mpi0, Mpi02 - real*8 Mk, Mk2, Mrho, Mrho2,Md, Md2 + real*8 Meta, Meta2, Mk, Mk2, Mrho, Mrho2, MrhoW + real*8 Momega, Momega2, MomegaW, Md, Md2 real*8 Mlambda, Msigma0, Msigma_minus real*8 amu, hbarc, pi, twopi, alpha, alpi, degrad, euler parameter (Me=0.51099906) @@ -23,10 +24,17 @@ parameter (Mpi2=Mpi**2) parameter (Mpi0=134.9766) parameter (Mpi02=Mpi0**2) + parameter (Meta=547.75) + parameter (Meta2=Meta**2) parameter (Mk=493.677) parameter (Mk2=Mk**2) - parameter (Mrho=769.3) +c parameter (Mrho=769.3) + parameter (Mrho=775.5) !2006 PDG value parameter (Mrho2=Mrho**2) + parameter (MrhoW=149.4) !2006 PDG value + parameter (Momega=782.65) !2006 PDG value + parameter (Momega2=Momega**2) + parameter (MomegaW=8.49) !2006 PDG value parameter (Md=1875.613) parameter (Md2=Md**2) parameter (Mlambda=1115.68) diff --git a/dbase.f b/dbase.f index d8cd052d..31760e42 100644 --- a/dbase.f +++ b/dbase.f @@ -160,6 +160,15 @@ subroutine dbase_read(H) doing_hekaon = .false. endif + else if (doing_eepx) then + Mh=Mp + if (nint(targ%A).ge.2) + > write(6,*) 'WARNING: Eepx cross section model only set up for proton target!' + doing_hydeepx = (nint(targ%A).eq.1) + doing_deuteepx = (nint(targ%A).eq.2) + doing_heeepx = (nint(targ%A).ge.3) + doing_eep = .false. + else if (doing_delta) then Mh=Mp if (nint(targ%A).ge.2) @@ -172,7 +181,7 @@ subroutine dbase_read(H) else if (doing_semi) then if(doing_semipi) then Mh=Mpi - elseif(doing_semika) then + else if(doing_semika) then Mh=Mk endif doing_hydsemi = (nint(targ%A).eq.1) @@ -184,6 +193,13 @@ subroutine dbase_read(H) endif doing_eep=.false. + else if (doing_Xphasespace) then + Mh=Mp + doing_hydXphase = (nint(targ%A).eq.1) + doing_deutXphase = (nint(targ%A).eq.2) + doing_heXphase = (nint(targ%A).ge.3) + doing_eep=.false. + else if (doing_rho) then Mh = Mrho doing_hydrho = (nint(targ%A).eq.1) @@ -208,6 +224,7 @@ subroutine dbase_read(H) doing_pion=.false. !but doing_phsp is independent of others. doing_kaon=.false. doing_delta=.false. + doing_eepx=.false. doing_rho=.false. endif @@ -266,12 +283,49 @@ subroutine dbase_read(H) endif endif - ! ... set target/recoil masses. if (doing_eep) then !Strike proton, no 'recoil' particle targ%Mtar_struck = Mp targ%Mrec_struck = 0.0 sign_hadron=1.0 + + else if (doing_delta) then !Strike (and detect) proton, pion 'recoil' + targ%Mtar_struck = Mp + targ%Mrec_struck = Mpi + sign_hadron=1.0 + else if(doing_semi) then ! For now, just assuming proton mass + targ%Mtar_struck = Mp + targ%Mrec_struck = Mp !must have at LEAST a recoiling proton + !Probably more... + if(doing_deutsemi) then + targ%Mtar_struck = (Mp+Mn)/2.0 + targ%Mrec_struck = (Mp+Mn)/2.0 + endif + if(doing_hplus) then + sign_hadron=1.0 + endif + else if (doing_eepx) then !Strike (and detect) proton, pion 'recoil' + targ%Mtar_struck = Mp + +! gh NOT CLEAR TO ME THAT THE FOLLOWING IS APPROPRIATE FOR WIDE MESONS + sign_hadron=1.0 + if(Meepx.gt.130.0.and.Meepx.lt.140.0) then + targ%Mrec_struck = Mpi0 + which_eepx = 1 + else if(Meepx.gt.500.0.and.Meepx.lt.600.0) then + targ%Mrec_struck = Meta + which_eepx = 2 + else if(Meepx.gt.765.0.and.Meepx.lt.778.0) then + targ%Mrec_struck = Mrho + which_eepx = 3 + else if(Meepx.gt.778.0.and.Meepx.lt.790.0) then + targ%Mrec_struck = Momega + which_eepx = 4 + else + targ%Mrec_struck = Meepx + which_eepx = 5 + endif + else if (doing_delta) then !Strike (and detect) proton, pion 'recoil' targ%Mtar_struck = Mp targ%Mrec_struck = Mpi @@ -289,6 +343,14 @@ subroutine dbase_read(H) else sign_hadron=-1.0 endif + else if(doing_Xphasespace) then ! For now, just assuming proton mass + targ%Mtar_struck = Mp + targ%Mrec_struck = Mpi0 ! Recoiling particle will always be + ! at LEAST pi0 + if(doing_deutXphase) then ! placeholder for now + targ%Mtar_struck = (Mp+Mn)/2.0 + targ%Mrec_struck = (Mp+Mn)/2.0 + endif else if(doing_rho) then targ%Mtar_struck = Mp @@ -481,7 +543,7 @@ subroutine dbase_read(H) using_E_arm_montecarlo = spect_mode.ne.1 .and. spect_mode.ne.-1 using_P_arm_montecarlo = spect_mode.ne.1 .and. spect_mode.ne.-2 - if (doing_pion .or. doing_kaon .or. doing_delta .or. + if (doing_pion .or. doing_kaon .or. doing_delta .or. doing_eepx .or. > (cuts%Em%min.eq.cuts%Em%max) ) then cuts%Em%min = -1.d6 cuts%Em%max = 1.d6 @@ -655,7 +717,7 @@ subroutine dbase_read(H) else write(6,*) ' ****-------- H(e,e''pi-)X --------****' endif - elseif (doing_deutsemi) then + else if (doing_deutsemi) then if(doing_hplus) then write(6,*) ' ****-------- D(e,e''pi+)X --------****' else @@ -670,7 +732,7 @@ subroutine dbase_read(H) else write(6,*) ' ****-------- H(e,e''K-)X --------****' endif - elseif(doing_deutsemi) then + else if(doing_deutsemi) then if(doing_hplus) then write(6,*) ' ****-------- D(e,e''K+)X --------****' else @@ -681,6 +743,58 @@ subroutine dbase_read(H) stop 'I don''t have ANY idea what (e,e''m)X we''re doing!!!' endif + else if (doing_Xphasespace) then + if(doing_hydXphase) then + write(6,*) ' ****-------- H(e,e''p)X --------****' + else if (doing_deutXphase) then + write(6,*) ' ****-------- D(e,e''p)X --------****' + else if (doing_heXphase) then + write(6,*) ' ****-------- He(e,e''p)X --------****' + else + stop 'I don''t have ANY idea what (e,e''p)X we''re doing!!!' + endif + + else if (doing_eepx) then + if (doing_hydeepx) then + if(which_eepx.eq.1) then + write(6,*) ' ****-------- H(e,e''p)pi0 --------****' + else if(which_eepx.eq.2) then + write(6,*) ' ****-------- H(e,e''p)eta --------****' + else if(which_eepx.eq.3) then + write(6,*) ' ****-------- H(e,e''p)rho --------****' + else if(which_eepx.eq.4) then + write(6,*) ' ****-------- H(e,e''p)omega --------****' + else + write(6,*) ' ****-------- H(e,e''p)Mx --------****' + write(6,*) 'where Mx in MeV is', Meepx + endif + else if (doing_deuteepx) then + if(which_eepx.eq.1) then + write(6,*) ' ****-------- D(e,e''p)pi0 --------****' + else if(which_eepx.eq.2) then + write(6,*) ' ****-------- D(e,e''p)eta --------****' + else if(which_eepx.eq.3) then + write(6,*) ' ****-------- D(e,e''p)rho --------****' + else if(which_eepx.eq.4) then + write(6,*) ' ****-------- D(e,e''p)omega --------****' + else + write(6,*) ' ****-------- D(e,e''p)Mx --------****' + write(6,*) 'where Mx in MeV is', Meepx + endif + else if (doing_heeepx) then + if(which_eepx.eq.1) then + write(6,*) ' ****-------- A(e,e''p)pi0 --------****' + else if(which_eepx.eq.2) then + write(6,*) ' ****-------- A(e,e''p)eta --------****' + else if(which_eepx.eq.3) then + write(6,*) ' ****-------- A(e,e''p)rho --------****' + else if(which_eepx.eq.4) then + write(6,*) ' ****-------- A(e,e''p)omega --------****' + else + write(6,*) ' ****-------- A(e,e''p)Mx --------****' + write(6,*) 'where Mx in MeV is', Meepx + endif + endif else if (doing_delta) then if (doing_hyddelta) then write(6,*) ' ****-------- H(e,e''p)pi --------****' @@ -826,7 +940,7 @@ subroutine dbase_read(H) if (doing_phsp) write(6,*) '**WARNING: phsp option is not really implemented - buyer beware!!' if (doing_kaon .and. .not. doing_decay) write(6,*) 'NOTE: not doing decay, so a decay weight will be applied to WEIGHT' if (doing_semika .and. .not. doing_decay) write(6,*) 'NOTE: not doing decay, so a decay weight will be applied to WEIGHT' - if(doing_deutsemi.and.do_fermi) write(6,*) 'NOTE: Fermi motion enabled for semi-incusive production from deuterium' + if (doing_deutsemi.and.do_fermi) write(6,*) 'NOTE: Fermi motion enabled for semi-incusive production from deuterium' if (.not.using_rad) write(6,*) 'NOTE: Will NOT be applying radiative corrections' if (.not.using_E_arm_montecarlo) write(6,*) 'NOTE: Will NOT be running events through the E arm Monte Carlo' if (.not.using_P_arm_montecarlo) write(6,*) 'NOTE: Will NOT be running events through the P arm Monte Carlo' @@ -876,12 +990,15 @@ subroutine regallvars() ierr = regparmint('which_kaon',which_kaon,0) ierr = regparmint('doing_pion',doing_pion,0) ierr = regparmint('which_pion',which_pion,0) + ierr = regparmint('doing_eepx',doing_eepx,0) ierr = regparmint('doing_delta',doing_delta,0) ierr = regparmint('doing_semi', doing_semi,0) ierr = regparmint('doing_hplus', doing_hplus,1) ierr = regparmint('doing_rho',doing_rho,0) + ierr = regparmint('doing_Xphasespace',doing_Xphasespace,0) ierr = regparmint('doing_decay',doing_decay,0) ierr = regparmdouble('ctau',ctau,0) + ierr = regparmdouble('Meepx',Meepx,0) * DEBUG diff --git a/event.f b/event.f index 820c3885..dc82a6ed 100644 --- a/event.f +++ b/event.f @@ -1,16 +1,19 @@ subroutine limits_update(main,vertex,orig,recon,doing_deuterium, - > doing_pion,doing_kaon,doing_delta,doing_rho,contrib,slop) + > doing_pion,doing_kaon,doing_eepx,doing_delta,doing_rho,contrib, + > slop) implicit none include 'structures.inc' include 'radc.inc' + include 'constants.inc' type(event_main):: main type(event):: vertex, orig, recon type(contribtype):: contrib type(sloptype):: slop integer i - logical doing_deuterium, doing_pion, doing_kaon, doing_delta, doing_rho + logical doing_deuterium, doing_pion, doing_kaon, doing_eepx + logical doing_delta, doing_rho ! Update the "contribution limits" records @@ -118,7 +121,8 @@ subroutine generate(main,vertex,orig,success) real*8 m_spec !spectator (A-1) mass based on missing energy real*8 gauss1 logical success - real*8 grnd !random # generator. + real*8 grnd,rannum !random # generator. + real*4 rannum4 type(event_main):: main type(event):: vertex, orig @@ -209,9 +213,11 @@ subroutine generate(main,vertex,orig,success) ! doing_pion: generate electron energy and angles, hadron angles, p_fermi, Em. ! Solve for hadron momentum. ! doing_kaon: as doing_pion. +! doing_eepx: as doing_pion. added option to generate recoiling particle mass ! doing_delta: as doing_pion. ! doing_rho: as doing_pion. ! doing_semi: Generate electron E,yptar,xptar and hadron E, yptar,xptar +! doing_Xphasespace: Generate electron E,yptar,xptar and hadron E, yptar,xptar ! ! The above is summarized in the following table: ! @@ -255,35 +261,56 @@ subroutine generate(main,vertex,orig,success) ! over the energy conservation delta function: delta(E_D - E_p - E_n - Em). ! Generate Electron Angles (all cases): - vertex%e%yptar=gen%e%yptar%min+grnd()*(gen%e%yptar%max-gen%e%yptar%min) - vertex%e%xptar=gen%e%xptar%min+grnd()*(gen%e%xptar%max-gen%e%xptar%min) +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + vertex%e%yptar=gen%e%yptar%min+rannum*(gen%e%yptar%max-gen%e%yptar%min) +c vertex%e%yptar=gen%e%yptar%min+grnd()*(gen%e%yptar%max-gen%e%yptar%min) + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + vertex%e%xptar=gen%e%xptar%min+rannum*(gen%e%xptar%max-gen%e%xptar%min) +c vertex%e%xptar=gen%e%xptar%min+grnd()*(gen%e%xptar%max-gen%e%xptar%min) ! Generate Hadron Angles (all but H(e,e'p)): if (doing_deuterium.or.doing_heavy.or.doing_pion.or.doing_kaon - > .or.doing_delta.or.doing_semi) then - vertex%p%yptar=gen%p%yptar%min+grnd()* + > .or.doing_eepx.or.doing_delta.or.doing_semi + > .or.doing_Xphasespace) then +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + vertex%p%yptar=gen%p%yptar%min+rannum* +c vertex%p%yptar=gen%p%yptar%min+grnd()* > (gen%p%yptar%max-gen%p%yptar%min) - vertex%p%xptar=gen%p%xptar%min+grnd()* + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + vertex%p%xptar=gen%p%xptar%min+rannum* +c vertex%p%xptar=gen%p%xptar%min+grnd()* > (gen%p%xptar%max-gen%p%xptar%min) endif ! Generate Hadron Momentum (A(e,e'p) or semi-inclusive production). - if (doing_heavy .or. doing_semi) then + if (doing_heavy .or. doing_semi .or. doing_Xphasespace) then Emin = max(gen%p%E%min, gen%sumEgen%min - gen%e%E%max) Emax = min(gen%p%E%max, gen%sumEgen%max - gen%e%E%min) if (Emin.gt.Emax) goto 100 main%gen_weight=main%gen_weight*(Emax-Emin)/(gen%p%E%max-gen%p%E%min) - vertex%p%E = Emin + grnd()*(Emax-Emin) +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + vertex%p%E = Emin + rannum*(Emax-Emin) +c vertex%p%E = Emin + grnd()*(Emax-Emin) vertex%p%P = sqrt(vertex%p%E**2 - Mh2) vertex%p%delta = 100.*(vertex%p%P-spec%p%P)/spec%p%P endif ! Generate Electron Energy (all but hydrogen elastic) if (doing_deuterium.or.doing_heavy.or.doing_pion.or.doing_kaon - > .or.doing_delta.or.doing_rho.or.doing_semi) then + > .or.doing_eepx.or.doing_delta.or.doing_rho.or.doing_semi + > .or.doing_Xphasespace) then Emin=gen%e%E%min Emax=gen%e%E%max - if (doing_deuterium .or. doing_pion .or. doing_kaon .or. doing_delta .or. doing_rho) then + if (doing_deuterium .or. doing_pion .or. doing_kaon .or. doing_eepx .or. + > doing_delta .or. doing_rho) then Emin = max(Emin,gen%sumEgen%min) Emax = min(Emax,gen%sumEgen%max) else if (doing_heavy) then ! A(e,e'p) @@ -292,7 +319,11 @@ subroutine generate(main,vertex,orig,success) endif if (Emin.gt.Emax) goto 100 main%gen_weight=main%gen_weight*(Emax-Emin)/(gen%e%E%max-gen%e%E%min) - vertex%e%E = Emin + grnd()*(Emax-Emin) +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + vertex%e%E = Emin + rannum*(Emax-Emin) +c vertex%e%E = Emin + grnd()*(Emax-Emin) vertex%e%P = vertex%e%E vertex%e%delta = 100.*(vertex%e%P-spec%e%P)/spec%e%P endif !not (doing_hyd_elast) @@ -316,8 +347,9 @@ subroutine generate(main,vertex,orig,success) vertex%Em=0.0 efer=targ%Mtar_struck !used for pion/kaon xsec calcs. if(doing_deutpi.or.doing_hepi.or.doing_deutkaon.or.doing_hekaon.or. - > doing_deutdelta.or.doing_hedelta.or.doing_deutrho.or.doing_herho - > .or.doing_deutsemi)then + > doing_deuteepx.or.doing_heeepx.or.doing_deutdelta.or. + > doing_hedelta.or.doing_deutrho.or.doing_herho.or. + > doing_deutsemi.or.doing_deutXphase.or.doing_heXphase)then ranprob=grnd() ii=1 do while (ranprob.gt.mprob(ii) .and. ii.lt.nump) @@ -341,13 +373,15 @@ subroutine generate(main,vertex,orig,success) pfery=sin(ranth)*sin(ranph) pferz=cos(ranth) - if (doing_deutpi.or.doing_deutkaon.or.doing_deutdelta - > .or.doing_deutrho .or.doing_deutsemi) then !Em = binding energy + if (doing_deutpi.or.doing_deutkaon.or.doing_deuteepx.or. + > doing_deutdelta.or.doing_deutrho .or.doing_deutsemi.or. + > doing_deutXphase) then !Em = binding energy vertex%Em = Mp + Mn - targ%M m_spec = targ%M - targ%Mtar_struck + vertex%Em != Mn(Mp) for pi+(-) efer = targ%M - sqrt(m_spec**2+pfer**2) endif - if (doing_hepi .or. doing_hekaon .or. doing_hedelta .or. doing_herho) then + if (doing_hepi .or. doing_hekaon .or.doing_heeepx.or. + > doing_hedelta .or. doing_herho.or.doing_heXphase) then call generate_em(pfer,vertex%Em) !Generate Em m_spec = targ%M - targ%Mtar_struck + vertex%Em != M^*_{A-1} efer = targ%M - sqrt(m_spec**2+pfer**2) @@ -425,10 +459,12 @@ subroutine complete_ev(main,vertex,success) real*8 oop_x,oop_y real*8 krel,krelx,krely,krelz real*8 MM + real*8 pmx,pmy,pmz,pm,em real*8 Ehad2,E_rec real*8 W2 - real*8 grnd !random # generator. + real*8 grnd,rannum !random # generator. + real*4 rannum4 logical success type(event_main):: main @@ -560,7 +596,7 @@ subroutine complete_ev(main,vertex,success) main%jacobian = abs(main%jacobian) - elseif (doing_pion .or. doing_kaon .or. doing_delta) then + elseif (doing_pion .or. doing_kaon .or. doing_eepx.or. doing_delta) then c if (doing_rho) then c Mh = Mrho @@ -571,11 +607,39 @@ subroutine complete_ev(main,vertex,success) c write(6,*) 'rho mass is', Mh c endif - +! DJG If doing_eepx, generate the recoiling particle mass, i.e. for H(e,e'p)omega +! DJG for example. For now, check that the width is larger than 0.1 MeV + + if(doing_eepx) then + if (debug(4)) write(6,*)'comp_ev: at 6.5a',which_eepx + if (which_eepx.eq.3) then !rho +* the rho is very broad and so gets a formula with more restricted width +* even so, masses will be generated down to about 375 MeV +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + targ%Mrec_struck = Mrho + + > 0.5*MrhoW* + > tan((2.*rannum-1.)*atan(2.*450./MrhoW)) +c > tan((2.*grnd()-1.)*atan(2.*450./MrhoW)) +c > tan((2.*grnd()-1.)*atan(2.*500./MrhoW)) + else if (which_eepx.eq.4) then ! omega +* all other mesons get the standard formula +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + targ%Mrec_struck = Momega + + > 0.5*MomegaW*tan((2.*rannum-1.)*pi/2.) +c > 0.5*MomegaW*tan((2.*grnd()-1.)*pi/2.) + endif + if (debug(4)) write(6,*)'comp_ev: at 6.5b',targ%Mrec_struck + if(targ%Mrec_struck.le.0.0) return + endif vertex%Pm = pfer !vertex%Em generated at beginning. vertex%Mrec = targ%M - targ%Mtar_struck + vertex%Em - a = -1.*vertex%q*(vertex%uq%x*vertex%up%x+vertex%uq%y*vertex%up%y+vertex%uq%z*vertex%up%z) + a = -1.*vertex%q*(vertex%uq%x*vertex%up%x+ + > vertex%uq%y*vertex%up%y+vertex%uq%z*vertex%up%z) b = vertex%q**2 c = vertex%nu + targ%M @@ -586,8 +650,10 @@ subroutine complete_ev(main,vertex,success) ! acceptance. If the low momentum solution IS within the acceptance, we ! have big problems. if (doing_deutpi.or.doing_hepi.or.doing_deutkaon.or.doing_hekaon.or. - > doing_deutdelta.or.doing_hedelta) then - a = a - abs(pfer)*(pferx*vertex%up%x+pfery*vertex%up%y+pferz*vertex%up%z) + > doing_deuteepx.or.doing_heeepx.or.doing_deutdelta.or. + > doing_hedelta) then + a = a - abs(pfer)*(pferx*vertex%up%x+pfery*vertex%up%y+ + > pferz*vertex%up%z) b = b + pfer**2 + 2*vertex%q*abs(pfer)* > (pferx*vertex%uq%x+pfery*vertex%uq%y+pferz*vertex%uq%z) *** c = c - sqrt(vertex.Mrec**2+pfer**2) @@ -599,28 +665,30 @@ subroutine complete_ev(main,vertex,success) QB = 4.*c*t QC = -4.*a**2*Mh2 - t**2 -! write(6,*) ' ' -! write(6,*) ' ' -! write(6,*) 'E0=',vertex.Ein -! write(6,*) 'P_elec,P_prot=',vertex.e.P/1000.,vertex.p.P/1000. -! write(6,*) 'thetae,phie=',vertex.e.theta*180./pi,vertex.e.phi*180./pi -! write(6,*) 'thetap,phip=',vertex.p.theta*180./pi,vertex.p.phi*180./pi -! write(6,*) 'q,nu,costhetapq=',vertex.q,vertex.nu,(vertex.uq.x*vertex.up.x+vertex.uq.y*vertex.up.y+vertex.uq.z*vertex.up.z) -! write(6,*) 'a,b,c=',a/1000.,b/1000000.,c/1000. -! write(6,*) 't=',t/1000000. -! write(6,*) 'A,B,C=',QA/1.d6,QB/1.d9,QC/1.d12 -! write(6,*) 'rad=',QB**2 - 4.*QA*QC -! write(6,*) 'e1,e2=',(-QB-sqrt(radical))/2000./QA,(-QB+sqrt(radical))/2000./QA -! write(6,*) 'E_pi1,2=',vertex.nu+targ.M-(-QB-sqrt(radical))/2./QA, -! > vertex.nu+targ.M-(-QB+sqrt(radical))/2./QA - + if (debug(2)) then + write(6,*) ' ' + write(6,*) ' ' + write(6,*) 'E0=',vertex%Ein + write(6,*) 'P_elec,P_prot=',vertex%e%P/1000.,vertex%p%P/1000. + write(6,*) 'thetae,phie=',vertex%e%theta*180./pi,vertex%e%phi*180./pi + write(6,*) 'thetap,phip=',vertex%p%theta*180./pi,vertex%p%phi*180./pi + write(6,*) 'q,nu,costhetapq=',vertex%q,vertex%nu, + > (vertex%uq%x*vertex%up%x+vertex%uq%y*vertex%up%y+vertex%uq%z*vertex%up%z) + write(6,*) 'a,b,c=',a/1000.,b/1000000.,c/1000. + write(6,*) 't=',t/1000000. + write(6,*) 'A,B,C=',QA/1.d6,QB/1.d9,QC/1.d12 + write(6,*) 'rad=',QB**2 - 4.*QA*QC + write(6,*) 'e1,e2=',(-QB-sqrt(radical))/2000./QA,(-QB+sqrt(radical))/2000./QA + write(6,*) 'E_pi1,2=',vertex%nu+targ%M-(-QB-sqrt(radical))/2./QA, + > vertex%nu+targ%M-(-QB+sqrt(radical))/2./QA + endif radical = QB**2 - 4.*QA*QC if (radical.lt.0) return vertex%p%E = (-QB - sqrt(radical))/2./QA Ehad2 = (-QB + sqrt(radical))/2./QA - if (doing_delta) then !choose one of the two solutions. + if (doing_eepx .or. doing_delta) then !choose one of the two solutions. ! write(6,*) ' e1, e2=',vertex%p%E,Ehad2 if (grnd().gt.0.5) vertex%p%E = Ehad2 else !verify that 'backwards' soln. is no good. @@ -661,15 +729,26 @@ subroutine complete_ev(main,vertex,success) ! Compute some pion and kaon stuff. Some of these should be OK for proton too. - if (doing_pion .or. doing_kaon .or. doing_delta .or. doing_rho .or. doing_semi) then + if (doing_pion .or. doing_kaon .or. doing_eepx.or.doing_delta + > .or. doing_rho .or. doing_semi.or. doing_Xphasespace) then W2 = targ%Mtar_struck**2 + 2.*targ%Mtar_struck*vertex%nu - vertex%Q2 main%W = sqrt(abs(W2)) * W2/abs(W2) main%epsilon=1./(1. + 2.*(1+vertex%nu**2/vertex%Q2)*tan(vertex%e%theta/2.)**2) main%theta_pq=acos(vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z) - main%t = vertex%Q2 - Mh2 + 2*vertex%nu*vertex%p%E - + if(doing_eepx.or.doing_Xphasespace) then ! here -t is calculated differently + ! need to account for pfer too! + pmx = vertex%q*vertex%uq%x+pfer*pferx-vertex%p%P*vertex%up%x + pmy = vertex%q*vertex%uq%y+pfer*pfery-vertex%p%P*vertex%up%y + pmz = vertex%q*vertex%uq%z+pfer*pferz-vertex%p%P*vertex%up%z + pm = sqrt(pmx**2+pmy**2+pmz**2) + em = vertex%nu+efer-vertex%p%E + main%t = -(targ%Mtar_struck**2 + Mh2 -2.0*targ%Mtar_struck*vertex%p%E) + else + main%t = vertex%Q2 - Mh2 + 2*vertex%nu*vertex%p%E - > 2*vertex%p%P*vertex%q*cos(main%theta_pq) + endif main%tmin = vertex%Q2 - Mh2 + 2*vertex%p%E*vertex%nu - - > 2*vertex%p%P*vertex%q + > 2*vertex%p%P*vertex%q main%q2 = vertex%Q2 ! CALCULATE ANGLE PHI BETWEEN SCATTERING PLANE AND REACTION PLANE. @@ -882,10 +961,12 @@ subroutine complete_ev(main,vertex,success) vertex%Mrec = sqrt(vertex%Emiss**2-vertex%Pmiss**2) vertex%Em = targ%Mtar_struck + vertex%Mrec - targ%M vertex%Trec = sqrt(vertex%Mrec**2 + vertex%Pm**2) - vertex%Mrec - else if (doing_hydpi .or. doing_hydkaon .or. doing_hyddelta .or. doing_hydrho) then + else if (doing_hydpi .or. doing_hydkaon .or.doing_hydeepx .or. + > doing_hyddelta .or. doing_hydrho) then vertex%Trec = 0.0 else if (doing_deutpi.or.doing_hepi.or.doing_deutkaon.or.doing_hekaon - > .or.doing_deutdelta.or.doing_hedelta.or.doing_deutrho.or.doing_herho) then + > .or.doing_deuteepx.or.doing_heeepx.or.doing_deutdelta + > .or.doing_hedelta.or.doing_deutrho.or.doing_herho) then vertex%Trec = sqrt(vertex%Mrec**2 + vertex%Pm**2) - vertex%Mrec else if (doing_semi) then vertex%Pm = vertex%Pmiss @@ -899,11 +980,13 @@ subroutine complete_ev(main,vertex,success) ! calculate krel for deuteron/heavy pion(kaon). Deuteron is straightforward. ! A>2 case is some approximation for 3He (DJG). - if (doing_deutpi .or. doing_deutkaon .or. doing_deutdelta .or. doing_deutrho) then + if (doing_deutpi .or. doing_deutkaon .or.doing_deuteepx .or. doing_deutdelta + > .or. doing_deutrho) then if ((vertex%Emiss**2-vertex%Pmiss**2).lt.0) write(6,*) 'BAD MM!!!!! Emiss,Pmiss=',vertex%Emiss, vertex%Pmiss MM = sqrt(max(0.d0,vertex%Emiss**2-vertex%Pmiss**2)) krel = sqrt( max(0.d0,MM**2-4.*targ%Mrec_struck**2) ) - else if (doing_hepi .or. doing_hekaon .or. doing_hedelta .or. doing_herho) then + else if (doing_hepi .or. doing_hekaon .or.doing_heeepx .or. doing_hedelta + > .or. doing_herho) then if ((vertex%Emiss**2-vertex%Pmiss**2).lt.0) write(6,*) 'BAD MM!!!!! Emiss,Pmiss=',vertex%Emiss, vertex%Pmiss MM = sqrt(max(0.d0,vertex%Emiss**2-vertex%Pmiss**2)) krelx = vertex%Pmx + 1.5*pferx*pfer @@ -925,6 +1008,13 @@ subroutine complete_ev(main,vertex,success) endif endif + if(doing_Xphasespace) then ! need at least 1 pion + if ( ( (targ%Mtar_struck+vertex%nu-vertex%p%E)**2-vertex%Pmiss**2).lt.Mpi02 ) then + success=.false. + return + endif + endif + if(doing_semi) then vertex%zhad = vertex%p%E/vertex%nu vertex%pt2 = vertex%p%P**2*(1.0-cos(main%theta_pq)**2) @@ -934,7 +1024,6 @@ subroutine complete_ev(main,vertex,success) endif endif - ! Determine PHYSICS scattering angles theta/phi for the two spectrometer ! vectors, and the Jacobian which we must include in our xsec computation ! to take into account the fact that we're not generating in the physics @@ -955,7 +1044,8 @@ subroutine complete_ev(main,vertex,success) C DJG stinkin' Jacobian! if (doing_heavy .or. doing_pion .or. doing_kaon .or. - > doing_delta .or. doing_semi) then + > doing_eepx .or. doing_delta .or. doing_semi .or. + > doing_Xphasespace) then r = sqrt(1.+vertex%p%yptar**2+vertex%p%xptar**2) main%jacobian = main%jacobian / r**3 !1/cos**3(theta-theta0) endif @@ -965,7 +1055,6 @@ subroutine complete_ev(main,vertex,success) ! The effective target thickness that the scattered particles see, and the ! resulting energy losses - call trip_thru_target (2, main%target%z-targ%zoffset, vertex%e%E, > vertex%e%theta, main%target%Eloss(2), main%target%teff(2),Me,1) @@ -997,13 +1086,18 @@ subroutine complete_recon_ev(recon,success) include 'simulate.inc' real*8 p_new_x,p_new_y,new_x_x,new_x_y,new_x_z + real*8 p_new_x1,p_new_y1,px1,py1,pz1 real*8 new_y_x,new_y_y,new_y_z,dummy real*8 targ_new_x,targ_new_y real*8 px,py,pz,qx,qy,qz + real*8 pmrecx,pmrecy,pmrecz,pmrec,emrec real*8 targx,targy,targz real*8 W2 real*8 oop_x,oop_y real*8 mm,mmA,mm2,mmA2,t + real*8 qdotpm + real*8 tcos,u + real*8 Pcm,Ecm,betacm,gammacm,Ppar,Pprp,Pparcm,thetacm logical success type(event):: recon @@ -1050,15 +1144,15 @@ subroutine complete_recon_ev(recon,success) recon%uq%x = - recon%e%P*recon%ue%x / recon%q recon%uq%y = - recon%e%P*recon%ue%y / recon%q recon%uq%z =(recon%Ein - recon%e%P*recon%ue%z)/ recon%q - -c if (doing_pion .or. doing_kaon .or. doing_delta .or. doing_rho .or. doing_semi) then -c W2 = targ%mtar_struck**2 + 2.*targ%mtar_struck*recon%nu - recon%Q2 -c else -c W2 = targ%M**2 + 2.*targ%M*recon%nu - recon%Q2 -c endif + if (doing_pion .or. doing_kaon .or. doing_eepx .or. doing_delta + > .or. doing_rho .or. doing_semi .or. doing_Xphasespace) then + W2 = targ%mtar_struck**2 + 2.*targ%mtar_struck*recon%nu - recon%Q2 + else + W2 = targ%M**2 + 2.*targ%M*recon%nu - recon%Q2 + endif c Everyone else in the world calculates W using the proton mass. - W2 = mp**2 + 2.*mp*recon%nu - recon%Q2 +Cgh W2 = mp**2 + 2.*mp*recon%nu - recon%Q2 recon%W = sqrt(abs(W2)) * W2/abs(W2) recon%xbj = recon%Q2/2./Mp/recon%nu @@ -1076,6 +1170,14 @@ subroutine complete_recon_ev(recon,success) recon%epsilon=1./(1. + 2.*(1+recon%nu**2/recon%Q2)*tan(recon%e%theta/2.)**2) recon%theta_pq=acos(min(1.0,recon%up%x*recon%uq%x+recon%up%y*recon%uq%y+recon%up%z*recon%uq%z)) + if(doing_eepx.or.doing_Xphasespace) then + pmrecx = recon%q*recon%uq%x-recon%p%P*recon%up%x + pmrecy = recon%q*recon%uq%y-recon%p%P*recon%up%y + pmrecz = recon%q*recon%uq%z-recon%p%P*recon%up%z + pmrec = sqrt(pmrecx**2+pmrecy**2+pmrecz**2) + emrec = recon%nu+targ%Mtar_struck-recon%p%E + ntup%theta_mq=acos(min(1.0,(pmrecx*recon%uq%x+pmrecy*recon%uq%y+pmrecz*recon%uq%z)/pmrec)) + endif ! CALCULATE ANGLE PHI BETWEEN SCATTERING PLANE AND REACTION PLANE. ! Therefore, define a new system with the z axis parallel to q, and @@ -1099,6 +1201,11 @@ subroutine complete_recon_ev(recon,success) px = -recon%up%y py = recon%up%x pz = recon%up%z + if(doing_eepx.or.doing_Xphasespace) then + px1 = -pmrecy/pmrec + py1 = pmrecx/pmrec + pz1 = pmrecz/pmrec + endif dummy=sqrt((qx**2+qy**2)*(qx**2+qy**2+qz**2)) new_x_x = -qx*qz/dummy @@ -1122,6 +1229,12 @@ subroutine complete_recon_ev(recon,success) recon%phi_pq = 2*pi - recon%phi_pq endif + if(doing_eepx.or.doing_Xphasespace) then + p_new_x1 = px1*new_x_x + py1*new_x_y + pz1*new_x_z + p_new_y1 = px1*new_y_x + py1*new_y_y + pz1*new_y_z + ntup%phi_mq = atan2(p_new_y1,p_new_x1) !atan2(y,x)=atan(y/x) + if (ntup%phi_mq.lt.0.d0) ntup%phi_mq=ntup%phi_mq+2.*pi + endif if(using_tgt_field) then !calculate polarized-target specific azimuthal angles @@ -1190,7 +1303,6 @@ subroutine complete_recon_ev(recon,success) c targy = -targ_pol*sin(abs(targ_Bangle)) c targz = targ_pol*cos(abs(targ_Bangle)) - px = -recon%up%y py = recon%up%x pz = recon%up%z @@ -1257,17 +1369,51 @@ subroutine complete_recon_ev(recon,success) recon%PmOop = (recon%Pmx*oop_x + recon%Pmy*oop_y) / sqrt(oop_x**2+oop_y**2) recon%PmPer = sqrt( max(0.d0, recon%Pm**2 - recon%PmPar**2 - recon%PmOop**2 ) ) - if (doing_pion .or. doing_kaon .or. doing_delta .or. doing_rho .or. doing_semi) then + if (doing_pion .or. doing_kaon .or. doing_eepx .or. doing_delta + > .or. doing_rho .or. doing_semi .or. doing_eep + > .or. doing_Xphasespace) then recon%Em = recon%nu + targ%Mtar_struck - recon%p%E mm2 = recon%Em**2 - recon%Pm**2 mm = sqrt(abs(mm2)) * abs(mm2)/mm2 mmA2= (recon%nu + targ%M - recon%p%E)**2 - recon%Pm**2 mmA = sqrt(abs(mmA2)) * abs(mmA2)/mmA2 - t = recon%Q2 - Mh2 - > + 2*(recon%nu*recon%p%E - recon%p%P*recon%q*cos(recon%theta_pq)) + +* reconstruct theta_cm + Pcm=recon%q + Ecm=targ%Mtar_struck+recon%nu + betacm=Pcm/Ecm + gammacm=1./sqrt(1.-betacm**2) + Ppar=recon%p%P*cos(recon%theta_pq) + Pprp=recon%p%P*sin(recon%theta_pq) + Pparcm=gammacm*(Ppar-betacm*recon%p%E) + thetacm=atan(Pprp/Pparcm) + + if(doing_eepx.or.doing_Xphasespace) then +C DJG Note that, as usual in simc, t is actually -t. I'll fix this later. + t = -(targ%Mtar_struck**2+Mh2-2.0*targ%Mtar_struck*recon%p%E) + + tcos = recon%up%x*recon%uq%x+recon%up%y*recon%uq%y+ + > recon%up%z*recon%uq%z + if (tcos-1..gt.0..and.tcos-1..lt.1.d-8) tcos=1.0 + u = -recon%Q2 +Mp**2 + > +2.*(recon%q*recon%p%P*tcos -recon%nu*recon%p%E ) + ntup%u = -u + else + t = recon%Q2 - Mh2 + > + 2*(recon%nu*recon%p%E - recon%p%P*recon%q*cos(recon%theta_pq)) + if (doing_heavy) t=-t ! above equation is actually for -t. + endif ntup%mm = mm ntup%mmA = mmA ntup%t = t + ntup%thetacm=thetacm + +c gh +c compute "signed" PM depending on the relative orientation of the PM with the +c three-momentum transfer (Q) + qdotpm=qx*recon%Pmx+qy*recon%Pmy+qz*recon%Pmz + ntup%PMsigned = -recon%Pm*dsign(1.d0,qdotpm) + endif if(doing_semi.or.doing_rho) then @@ -1284,13 +1430,29 @@ subroutine complete_recon_ev(recon,success) else if (doing_deuterium .or. doing_heavy) then recon%Trec = sqrt(recon%Pm**2+targ%Mrec**2) - targ%Mrec recon%Em = recon%nu + targ%Mtar_struck - recon%p%E - recon%Trec - else if (doing_pion .or. doing_kaon .or. doing_delta .or. doing_rho) then + else if (doing_pion .or. doing_kaon .or. doing_eepx .or. doing_delta + > .or. doing_rho .or. doing_Xphasespace) then recon%Em = recon%nu + targ%Mtar_struck - recon%p%E endif if (debug(5)) write(6,*) 'recon%Pm,recon%Trec,recon%Em',recon%Pm,recon%Trec,recon%Em if (debug(4)) write(6,*)'comp_rec_ev: at 10' + if (debug(3)) then + write(6,*)'======================================' + write(6,*)'complete_recon_ev:' + write(6,*)'theta_e =',recon%e%theta + write(6,*)'q mag =',recon%q + write(6,*)'nu =',recon%nu + write(6,*)'Q2 =',recon%Q2/1000000. + write(6,*)'Ein =',recon%Ein + write(6,*)'hadron mom =',recon%p%P + write(6,*)'hadron E =',recon%p%E + write(6,*)'e mom =',recon%e%P + write(6,*)'mass =',Mh + write(6,*)'======================================' + endif + success=.true. return end @@ -1304,8 +1466,11 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) integer i, iPm1 real*8 a, b, r, frac, peepi, peeK, peedelta, peerho, peepiX + real*8 peep_omega, peep_rho, peepph real*8 survivalprob, semi_dilution real*8 weight, width, sigep, deForest, tgtweight + real*8 Em_weight ! gh + integer iEm1 logical force_sigcc, success type(event_main):: main type(event):: vertex, vertex0, recon @@ -1321,7 +1486,6 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) ! COMPLETE_ev. !----------------------------------------------------------------------- - ! Initialize success code if (debug(2)) write(6,*)'comp_main: entering...' @@ -1329,14 +1493,16 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) ! The spectral function weighting - if (doing_hyd_elast.or.doing_pion.or.doing_kaon.or.doing_delta.or.doing_phsp.or.doing_rho.or.doing_semi) then !no SF. + if (doing_hyd_elast.or.doing_pion.or.doing_kaon.or.doing_eepx.or. + > doing_phsp.or.doing_delta.or.doing_rho.or.doing_semi.or. + > doing_Xphasespace) then !no SF. main%SF_weight=1.0 else if (use_benhar_sf.and.doing_heavy) then ! Doing Spectral Functions call sf_lookup_diff(vertex%Em, vertex%Pm, weight) main%SF_weight = targ%Z*transparency*weight else if (doing_deuterium .or. (doing_heavy.and.(.not.use_benhar_sf))) then main%SF_weight = 0.0 - do i=1,nrhoPm + do i=1,nrhoPm ! loop over the #shells in A(e,e'p) weight = 0.0 ! ... use linear interpolation to determine rho(pm) @@ -1408,6 +1574,28 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) tgtweight = targ%Z endif + elseif (doing_eepx) then + if(which_eepx.eq.1) then !pi0 + main%sigcc = 1.0 + main%sigcc_recon = 1.0 !Need new xsec model. + else if(which_eepx.eq.2) then !eta + main%sigcc = 1.0 + main%sigcc_recon = 1.0 !Need new xsec model. + else if(which_eepx.eq.3) then !rho + main%sigcc = peep_rho(vertex,main) + main%sigcc_recon = 1.0 + else if(which_eepx.eq.4) then !omega + main%sigcc = peep_omega(vertex,main) + main%sigcc_recon = 1.0 + else if(which_eepx.eq.5) then + main%sigcc = 1.0 + main%sigcc_recon = 1.0 + endif + + elseif (doing_Xphasespace) then + main%sigcc = peepph(vertex,main) + main%sigcc_recon = 1.0 + elseif (doing_delta) then main%sigcc = peedelta(vertex,main) !Need new xsec model. main%sigcc_recon = 1.0 @@ -1441,6 +1629,7 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) write(6,*)'Q2 =',vertex%Q2/1000000. write(6,*)'Ein =',vertex%Ein write(6,*)'hadron mom =',vertex%p%P + write(6,*)'hadron E =',vertex%p%E write(6,*)'e mom =',vertex%e%P write(6,*)'mass =',Mh write(6,*)'epsilon =',main%epsilon @@ -1458,7 +1647,7 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) if ((doing_kaon.or.doing_semika) .and. .not.doing_decay) > main%weight = main%weight*survivalprob if (debug(5))write(6,*) 'gen_weight = ',main%gen_weight, - > main%jacobian,main%sigcc + > main%jacobian,main%sigcc,main%weight success = .true. diff --git a/init.f b/init.f index 0ab20d95..c95bee6f 100644 --- a/init.f +++ b/init.f @@ -335,22 +335,25 @@ subroutine limits_init(H) enddo VERTEXedge%Em%min = E_Fermi VERTEXedge%Em%max = 1000. !Need Egamma_tot_max for good limit. - else if (doing_hydpi .or. doing_hydkaon .or. doing_hyddelta .or. doing_hydrho) then + else if (doing_hydpi .or. doing_hydkaon .or. doing_hydeepx .or. doing_hyddelta + > .or. doing_hydrho) then VERTEXedge%Em%min = 0.0 VERTEXedge%Em%max = 0.0 VERTEXedge%Pm%min = 0.0 VERTEXedge%Pm%max = 0.0 - else if (doing_deutpi .or. doing_deutkaon .or. doing_deutdelta .or. doing_deutrho) then + else if (doing_deutpi .or. doing_deutkaon .or. doing_deuteepx .or. doing_deutdelta + > .or. doing_deutrho) then VERTEXedge%Em%min = Mp + Mn - targ%M !2.2249 MeV, I hope. VERTEXedge%Em%max = Mp + Mn - targ%M VERTEXedge%Pm%min = 0.0 VERTEXedge%Pm%max = pval(nump) - else if (doing_hepi .or. doing_hekaon .or. doing_hedelta .or. doing_herho) then + else if (doing_hepi .or. doing_hekaon .or. doing_heeepx .or. doing_hedelta + > .or. doing_herho) then VERTEXedge%Em%min = targ%Mtar_struck + targ%Mrec - targ%M VERTEXedge%Em%max = Emval(numEm) VERTEXedge%Pm%min = 0.0 VERTEXedge%Pm%max = pval(nump) - else if (doing_semi) then + else if (doing_semi.or.doing_Xphasespace) then VERTEXedge%Em%min = 0.0 VERTEXedge%Em%max = 0.0 VERTEXedge%Pm%min = 0.0 @@ -366,7 +369,8 @@ subroutine limits_init(H) ! E_rec=sqrt(M_rec**2+P_rec**2), and P_rec = -P_m if (doing_hyd_elast .or. doing_hydpi .or. doing_hydkaon .or. - > doing_hyddelta .or. doing_hydrho .or. doing_semi) then + > doing_hydeepx .or. doing_hyddelta .or. doing_hydrho .or. + > doing_semi .or. doing_Xphasespace) then VERTEXedge%Mrec%min = 0.0 VERTEXedge%Mrec%max = 0.0 VERTEXedge%Trec%min = 0.0 @@ -385,7 +389,7 @@ subroutine limits_init(H) ! upper limit, since the lower limit is determined by the allowed radiation, ! which is not calculated yet (and needs Trec to be calculated). - if (doing_eep .or. doing_semi) then + if (doing_eep .or. doing_semi .or. doing_Xphasespace) then VERTEXedge%Trec_struck%min = 0. VERTEXedge%Trec_struck%max = 0. else @@ -441,7 +445,7 @@ subroutine limits_init(H) gen%sumEgen%max = min(gen%sumEgen%max,edge%e%E%max+edge%p%E%max+Egamma_tot_max) gen%sumEgen%min = max(gen%sumEgen%min,edge%e%E%min+edge%p%E%min) - else if (doing_semi) then + else if (doing_semi.or.doing_Xphasespace) then c gen%sumEgen%max = Ebeam_max - VERTEXedge%Trec%min - VERTEXedge%Trec_struck%min c gen%sumEgen%min = Ebeam_min - VERTEXedge%Trec%max - VERTEXedge%Trec_struck%max gen%sumEgen%max = Ebeam_max + targ%Mtar_struck - targ%Mrec_struck @@ -469,10 +473,10 @@ subroutine limits_init(H) gen%e%E%min = edge%e%E%min gen%e%E%max = edge%e%E%max + Egamma2_max else if (doing_deuterium .or. doing_pion .or. doing_kaon - > .or. doing_rho .or. doing_delta) then + > .or. doing_rho .or. doing_eepx .or. doing_delta) then gen%e%E%min = gen%sumEgen%min gen%e%E%max = gen%sumEgen%max - else if (doing_heavy .or. doing_semi) then + else if (doing_heavy .or. doing_semi .or. doing_Xphasespace) then gen%e%E%min = gen%sumEgen%min - edge%p%E%max - Egamma3_max gen%e%E%max = gen%sumEgen%max - edge%p%E%min endif @@ -492,10 +496,10 @@ subroutine limits_init(H) ! ... except doing_heavy, but need to define for code that writes out limits. if (doing_hyd_elast.or.doing_deuterium.or.doing_pion.or.doing_kaon .or. - > doing_rho .or. doing_delta) then + > doing_rho .or. doing_eepx .or. doing_delta) then gen%p%E%min = edge%p%E%min gen%p%E%max = edge%p%E%max + Egamma3_max - else if (doing_heavy .or. doing_semi)then + else if (doing_heavy .or. doing_semi .or. doing_Xphasespace)then gen%p%E%min = gen%sumEgen%min - edge%e%E%max - Egamma2_max gen%p%E%max = gen%sumEgen%max - edge%e%E%min endif @@ -876,7 +880,10 @@ subroutine theory_init(success) enddo ! ... are we doing deuterium? (i.e. only using a 1D spectral function) - doing_deuterium = nrhoPm.eq.1 .and. E_Fermi.lt.1.0 +c doing_deuterium = nrhoPm.eq.1 .and. E_Fermi.lt.1.0 +c mod by gh + doing_deuterium = nrhoPm.eq.1 .and. E_Fermi.lt.1.0 .and. nint(targ%A).eq.2 + ! ... renormalize the momentum distributions do m=1, nrhoPm diff --git a/radc.f b/radc.f index 37775156..4e5f2889 100644 --- a/radc.f +++ b/radc.f @@ -284,8 +284,8 @@ subroutine generate_rad(main,vertex,orig,success) ! ... from scattered particles. Use sumEgen-vertex.e.E as limit for remaining ! ... generated energy available. - else if (doing_pion .or. doing_kaon .or. doing_rho .or. - > doing_semi) then + else if (doing_pion .or. doing_kaon .or. doing_eepx .or. doing_rho + > .or. doing_semi .or. doing_Xphasespace) then if (debug(5)) write(6,*)'gen_rad: at 2d' Egamma_min(1) = 0. Egamma_max(1) = gen%sumEgen%max - vertex%e%E diff --git a/results_write.f b/results_write.f index bcbec073..ebe3a97f 100644 --- a/results_write.f +++ b/results_write.f @@ -126,46 +126,60 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) ntu(32) = recon%theta_pq !theta_pq - radians ntu(33) = recon%phi_pq !phi_pq - radians - if (doing_pion .or. doing_kaon .or. doing_delta) then - ntu(34) = ntup%mm/1000. !missmass (nucleon) - ntu(35) = ntup%mmA/1000. !missmass (nucleus) - ntu(36) = recon%p%P/1000. !ppi - GeV/c - ntu(37) = ntup%t/1.d6 !t - GeV^2 - ntu(38) = recon%PmPar/1000. - ntu(39) = recon%PmPer/1000. - ntu(40) = recon%PmOop/1000. - ntu(41) = -main%target%rastery !fry - cm - ntu(42) = ntup%radphot/1000. !radphot - GeV + if (doing_pion .or. doing_kaon .or. doing_eep .or. doing_eepx + > .or. doing_delta .or. doing_Xphasespace) then + ntu(34) = ntup%thetacm !thetacm + ntu(35) = ntup%mm/1000. !missmass (nucleon) + ntu(36) = ntup%mmA/1000. !missmass (nucleus) + ntu(37) = recon%p%P/1000. !ppi - GeV/c + ntu(38) = ntup%t/1.d6 !t - GeV^2 + ntu(39) = recon%PmPar/1000. + ntu(40) = recon%PmPer/1000. + ntu(41) = recon%PmOop/1000. + ntu(42) = -main%target%rastery !fry - cm + ntu(43) = ntup%radphot/1000. !radphot - GeV dummy = pferx*vertex%uq%x + pfery*vertex%uq%y + pferz*vertex%uq%z if (dummy.eq.0) dummy=1.d-20 - ntu(43) = pfer/1000.*abs(dummy)/dummy !p_fermi - GeV/c - ntu(44) = main%sigcc !d5sig - ntu(45) = ntup%sigcm !pion sig_cm - ntu(46) = main%weight - ntu(47) = decdist !decay distance (cm) - ntu(48) = sqrt(Mh2_final) - ntu(49) = pfer/1000.*dummy !p_fermi along q. - ntu(50) = vertex%Q2/1.d6 - ntu(51) = main%w/1.d3 - ntu(52) = main%t/1.d6 - ntu(53) = main%phi_pq + ntu(44) = pfer/1000.*abs(dummy)/dummy !p_fermi - GeV/c + ntu(45) = main%sigcc !d5sig + ntu(46) = ntup%sigcm !pion sig_cm + ntu(47) = main%weight + ntu(48) = decdist !decay distance (cm) + ntu(49) = sqrt(Mh2_final) + ntu(50) = pfer/1000.*dummy !p_fermi along q. + ntu(51) = vertex%Q2/1.d6 + ntu(52) = main%w/1.d3 + ntu(53) = main%t/1.d6 + ntu(54) = main%theta_pq + ntu(55) = main%phi_pq + ntu(56) = main%thetacm !PION and eepx only - check vs. main%theta_pq + ntu(57) = ntup%Pmsigned + if(using_tgt_field) then - ntu(54) = recon%theta_tarq - ntu(55) = recon%phi_targ - ntu(56) = recon%beta - ntu(57) = recon%phi_s - ntu(58) = recon%phi_c - ntu(59) = main%beta - ntu(60) = vertex%phi_s - ntu(61) = vertex%phi_c + ntu(58) = recon%theta_tarq + ntu(59) = recon%phi_targ + ntu(60) = recon%beta + ntu(61) = recon%phi_s + ntu(62) = recon%phi_c + ntu(63) = main%beta + ntu(64) = vertex%phi_s + ntu(65) = vertex%phi_c if (doing_kaon) then - ntu(62) = ntup%sigcm1 !sigcm - saghai model - ntu(63) = ntup%sigcm2 !sigcm - factorized. + ntu(66) = ntup%sigcm1 !sigcm - saghai model + ntu(67) = ntup%sigcm2 !sigcm - factorized. + elseif (doing _eepx.or.doing_Xphasespace) then + ntu(66) = ntup%theta_mq + ntu(67) = ntup%phi_mq + ntu(68) = ntup%u/1.d6 endif else if (doing_kaon) then - ntu(54) = ntup%sigcm1 !sigcm - saghai model - ntu(55) = ntup%sigcm2 !sigcm - factorized. + ntu(58) = ntup%sigcm1 !sigcm - saghai model + ntu(59) = ntup%sigcm2 !sigcm - factorized. + elseif (doing _eepx.or.doing_Xphasespace) then + ntu(58) = ntup%theta_mq + ntu(59) = ntup%phi_mq + ntu(60) = ntup%u/1.d6 endif endif else if (doing_semi.or.doing_rho) then diff --git a/simc.f b/simc.f index 11d2ec53..e9f24907 100644 --- a/simc.f +++ b/simc.f @@ -38,7 +38,7 @@ program simc real*8 one parameter (one=1.0d0) !double precision 1 for subroutine calls - real*8 grnd + real*8 grnd,dummy real*8 ang_targ_earm,ang_targ_parm logical restorerndstate c @@ -82,6 +82,10 @@ program simc call radc_init if (debug(2)) write(6,*)'sim: done with radc_init' +c gh - ranlux init + dummy=grnd() + call rluxgo(3,dummy,0,0) + ! ... compute some quantities for a central event call calculate_central(central,vertex0) @@ -337,7 +341,8 @@ program simc ! ... update the "contribution" and "slop" limits call limits_update(main,vertex,orig,recon,doing_deuterium, - > doing_pion,doing_kaon,doing_delta,doing_rho,contrib,slop) + > doing_pion,doing_kaon,doing_eepx,doing_delta,doing_rho,contrib, + > slop) endif ! @@ -391,11 +396,12 @@ program simc ! ... 2-fold to 5-fold. if (doing_deuterium.or.doing_heavy.or.doing_pion.or.doing_kaon - > .or.doing_delta.or.doing_rho .or. doing_semi) then + > .or.doing_eepx.or.doing_delta.or.doing_rho .or. doing_semi + > .or.doing_Xphasespace) then genvol = genvol * domega_p * (gen%e%E%max-gen%e%E%min) endif - if (doing_heavy.or.doing_semi) then !6-fold + if (doing_heavy.or.doing_semi.or.doing_Xphasespace) then !6-fold genvol = genvol * (gen%p%E%max-gen%p%E%min) endif @@ -720,13 +726,64 @@ subroutine report(iun,timestring1,timestring2,central,contrib, endif else stop 'I don''t have ANY idea what A(e,e''x)X we''re doing!!!' - endif + endif + else if (doing_Xphasespace) then + if (targ%A .eq. 1) then + write(iun,*) ' ****-------- H(e,e''p)X --------****' + else if (targ%A .eq. 2) then + write(iun,*) ' ****-------- D(e,e''p)X --------****' + else if (targ%A .eq. 3) then + write(iun,*) ' ****-------- A(e,e''p)X --------****' + else + stop 'I don''t have ANY idea what (e,e''p)X we''re doing!!!' + endif else if (doing_rho) then if (targ%A .eq. 1) then write(iun,*) ' ****-------- H(e,e''rho) --------****' else write(iun,*) 'I am not set up for anything else yet!' endif + else if (doing_eepx) then + if (doing_hydeepx) then + if(which_eepx.eq.1) then + write(iun,*) ' ****-------- H(e,e''p)pi0 --------****' + else if(which_eepx.eq.2) then + write(iun,*) ' ****-------- H(e,e''p)eta --------****' + else if(which_eepx.eq.3) then + write(iun,*) ' ****-------- H(e,e''p)rho0 --------****' + else if(which_eepx.eq.4) then + write(iun,*) ' ****-------- H(e,e''p)omega --------****' + else + write(iun,*) ' ****-------- H(e,e''p)Mx --------****' + write(iun,*) ' Mx in MeV is', Meepx + endif + else if (doing_deuteepx) then + if(which_eepx.eq.1) then + write(iun,*) ' ****-------- D(e,e''p)pi0 --------****' + else if(which_eepx.eq.2) then + write(iun,*) ' ****-------- D(e,e''p)eta --------****' + else if(which_eepx.eq.3) then + write(iun,*) ' ****-------- D(e,e''p)rho0 --------****' + else if(which_eepx.eq.4) then + write(iun,*) ' ****-------- D(e,e''p)omega --------****' + else + write(iun,*) ' ****-------- D(e,e''p)Mx --------****' + write(iun,*) ' Mx in MeV is', Meepx + endif + else if (doing_heeepx) then + if(which_eepx.eq.1) then + write(iun,*) ' ****-------- A(e,e''p)pi0 --------****' + else if(which_eepx.eq.2) then + write(iun,*) ' ****-------- A(e,e''p)eta --------****' + else if(which_eepx.eq.3) then + write(iun,*) ' ****-------- A(e,e''p)rho0 --------****' + else if(which_eepx.eq.4) then + write(iun,*) ' ****-------- A(e,e''p)omega --------****' + else + write(iun,*) ' ****-------- A(e,e''p)Mx --------****' + write(iun,*) ' where Mx in MeV is', Meepx + endif + endif else if (doing_delta) then if (doing_hyddelta) then write(6,*) ' ****-------- H(e,e''p)pi --------****' @@ -880,10 +937,12 @@ subroutine report(iun,timestring1,timestring2,central,contrib, > 'doing_rho', doing_rho, 'doing_hplus', doing_hplus write(iun,'(5x,2(2x,a19,''='',l2))') 'doing_semipi',doing_semipi, > 'doing_semika', doing_semika + write(iun,'(5x,3(2x,a19,''='',l2))') 'doing_eepx',doing_eepx, + > 'doing_phsp', doing_phsp, 'doing_Xphasespace', doing_Xphasespace write(iun,'(5x,2(2x,a19,''='',l2))') 'doing_delta',doing_delta, > 'doing_phsp', doing_phsp - write(iun,'(5x,2(2x,a19,''='',i2))') 'which_pion', which_pion, - > 'which_kaon', which_kaon + write(iun,'(5x,3(2x,a19,''='',i2))') 'which_pion', which_pion, + > 'which_kaon', which_kaon, 'which_eepx',which_eepx write(iun,'(5x,3(2x,a19,''='',l2))') 'doing_hyd_elast', doing_hyd_elast, > 'doing_deuterium', doing_deuterium, 'doing_heavy', doing_heavy write(iun,'(5x,3(2x,a19,''='',l2))') 'doing_hydpi', doing_hydpi, @@ -894,6 +953,10 @@ subroutine report(iun,timestring1,timestring2,central,contrib, > 'doing_deutsemi', doing_deutsemi, 'do_fermi', do_fermi write(iun,'(5x,3(2x,a19,''='',l2))') 'doing_hydrho', doing_hydrho, > 'doing_deutrho', doing_deutrho, 'doing_herho', doing_herho + write(iun,'(5x,3(2x,a19,''='',l2))') 'doing_hydeepx', doing_hydeepx, + > 'doing_deuteepx', doing_deuteepx, 'doing_heeepx', doing_heeepx + write(iun,'(5x,3(2x,a19,''='',l2))') 'doing_hydXphase', doing_hydXphase, + > 'doing_deutXphase', doing_deutXphase, 'doing_heXphase', doing_heXphase write(iun,'(5x,(2x,a19,''='',l2),2(2x,a19,''='',i2))') 'mc_smear', > mc_smear,'electron_arm',electron_arm,'hadron_arm',hadron_arm write(iun,'(5x,3(2x,a19,''='',l2)))') 'using_Eloss', using_Eloss, @@ -907,7 +970,7 @@ subroutine report(iun,timestring1,timestring2,central,contrib, if (electron_arm.eq.5 .or. hadron_arm.eq.5 .or. > electron_arm.eq.6 .or. hadron_arm.eq.6) > write(iun,'(7x,a19,''='',l2)') 'use_first_cer',use_first_cer - write(iun,'(7x,a11,''='',f10.3,a4)') 'ctau',ctau,'cm' + write(iun,'(7x,2(a11,''='',f10.3,a4))') 'ctau',ctau,'cm','Meepx',Meepx,'MeV' if (use_benhar_sf) > write(iun,'(7x,a12,''='',f8.4)') 'transparency',transparency ! Counters @@ -1045,7 +1108,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, > contrib%vertex%Em%lo, contrib%vertex%Em%hi, 'MeV' write(iun,9917) 'Pm', VERTEXedge%Pm%min, VERTEXedge%Pm%max, > contrib%vertex%Pm%lo, contrib%vertex%Pm%hi, 'MeV/c' - if ((doing_deuterium .or. doing_pion .or. doing_kaon .or. doing_delta) .and. using_rad) then + if ((doing_deuterium .or. doing_pion .or. doing_kaon .or. + > doing_eepx .or. doing_delta) .and. using_rad) then write(iun,*) ' *** NOTE: sumEgen.min only used in GENERATE_RAD' endif diff --git a/simulate.inc b/simulate.inc index 77c3f001..bfbb459d 100644 --- a/simulate.inc +++ b/simulate.inc @@ -46,6 +46,7 @@ real*8 wtcontribute, dE_edge_test, Egamma_gen_max real*8 pt_b_param,sigc_kin_min,sigc_kin_max,sigc_kin_ind real*8 targ_Bangle, targ_Bphi, targ_pol, drift_to_cal,sign_hadron + real*8 Meepx integer*4 sigc_flag,sigc_nbin type(gen_limits):: gen @@ -66,9 +67,9 @@ logical using_E_arm_montecarlo, using_P_arm_montecarlo logical doing_phsp, using_rad, hard_cuts logical doing_hyd_elast, doing_deuterium, doing_heavy - logical doing_eep, doing_pion, doing_delta, doing_kaon, doing_rho - logical doing_semi, doing_semipi, doing_semika, doing_hplus - integer*4 which_kaon, which_pion + logical doing_eep, doing_pion, doing_eepx, doing_delta, doing_kaon, doing_rho + logical doing_semi, doing_semipi, doing_semika, doing_hplus, doing_Xphasespace + integer*4 which_kaon, which_pion, which_eepx logical using_cit_generation, using_Coulomb, using_Eloss logical correct_Eloss, correct_raster,do_fermi logical using_tgt_field @@ -83,16 +84,16 @@ > genvol, genvol_inclusive, luminosity, targetfac, > normfac, wtcontribute, dE_edge_test, Egamma_gen_max,pt_b_param, > sigc_kin_min,sigc_kin_max,sigc_kin_ind,targ_Bangle, targ_Bphi, targ_pol, - > drift_to_cal,sign_hadron,sigc_flag,sigc_nbin, + > drift_to_cal,sign_hadron,Meepx,sigc_flag,sigc_nbin, > gen, spec, cuts, edge, VERTEXedge, SPedge, > slop, EXPER, mc_smear, debug, nevent, ntried, ngen, > deForest_flag, Nntu, ncontribute, npasscuts, ncontribute_no_rad_proton, > spect_mode, phsp_mode, base, > extra_dbase_file,tgt_field_file,using_E_arm_montecarlo,using_P_arm_montecarlo, > doing_phsp, using_rad, hard_cuts, doing_hyd_elast, doing_deuterium, doing_heavy, - > doing_eep, doing_pion, doing_delta, doing_kaon, doing_rho, doing_semi, - > doing_semipi, doing_semika, doing_hplus, which_kaon, - > which_pion, using_cit_generation, using_Coulomb, using_Eloss, + > doing_eep, doing_pion, doing_eepx, doing_delta, doing_kaon, doing_rho, doing_semi, + > doing_semipi, doing_semika, doing_hplus, doing_Xphasespace, which_kaon, + > which_pion, which_eepx, using_cit_generation, using_Coulomb, using_Eloss, > correct_Eloss, correct_raster, do_fermi,using_tgt_field, > electron_arm, hadron_arm, use_first_cer, > transparency, use_benhar_sf, random_state_file, random_seed @@ -131,16 +132,20 @@ C real*8 decdist(30) logical doing_decay logical doing_hydpi, doing_deutpi, doing_hepi logical doing_hydkaon, doing_deutkaon, doing_hekaon + logical doing_hydeepx, doing_deuteepx, doing_heeepx logical doing_hyddelta, doing_deutdelta, doing_hedelta logical doing_hydrho, doing_Deutrho, doing_herho logical doing_hydsemi, doing_deutsemi + logical doing_hydXphase, doing_deutXphase, doing_heXphase common /decd/ ctau,doing_decay, > doing_hydpi,doing_deutpi,doing_hepi, > doing_hydkaon,doing_deutkaon,doing_hekaon, + > doing_hydeepx,doing_deuteepx,doing_heeepx, > doing_hyddelta,doing_deutdelta,doing_hedelta, > doing_hydrho, doing_deutrho, doing_herho, - > doing_hydsemi, doing_deutsemi + > doing_hydsemi, doing_deutsemi, + > doing_hydXphase, doing_deutXphase, doing_heXphase C Trying to get rid of the decdist array of random variables. C Structure for variables that we want to available to the ntuple. @@ -149,10 +154,11 @@ C Structure for variables that we want to available to the ntuple. real*8 radphot, radarm real*8 resfac real*8 sigcm - real*8 krel,mm,mmA,t,dilu + real*8 krel,mm,mmA,t,u,dilu real*8 sigcm1, sigcm2, sigcm3, sigcm4 real*8 xfermi, yfermi - real*8 rhomass, rhotheta + real*8 rhomass, rhotheta,PMsigned + real*8 thetacm,theta_mq,phi_mq end type type (ntupvars):: ntup From e0332efed9057b2f6fb6c6467301d6251b8ea430 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Thu, 17 Apr 2014 14:09:11 -0600 Subject: [PATCH 02/15] omega v1.0.1 --- infiles/omega_160_33_+1.inp | 119 ++++++++++ infiles/omega_160_33_+3.inp | 119 ++++++++++ infiles/omega_160_58_+3.inp | 122 ++++++++++ infiles/omega_160_58_-3.inp | 121 ++++++++++ infiles/omega_160_58_00.inp | 121 ++++++++++ infiles/omega_245_27_+1.inp | 123 ++++++++++ infiles/omega_245_27_+3.inp | 123 ++++++++++ infiles/omega_245_54_+3.inp | 125 ++++++++++ infiles/omega_245_54_-3.inp | 126 ++++++++++ infiles/omega_245_54_00.inp | 125 ++++++++++ infiles/rho_160_33_+1.inp | 119 ++++++++++ infiles/rho_160_33_+3.inp | 119 ++++++++++ infiles/rho_160_58_+3.inp | 122 ++++++++++ infiles/rho_160_58_-3.inp | 121 ++++++++++ infiles/rho_160_58_00.inp | 121 ++++++++++ infiles/rho_245_27_+1.inp | 123 ++++++++++ infiles/rho_245_27_+3.inp | 123 ++++++++++ infiles/rho_245_54_+3.inp | 125 ++++++++++ infiles/rho_245_54_-3.inp | 126 ++++++++++ infiles/rho_245_54_00.inp | 125 ++++++++++ infiles/xphsp_160_33_+1.inp | 120 ++++++++++ infiles/xphsp_160_33_+3.inp | 120 ++++++++++ infiles/xphsp_160_58_+3.inp | 123 ++++++++++ infiles/xphsp_160_58_-3.inp | 122 ++++++++++ infiles/xphsp_160_58_00.inp | 122 ++++++++++ infiles/xphsp_245_27_+1.inp | 124 ++++++++++ infiles/xphsp_245_27_+3.inp | 124 ++++++++++ infiles/xphsp_245_54_+3.inp | 126 ++++++++++ infiles/xphsp_245_54_-3.inp | 127 ++++++++++ infiles/xphsp_245_54_00.inp | 126 ++++++++++ physics_Xphasespace.f | 156 ++++++++++++ physics_omega.f | 458 ++++++++++++++++++++++++++++++++++++ physics_rho_recoil.f | 307 ++++++++++++++++++++++++ 33 files changed, 4603 insertions(+) create mode 100644 infiles/omega_160_33_+1.inp create mode 100644 infiles/omega_160_33_+3.inp create mode 100644 infiles/omega_160_58_+3.inp create mode 100644 infiles/omega_160_58_-3.inp create mode 100644 infiles/omega_160_58_00.inp create mode 100644 infiles/omega_245_27_+1.inp create mode 100644 infiles/omega_245_27_+3.inp create mode 100644 infiles/omega_245_54_+3.inp create mode 100644 infiles/omega_245_54_-3.inp create mode 100644 infiles/omega_245_54_00.inp create mode 100644 infiles/rho_160_33_+1.inp create mode 100644 infiles/rho_160_33_+3.inp create mode 100644 infiles/rho_160_58_+3.inp create mode 100644 infiles/rho_160_58_-3.inp create mode 100644 infiles/rho_160_58_00.inp create mode 100644 infiles/rho_245_27_+1.inp create mode 100644 infiles/rho_245_27_+3.inp create mode 100644 infiles/rho_245_54_+3.inp create mode 100644 infiles/rho_245_54_-3.inp create mode 100644 infiles/rho_245_54_00.inp create mode 100644 infiles/xphsp_160_33_+1.inp create mode 100644 infiles/xphsp_160_33_+3.inp create mode 100644 infiles/xphsp_160_58_+3.inp create mode 100644 infiles/xphsp_160_58_-3.inp create mode 100644 infiles/xphsp_160_58_00.inp create mode 100644 infiles/xphsp_245_27_+1.inp create mode 100644 infiles/xphsp_245_27_+3.inp create mode 100644 infiles/xphsp_245_54_+3.inp create mode 100644 infiles/xphsp_245_54_-3.inp create mode 100644 infiles/xphsp_245_54_00.inp create mode 100644 physics_Xphasespace.f create mode 100644 physics_omega.f create mode 100644 physics_rho_recoil.f diff --git a/infiles/omega_160_33_+1.inp b/infiles/omega_160_33_+1.inp new file mode 100644 index 00000000..fa7c529f --- /dev/null +++ b/infiles/omega_160_33_+1.inp @@ -0,0 +1,119 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 2000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 3778.61 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 785.98 ; e arm central momentum (MeV/c) + spec%e%theta = 43.10 ; e arm angle setting (degrees) + spec%p%P = 2927.24 ; p arm central momentum (MeV/c) + spec%p%theta = 10.54 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 286.89 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_160_33_+3.inp b/infiles/omega_160_33_+3.inp new file mode 100644 index 00000000..6fbba4ea --- /dev/null +++ b/infiles/omega_160_33_+3.inp @@ -0,0 +1,119 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 3778.61 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 785.98 ; e arm central momentum (MeV/c) + spec%e%theta = 43.10 ; e arm angle setting (degrees) + spec%p%P = 2927.24 ; p arm central momentum (MeV/c) + spec%p%theta = 12.545 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 286.89 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_160_58_+3.inp b/infiles/omega_160_58_+3.inp new file mode 100644 index 00000000..6abeed68 --- /dev/null +++ b/infiles/omega_160_58_+3.inp @@ -0,0 +1,122 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) +; spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%P = 2927.00 ; p arm central momentum (MeV/c) + spec%p%theta = 16.29 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_160_58_-3.inp b/infiles/omega_160_58_-3.inp new file mode 100644 index 00000000..0aba8992 --- /dev/null +++ b/infiles/omega_160_58_-3.inp @@ -0,0 +1,121 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) + spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%theta = 10.55 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_160_58_00.inp b/infiles/omega_160_58_00.inp new file mode 100644 index 00000000..54e511bd --- /dev/null +++ b/infiles/omega_160_58_00.inp @@ -0,0 +1,121 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) + spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%theta = 13.285 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_245_27_+1.inp b/infiles/omega_245_27_+1.inp new file mode 100644 index 00000000..63bef2f0 --- /dev/null +++ b/infiles/omega_245_27_+1.inp @@ -0,0 +1,123 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4210.27 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 771.00 ; e arm central momentum (MeV/c) + spec%e%theta = 51.48 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 10.54 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) + targ%thick = 284.36 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_245_27_+3.inp b/infiles/omega_245_27_+3.inp new file mode 100644 index 00000000..198dd099 --- /dev/null +++ b/infiles/omega_245_27_+3.inp @@ -0,0 +1,123 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4210.27 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 771.00 ; e arm central momentum (MeV/c) + spec%e%theta = 51.48 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 12.20 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) + targ%thick = 284.36 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_245_54_+3.inp b/infiles/omega_245_54_+3.inp new file mode 100644 index 00000000..49d2a560 --- /dev/null +++ b/infiles/omega_245_54_+3.inp @@ -0,0 +1,125 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) + spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 16.61 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_245_54_-3.inp b/infiles/omega_245_54_-3.inp new file mode 100644 index 00000000..9287bbfd --- /dev/null +++ b/infiles/omega_245_54_-3.inp @@ -0,0 +1,126 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) +; spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%e%theta = 29.42 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 10.615 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_245_54_00.inp b/infiles/omega_245_54_00.inp new file mode 100644 index 00000000..bce85305 --- /dev/null +++ b/infiles/omega_245_54_00.inp @@ -0,0 +1,125 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 500 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) + spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 13.61 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em%max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em%min=Em%max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_160_33_+1.inp b/infiles/rho_160_33_+1.inp new file mode 100644 index 00000000..4cd0d563 --- /dev/null +++ b/infiles/rho_160_33_+1.inp @@ -0,0 +1,119 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 2000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 3778.61 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 785.98 ; e arm central momentum (MeV/c) + spec%e%theta = 43.10 ; e arm angle setting (degrees) + spec%p%P = 2927.24 ; p arm central momentum (MeV/c) + spec%p%theta = 10.54 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 286.89 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_160_33_+3.inp b/infiles/rho_160_33_+3.inp new file mode 100644 index 00000000..4d30145b --- /dev/null +++ b/infiles/rho_160_33_+3.inp @@ -0,0 +1,119 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 3778.61 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 785.98 ; e arm central momentum (MeV/c) + spec%e%theta = 43.10 ; e arm angle setting (degrees) + spec%p%P = 2927.24 ; p arm central momentum (MeV/c) + spec%p%theta = 12.545 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 286.89 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_160_58_+3.inp b/infiles/rho_160_58_+3.inp new file mode 100644 index 00000000..4de2617e --- /dev/null +++ b/infiles/rho_160_58_+3.inp @@ -0,0 +1,122 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) +; spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%P = 2927.00 ; p arm central momentum (MeV/c) + spec%p%theta = 16.29 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_160_58_-3.inp b/infiles/rho_160_58_-3.inp new file mode 100644 index 00000000..994e7334 --- /dev/null +++ b/infiles/rho_160_58_-3.inp @@ -0,0 +1,121 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) + spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%theta = 10.55 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_160_58_00.inp b/infiles/rho_160_58_00.inp new file mode 100644 index 00000000..04bdbfbc --- /dev/null +++ b/infiles/rho_160_58_00.inp @@ -0,0 +1,121 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) + spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%theta = 13.285 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_245_27_+1.inp b/infiles/rho_245_27_+1.inp new file mode 100644 index 00000000..1246d96c --- /dev/null +++ b/infiles/rho_245_27_+1.inp @@ -0,0 +1,123 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4210.27 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 771.00 ; e arm central momentum (MeV/c) + spec%e%theta = 51.48 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 10.54 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) + targ%thick = 284.36 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_245_27_+3.inp b/infiles/rho_245_27_+3.inp new file mode 100644 index 00000000..e98270f5 --- /dev/null +++ b/infiles/rho_245_27_+3.inp @@ -0,0 +1,123 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 4210.27 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 771.00 ; e arm central momentum (MeV/c) + spec%e%theta = 51.48 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 12.20 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) + targ%thick = 284.36 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_245_54_+3.inp b/infiles/rho_245_54_+3.inp new file mode 100644 index 00000000..5f01ed68 --- /dev/null +++ b/infiles/rho_245_54_+3.inp @@ -0,0 +1,125 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) + spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 16.61 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_245_54_-3.inp b/infiles/rho_245_54_-3.inp new file mode 100644 index 00000000..824c8ccf --- /dev/null +++ b/infiles/rho_245_54_-3.inp @@ -0,0 +1,126 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) +; spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%e%theta = 29.42 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 10.615 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_245_54_00.inp b/infiles/rho_245_54_00.inp new file mode 100644 index 00000000..9dcbb33b --- /dev/null +++ b/infiles/rho_245_54_00.inp @@ -0,0 +1,125 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 0 ; H(e,e'p)X +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) + spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 13.61 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_160_33_+1.inp b/infiles/xphsp_160_33_+1.inp new file mode 100644 index 00000000..2f68844e --- /dev/null +++ b/infiles/xphsp_160_33_+1.inp @@ -0,0 +1,120 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 2000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 3778.61 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 785.98 ; e arm central momentum (MeV/c) + spec%e%theta = 43.10 ; e arm angle setting (degrees) + spec%p%P = 2927.24 ; p arm central momentum (MeV/c) + spec%p%theta = 10.54 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 286.89 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_160_33_+3.inp b/infiles/xphsp_160_33_+3.inp new file mode 100644 index 00000000..845c5219 --- /dev/null +++ b/infiles/xphsp_160_33_+3.inp @@ -0,0 +1,120 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 3778.61 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 785.98 ; e arm central momentum (MeV/c) + spec%e%theta = 43.10 ; e arm angle setting (degrees) + spec%p%P = 2927.24 ; p arm central momentum (MeV/c) + spec%p%theta = 12.545 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 286.89 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_160_58_+3.inp b/infiles/xphsp_160_58_+3.inp new file mode 100644 index 00000000..3edcb9e3 --- /dev/null +++ b/infiles/xphsp_160_58_+3.inp @@ -0,0 +1,123 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) +; spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%P = 2927.00 ; p arm central momentum (MeV/c) + spec%p%theta = 16.29 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_160_58_-3.inp b/infiles/xphsp_160_58_-3.inp new file mode 100644 index 00000000..8865e1a9 --- /dev/null +++ b/infiles/xphsp_160_58_-3.inp @@ -0,0 +1,122 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) + spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%theta = 10.55 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_160_58_00.inp b/infiles/xphsp_160_58_00.inp new file mode 100644 index 00000000..d7e0db68 --- /dev/null +++ b/infiles/xphsp_160_58_00.inp @@ -0,0 +1,122 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 4708.97 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1641.70 ; e arm central momentum (MeV/c) + spec%e%theta = 25.735 ; e arm angle setting (degrees) + spec%p%P = 2927.20 ; p arm central momentum (MeV/c) + spec%p%theta = 13.285 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) + targ%thick = 285.51 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_245_27_+1.inp b/infiles/xphsp_245_27_+1.inp new file mode 100644 index 00000000..0a5fd88a --- /dev/null +++ b/infiles/xphsp_245_27_+1.inp @@ -0,0 +1,124 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 4210.27 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 771.00 ; e arm central momentum (MeV/c) + spec%e%theta = 51.48 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 10.54 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) + targ%thick = 284.36 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_245_27_+3.inp b/infiles/xphsp_245_27_+3.inp new file mode 100644 index 00000000..3a22dfea --- /dev/null +++ b/infiles/xphsp_245_27_+3.inp @@ -0,0 +1,124 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 4210.27 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 771.00 ; e arm central momentum (MeV/c) + spec%e%theta = 51.48 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 12.20 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) + targ%thick = 284.36 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_245_54_+3.inp b/infiles/xphsp_245_54_+3.inp new file mode 100644 index 00000000..69818000 --- /dev/null +++ b/infiles/xphsp_245_54_+3.inp @@ -0,0 +1,126 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) + spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 16.61 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_245_54_-3.inp b/infiles/xphsp_245_54_-3.inp new file mode 100644 index 00000000..56b14d69 --- /dev/null +++ b/infiles/xphsp_245_54_-3.inp @@ -0,0 +1,127 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) +; spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%e%theta = 29.42 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 10.615 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_245_54_00.inp b/infiles/xphsp_245_54_00.inp new file mode 100644 index 00000000..d02eee47 --- /dev/null +++ b/infiles/xphsp_245_54_00.inp @@ -0,0 +1,126 @@ +; This is a CTP file + +begin parm experiment + ngen = 500000 ; POS: # of successes; NEG: # of tries +; ngen = 5000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi-coherent) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 5246.82 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 2 ; 1=hms,2=sos,3=hrsr,4=hrsl + hadron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl + spec%e%P = 1718.40 ; e arm central momentum (MeV/c) + spec%e%theta = 29.43 ; e arm angle setting (degrees) + spec%p%P = 3331.70 ; p arm central momentum (MeV/c) + spec%p%theta = 13.61 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) +; targ%thick = 286.89 ; target thick (mg/cm^2) +; targ%thick = 285.51 ; target thick (mg/cm^2) +; targ%thick = 284.36 ; target thick (mg/cm^2) + targ%thick = 283.71 ; target thick (mg/cm^2) + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 50.0 ; delta max + SPedge%e%yptar%min = -80.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 85.0 ; %yptar%max = {TF} / 1000 + SPedge%e%xptar%min = -55.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 55.0 ; %xptar%max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 25.0 ; delta max + SPedge%p%yptar%min = -40.0 ; %yptar%min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 40.0 ; %yptar%max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; %xptar%min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; %xptar%max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 1. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) +; targ%xoffset = 0.200 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.117 ; target x-offset (cm): +x = beam right +; targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%xoffset = 0.015 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.00 ; target y-offset (cm): +y = up + targ%zoffset = 0.315 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtargetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.0 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 3.20 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 1.10 ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/physics_Xphasespace.f b/physics_Xphasespace.f new file mode 100644 index 00000000..1d004bf0 --- /dev/null +++ b/physics_Xphasespace.f @@ -0,0 +1,156 @@ + real*8 function peepph(vertex,main) + +C This function is adapted from Pawel Ambrozewicz +C noted by xucc + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f +C For we need these quantities as starting point which may be different +C from Pawel's noted by xucc + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass. + + real*8 m_pisq, m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 e_photCM,q_photCM ! virtual photon in CM system + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + real*8 E_cm,p_cm ! proton CM momentum + + real*8 mass ! recoil mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt ! Mandelstam variables + real*8 e_xCM,t_min + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Jttheta ! Jacobian theta_CM Mx - theta_LAB Ep + real*8 tcos ! cos of theta_LAB between Pp and q + +c real*8 mass_vtx +c common /pawel_crosssection/mass_vtx + +* Variables calculated in transformation to gamma-NUCLEON center of mass. + + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_pisq= Mpi02 + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = sqrt((vertex%nu+targ%Mtar_struck-vertex%p%E)**2 + > -vertex%Pmiss**2) + if (mass**2.lt.m_pisq) then ! should never pass this test + write(6,*) 'warning in peepph: I should never get here!',mass**2 + peepph=0.0 + return + endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + + E_cm = (invm**2 + m_p**2 - mass**2)/invm/2. + p_cm = sqrt(E_cm**2 - m_p**2) + +* cos/sin of theta between Pp and q in LAB +cdjg tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y + > +vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t =tt + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + q_photCM = sqrt((Wsq-qsq-m_psq)**2 +4.*Wsq*qsq)/invm/2. + + e_xCM = (Wsq + mass**2 - m_psq)/invm/2. + if ((e_xCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_xCM*e_photCM- + * sqrt((e_xCM**2-mass**2)*(e_photCM**2+qsq))) + endif + main%tmin=-t_min + +****************************************************************************** +* here ntup.sigcm=d3sigma/dOmega_cm/dMx [ub/MeV/sr] +****************************************************************************** +* Equation 3.27 from Pawel's thesis + + ntup%sigcm = 1./(32.*pi*pi)*mass/q_photCM*p_cm/invm**2 + +******************************************************************************* +* Convert from d3sigma/dOmega_cm/dMx [ub/MeV/sr] --> +* d3sigma/dOmega_lab/dEp [ub/MeV/sr] using 'Jttheta' + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. + + Jttheta=(m_p*qvec*Pp)/(mass*q_photCM*p_cm) + + main%davejac=Jttheta + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] + +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV/sr-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + + peepph=Jttheta*gamma_T*ntup%sigcm + + return + end diff --git a/physics_omega.f b/physics_omega.f new file mode 100644 index 00000000..de143133 --- /dev/null +++ b/physics_omega.f @@ -0,0 +1,458 @@ + real*8 function peep_omega(vertex,main) + +C This function is adapted from Pawel Ambrozewicz +C noted by xucc +* checked and modifed by gh - 05.02.11 + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f +C For we need these quantities as starting point which may be different +C from Pawel's noted by xucc + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 sigma_omega +c real*8 m_omega/782.59/ +c real*8 gamma_omega/8.49/ + real*8 m_pisq, m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + + real*8 mass ! omega mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt,uu ! Mandelstam variables + real*8 tprime + real*8 e_photCM,e_omCM,t_min + + real*8 gamma_T ! flux of transversely polarized virt. photons +c real*8 Breit_wigner + real*8 Jttheta ! Jacobian t-Mx - Ep,theta_p in LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + +c real*8 mass_vtx +c common /pawel_crosssection/mass_vtx + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_joos,sig_gmh + real*8 sig1,sig2 + + if (debug(2)) write(6,*)' peep_omega: enter ' + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_pisq= 139.57018**2 + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm +* main%davejac = jacobian +* main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = targ%Mrec_struck + if (mass**2.lt.m_pisq) then + peep_omega=0.0 + return + endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + +* cos/sin of theta between Pp and q in LAB +CDJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t = tt + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_omCM = (Wsq + mass**2 - m_psq)/invm/2. + if ((e_omCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_omCM*e_photCM- + * sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) + endif + main%tmin=t_min + tprime = abs(tt)-abs(t_min) + if (tprime.lt.0.) then + write(6,*)' unphysical -t<-t_min ',tt,t_min + endif + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +* +* One Pion Exchange model used in DESY analysis of Joos et al. +* W<2 GeV, Q^2<1.4 GeV^2 + sig1 = sig_joos(mass/1.d3,tt/1.d6,uu/1.d6, + * vertex%q2/1.d6,invm/1.d3,main%epsilon) + +* Parameterization based on saturated Regge model of J.M.Laget. +* 2 d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG peep_omega=Jttheta*gamma_T*Breit_wigner*ntup.sigcm + +C DJG Now we want the "fixed Mx" Jacobian since we are only generating the hadron +C DJG angles. No Breit-Wigner now either. +C DJG Note to me: If we ever want to extend to deuterium, need to get rid of numerous +C DJG hard-wired proton masses above... + + peep_omega = Jttheta_fx*gamma_T*ntup%sigcm + + if (debug(2)) write(6,*)' peep_omega: end ',peep_omega + return + end + + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_joos(mass,tt,uu,qsq,invm,epsilon) + +* This routine calculates p(e,e'p)omega0 cross sections using the One +* Pion Exchange model referenced by Joos et al. Nucl.Phys. B122(1977)365-382. + +C Model cross section for omega production taken from P. Joos et al. +C J. Dunne 4/20/00 + +C This function is adapted from Pawel Ambrozewicz +C noted by xucc +* all quantities are in GeV, except for returned cross section, which is in +* ub/MeV^2/rad + + implicit none + include 'constants.inc' + +C COMMON /SIG_STUFF/ J,epsilon,gamma_T,Jttheta +c real*4 J ! Jacobian E,E',Theta_e' ---> Q2,W,Phi_e' +C We no longer need such J because we want to keep sampling in Lab +C system Noted by xucc + + real*8 m_pi, m_pisq, m_p, m_psq, m_rho, m_rhosq + + real*8 mass ! omega mass + + real*8 invm ! invariant mass of hadronic system + real*8 Wsq + real*8 tt,uu ! Mandelstam variables + real*8 epsilon ! virtual photon polarisation + real*8 E_gamma ! Energy of equiv. real photon for norm of dif. + real*8 qsq ! 4 momentum transfer of scattered electron + + real*8 gamma_wpg ! Partial width for omega->pi gamma + real*8 Gsq/14.6/ ! pion-nucleon coupling + real*8 Lamba_wp +C real*8 Q_N_sq,Q_NT_sq + real*8 F_N ! form factor from pi-nucleon vertex + real*8 F_w ! form factor from gamma-pi-omega vertex + real*8 U_ff,pcm + real*8 QT,QF ! momentum of on-shell and off-shell pion + ! in omega rest frame + real*8 B,C,N_3 ! parameters in Joos OPE model + real*8 sig_ope_t ! differential x-section for trans. photons + real*8 sig_ope_l ! differential x-section for long. photons +c real*8 sig_dif ! differential x-section for diffraction + real*8 R ! + + real*8 Q_N,Q_NT !,L_piece,T_piece + real*8 temp,temp1,temp2 + +c Convert masses to GeV + m_pi = Mpi/1.e3 + m_pisq= Mpi2/1.e6 + m_rho = Mrho/1.e3 + m_rhosq=Mrho2/1.e6 + m_p = Mp/1.e3 + m_psq = Mp2/1.e6 + + Wsq = invm*invm + +C One Pion Exchange coefficients + + gamma_wpg = 0.9E-3*400*2*pi + Lamba_wp = sqrt(96*pi*(mass/(mass**2-m_pisq))**3*gamma_wpg) + + Q_N = m_pi*m_pi*(m_pisq-4.*m_psq)/(4.*m_psq) + Q_NT = tt*(tt-4.*m_psq)/(4.*m_psq) + F_N = (1+8.41*Q_N)/(1+8.41*Q_NT) + + temp=0.0 + +c QT = Pcm(m_pisq,0.,mass**2) + QT = Pcm(m_pisq,temp,mass**2) + + QF = Pcm(tt,-qsq,mass**2) + + temp1=2.3*QF + temp2=2.3*QT + +C test1=(U_ff(temp1)/U_ff(temp2)) + + F_w = (QT/QF)**2*(U_ff(temp1)/U_ff(temp2)) + + B = -0.5*qsq*(tt-2.*m_psq)+0.25*(m_psq-qsq-Wsq)* + $ (m_psq+mass**2-Wsq-tt) + + C = -0.25*((invm-m_p)**2+qsq)*((invm+m_p)**2+qsq) + + N_3 = Wsq*tt*uu-tt*(m_psq+qsq)*(m_psq-mass**2) + * -m_psq*(qsq+mass**2)**2 + N_3 = 0.5*sqrt(N_3) + + R = 0.4*qsq/m_rhosq + E_gamma = (Wsq-m_psq)/2./m_p + +C T_piece = (B+C)**2/(-C) + + sig_ope_t = 1./(Pcm(-qsq,Wsq,m_psq)*Pcm(temp,Wsq,m_psq)*Wsq)*Gsq* + $ lamba_wp**2/16.*(-tt)/(tt-m_pisq)**2*m_rhosq*m_rhosq/ + $ (qsq+m_rhosq)**2*(4.*(B+C)**2 - 2.*qsq*N_3**2)/ + $ (4.*(-C))*F_N*F_w + +c L_piece = 2*qsq*N_3*N_3/(-C) + + sig_ope_l = 1./(Pcm(-qsq,Wsq,m_psq)*Pcm(temp,Wsq,m_psq)*Wsq)*Gsq* + $ lamba_wp**2/16.*(-tt)/(tt-m_pisq)**2*m_rhosq*m_rhosq/ + $ (qsq+m_rhosq)**2*qsq*N_3*N_3/(-C)*F_N*F_w + +c Diffractive Cross Section +c coded but not used since the diffractive contribution is miniscule + +c sig_dif = Pcm(temp,Wsq,m_psq)/Pcm(-qsq,Wsq,m_psq)*(1.+epsilon*R)* +c 1 mass**4/(qsq+mass**2)**2*9.3*exp(6.7*tt)*(1+1.4/E_gamma) + +****************************************************************************** +* we keep the tradition that ntup.sigcm be d2sigma/dt/dphi_cm [ub/MeV**2/rad] +* 2pi factor is for dphi_cm and 1.e6 converts GeV**2 to MeV**2 +****************************************************************************** + sig_joos = (sig_ope_t+epsilon*sig_ope_l)/(2.*pi)/1.e6 + + return + end + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function U_ff(x) + real*8 x + U_ff = 1./(2.*x*x)*((2.*x*x+1)/(4.*x*x)*log(4*x*x+1.)-1) + return + end + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function Pcm(m1sq,m2sq,m3sq) + real*8 m1sq,m2sq,m3sq + Pcm = sqrt((m1sq*m1sq-2.*m1sq*(m2sq+m3sq)+(m2sq-m3sq)**2)/ + * (4.*m3sq)) + return + end + + + + real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, + * q2_gev,w_gev,eps) + +* This is a starting-point model to be used in the omega analysis of +* E01-004. Fits were made to the p(e,e'p)omega Regge model calculation +* at Q^2=2.35, W=2.47 by J.M. Laget, Phys.Rev.D 70(2004)054023. The +* model will be modified to best fit the omega data, as necessary. +* Subroutine calculates dsigma/dt/dphi_cm, which is returned as sig_gmh +* [ub/MeV^2/rad]. +* gh, 05.02.11 + + implicit none + include 'constants.inc' + + real*8 sig,wfactor + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + real*8 thetacm,phicm,t_gev,tprime_gev,q2_gev,w_gev,eps,tp + real*8 lambda0_sq,lambdapi_sq,alphapi_t,alphapi_0 + real*8 a,b,c,d,e,f,fpi,fpi235 + real*8 m_pi0sq + + m_pi0sq= Mpi02/1.e6 + + tp = abs(tprime_gev) ! just to make sure it's positive + if (abs(t_gev)-tprime error',abs(t_gev),tp + stop + endif + +* Normally, this would equal m_rho**2, but Laget has adjusted the value +* to reproduce the real photon data. + lambda0_sq= 0.462 !GeV^2 + +* Pion saturating Regge trajectory. +* For t>(m_pi**2), the trajectory takes the usual form, 0.7(t-m_pi**2). +* As t --> -infty, the trajectory goes asymptotically to -1. +* Laget does not mention which function he uses for the asymptotic +* behavior, but I find that taking the hyperbolic tangent of the usual +* trajectory expression gives a curve which resembles the one in +* Laget's paper. + if (t_gev>m_pi0sq) then + alphapi_t=0.7*(t_gev-m_pi0sq) + else + alphapi_t=tanh(0.7*(t_gev-m_pi0sq)) + endif + +* Use these instead of the usual Q^2 scaling of the response functions. + alphapi_0=0.7*(0.-m_pi0sq) + lambdapi_sq=lambda0_sq*((1.+alphapi_t)/(1.+alphapi_0))**2 + fpi = 1./(1.+q2_gev/lambdapi_sq) + fpi235 = 1./(1.+2.35/lambdapi_sq) + +* Fit parameters to t-dependence of Laget's p(e,e'p)omega response +* functions at Q^2=2.35, W=2.47 [ub/GeV^2]. Before fitting, I first +* divided the response functions by (fpi/fpi235)^2 and any sin(thetacm) +* factors. + a = 0.16675 + b = 0.89524 + c = 3.5991 + d = 6.4562 + e = -9.6199 + f = 5.8319 + sigl = a*exp(-b*tp)+c*exp(-d*(tp**0.5))+e*exp(-f*(tp**0.25)) + sigl = sigl *(fpi/fpi235)**2 + + a = -0.12286 + b = 0.56383 + c = 1.4673 + d = 2.1988 + e = 0.65170 + f = 18.501 + sigt = a*exp(-b*tp)+c*exp(-d*(tp**0.5))+e*exp(-f*(tp**2)) + sigt = sigt *(fpi/fpi235)**2 + + a = 0.46397 + b = 4.9179 + c = 3.3023 + d = 3.1741 + siglt = a*exp(-b*tp)+c*exp(-d*(tp**0.5)) + siglt = siglt*(fpi/fpi235)**2*sin(thetacm) +* Laget uses -sqrt(e(1+e)) instead of +sqrt(2e(1+e)) + siglt = -siglt/sqrt(2.) + + a = -0.26497 + b = 2.7655 + c = 2.8034 + d = 3.8586 + sigtt = a*exp(-b*tp)+c*exp(-d*(tp**0.5)) + sigtt= sigtt*(fpi/fpi235)**2*(sin(thetacm))**2 + +* Since I have nothing better to go on, for now I assume W scales as +* 1/(W^2-mp^2)^2. + wfactor=(2.47**2-mp**2)**2/(w_gev**2-mp**2)**2 + + sigl = sigl*wfactor + sigt = sigt*wfactor + siglt= siglt*wfactor + sigtt= sigtt*wfactor + +* Application of these Q^2, W scaling factors to my fitted functions +* gives response functions which closely resemble Laget's published +* curves at Q^2=2.35, W=2.47. Comparing to the DESY data and Laget's +* model at Q^2=0.84, W=2.30, my fits are 20% high at -t=0.1, 300-500% +* high between -t=1 and 3 GeV^2. Thus, this subroutine is optimized for +* Q^2>2, W>2. + sig = sigt +eps*sigl +eps*cos(2.*phicm)*sigtt + * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt + + sig = sig/2./pi/1.d+06 !dsig/dtdphicm in microbarns/MeV^2/rad + sig_gmh = sig + + return + end diff --git a/physics_rho_recoil.f b/physics_rho_recoil.f new file mode 100644 index 00000000..b4966473 --- /dev/null +++ b/physics_rho_recoil.f @@ -0,0 +1,307 @@ + real*8 function peep_rho(vertex,main) + +C This function is adapted from Pawel Ambrozewicz +C noted by xucc + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f +C For we need these quantities as starting point which may be different +C from Pawel's noted by xucc + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 m_rho/775.8/ + real*8 gamma_rho/150.3/ + real*8 m_pisq, m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + real*8 E_cm,p_cm ! proton CM momentum + + real*8 mass ! omega mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt ! Mandelstam variables + real*8 e_photCM,e_rhoCM,t_min + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Breit_wigner,Soding + real*8 Jttheta ! Jacobian t - theta_LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + +c real*8 mass_vtx +c common /pawel_crosssection/mass_vtx + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_diffract,sig_hermes + real*8 sig1,sig2 + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_pisq= 139.57018**2 + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm + main%davejac = jacobian + main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + +c mass = mass_vtx + mass = targ%Mrec_struck + if (mass**2.lt.m_pisq) then + peep_rho=0.0 + return + endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + + E_cm = (invm**2 + m_p**2 - mass**2)/invm/2. + p_cm = sqrt(E_cm**2 - m_p**2) + +* cos/sin of theta between Pp and q in LAB +C DJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x + + > vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t =tt + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_rhoCM = (Wsq + mass**2 - m_psq)/invm/2. + if ((e_rhoCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_rhoCM*e_photCM- + * sqrt((e_rhoCM**2-mass**2)*(e_photCM**2+qsq))) + endif + main%tmin=-t_min + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +* +* Diffractive rho production model used by P. Ambrosewicz + sig1 = sig_diffract(mass/1.d3,invm/1.d3,qsq/1.d6, + * tt/1.d6,t_min/1.d6) + +* PYTHIA model with modifications from the HERMES MC + sig2 = sig_hermes(qsq,tt,t_min,nu,epsilon) + + ntup%sigcm=sig2 + +C DJG Breit-Wigner in the event generation - not needed here anymore. +******************************************************************************* +* Multiply by Breit_wigner [1/MeV] to give proper Mx weighted cross section +* d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* +* gh - relativistic Breit-Wigner factor (eqn 38.52 of 2004 PDG book) + Breit_wigner=(m_rho*gamma_rho)**2/ + * ((mass**2-m_rho**2)**2 +(m_rho*gamma_rho)**2) + +* gh - since sigma_omega is integrated over the omega peak, normalize +* Breit-Wigner to unit integral + Breit_wigner=Breit_wigner/(gamma_rho*pi/2.) + +* Soding model (skewness) correction +* gh - This will screw up the normalization, but this generator is only +* intended for background subtraction anyways, and so does not matter +* +* Note that the value of the exponent falls steeply with t (see Fig 71 +* of Bauer's review article, Rev.Mod.Phys. 50(1978)261) and is often +* determined by fit to data. In the CLAS experiment, the fit exponent was +* 0+/-0.09. +* +* The value used by Ambrosewicz (low -t) was 5.2 +* Soding=(m_rho/mass)**5.2 +* +* Use value determined from fit to E01-004 (high -t) data +* Value is 4.95 for Q2=1.60 data (-t=3.95) and 6.65 for Q2=2.45 data (-t=4.67) +* Soding=(mass/m_rho)**5.5 + Soding=(mass/m_rho)**(-4.394+2.366*abs(tt/1.e6)) + +******************************************************************************* +* Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* --> d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG BW in event generation - also want Jacobian at fixed Mx ... +CDJG May want (Mrho/Mass)**5.2 as an extra weight here. Need to check with Garth. + + peep_rho=Jttheta_fx*gamma_T*Soding*ntup%sigcm + + return + end + + + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_diffract(mass,invm,qsq,tt,t_min) + +* This routine calculates p(e,e'p)rho0 cross sections using the diffractive +* model referenced by P. Ambrosewicz et al. + +* all calculations are in GeV + + implicit none + + real*8 mass,invm,Wsq,qsq,tt,t_min,e_gamma + real*8 A,B,C,b_slope,sig_grho + real*8 m_p,m_psq,pi + + pi = 3.141592653589793 + m_p = 0.93827231 + m_psq = m_p**2 + + Wsq = invm*invm + + A = 0.6*Wsq - 3.62*invm + 5.64 + B = -2.58*Wsq + 14.93*invm - 23.21 + C = 1.1*invm + 2.6 + b_slope = A*qsq + B*sqrt(qsq) + C + + if (b_slope.lt.0.0) then + b_slope = 0.0 + endif + + e_gamma = (Wsq - m_psq)/m_p/2. + sig_grho = 29.4/e_gamma + 9.5 + +* returned cross section is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +* 2pi factor is for dphi_cm and 1.e6 converts GeV^2 to MeV^2 + + sig_diffract = (sig_grho/(1+qsq/mass**2)**2) + * *exp(b_slope*(tt-t_min))/(2.*pi)/1.d6 + + return + end + + + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_hermes(Q2,t,tmin,nu,epsi) + +* This routine calculates p(e,e'rho)p cross sections using D. Gaskell's +* attempt to code in the form used in PYTHIA with modifications +* implmented in the HERMES Monte Carlo by Patricia Liebing. + + implicit none + include 'constants.inc' + + real*8 t,tmin,tprime + real*8 nu,epsi,Q2 + real*8 sig0,sigt,sig219,R,cdeltatau,brho + + tprime = abs(t-tmin)/1.d6 + cdeltatau = hbarc/(sqrt(nu**2+Q2+mrho2)-nu) !in fm! + +* Put in some W dependence from photoproduction data +* DJG: This is my rough fit to some old photoproduction data. + + sig0 = 41.263/(nu/1000.0)**0.4765 ! microbarns + +* DJG: R is usually fit to the form c_0 (Q2/M2_rho)^c1 +* DJG: The c_0 and c_1 are taken from HERMES data. + + R = 0.33*(Q2/mrho2)**(0.61) + +* DJG: The Q2 dependence is usually given by (M2_rho/(Q2+M2_rho))^2 +* DJG: HERMES found that 2.575 works better than 2 in the exponent. + + sigt = sig0*(1.0+epsi*R)*(mrho2/(Q2+mrho2))**(2.575) + +* DJG: Need to parameterize t-dependence with b parameter as a function of c-tau +* +* if (cdeltatau.le.0.390323) then +* brho = 1.07477 +* else if(cdeltatau.lt.1.968.and.cdeltatau.gt.0.390323) then +* brho = 4.4679 + 8.6106*dlog10(cdeltatau) +* else +* brho = 7.0 +* endif + +* This is the parameterization shown in Cynthia Hajidakis' thesis (Orsay) +* JLab CLAS E99-105. + + if (cdeltatau.lt.2.057) then + brho = -0.0941+3.449*cdeltatau + else + brho = 7.0 + endif + + sig219 = sigt*brho*exp(-brho*tprime)/2.0/pi !ub/GeV**2/rad + + sig_hermes=sig219/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + + return + end From 505432b2ad2679f50d4138c6862ef213d635d7ff Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Fri, 9 Jan 2015 11:04:36 -0600 Subject: [PATCH 03/15] first attempt at phi, update K+ generators --- Makefile | 5 +- constants.inc | 4 + dbase.f | 11 +- event.f | 16 +- infiles/kaonL_550_302_37_+0000.inp | 116 ++++++++++++++ infiles/kaonS_550_302_37_+0000.inp | 116 ++++++++++++++ infiles/omega_245_27_+1.inp | 4 +- infiles/phi_600_320_17_+0590.inp | 116 ++++++++++++++ physics_kaon.f | 80 +++++++++- physics_phi.f | 247 +++++++++++++++++++++++++++++ physics_rho_recoil.f | 81 ++++++---- simc.f | 6 + 12 files changed, 765 insertions(+), 37 deletions(-) create mode 100644 infiles/kaonL_550_302_37_+0000.inp create mode 100644 infiles/kaonS_550_302_37_+0000.inp create mode 100644 infiles/phi_600_320_17_+0590.inp create mode 100644 physics_phi.f diff --git a/Makefile b/Makefile index 606f0f18..d16735d2 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,8 @@ C = $(simcdir)/calo/ OBJ1 = target.o brem.o gauss1.o NtupleInit.o NtupleClose.o enerloss_new.o OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o -OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o results_write.o event.o mt19937.o jacobians.o +OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o +OBJ4a = results_write.o event.o mt19937.o jacobians.o OBJ5 = $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o OBJ6 = $(A)rotate_haxis.o $(A)rotate_vaxis.o $(A)locforunt.o OBJ7 = $(H)mc_hms.o $(H)mc_hms_hut.o $(H)mc_hms_recon.o @@ -45,7 +46,7 @@ OBJA = $(L)mc_hrsl.o $(L)mc_hrsl_hut.o $(L)mc_hrsl_recon.o OBJB = $(SH)mc_shms.o $(SH)mc_shms_hut.o $(SH)mc_shms_recon.o OBJC = $(T)Ctq5Pdf.o OBJD = $(C)mc_calo.o $(C)mc_calo_recon.o -my_objs = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJA) $(OBJB) $(OBJC) $(OBJD) +my_objs = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ4a) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJA) $(OBJB) $(OBJC) $(OBJD) my_deps = $(my_objs:.o=.d) diff --git a/constants.inc b/constants.inc index cd4b628d..0693b6cf 100644 --- a/constants.inc +++ b/constants.inc @@ -12,6 +12,7 @@ real*8 Me, Me2, Mp, Mp2, Mn, Mn2, Mpi, Mpi2, Mpi0, Mpi02 real*8 Meta, Meta2, Mk, Mk2, Mrho, Mrho2, MrhoW real*8 Momega, Momega2, MomegaW, Md, Md2 + real*8 Mphi, Mphi2, MphiW real*8 Mlambda, Msigma0, Msigma_minus real*8 amu, hbarc, pi, twopi, alpha, alpi, degrad, euler parameter (Me=0.51099906) @@ -20,6 +21,9 @@ parameter (Mp2=Mp**2) parameter (Mn=939.56563) parameter (Mn2=Mn**2) + parameter (Mphi=1019.460) !2006 PDG value + parameter (Mphi2=Mphi**2) + parameter (MphiW=4.26) !2006 PDG value parameter (Mpi=139.57018) parameter (Mpi2=Mpi**2) parameter (Mpi0=134.9766) diff --git a/dbase.f b/dbase.f index 31760e42..1d8e2a77 100644 --- a/dbase.f +++ b/dbase.f @@ -321,9 +321,12 @@ subroutine dbase_read(H) else if(Meepx.gt.778.0.and.Meepx.lt.790.0) then targ%Mrec_struck = Momega which_eepx = 4 + else if(Meepx.gt.1015.0.and.Meepx.lt.1025.0) then + targ%Mrec_struck = Mphi + which_eepx = 5 else targ%Mrec_struck = Meepx - which_eepx = 5 + which_eepx = 6 endif else if (doing_delta) then !Strike (and detect) proton, pion 'recoil' @@ -764,6 +767,8 @@ subroutine dbase_read(H) write(6,*) ' ****-------- H(e,e''p)rho --------****' else if(which_eepx.eq.4) then write(6,*) ' ****-------- H(e,e''p)omega --------****' + else if(which_eepx.eq.5) then + write(6,*) ' ****-------- H(e,e''p)phi --------****' else write(6,*) ' ****-------- H(e,e''p)Mx --------****' write(6,*) 'where Mx in MeV is', Meepx @@ -777,6 +782,8 @@ subroutine dbase_read(H) write(6,*) ' ****-------- D(e,e''p)rho --------****' else if(which_eepx.eq.4) then write(6,*) ' ****-------- D(e,e''p)omega --------****' + else if(which_eepx.eq.5) then + write(6,*) ' ****-------- D(e,e''p)phi --------****' else write(6,*) ' ****-------- D(e,e''p)Mx --------****' write(6,*) 'where Mx in MeV is', Meepx @@ -790,6 +797,8 @@ subroutine dbase_read(H) write(6,*) ' ****-------- A(e,e''p)rho --------****' else if(which_eepx.eq.4) then write(6,*) ' ****-------- A(e,e''p)omega --------****' + else if(which_eepx.eq.5) then + write(6,*) ' ****-------- A(e,e''p)phi --------****' else write(6,*) ' ****-------- A(e,e''p)Mx --------****' write(6,*) 'where Mx in MeV is', Meepx diff --git a/event.f b/event.f index dc82a6ed..d5d02862 100644 --- a/event.f +++ b/event.f @@ -613,7 +613,7 @@ subroutine complete_ev(main,vertex,success) if(doing_eepx) then if (debug(4)) write(6,*)'comp_ev: at 6.5a',which_eepx if (which_eepx.eq.3) then !rho -* the rho is very broad and so gets a formula with more restricted width +* the rho is very broad and gets a formula with more restricted width * even so, masses will be generated down to about 375 MeV c ranlux substituted for grnd - gh call ranlux (rannum4,1) @@ -631,6 +631,13 @@ subroutine complete_ev(main,vertex,success) targ%Mrec_struck = Momega + > 0.5*MomegaW*tan((2.*rannum-1.)*pi/2.) c > 0.5*MomegaW*tan((2.*grnd()-1.)*pi/2.) + else if (which_eepx.eq.5) then ! phi +c ranlux substituted for grnd - gh + call ranlux (rannum4,1) + rannum=dfloat(rannum4) + targ%Mrec_struck = Mphi + + > 0.5*MphiW*tan((2.*rannum-1.)*pi/2.) +c > 0.5*MphiW*tan((2.*grnd()-1.)*pi/2.) endif if (debug(4)) write(6,*)'comp_ev: at 6.5b',targ%Mrec_struck if(targ%Mrec_struck.le.0.0) return @@ -1466,7 +1473,7 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) integer i, iPm1 real*8 a, b, r, frac, peepi, peeK, peedelta, peerho, peepiX - real*8 peep_omega, peep_rho, peepph + real*8 peep_omega, peep_rho, peep_phi, peepph real*8 survivalprob, semi_dilution real*8 weight, width, sigep, deForest, tgtweight real*8 Em_weight ! gh @@ -1587,7 +1594,10 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) else if(which_eepx.eq.4) then !omega main%sigcc = peep_omega(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.5) then + else if(which_eepx.eq.5) then !phi + main%sigcc = peep_phi(vertex,main) + main%sigcc_recon = 1.0 + else if(which_eepx.eq.6) then main%sigcc = 1.0 main%sigcc_recon = 1.0 endif diff --git a/infiles/kaonL_550_302_37_+0000.inp b/infiles/kaonL_550_302_37_+0000.inp new file mode 100644 index 00000000..03d8943d --- /dev/null +++ b/infiles/kaonL_550_302_37_+0000.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 20000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 1 ; (ONE = TRUE) + which_kaon = 0 ; (0=p-->K+lamda0,1=p-->K+sigma0,2=n-->K+sigma) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 371.3 ; decay length (cm) +end parm experiment + +begin parm kinematics_main + Ebeam = 9343.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 2021.0 ; e arm central momentum (MeV/c) + spec%e%theta = 31.300 ; e arm angle setting (degrees) + spec%p%P = 6842.2 ; p arm central momentum (MeV/c) + spec%p%theta = 7.850 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/kaonS_550_302_37_+0000.inp b/infiles/kaonS_550_302_37_+0000.inp new file mode 100644 index 00000000..8a675b2b --- /dev/null +++ b/infiles/kaonS_550_302_37_+0000.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 20000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 1 ; (ONE = TRUE) + which_kaon = 1 ; (0=p-->K+lamda0,1=p-->K+sigma0,2=n-->K+sigma) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 371.3 ; decay length (cm) +end parm experiment + +begin parm kinematics_main + Ebeam = 9343.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 2021.0 ; e arm central momentum (MeV/c) + spec%e%theta = 31.300 ; e arm angle setting (degrees) + spec%p%P = 6842.2 ; p arm central momentum (MeV/c) + spec%p%theta = 7.850 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_245_27_+1.inp b/infiles/omega_245_27_+1.inp index 63bef2f0..1c5f3408 100644 --- a/infiles/omega_245_27_+1.inp +++ b/infiles/omega_245_27_+1.inp @@ -1,8 +1,8 @@ ; This is a CTP file begin parm experiment - ngen = 500000 ; POS: # of successes; NEG: # of tries -; ngen = 500 ; POS: # of successes; NEG: # of tries +; ngen = 500000 ; POS: # of successes; NEG: # of tries + ngen = 5000 ; POS: # of successes; NEG: # of tries EXPER%charge = 1.0 ; total charge (mC) doing_phsp = 0 ; (ONE = TRUE) doing_kaon = 0 ; (ONE = TRUE) diff --git a/infiles/phi_600_320_17_+0590.inp b/infiles/phi_600_320_17_+0590.inp new file mode 100644 index 00000000..8d0d3472 --- /dev/null +++ b/infiles/phi_600_320_17_+0590.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 20000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 1019.46 ; Mphi=1019.460 +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/physics_kaon.f b/physics_kaon.f index 9416f4d4..07dfe171 100644 --- a/physics_kaon.f +++ b/physics_kaon.f @@ -30,7 +30,7 @@ real*8 function peeK(vertex,main,survivalprob) real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian,jac_old - real*8 sig_factorized + real*8 sig_factorized,sig_factorized2007 * Calculate velocity of PHOTON-NUCLEON C.M. system in the lab frame. Use beta * and gamma of the cm system (bstar and gstar) to transform particles into @@ -88,7 +88,8 @@ real*8 function peeK(vertex,main,survivalprob) * Factorization model (CURRENTLY SET UP FOR HYDROGEN ONLY!!!) - ntup%sigcm2 = sig_factorized(vertex%q2,main%wcm,main%t,pkcm,targ%Mrec_struck) + ntup%sigcm2 = sig_factorized2007(vertex%q2,main%wcm,main%t, + 1 pkcm,targ%Mrec_struck,main%epsilon) * Choose the cross section model to use by default. ! sigma_eek = ntup.sigcm1 !Saghai @@ -237,6 +238,81 @@ real*8 function sig_factorized(q2,w,t,pk,mrec) + real*8 function sig_factorized2007(q2,w,t,pk,mrec,epsilon) + +* Purpose: +* p(e,e'K+)Lambda and p(e,e'K+)Sigma cross sections +* via factorized model described in Tanja Horn's December 2007 report +* model is based on Q^2, W dependence of Bebek and Brauel data, using +* Koltenuk fits which are updated to improve epsilon, etc. dependence + +* Cross section (at theta_cm=0, i.e. t=tmin) is F(Q^2)*G(W) +* The t-dependance at fixed Q^2,W is h(t)=D*exp(-b*t), +* so the cross section is F(Q^2)*G(W)*(h(t)/h(tmin))=F(Q^2)*G(W)*h(t-tmin) +* +* The model requires W, Q^2, t, pkcm and epsilon + + real*8 q2,w,t,pk,mrec !all in Mev,MeV**2 + real*8 epsilon + real*8 nu,q,nucm,qcm,tmin,pktest + real*8 w2val,q2val,tval,pkval,tminval !Vars. used in model (GeV) + real*8 fact_w,fact_q,fact_t + + include 'constants.inc' + +! Initialize some stuff. Start with intermediate variables, all in MeV. + + nu = ( w**2 + q2 - mp**2 )/2./Mp + q = sqrt(q2+nu**2) + qcm = q*(Mp/W) + nucm = sqrt(qcm**2-q2) + tmin = -1.*(Mk2 - q2 - 2*nucm*sqrt(pk**2+mk2) + 2*qcm*pk ) + +! Check center of mass pk, since we can get it from w2 + pktest = sqrt ( (w**2+mk2-mrec**2)**2/4./w**2 - mk2 ) + if (abs((pktest-pk)/pk).gt.0.001) then + write(6,*) 'Kaon C.M. momentum passed to sig_factorized does not agree with' + write(6,*) 'the value calculated from W' + write(6,*) 'Passed,calculated=',pk,pktest + endif + +! Parameters used by the model, all converted to GeV. + q2val = q2/1.d6 + w2val = w**2/1.d6 + pkval = pk/1000. + tval = t/1.d6 + tminval = tmin/1.d6 + + if (mrec.lt.1150.) then ! Lambda production + fact_q = 4.50/(q2val+2.67)**2 + + if (w2val.ne.0) then !=0 for central event!!! + fact_w = 4.1959*pkval/(sqrt(w2val)*(w2val-0.93827**2)) + if (w2val.lt.4.) then ! resonance region correction + fact_w = 0.959*fact_w + (0.18*1.72**2*0.10**2) / + > ( (w2val-1.72**2)**2 + 1.72**2*0.10**2 ) + endif + endif + + fact_t = 1.10*exp(-2.1*(tval-tminval)) + + else ! Sigma production + fact_q = 0.1587/(q2val+0.785)**2 + + if (w2val.ne.0) then !=0 for central event!!! + fact_w = 1.3176*pkval/(sqrt(w2val)*(w2val-0.93827**2)) + endif + + fact_t = 1.0*exp(-1.0*(tval-tminval)) + endif + + sig_factorized2007 = fact_q*fact_t*fact_w*(2.+epsilon)/3. + + return + end + + + subroutine eekeek(ss,q22,angl,theta,phi,epsi,sigma_eep) implicit none diff --git a/physics_phi.f b/physics_phi.f new file mode 100644 index 00000000..84e257f2 --- /dev/null +++ b/physics_phi.f @@ -0,0 +1,247 @@ + real*8 function peep_phi(vertex,main) + +C This function is adapted from Pawel Ambrozewicz +c gh - 14.12.18 + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f +C For we need these quantities as starting point which may be different +C from Pawel's noted by xucc + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 sigma_phi + real*8 m_phi/1019.460/ + real*8 gamma_phi/4.26/ + real*8 m_Ksq, m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + + real*8 mass ! phi mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt,uu ! Mandelstam variables + real*8 tprime + real*8 e_photCM,e_phiCM,t_min + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Breit_wigner + real*8 Jttheta ! Jacobian t-Mx - Ep,theta_p in LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_gmh,sig_diffract,sig_phigmh + real*8 sig1,sig2,sig3 + + if (debug(2)) write(6,*)' peep_phi: enter ' + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_Ksq= 493.677**2 + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm +* main%davejac = jacobian +* main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = targ%Mrec_struck + if (mass**2.lt.m_Ksq) then + peep_phi=0.0 + return + endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + +* cos/sin of theta between Pp and q in LAB +CDJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t = tt + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_phiCM = (Wsq + mass**2 - m_psq)/invm/2. + if ((e_phiCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_phiCM*e_photCM- + * sqrt((e_phiCM**2-mass**2)*(e_photCM**2+qsq))) + endif + main%tmin=t_min + tprime = abs(tt)-abs(t_min) + if (tprime.lt.0.) then + write(6,*)' unphysical -t<-t_min ',tt,t_min + endif + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +* +* Diffractive model used by P. Ambrosewicz + sig1 = sig_diffract(mass/1.d3,invm/1.d3,qsq/1.d6, + * tt/1.d6,t_min/1.d6) + +* PYTHIA model with modifications from the HERMES MC + sig2 = sig_phigmh(qsq,tt,t_min,nu,invm/1.d3,epsilon) + +* Parameterization based on saturated Regge model of J.M.Laget. +* 2 d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG peep_omega=Jttheta*gamma_T*Breit_wigner*ntup.sigcm + +C DJG Now we want the "fixed Mx" Jacobian since we are only generating the hadron +C DJG angles. No Breit-Wigner now either. +C DJG Note to me: If we ever want to extend to deuterium, need to get rid of numerous +C DJG hard-wired proton masses above... + + peep_phi = Jttheta_fx*gamma_T*ntup%sigcm + + if (debug(2)) write(6,*)' peep_phi: end ',peep_phi + return + end + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_phigmh(Q2,t,tmin,nu,w_gev,epsi) + +* This routine calculates p(e,e'phi)p cross sections +* in the form used in PYTHIA with modifications +* implmented in the HERMES Monte Carlo + + implicit none + include 'constants.inc' + + real*8 t,tmin,tprime + real*8 nu,epsi,Q2,w_gev + real*8 sig0,sigt,sig219,R,cdeltatau,bphi + + tprime = abs(t-tmin)/1.d6 + cdeltatau = hbarc/(sqrt(nu**2+Q2+mphi2)-nu) !in fm! + +* W dependence from photoproduction data +* Use Fig 35 of Cassel et al, PRD 24(1981) 2787 + + sig0 = 0.225+(w_gev-2.0)*(0.275/2.) ! microbarns + +* R=L/T is usually fit to the form c_0*(Q2/M2_V)^c1 +* c_0 and c_1 taken from HERMES data, Rakness thesis, Fig 5.8 + + R = 0.38*(Q2/mphi2)**(0.87) + if (R.gt.1) R=1 + +* The Q2 dependence is usually given by (M2_V/(Q2+M2_V))^2 + + sigt = sig0*(1.0+epsi*R)*(mphi2/(Q2+mphi2))**2 + +* Need to parameterize t-dependence with b parameter as a function of c-tau +* Use Fig 34 of Cassel et al, PRD 24(1981) 2787 + + bphi = 3.75 + 3.5*dlog10(cdeltatau) + +c GH: the conventional formula with exponential factor is for forward +c diffractive, it might not be appropriate for u-channel production + + sig219 = sigt*bphi*exp(-bphi*tprime)/2.0/pi !ub/GeV**2/rad + + sig_phigmh=sig219/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + + return + end diff --git a/physics_rho_recoil.f b/physics_rho_recoil.f index b4966473..dc8e4857 100644 --- a/physics_rho_recoil.f +++ b/physics_rho_recoil.f @@ -32,7 +32,8 @@ real*8 function peep_rho(vertex,main) real*8 mass ! omega mass real*8 invm,Wsq ! invariant mass of hadronic system - real*8 tt ! Mandelstam variables + real*8 tt,uu ! Mandelstam variables + real*8 tprime real*8 e_photCM,e_rhoCM,t_min real*8 gamma_T ! flux of transversely polarized virt. photons @@ -122,6 +123,12 @@ real*8 function peep_rho(vertex,main) * sqrt((e_rhoCM**2-mass**2)*(e_photCM**2+qsq))) endif main%tmin=-t_min + tprime = abs(tt)-abs(t_min) + if (tprime.lt.0.) then + write(6,*)' unphysical -t<-t_min ',tt,t_min + endif + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] @@ -132,7 +139,7 @@ real*8 function peep_rho(vertex,main) * tt/1.d6,t_min/1.d6) * PYTHIA model with modifications from the HERMES MC - sig2 = sig_hermes(qsq,tt,t_min,nu,epsilon) + sig2 = sig_hermes(qsq,tt,t_min,nu,invm/1.d3,epsilon) ntup%sigcm=sig2 @@ -150,21 +157,21 @@ real*8 function peep_rho(vertex,main) Breit_wigner=Breit_wigner/(gamma_rho*pi/2.) * Soding model (skewness) correction -* gh - This will screw up the normalization, but this generator is only -* intended for background subtraction anyways, and so does not matter * -* Note that the value of the exponent falls steeply with t (see Fig 71 +* The value of the exponent falls steeply with t (see Fig 71 * of Bauer's review article, Rev.Mod.Phys. 50(1978)261) and is often * determined by fit to data. In the CLAS experiment, the fit exponent was -* 0+/-0.09. +* 0+/-0.09 [C. Hajidakis Thesis, p. 113] * * The value used by Ambrosewicz (low -t) was 5.2 * Soding=(m_rho/mass)**5.2 * -* Use value determined from fit to E01-004 (high -t) data +* Initial value determined from fit to E01-004 (high -t) data * Value is 4.95 for Q2=1.60 data (-t=3.95) and 6.65 for Q2=2.45 data (-t=4.67) -* Soding=(mass/m_rho)**5.5 - Soding=(mass/m_rho)**(-4.394+2.366*abs(tt/1.e6)) +* Soding=(mass/m_rho)**(-4.394+2.366*abs(tt/1.e6)) + +* GH: leave it fixed at the CLAS value for now + Soding=(m_rho/mass)**0.0 ******************************************************************************* * Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] @@ -249,7 +256,7 @@ real*8 function sig_diffract(mass,invm,qsq,tt,t_min) C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - real*8 function sig_hermes(Q2,t,tmin,nu,epsi) + real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) * This routine calculates p(e,e'rho)p cross sections using D. Gaskell's * attempt to code in the form used in PYTHIA with modifications @@ -259,49 +266,69 @@ real*8 function sig_hermes(Q2,t,tmin,nu,epsi) include 'constants.inc' real*8 t,tmin,tprime - real*8 nu,epsi,Q2 + real*8 nu,epsi,Q2,w_gev,wfactor,m_p real*8 sig0,sigt,sig219,R,cdeltatau,brho + m_p = 0.93827231 tprime = abs(t-tmin)/1.d6 cdeltatau = hbarc/(sqrt(nu**2+Q2+mrho2)-nu) !in fm! * Put in some W dependence from photoproduction data + * DJG: This is my rough fit to some old photoproduction data. +c sig0 = 41.263/(nu/1000.0)**0.4765 ! microbarns + +* GH: Photoproduction fit in Fig 22 of Cassel et al, PRD 24(1981) 2787 + sig0 = 29.4/(nu/1000.)+9.5 ! microbarns - sig0 = 41.263/(nu/1000.0)**0.4765 ! microbarns +* GH: Since I have nothing better to go on, for now I assume W scales as +* 1/(W^2-mp^2)^2. +c wfactor=(2.47**2-m_p**2)**2/(w_gev**2-m_p**2)**2 -* DJG: R is usually fit to the form c_0 (Q2/M2_rho)^c1 -* DJG: The c_0 and c_1 are taken from HERMES data. +* DJG: R=L/T is usually fit to the form c_0 (Q2/M2_rho)^c1 +* GH: c_0 and c_1 taken from HERMES data, Rakness thesis, Fig 5.9 - R = 0.33*(Q2/mrho2)**(0.61) + R = 0.39*(Q2/mrho2)**(0.68) + if (R.gt.1) R=1 * DJG: The Q2 dependence is usually given by (M2_rho/(Q2+M2_rho))^2 * DJG: HERMES found that 2.575 works better than 2 in the exponent. sigt = sig0*(1.0+epsi*R)*(mrho2/(Q2+mrho2))**(2.575) -* DJG: Need to parameterize t-dependence with b parameter as a function of c-tau -* -* if (cdeltatau.le.0.390323) then -* brho = 1.07477 -* else if(cdeltatau.lt.1.968.and.cdeltatau.gt.0.390323) then -* brho = 4.4679 + 8.6106*dlog10(cdeltatau) -* else -* brho = 7.0 -* endif +* DJG: Need to parameterize t-dependence with b parameter as a function +* of c-tau + +c if (cdeltatau.le.0.390323) then +c brho = 1.07477 +c else if(cdeltatau.lt.1.968.and.cdeltatau.gt.0.390323) then +c brho = 4.4679 + 8.6106*dlog10(cdeltatau) +c else +c brho = 7.0 +c endif -* This is the parameterization shown in Cynthia Hajidakis' thesis (Orsay) -* JLab CLAS E99-105. +* GH: brho parameterization from Cynthia Hajidakis' thesis Fig 4.9, p146. +* JLab CLAS E99-105 (Orsay) if (cdeltatau.lt.2.057) then brho = -0.0941+3.449*cdeltatau else - brho = 7.0 + brho = 7.0 ! see Fig 14 of Cassel et al, PRD 24(1981) 2787 endif + if (brho.lt.1.07477) brho = 1.07477 + +c GH: the conventional formula with exponential factor is for forward +c diffractive, it might not be appropriate for u-channel production sig219 = sigt*brho*exp(-brho*tprime)/2.0/pi !ub/GeV**2/rad sig_hermes=sig219/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + +c GH: check for weird behavior on upper side of rho peak + if (tprime.gt.8. and. sig_hermes.gt.1.d-14) then + write(6,*)' tprime=',tprime,' sig=',sig_hermes + sig_hermes=1.d-14 + endif return end diff --git a/simc.f b/simc.f index e9f24907..38bb1e47 100644 --- a/simc.f +++ b/simc.f @@ -753,6 +753,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, write(iun,*) ' ****-------- H(e,e''p)rho0 --------****' else if(which_eepx.eq.4) then write(iun,*) ' ****-------- H(e,e''p)omega --------****' + else if(which_eepx.eq.5) then + write(iun,*) ' ****-------- H(e,e''p)phi --------****' else write(iun,*) ' ****-------- H(e,e''p)Mx --------****' write(iun,*) ' Mx in MeV is', Meepx @@ -766,6 +768,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, write(iun,*) ' ****-------- D(e,e''p)rho0 --------****' else if(which_eepx.eq.4) then write(iun,*) ' ****-------- D(e,e''p)omega --------****' + else if(which_eepx.eq.5) then + write(iun,*) ' ****-------- D(e,e''p)phi --------****' else write(iun,*) ' ****-------- D(e,e''p)Mx --------****' write(iun,*) ' Mx in MeV is', Meepx @@ -779,6 +783,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, write(iun,*) ' ****-------- A(e,e''p)rho0 --------****' else if(which_eepx.eq.4) then write(iun,*) ' ****-------- A(e,e''p)omega --------****' + else if(which_eepx.eq.5) then + write(iun,*) ' ****-------- A(e,e''p)phi --------****' else write(iun,*) ' ****-------- A(e,e''p)Mx --------****' write(iun,*) ' where Mx in MeV is', Meepx From 4d53f011e6504d11c154ecaf4967e4aa6545a254 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Wed, 25 Nov 2015 16:08:11 -0600 Subject: [PATCH 04/15] Changes for new gfortran treatment of double precision variables and functions. Garth Huber Nov 24, 2015 --- brem.f | 64 ++++++++++++++++++++++---------------------- cteq5/Ctq5Pdf.f | 10 +++---- dbase.f | 8 +++--- enerloss_new.f | 12 ++++----- event.f | 41 ++++++++++++++-------------- hms/mc_hms.f | 28 +++++++++---------- hms/mc_hms_hut.f | 2 +- hms/mc_hms_recon.f | 2 +- init.f | 14 +++++----- jacobians.f | 6 ++--- last.kumac | 7 ++--- mt19937.f | 4 +-- physics_delta.f | 4 +-- physics_kaon.f | 38 +++++++++++++------------- physics_omega.f | 8 +++--- physics_phi.f | 14 +++++----- physics_pion.f | 16 +++++------ physics_proton.f | 8 +++--- physics_rho_recoil.f | 14 +++++----- poltar/trg_track.f | 4 +-- radc.f | 8 +++--- results_write.f | 22 +++++++-------- rho_decay.f | 2 +- rho_physics.f | 14 +++++----- semi_dilution.f | 8 +++--- semi_physics.f | 20 +++++++------- sf_lookup.f | 2 +- shared/musc.f | 2 +- shared/musc_ext.f | 2 +- shared/transp.f | 46 +++++++++++++++---------------- shms/mc_shms.f | 3 ++- shms/mc_shms_hut.f | 2 +- shms/mc_shms_recon.f | 2 +- simc.f | 14 +++++----- sos/mc_sos.f | 46 +++++++++++++++---------------- sos/mc_sos_hut.f | 2 +- sos/mc_sos_recon.f | 2 +- target.f | 8 +++--- trg_track.f | 4 +-- 39 files changed, 257 insertions(+), 256 deletions(-) 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/cteq5/Ctq5Pdf.f b/cteq5/Ctq5Pdf.f index 832e08c6..05b31ce9 100644 --- a/cteq5/Ctq5Pdf.f +++ b/cteq5/Ctq5Pdf.f @@ -67,7 +67,7 @@ C=========================================================================== real*8 Function Ctq5Pdf (Iparton, X, Q) - Implicit Double Precision (A-H,O-Z) +c Implicit Double Precision (A-H,O-Z) implicit integer (I-N) Logical Warn Common @@ -112,7 +112,7 @@ real*8 FUNCTION PartonX (IPRTN, X, Q) C COMMON / CtqPar1 / , this routine fetches u(fl, x, q) at any value of C x and q using Mth-order polynomial interpolation for x and Ln(Q/Lambda). C - IMPLICIT DOUBLE PRECISION (A-H, O-Z) +c IMPLICIT DOUBLE PRECISION (A-H, O-Z) implicit integer (I-N) C PARAMETER (MXX = 105, MXQ = 25, MXF = 6) @@ -202,7 +202,7 @@ real*8 FUNCTION PartonX (IPRTN, X, Q) END Subroutine SetCtq5 (Iset) - Implicit Double Precision (A-H,O-Z) +c Implicit Double Precision (A-H,O-Z) implicit integer (I-N) Parameter (Isetmax=9) @@ -248,7 +248,7 @@ Subroutine SetCtq5 (Iset) End Subroutine ReadTbl (Nu) - Implicit Double Precision (A-H,O-Z) +c Implicit Double Precision (A-H,O-Z) implicit integer (I-N) Character Line*80 PARAMETER (MXX = 105, MXQ = 25, MXF = 6) @@ -312,7 +312,7 @@ Function NextUn() SUBROUTINE POLINT (XA,YA,N,X,Y,DY) - IMPLICIT DOUBLE PRECISION (A-H, O-Z) +c IMPLICIT DOUBLE PRECISION (A-H, O-Z) C Adapted from "Numerical Recipes" PARAMETER (NMAX=10) DIMENSION XA(N),YA(N),C(NMAX),D(NMAX) diff --git a/dbase.f b/dbase.f index 1d8e2a77..ccb9b0a2 100644 --- a/dbase.f +++ b/dbase.f @@ -548,8 +548,8 @@ subroutine dbase_read(H) if (doing_pion .or. doing_kaon .or. doing_delta .or. doing_eepx .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' @@ -624,9 +624,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/event.f b/event.f index d5d02862..d268638b 100644 --- a/event.f +++ b/event.f @@ -127,7 +127,7 @@ subroutine generate(main,vertex,orig,success) type(event):: vertex, orig real*8 nsig_max - parameter(nsig_max=3.0d0) !max #/sigma for gaussian ran #s. + parameter(nsig_max=3.0e0) !max #/sigma for gaussian ran #s. ! Randomize the position of the interaction inside the available region. @@ -177,7 +177,7 @@ subroutine generate(main,vertex,orig,success) ! electron. Remove targ.zoffset from the z position of the scattering ! in order to get the position relative to the center of the target. - call trip_thru_target (1, main%target%z-targ%zoffset, Ebeam, 0.0d0, + call trip_thru_target (1, main%target%z-targ%zoffset, Ebeam, 0.0e0, > main%target%Eloss(1), main%target%teff(1),Me,1) if (.not.using_Eloss) main%target%Eloss(1) = 0.0 if (using_Coulomb) then @@ -263,11 +263,11 @@ subroutine generate(main,vertex,orig,success) ! Generate Electron Angles (all cases): c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) vertex%e%yptar=gen%e%yptar%min+rannum*(gen%e%yptar%max-gen%e%yptar%min) c vertex%e%yptar=gen%e%yptar%min+grnd()*(gen%e%yptar%max-gen%e%yptar%min) call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) vertex%e%xptar=gen%e%xptar%min+rannum*(gen%e%xptar%max-gen%e%xptar%min) c vertex%e%xptar=gen%e%xptar%min+grnd()*(gen%e%xptar%max-gen%e%xptar%min) @@ -277,12 +277,12 @@ subroutine generate(main,vertex,orig,success) > .or.doing_Xphasespace) then c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) vertex%p%yptar=gen%p%yptar%min+rannum* c vertex%p%yptar=gen%p%yptar%min+grnd()* > (gen%p%yptar%max-gen%p%yptar%min) call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) vertex%p%xptar=gen%p%xptar%min+rannum* c vertex%p%xptar=gen%p%xptar%min+grnd()* > (gen%p%xptar%max-gen%p%xptar%min) @@ -296,7 +296,7 @@ subroutine generate(main,vertex,orig,success) main%gen_weight=main%gen_weight*(Emax-Emin)/(gen%p%E%max-gen%p%E%min) c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) vertex%p%E = Emin + rannum*(Emax-Emin) c vertex%p%E = Emin + grnd()*(Emax-Emin) vertex%p%P = sqrt(vertex%p%E**2 - Mh2) @@ -321,7 +321,7 @@ subroutine generate(main,vertex,orig,success) main%gen_weight=main%gen_weight*(Emax-Emin)/(gen%e%E%max-gen%e%E%min) c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) vertex%e%E = Emin + rannum*(Emax-Emin) c vertex%e%E = Emin + grnd()*(Emax-Emin) vertex%e%P = vertex%e%E @@ -338,7 +338,6 @@ subroutine generate(main,vertex,orig,success) call physics_angles(spec%p%theta,spec%p%phi, & vertex%p%xptar,vertex%p%yptar,vertex%p%theta,vertex%p%phi) - ! Generate Fermi Momentum and Em for A(e,e'pi) and A(e,e'K). pfer=0.0 pferx=0.0 @@ -617,7 +616,7 @@ subroutine complete_ev(main,vertex,success) * even so, masses will be generated down to about 375 MeV c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) targ%Mrec_struck = Mrho + > 0.5*MrhoW* > tan((2.*rannum-1.)*atan(2.*450./MrhoW)) @@ -627,14 +626,14 @@ subroutine complete_ev(main,vertex,success) * all other mesons get the standard formula c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) targ%Mrec_struck = Momega + > 0.5*MomegaW*tan((2.*rannum-1.)*pi/2.) c > 0.5*MomegaW*tan((2.*grnd()-1.)*pi/2.) else if (which_eepx.eq.5) then ! phi c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dfloat(rannum4) + rannum=dble(rannum4) targ%Mrec_struck = Mphi + > 0.5*MphiW*tan((2.*rannum-1.)*pi/2.) c > 0.5*MphiW*tan((2.*grnd()-1.)*pi/2.) @@ -795,7 +794,7 @@ subroutine complete_ev(main,vertex,success) p_new_y = px*new_y_x + py*new_y_y + pz*new_y_z main%phi_pq = atan2(p_new_y,p_new_x) !atan2(y,x)=atan(y/x) - if (main%phi_pq.lt.0.d0) main%phi_pq=main%phi_pq+2.*pi + if (main%phi_pq.lt.0.e0) main%phi_pq=main%phi_pq+2.*pi ! if (p_new_y.lt.0.) then ! main.phi_pq = 2*pi - main.phi_pq ! endif @@ -947,7 +946,7 @@ subroutine complete_ev(main,vertex,success) oop_y = vertex%uq%x ! oop_y = q_x *(z_hat x x_hat) = q_x * (y_hat) vertex%PmPar = (vertex%Pmx*vertex%uq%x + vertex%Pmy*vertex%uq%y + vertex%Pmz*vertex%uq%z) vertex%PmOop = (vertex%Pmx*oop_x + vertex%Pmy*oop_y) / sqrt(oop_x**2+oop_y**2) - vertex%PmPer = sqrt( max(0.d0, vertex%Pm**2 - vertex%PmPar**2 - vertex%PmOop**2 ) ) + vertex%PmPer = sqrt( max(0.e0, vertex%Pm**2 - vertex%PmPar**2 - vertex%PmOop**2 ) ) if (debug(4)) write(6,*)'comp_ev: at 9',vertex%Pmx,vertex%Pmy,vertex%Pmz @@ -990,12 +989,12 @@ subroutine complete_ev(main,vertex,success) if (doing_deutpi .or. doing_deutkaon .or.doing_deuteepx .or. doing_deutdelta > .or. doing_deutrho) then if ((vertex%Emiss**2-vertex%Pmiss**2).lt.0) write(6,*) 'BAD MM!!!!! Emiss,Pmiss=',vertex%Emiss, vertex%Pmiss - MM = sqrt(max(0.d0,vertex%Emiss**2-vertex%Pmiss**2)) - krel = sqrt( max(0.d0,MM**2-4.*targ%Mrec_struck**2) ) + MM = sqrt(max(0.e0,vertex%Emiss**2-vertex%Pmiss**2)) + krel = sqrt( max(0.e0,MM**2-4.*targ%Mrec_struck**2) ) else if (doing_hepi .or. doing_hekaon .or.doing_heeepx .or. doing_hedelta > .or. doing_herho) then if ((vertex%Emiss**2-vertex%Pmiss**2).lt.0) write(6,*) 'BAD MM!!!!! Emiss,Pmiss=',vertex%Emiss, vertex%Pmiss - MM = sqrt(max(0.d0,vertex%Emiss**2-vertex%Pmiss**2)) + MM = sqrt(max(0.e0,vertex%Emiss**2-vertex%Pmiss**2)) krelx = vertex%Pmx + 1.5*pferx*pfer krely = vertex%Pmy + 1.5*pfery*pfer krelz = vertex%Pmz + 1.5*pferz*pfer @@ -1240,7 +1239,7 @@ subroutine complete_recon_ev(recon,success) p_new_x1 = px1*new_x_x + py1*new_x_y + pz1*new_x_z p_new_y1 = px1*new_y_x + py1*new_y_y + pz1*new_y_z ntup%phi_mq = atan2(p_new_y1,p_new_x1) !atan2(y,x)=atan(y/x) - if (ntup%phi_mq.lt.0.d0) ntup%phi_mq=ntup%phi_mq+2.*pi + if (ntup%phi_mq.lt.0.e0) ntup%phi_mq=ntup%phi_mq+2.*pi endif if(using_tgt_field) then !calculate polarized-target specific azimuthal angles @@ -1374,7 +1373,7 @@ subroutine complete_recon_ev(recon,success) oop_y = recon%uq%x ! oop_y = q_x *(z_hat x x_hat) = q_x * (y_hat) recon%PmPar = (recon%Pmx*recon%uq%x + recon%Pmy*recon%uq%y + recon%Pmz*recon%uq%z) recon%PmOop = (recon%Pmx*oop_x + recon%Pmy*oop_y) / sqrt(oop_x**2+oop_y**2) - recon%PmPer = sqrt( max(0.d0, recon%Pm**2 - recon%PmPar**2 - recon%PmOop**2 ) ) + recon%PmPer = sqrt( max(0.e0, recon%Pm**2 - recon%PmPar**2 - recon%PmOop**2 ) ) if (doing_pion .or. doing_kaon .or. doing_eepx .or. doing_delta > .or. doing_rho .or. doing_semi .or. doing_eep @@ -1401,7 +1400,7 @@ subroutine complete_recon_ev(recon,success) tcos = recon%up%x*recon%uq%x+recon%up%y*recon%uq%y+ > recon%up%z*recon%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 u = -recon%Q2 +Mp**2 > +2.*(recon%q*recon%p%P*tcos -recon%nu*recon%p%E ) ntup%u = -u @@ -1419,7 +1418,7 @@ subroutine complete_recon_ev(recon,success) c compute "signed" PM depending on the relative orientation of the PM with the c three-momentum transfer (Q) qdotpm=qx*recon%Pmx+qy*recon%Pmy+qz*recon%Pmz - ntup%PMsigned = -recon%Pm*dsign(1.d0,qdotpm) + ntup%PMsigned = -recon%Pm*sign(1.0,qdotpm) endif diff --git a/hms/mc_hms.f b/hms/mc_hms.f index 1e979c7c..586d7e4d 100644 --- a/hms/mc_hms.f +++ b/hms/mc_hms.f @@ -84,13 +84,13 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! z-position of important apertures. real*8 z_entr,z_exit - parameter (z_entr = 126.2d0 + z_off) !nominally 1.262 m - parameter (z_exit = z_entr + 6.3d0) !6.3 cm thick + parameter (z_entr = 126.2e0 + z_off) !nominally 1.262 m + parameter (z_exit = z_entr + 6.3e0) !6.3 cm thick real*8 z_dip1,z_dip2,z_dip3 !post dipole apertures - parameter (z_dip1 = 64.77d0) ! end of 26.65 inch pipe. - parameter (z_dip2 = z_dip1 + 297.18d0) !~117 inch pipe. - parameter (z_dip3 = z_dip2 + 115.57d0) ! 45.5 inch pipe. + parameter (z_dip1 = 64.77e0) ! end of 26.65 inch pipe. + parameter (z_dip2 = z_dip1 + 297.18e0) !~117 inch pipe. + parameter (z_dip3 = z_dip2 + 115.57e0) ! 45.5 inch pipe. ! Math constants @@ -235,7 +235,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Check aperture at 2/3 of Q1. - call transp(spectr,2,decay_flag,dflag,m2,p,125.233d0,pathlen) + call transp(spectr,2,decay_flag,dflag,m2,p,125.233e0,pathlen) if ((xs*xs + ys*ys).gt.r_Q1*r_Q1) then hSTOP_Q1_mid = hSTOP_Q1_mid + 1 goto 500 @@ -243,7 +243,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to Q1 OUT mag boundary. - call transp(spectr,3,decay_flag,dflag,m2,p,62.617d0,pathlen) + call transp(spectr,3,decay_flag,dflag,m2,p,62.617e0,pathlen) if ((xs*xs + ys*ys).gt.r_Q1*r_Q1) then hSTOP_Q1_out = hSTOP_Q1_out + 1 goto 500 @@ -261,7 +261,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Check aperture at 2/3 of Q2. - call transp(spectr,5,decay_flag,dflag,m2,p,143.90d0,pathlen) + call transp(spectr,5,decay_flag,dflag,m2,p,143.90e0,pathlen) if ((xs*xs + ys*ys).gt.r_Q2*r_Q2) then hSTOP_Q2_mid = hSTOP_Q2_mid + 1 goto 500 @@ -269,7 +269,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to Q2 OUT mag boundary. - call transp(spectr,6,decay_flag,dflag,m2,p,71.95d0,pathlen) + call transp(spectr,6,decay_flag,dflag,m2,p,71.95e0,pathlen) if ((xs*xs + ys*ys).gt.r_Q2*r_Q2) then hSTOP_Q2_out = hSTOP_Q2_out + 1 goto 500 @@ -287,7 +287,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Check aperture at 2/3 of Q3. - call transp(spectr,8,decay_flag,dflag,m2,p,143.8d0,pathlen) + call transp(spectr,8,decay_flag,dflag,m2,p,143.8e0,pathlen) if ((xs*xs + ys*ys).gt.r_Q3*r_Q3) then hSTOP_Q3_mid = hSTOP_Q3_mid + 1 goto 500 @@ -295,7 +295,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to Q3 OUT mag boundary. - call transp(spectr,9,decay_flag,dflag,m2,p,71.9d0,pathlen) + call transp(spectr,9,decay_flag,dflag,m2,p,71.9e0,pathlen) if ((xs*xs + ys*ys).gt.r_Q3*r_Q3) then hSTOP_Q3_out = hSTOP_Q3_out + 1 goto 500 @@ -309,7 +309,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, call project(xs,ys,zdrift,decay_flag,dflag,m2,p,pathlen) !project and decay xt=xs yt=ys - call rotate_haxis(-6.0d0,xt,yt) + call rotate_haxis(-6.0e0,xt,yt) if (hit_dipole(xt,yt)) then hSTOP_D1_in = hSTOP_D1_in + 1 goto 500 @@ -318,10 +318,10 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to D1 OUT magnetic boundary. ! Find intersection with rotated aperture plane. - call transp(spectr,11,decay_flag,dflag,m2,p,526.053d0,pathlen) + call transp(spectr,11,decay_flag,dflag,m2,p,526.053e0,pathlen) xt=xs yt=ys - call rotate_haxis(6.0d0,xt,yt) + call rotate_haxis(6.0e0,xt,yt) if (hit_dipole(xt,yt)) then hSTOP_D1_out = hSTOP_D1_out + 1 goto 500 diff --git a/hms/mc_hms_hut.f b/hms/mc_hms_hut.f index b4683129..e73fca77 100644 --- a/hms/mc_hms_hut.f +++ b/hms/mc_hms_hut.f @@ -249,7 +249,7 @@ subroutine mc_hms_hut (m2,p,x_fp,dx_fp,y_fp,dy_fp,ms_flag,wcs_flag, real*8 radw,drift real*8 nsig_max - parameter(nsig_max=99.0d0) !max #/sigma for gaussian ran #s. + parameter(nsig_max=99.0e0) !max #/sigma for gaussian ran #s. C These have to be real*4 for the CERNLIB lfit routine. real*4 badf !temporaries diff --git a/hms/mc_hms_recon.f b/hms/mc_hms_recon.f index cad3b22b..86acf327 100644 --- a/hms/mc_hms_recon.f +++ b/hms/mc_hms_recon.f @@ -115,7 +115,7 @@ subroutine mc_hms_recon (delta_p,delta_t,delta_phi,y_tgt,fry) hut(3) = ys/100. !cm --> m hut(4) = dydzs !slope ("radians") hut(5) = fry/100. !vert. position at target(cm-->m) - if (abs(hut(5)).le.1.d-30) hut(5)=1.d-30 + if (abs(hut(5)).le.1.e-30) hut(5)=1.e-30 C Compute COSY sums. diff --git a/init.f b/init.f index c95bee6f..af0e7446 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 @@ -464,7 +464,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. @@ -528,9 +528,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 @@ -667,7 +667,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 index ae9df337..75ac9124 100644 --- a/last.kumac +++ b/last.kumac @@ -1,3 +1,4 @@ -*** Begin of history file: Thu Jun 19 09:54:52 2008 -exit -*** End of history file: Thu Jun 19 09:54:54 2008 +*** Begin of history file: Wed Jul 29 12:53:30 2015 +Histogram/File 1 /home/huberg/r2d2/simc/simc_gfortran/worksim/kaonl_550_302_37_+0000.rzdat 0 -X +Ntuple/Plot //LUN1/666.ssdeltai ! 20000 1 20001 ' ' 1000000 +*** End of history file: Wed Jul 29 12:54:25 2015 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_delta.f b/physics_delta.f index e34d19e1..357debdb 100644 --- a/physics_delta.f +++ b/physics_delta.f @@ -71,7 +71,7 @@ real*8 function peedelta(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 @@ -96,7 +96,7 @@ real*8 function peedelta(vertex,main) * IF low_w_flag is set. * NOTE: s, t, mtar, and Q2 must be converted to GeV first. - ntup%sigcm1 = sig_blok(thetacm,phicm,main%t/1.d6,vertex%q2/1.d6,s/1.d6,main%epsilon, + ntup%sigcm1 = sig_blok(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 diff --git a/physics_kaon.f b/physics_kaon.f index 07dfe171..24986ba9 100644 --- a/physics_kaon.f +++ b/physics_kaon.f @@ -63,7 +63,7 @@ real*8 function peeK(vertex,main,survivalprob) * 'f' and 'fer' indicate fermi momenta. 'star' or 'cm' indicate CM system 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 @@ -79,9 +79,9 @@ real*8 function peeK(vertex,main,survivalprob) * above, but phi is not, SO WE ARE ALWAYS CALCULATING FOR PHI=0!! if (targ%Mrec_struck.lt.1150.) then !lambda production. - call eekeek(s/1.d6,vertex%q2,main%thetacm,main%theta_pq,phi,main%epsilon,sigma_saghai) + call eekeek(s/1.e6,vertex%q2,main%thetacm,main%theta_pq,phi,main%epsilon,sigma_saghai) else - call eekeeks(s/1.d6,vertex%q2,main%thetacm,main%theta_pq,phi,main%epsilon,sigma_saghai) + call eekeeks(s/1.e6,vertex%q2,main%thetacm,main%theta_pq,phi,main%epsilon,sigma_saghai) endif ntup%sigcm1 = sigma_saghai @@ -206,11 +206,11 @@ real*8 function sig_factorized(q2,w,t,pk,mrec) endif ! Parameters used by the model, all converted to GeV. - q2val = q2/1.d6 - w2val = w**2/1.d6 + q2val = q2/1.e6 + w2val = w**2/1.e6 pkval = pk/1000. - tval = t/1.d6 - tminval = tmin/1.d6 + tval = t/1.e6 + tminval = tmin/1.e6 if (mrec.lt.1150.) then !lambda production fact_q = 1./(q2val+2.67)**2 @@ -277,11 +277,11 @@ real*8 function sig_factorized2007(q2,w,t,pk,mrec,epsilon) endif ! Parameters used by the model, all converted to GeV. - q2val = q2/1.d6 - w2val = w**2/1.d6 + q2val = q2/1.e6 + w2val = w**2/1.e6 pkval = pk/1000. - tval = t/1.d6 - tminval = tmin/1.d6 + tval = t/1.e6 + tminval = tmin/1.e6 if (mrec.lt.1150.) then ! Lambda production fact_q = 4.50/(q2val+2.67)**2 @@ -337,7 +337,7 @@ subroutine eekeek(ss,q22,angl,theta,phi,epsi,sigma_eep) w=sqrt(ss)*1000. skc2=(w**2-Mk2-targ%Mrec_struck**2)**2-4.*Mk2*targ%Mrec_struck**2 - skc2=max(skc2,0.d0) + skc2=max(skc2,0.e0) skc=sqrt(skc2)/2./w q0=-(-q22-w**2+Mp2)/2./Mp q0c=(-q22+q0*Mp)/w @@ -388,8 +388,8 @@ subroutine eekeek(ss,q22,angl,theta,phi,epsi,sigma_eep) zf(2,5)=dble(fint(pn,px,pna,pa,ziff5)) zf(2,6)=dble(fint(pn,px,pna,pa,ziff6)) - ur=(1.D0,0.D0) - ui=(0.D0,1.D0) + ur=(1.e0,0.e0) + ui=(0.e0,1.e0) z1a=zf(1,1)*ur+zf(2,1)*ui z2a=zf(1,2)*ur+zf(2,2)*ui @@ -449,7 +449,7 @@ subroutine eekeeks(ss,q22,angl,theta,phi,epsi,sigma_eep) w=sqrt(ss)*1000. skc2=(w**2-Mk2-targ%Mrec_struck**2)**2-4.*Mk2*targ%Mrec_struck**2 - skc2=max(skc2,0.d0) + skc2=max(skc2,0.e0) skc=sqrt(skc2)/2./w q0=-(-q22-w**2+Mp2)/2./Mp q0c=(-q22+q0*Mp)/w @@ -519,8 +519,8 @@ subroutine eekeeks(ss,q22,angl,theta,phi,epsi,sigma_eep) zf(2,5)=dble(fint(pn,px,pna,pa,zsiff5)) zf(2,6)=dble(fint(pn,px,pna,pa,zsiff6)) - ur=(1.D0,0.D0) - ui=(0.D0,1.D0) + ur=(1.e0,0.e0) + ui=(0.e0,1.e0) z1a=zf(1,1)*ur+zf(2,1)*ui z2a=zf(1,2)*ur+zf(2,2)*ui @@ -610,7 +610,7 @@ subroutine phspwght(delta,theta,phi,weight) write(6,*) 'hms&sos case. Need to update for other spectrometers.' stop endif - weight=max(weight,0.01D00) - weight=max(100.D00/weight,1.0D00) + weight=max(weight,0.01e00) + weight=max(100.e00/weight,1.0e00) return end diff --git a/physics_omega.f b/physics_omega.f index de143133..bc9519d3 100644 --- a/physics_omega.f +++ b/physics_omega.f @@ -134,13 +134,13 @@ real*8 function peep_omega(vertex,main) * * One Pion Exchange model used in DESY analysis of Joos et al. * W<2 GeV, Q^2<1.4 GeV^2 - sig1 = sig_joos(mass/1.d3,tt/1.d6,uu/1.d6, - * vertex%q2/1.d6,invm/1.d3,main%epsilon) + sig1 = sig_joos(mass/1.e3,tt/1.e6,uu/1.e6, + * vertex%q2/1.e6,invm/1.e3,main%epsilon) * Parameterization based on saturated Regge model of J.M.Laget. * 2 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/physics_rho_recoil.f b/physics_rho_recoil.f index dc8e4857..58437649 100644 --- a/physics_rho_recoil.f +++ b/physics_rho_recoil.f @@ -135,11 +135,11 @@ real*8 function peep_rho(vertex,main) ****************************************************************************** * * Diffractive rho production model used by P. Ambrosewicz - sig1 = sig_diffract(mass/1.d3,invm/1.d3,qsq/1.d6, - * tt/1.d6,t_min/1.d6) + sig1 = sig_diffract(mass/1.e3,invm/1.e3,qsq/1.e6, + * tt/1.e6,t_min/1.e6) * PYTHIA model with modifications from the HERMES MC - sig2 = sig_hermes(qsq,tt,t_min,nu,invm/1.d3,epsilon) + sig2 = sig_hermes(qsq,tt,t_min,nu,invm/1.e3,epsilon) ntup%sigcm=sig2 @@ -248,7 +248,7 @@ real*8 function sig_diffract(mass,invm,qsq,tt,t_min) * 2pi factor is for dphi_cm and 1.e6 converts GeV^2 to MeV^2 sig_diffract = (sig_grho/(1+qsq/mass**2)**2) - * *exp(b_slope*(tt-t_min))/(2.*pi)/1.d6 + * *exp(b_slope*(tt-t_min))/(2.*pi)/1.e6 return end @@ -270,7 +270,7 @@ real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) real*8 sig0,sigt,sig219,R,cdeltatau,brho m_p = 0.93827231 - tprime = abs(t-tmin)/1.d6 + tprime = abs(t-tmin)/1.e6 cdeltatau = hbarc/(sqrt(nu**2+Q2+mrho2)-nu) !in fm! * Put in some W dependence from photoproduction data @@ -325,9 +325,9 @@ real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) sig_hermes=sig219/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad c GH: check for weird behavior on upper side of rho peak - if (tprime.gt.8. and. sig_hermes.gt.1.d-14) then + if (tprime.gt.8. and. sig_hermes.gt.1.e-14) then write(6,*)' tprime=',tprime,' sig=',sig_hermes - sig_hermes=1.d-14 + sig_hermes=1.e-14 endif return diff --git a/poltar/trg_track.f b/poltar/trg_track.f index 5d432dd0..204daa61 100644 --- a/poltar/trg_track.f +++ b/poltar/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 @@ -817,7 +817,7 @@ subroutine track_to_tgt(delta,y,dx,dy,frx,fry,mom,mass,ctheta, call mc_hms_recon(delta,dy,dx,y,xxd) - 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) diff --git a/radc.f b/radc.f index 4e5f2889..1cb167b1 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/results_write.f b/results_write.f index ebe3a97f..4f0cfe00 100644 --- a/results_write.f +++ b/results_write.f @@ -118,7 +118,7 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) endif ntu(25) = recon%q/1000. !q - GeV/c ntu(26) = recon%nu/1000. !nu - GeV - ntu(27) = recon%Q2/1.d6 !Q^2 - (GeV/c)^2 + ntu(27) = recon%Q2/1.e6 !Q^2 - (GeV/c)^2 ntu(28) = recon%W/1000. !W - GeV/c ntu(29) = recon%epsilon !epsilon ntu(30) = recon%Em/1000. !GeV @@ -132,14 +132,14 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) ntu(35) = ntup%mm/1000. !missmass (nucleon) ntu(36) = ntup%mmA/1000. !missmass (nucleus) ntu(37) = recon%p%P/1000. !ppi - GeV/c - ntu(38) = ntup%t/1.d6 !t - GeV^2 + ntu(38) = ntup%t/1.e6 !t - GeV^2 ntu(39) = recon%PmPar/1000. ntu(40) = recon%PmPer/1000. ntu(41) = recon%PmOop/1000. ntu(42) = -main%target%rastery !fry - cm ntu(43) = ntup%radphot/1000. !radphot - GeV dummy = pferx*vertex%uq%x + pfery*vertex%uq%y + pferz*vertex%uq%z - if (dummy.eq.0) dummy=1.d-20 + if (dummy.eq.0) dummy=1.e-20 ntu(44) = pfer/1000.*abs(dummy)/dummy !p_fermi - GeV/c ntu(45) = main%sigcc !d5sig ntu(46) = ntup%sigcm !pion sig_cm @@ -147,9 +147,9 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) ntu(48) = decdist !decay distance (cm) ntu(49) = sqrt(Mh2_final) ntu(50) = pfer/1000.*dummy !p_fermi along q. - ntu(51) = vertex%Q2/1.d6 - ntu(52) = main%w/1.d3 - ntu(53) = main%t/1.d6 + ntu(51) = vertex%Q2/1.e6 + ntu(52) = main%w/1.e3 + ntu(53) = main%t/1.e6 ntu(54) = main%theta_pq ntu(55) = main%phi_pq ntu(56) = main%thetacm !PION and eepx only - check vs. main%theta_pq @@ -170,7 +170,7 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) elseif (doing _eepx.or.doing_Xphasespace) then ntu(66) = ntup%theta_mq ntu(67) = ntup%phi_mq - ntu(68) = ntup%u/1.d6 + ntu(68) = ntup%u/1.e6 endif else if (doing_kaon) then @@ -179,13 +179,13 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) elseif (doing _eepx.or.doing_Xphasespace) then ntu(58) = ntup%theta_mq ntu(59) = ntup%phi_mq - ntu(60) = ntup%u/1.d6 + ntu(60) = ntup%u/1.e6 endif endif else if (doing_semi.or.doing_rho) then ntu(34) = ntup%mm/1000. !missmass (nucleon) ntu(35) = recon%p%P/1000. !ppi - GeV/c - ntu(36) = ntup%t/1.d6 !t - GeV^2 + ntu(36) = ntup%t/1.e6 !t - GeV^2 ntu(37) = -main%target%rastery !fry - cm ntu(38) = ntup%radphot/1000. !radphot - GeV ntu(39) = main%sigcc !d5sig @@ -195,8 +195,8 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) ntu(43) = sqrt(Mh2_final) ntu(44) = recon%zhad ntu(45) = vertex%zhad - ntu(46) = recon%pt2/1.d06 - ntu(47) = vertex%pt2/1.d06 + ntu(46) = recon%pt2/1.e06 + ntu(47) = vertex%pt2/1.e06 ntu(48) = recon%xbj ntu(49) = vertex%xbj ntu(50) = acos(vertex%uq%z) 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/shared/musc.f b/shared/musc.f index e542775a..37d680d3 100644 --- a/shared/musc.f +++ b/shared/musc.f @@ -34,7 +34,7 @@ subroutine musc(m2,p,rad_len,dth,dph) real*8 m2, p real*8 nsig_max - parameter(nsig_max=99.0d0) !max #/sigma for gaussian ran #s. + parameter(nsig_max=99.0e0) !max #/sigma for gaussian ran #s. real*8 gauss1 diff --git a/shared/musc_ext.f b/shared/musc_ext.f index e60c51ab..ddc78414 100644 --- a/shared/musc_ext.f +++ b/shared/musc_ext.f @@ -19,7 +19,7 @@ subroutine musc_ext(m2,p,rad_len,x_len,dth,dph,y,x) real*8 m2, p real*8 nsig_max - parameter(nsig_max=99.0d0) !max #/sigma for gaussian ran #s. + parameter(nsig_max=99.0e0) !max #/sigma for gaussian ran #s. real*8 gauss1 diff --git a/shared/transp.f b/shared/transp.f index 224260f8..fe828af6 100644 --- a/shared/transp.f +++ b/shared/transp.f @@ -62,7 +62,7 @@ subroutine transp(spectr,class,decay_flag,dflag,m2,ph,zd,pathlen) ! integer*4 max_class ! parameter (max_class = 18) !max number of classes real*8 coeff_min - parameter (coeff_min = 1.0d-14) !coeff's smaller than this = 0 + parameter (coeff_min = 1.0e-14) !coeff's smaller than this = 0 C Local declarations. @@ -173,9 +173,9 @@ subroutine transp(spectr,class,decay_flag,dflag,m2,ph,zd,pathlen) C Pack local copy of input coordinates. ray(1) = xs !cm. ( "X" ) - ray(2) = dxdzs*1000.d0 !mrad. ( "THETA" ) + ray(2) = dxdzs*1000.e0 !mrad. ( "THETA" ) ray(3) = ys !cm. ( "Y" ) - ray(4) = dydzs*1000.d0 !mrad. ( "PHI" ) + ray(4) = dydzs*1000.e0 !mrad. ( "PHI" ) ray(5) = dpps !Fractional "Delta P/P" C Reset COSY sums. @@ -188,9 +188,9 @@ subroutine transp(spectr,class,decay_flag,dflag,m2,ph,zd,pathlen) k = class do i = 1,n_terms(spectr,k) - term = 1.0d0 + term = 1.0e0 do j = 1,5 - temp = 1.0d0 + temp = 1.0e0 if (expon(spectr,j,i,k).ne.0.) temp = ray(j)**expon(spectr,j,i,k) term = term*temp enddo @@ -205,9 +205,9 @@ subroutine transp(spectr,class,decay_flag,dflag,m2,ph,zd,pathlen) C Pathlength correction: real pathlength=nominal-sum(5), so delta_z=-sum(5) xs = sum(1) !cm - dxdzs = sum(2)/1000.d0 !slope (mr) + dxdzs = sum(2)/1000.e0 !slope (mr) ys = sum(3) !cm - dydzs = sum(4)/1000.d0 !slope (mr) + dydzs = sum(4)/1000.e0 !slope (mr) delta_z = -sum(5) !deltaZ (cm) C Check for decay in 2nd half of element, which is applied AFTER trasnporting. @@ -377,26 +377,26 @@ subroutine transp(spectr,class,decay_flag,dflag,m2,ph,zd,pathlen) if (order.eq.1) then if (e1.eq.1) then - if (abs(c1-1.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c2-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c3-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c4-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c1-1.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c2-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c3-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c4-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. else if (e2.eq.1) then - driftdist(spectr,kk)=1000.d0*c1 !drift distance in cm. - if (abs(c2-1.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c3-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c4-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. + driftdist(spectr,kk)=1000.e0*c1 !drift distance in cm. + if (abs(c2-1.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c3-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c4-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. else if (e3.eq.1) then - if (abs(c1-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c2-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c3-1.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c4-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c1-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c2-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c3-1.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c4-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. else if (e4.eq.1) then - if (abs(c1-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(c2-0.d0) .gt. coeff_min) adrift(spectr,kk)=.false. - if (abs(driftdist(spectr,kk)-1000.d0*c3).gt.coeff_min) + if (abs(c1-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c2-0.e0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(driftdist(spectr,kk)-1000.e0*c3).gt.coeff_min) > adrift(spectr,kk)=.false. - if (abs(c4-1.d0) .gt. coeff_min) adrift(spectr,kk)=.false. + if (abs(c4-1.e0) .gt. coeff_min) adrift(spectr,kk)=.false. endif else !if order.ne.1 if (abs(csum).gt.coeff_min) adrift(spectr,kk)=.false. diff --git a/shms/mc_shms.f b/shms/mc_shms.f index a62d14ca..cccbcaf5 100755 --- a/shms/mc_shms.f +++ b/shms/mc_shms.f @@ -109,7 +109,8 @@ subroutine mc_shms(p_spec, th_spec, dpp, x, y, z, dxdz, dydz, real*8 zd_d1mid5,zd_d1mid6,zd_d1mid7 real*8 zd_d1mex,zd_d1out real*8 zd_fp - real*4 spec(58) +c real*4 spec(58) + real*8 spec(58) c parameter(zd_q1in = 307.00) c parameter(zd_q1mid = 107.00) diff --git a/shms/mc_shms_hut.f b/shms/mc_shms_hut.f index 75b58e96..91733f4a 100755 --- a/shms/mc_shms_hut.f +++ b/shms/mc_shms_hut.f @@ -62,7 +62,7 @@ subroutine mc_shms_hut (m2,p,x_fp,dx_fp,y_fp,dy_fp,ms_flag, real*8 tmpran1,tmpran2 real*8 nsig_max real*8 hdc_del_plane - parameter (nsig_max=99.0d0) + parameter (nsig_max=99.0e0) c mkj logical use_det_cut parameter (use_det_cut=.true.) diff --git a/shms/mc_shms_recon.f b/shms/mc_shms_recon.f index b9299048..2c9803d2 100755 --- a/shms/mc_shms_recon.f +++ b/shms/mc_shms_recon.f @@ -132,7 +132,7 @@ subroutine mc_shms_recon (delta_p,delta_t,delta_phi,y_tgt, hut(3) = ys/100. !Meters hut(4) = dydzs !Radians hut(5) = fry/100. !vert. position at target (cm-->m) - if (abs(hut(5)).le.1.d-30) hut(5)=1.d-30 + if (abs(hut(5)).le.1.e-30) hut(5)=1.e-30 C Compute COSY sums. diff --git a/simc.f b/simc.f index 38bb1e47..449eecbf 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,dummy real*8 ang_targ_earm,ang_targ_parm @@ -207,7 +207,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 @@ -890,7 +890,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' @@ -986,7 +986,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 @@ -1138,7 +1138,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' @@ -1358,7 +1358,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 @@ -1398,7 +1398,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/sos/mc_sos.f b/sos/mc_sos.f index edc08213..2c2bf43c 100644 --- a/sos/mc_sos.f +++ b/sos/mc_sos.f @@ -63,8 +63,8 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! z-position of important apertures. real*8 z_entr,z_exit - parameter (z_entr = 126.3d0) !nominally 1.263 m - parameter (z_exit = z_entr + 6.3d0) !6.3 cm thick + parameter (z_entr = 126.3e0) !nominally 1.263 m + parameter (z_exit = z_entr + 6.3e0) !6.3 cm thick ! Math constants @@ -209,7 +209,7 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to quad midplane. - call transp(spectr,2,decay_flag,dflag,m2,p,35.0d0,pathlen) + call transp(spectr,2,decay_flag,dflag,m2,p,35.0e0,pathlen) if ((xs*xs + ys*ys).gt.r2_quad) then sSTOP_quad_mid = sSTOP_quad_mid + 1 goto 500 @@ -217,7 +217,7 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to quad OUT mag boundary. - call transp(spectr,3,decay_flag,dflag,m2,p,35.0d0,pathlen) + call transp(spectr,3,decay_flag,dflag,m2,p,35.0e0,pathlen) if ((xs*xs + ys*ys).gt.r2_quad) then sSTOP_quad_out = sSTOP_quad_out + 1 goto 500 @@ -225,12 +225,12 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to BM01 IN magnetic boundary. ! Find intersection with rotated aperture plane. - call transp(spectr,4,decay_flag,dflag,m2,p,80.0d0,pathlen) + call transp(spectr,4,decay_flag,dflag,m2,p,80.0e0,pathlen) -! call project(xs,ys,80.0d0,decay_flag,dflag,m2,p,pathlen) +! call project(xs,ys,80.0e0,decay_flag,dflag,m2,p,pathlen) xt=xs yt=ys - call rotate_haxis(-45.0d0,xt,yt) + call rotate_haxis(-45.0e0,xt,yt) if ((yt.gt.w_bm01) .or. (-yt.gt.(w_bm01-0.05*2.54)) .or. > (-xt.gt.t_bm01_in) .or. (-xt.lt.b_bm01_in)) then sSTOP_bm01_in = sSTOP_bm01_in + 1 @@ -240,10 +240,10 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to BM01 OUT magnetic boundary. ! Find intersection with rotated aperture plane. - call transp(spectr,5,decay_flag,dflag,m2,p,169.52d0,pathlen) + call transp(spectr,5,decay_flag,dflag,m2,p,169.52e0,pathlen) xt=xs yt=ys - call rotate_haxis(45.0d0,xt,yt) + call rotate_haxis(45.0e0,xt,yt) if ((abs(yt).gt.w_bm01) .or. > (-xt.gt.t_bm01_out) .or. (-xt.lt.b_bm01_out)) then sSTOP_bm01_out = sSTOP_bm01_out + 1 @@ -253,10 +253,10 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to BM02 IN magnetic boundary. ! Find intersection with rotated aperture plane. - call transp(spectr,6,decay_flag,dflag,m2,p,80.80d0,pathlen) + call transp(spectr,6,decay_flag,dflag,m2,p,80.80e0,pathlen) xt=xs yt=ys - call rotate_haxis(49.0d0,xt,yt) + call rotate_haxis(49.0e0,xt,yt) if ((abs(yt).gt.w_bm02) .or. > (-xt.gt.t_bm02_in) .or. (-xt.lt.b_bm02_in)) then sSTOP_bm02_in = sSTOP_bm02_in + 1 @@ -266,10 +266,10 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to BM02 OUT magnetic boundary. ! Find intersection with rotated aperture plane. - call transp(spectr,7,decay_flag,dflag,m2,p,77.06d0,pathlen) + call transp(spectr,7,decay_flag,dflag,m2,p,77.06e0,pathlen) xt=xs yt=ys - call rotate_haxis(57.0d0,xt,yt) + call rotate_haxis(57.0e0,xt,yt) if ((abs(yt).gt.w_bm02) .or. > (-xt.gt.t_bm02_out) .or. (-xt.lt.b_bm02_out)) then sSTOP_bm02_out = sSTOP_bm02_out + 1 @@ -284,10 +284,10 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! - new exit window is at -3.22 cm. In addition, at -10.84 cm there ! is another constraining aperture. All are hardwired in for now. !old call transp(spectr,n_classes,decay_flag,dflag,m2,p,pathlen) -!old call project(xs,ys,-55.18d0,decay_flag,dflag,m2,p,pathlen) -!old call project(xs,ys,43.817d0,decay_flag,dflag,m2,p,pathlen) !from dipole exit to old flange +!old call project(xs,ys,-55.18e0,decay_flag,dflag,m2,p,pathlen) +!old call project(xs,ys,43.817e0,decay_flag,dflag,m2,p,pathlen) !from dipole exit to old flange -!less old call transp(spectr,n_classes,decay_flag,dflag,m2,p,98.997d0) +!less old call transp(spectr,n_classes,decay_flag,dflag,m2,p,98.997e0) ! xs=xs-55.18*dxdzs ! ys=ys-55.18*dydzs ! xt=xs @@ -304,11 +304,11 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! remaining (10.826267-7.62)=3.206267 cm is the distance to the focal ! plane at the end, which is passed to mc_sos_hut. - call transp(spectr,8,decay_flag,dflag,m2,p,43.82d0,pathlen) !old flange + call transp(spectr,8,decay_flag,dflag,m2,p,43.82e0,pathlen) !old flange xt=xs yt=ys -!!! call rotate_haxis(57.0d0,xt,yt) - call rotate_haxis(45.0d0,xt,yt) +!!! call rotate_haxis(57.0e0,xt,yt) + call rotate_haxis(45.0e0,xt,yt) if ((abs(yt).gt.w_exit) .or. > (-xt.gt.t_exit) .or. (-xt.lt.b_exit)) then sSTOP_exit = sSTOP_exit + 1 @@ -319,11 +319,11 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Aperture is +/- 18.6944cm wide at top, +/- 10.998 cm wide at bottom, ! and +/- 37.694 cm tall. -! call project(xs,ys,44.34d0,decay_flag,dflag,m2,p,pathlen) +! call project(xs,ys,44.34e0,decay_flag,dflag,m2,p,pathlen) ! xs=xs+44.34*dxdzs ! ys=ys+44.34*dydzs - call transp(spectr,9,decay_flag,dflag,m2,p,44.34d0,pathlen) !new aperture. + call transp(spectr,9,decay_flag,dflag,m2,p,44.34e0,pathlen) !new aperture. tmpwidth= 10.998 + 0.10209*(xs+37.694) if ((abs(xs).gt.37.694) .or. @@ -334,7 +334,7 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Go to window at -3.22 cm (from -10.84 to -3.22 is 7.62 cm) ! Aperture is +/- 12.7cm wide, +/-38.1 cm tall. -! call project(xs,ys,7.62d0,decay_flag,dflag,m2,p,pathlen) +! call project(xs,ys,7.62e0,decay_flag,dflag,m2,p,pathlen) xs=xs+7.62*dxdzs ys=ys+7.62*dydzs @@ -366,7 +366,7 @@ subroutine mc_sos (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! and track through the detector hut call mc_sos_hut(m2,p,x_fp,dx_fp,y_fp,dy_fp,ms_flag,wcs_flag, - > decay_flag,dflag,resmult,ok,-3.206267d0,pathlen) + > decay_flag,dflag,resmult,ok,-3.206267e0,pathlen) if (.not.ok) goto 500 ! replace xs,ys,... with 'tracked' quantities. diff --git a/sos/mc_sos_hut.f b/sos/mc_sos_hut.f index fe4cdbda..8acdeae1 100644 --- a/sos/mc_sos_hut.f +++ b/sos/mc_sos_hut.f @@ -216,7 +216,7 @@ subroutine mc_sos_hut (m2,p,x_fp,dx_fp,y_fp,dy_fp,ms_flag,wcs_flag, real*8 radw,drift real*8 nsig_max - parameter(nsig_max=99.0d0) !max #/sigma for gaussian ran #s. + parameter(nsig_max=99.0e0) !max #/sigma for gaussian ran #s. C These have to be real*4 for the CERNLIB lfit routine. real*4 badf !temporaries diff --git a/sos/mc_sos_recon.f b/sos/mc_sos_recon.f index bafffe66..51b6ae05 100644 --- a/sos/mc_sos_recon.f +++ b/sos/mc_sos_recon.f @@ -118,7 +118,7 @@ subroutine mc_sos_recon (delta_p,delta_t,delta_phi,y_tgt,fry) hut(4) = dydzs !slope ("radians") hut(5) = fry/100. !vert. position at target (cm-->m) do i=1,5 - if (abs(hut(i)).le.1.d-30) hut(i)=1.d-30 + if (abs(hut(i)).le.1.e-30) hut(i)=1.e-30 enddo C Compute COSY sums. 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) From b01d0727bc8020799a489a1d2771a3157777300d Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Fri, 4 Dec 2015 17:07:57 -0600 Subject: [PATCH 05/15] Add physics_piKmodel.f which allows simulations using VGL or VR model --- Makefile | 3 +- physics_piKmodel.f | 1012 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1014 insertions(+), 1 deletion(-) create mode 100644 physics_piKmodel.f diff --git a/Makefile b/Makefile index d16735d2..b6eb57a5 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,8 @@ T = $(simcdir)/cteq5/ C = $(simcdir)/calo/ OBJ1 = target.o brem.o gauss1.o NtupleInit.o NtupleClose.o enerloss_new.o -OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o +#OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o +OBJ2 = radc.o init.o dbase.o physics_piKmodel.o physics_delta.o physics_proton.o loren.o sf_lookup.o OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o OBJ4a = results_write.o event.o mt19937.o jacobians.o diff --git a/physics_piKmodel.f b/physics_piKmodel.f new file mode 100644 index 00000000..c696abd4 --- /dev/null +++ b/physics_piKmodel.f @@ -0,0 +1,1012 @@ +* physics_piKmodel.f +* +* Purpose: +* Determine the kinematics in the PHOTON-NUCLEON center of mass frame, +* calculate some of the kinematical variables (s,t, and CM quantities in +* the 'main' structure), and return the p(e,e'pi+)n and p(e,e'K+)L +* electroproduction cross section which is interpolated from the VGL or +* VR model + +******************************************************************************* + real*8 function peepi(vertex,main) + +* output: +* peepi !d5sigma/dEe'dOmegae'Omegapi (microbarn/MeV/sr^2) + + implicit none + include 'simulate.inc' + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass, not the photon-NUCLEUS! The model gives +* the cross section in the photon-nucleon center of mass frame. + + real*8 sigma_eepi !final cross section (returned as peepi) + real*8 sig219,sig,fac + real*8 wfactor,Wset + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + real*8 epsi !epsilon of virtual photon + real*8 gtpr !gamma_t prime. + real*8 tcos,tsin !cos/sin of theta between ppi and q + real*8 tfcos,tfsin !cos/sin of theta between pfermi and q + real*8 ppix,ppiy,ppiz !pion momentum in lab. + real*8 zero + + real*8 s,s_gev,t,t_gev,Q2_g !t,s, Q2 in (GeV/c)**2 + real*8 mtar_gev + + real*8 new_x_x,new_x_y,new_x_z + real*8 new_y_x,new_y_y,new_y_z + real*8 new_z_x,new_z_y,new_z_z + real*8 dummy,p_new_x,p_new_y + real*8 davesig,phipq,cospq,sinpq + real*8 square_root,dp_dcos_num,dp_dcos_den,dp_dcos + real*8 dp_dphi_num,dp_dphi_den,dp_dphi + real*8 dt_dcos_lab,dt_dphi_lab,psign + real*8 dpxdphi,dpydphi,dpxdcos,dpydcos,dpzdcos,dpzdphi + real*8 dpxnewdphi,dpynewdphi,dpxnewdcos,dpynewdcos + real*8 dpznewdphi,dpznewdcos + real*8 dphicmdphi,dphicmdcos + + real*8 pbeam,beam_newx,beam_newy,beam_newz + real*8 ppicm_newx,ppicm_newy,ppicm_newz + + real*8 dEcmdcos,dEcmdphi,dcoscmdcos,dcoscmdphi + real*8 qx,qy,qz,px,py,pz + + real*8 t_high,t_low,delta_t,delta_Q2,Q2_tmp,t_tmp + real*8 q2_high,q2_low + + complex*8 A1,A2,A3,A4,A12,A34,A1234 + complex*8 XL,XT,XTT,XLT + real*8 sinterp(4) + + integer Q2_count,t_count,itab,j + + logical first + +c Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian + real*8 pm2_tmp + + logical first_call + save first_call + + data first_call/.true./ + + real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) + character*35 filename(12) + integer nfiles, tbins(12) + nfiles=12 + Wset=3.28 + data filename /'VGL/ep_enpip_q21p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q21p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q22p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q22p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q23p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q23p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q24p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q24p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q25p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q25p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q26p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q26p50_w3p27_pirho.dat'/ + +c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) +c character*35 filename(5) +c integer nfiles, tbins(5) +c nfiles=5 +c Wset=2.89 +c data filename /'VGL/ep_enpip_q27p50_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q28p00_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q28p50_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q29p00_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q29p50_w2p89_pirho.dat'/ + +c real*8 Q2_tab(12),t_tab(130),stab(12,130,4) +c character*35 filename(12) +c integer nfiles, tbins(12) +c nfiles=12 +c Wset=3.28 +c character*28 filename(12) +c data filename /'VR/ep_enpip_q21p00_w3p28.dat', +c $ 'VR/ep_enpip_q21p50_w3p28.dat', +c $ 'VR/ep_enpip_q22p00_w3p28.dat', +c $ 'VR/ep_enpip_q22p50_w3p28.dat', +c $ 'VR/ep_enpip_q23p00_w3p28.dat', +c $ 'VR/ep_enpip_q23p50_w3p28.dat', +c $ 'VR/ep_enpip_q24p00_w3p28.dat', +c $ 'VR/ep_enpip_q24p50_w3p28.dat', +c $ 'VR/ep_enpip_q25p00_w3p28.dat', +c $ 'VR/ep_enpip_q25p50_w3p28.dat', +c $ 'VR/ep_enpip_q26p00_w3p28.dat', +c $ 'VR/ep_enpip_q26p50_w3p28.dat'/ + +c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) +c character*35 filename(5) +c integer nfiles, tbins(5) +c nfiles=5 +c Wset=2.89 +c character*28 filename(5) +c data filename /'VR/ep_enpip_q27p50_w2p89.dat', +c $ 'VR/ep_enpip_q28p00_w2p89.dat', +c $ 'VR/ep_enpip_q28p50_w2p89.dat', +c $ 'VR/ep_enpip_q29p00_w2p89.dat', +c $ 'VR/ep_enpip_q29p50_w2p89.dat'/ + +******************************************************************************* +* Read model values when first called. +c Columns are: Q2, W, -t (GeV2), dsig_L, T, TL, TT (mubarn/GeV2) + + if(first_call) then + first_call=.false. + + do j=1,nfiles + OPEN(3,FILE=filename(j),STATUS='OLD') + write(6,*) 'reading model file', j + do t_count = 1,130 + read(3,*,end=100) Q2_tab(j,t_count), + 1 W_tab(j,t_count),t_tab(j,t_count), + 2 stab(j,t_count,1), stab(j,t_count,2), + 3 stab(j,t_count,3), stab(j,t_count,4) + if (abs(W_tab(j,t_count)-Wset).gt.0.01) then + write(6,*)' W read error ',W_tab(j,t_count),Wset + stop + endif + enddo + 100 continue + tbins(j)=t_count-1 +c write(6,*)' lines found ',tbins(j),t_tab(j,tbins(j)) + close(unit=3) + write(6,*) 'done' + enddo + endif !if first time. +******************************************************************************* + +* Initialize some stuff. + Q2_g = vertex%Q2/1.e6 +c NOTE: phipq calculation in event.f reverted to original version. + phipq= main%phi_pq + mtar_gev = targ%Mtar_struck/1000. + + cospq = cos(phipq) + sinpq = sin(phipq) + +* calculate energy of initial (struck) nucleon, using the same assumptions that +* go into calculating the pion angle/momentum (in event.f). For A>1, the struck +* nucleon is off shell, the 2nd nucleon (always a neutron) is on shell, and has +* p = -p_fermi, and any additional nucleons are at rest. +* NOTE pfer, efer appear to be in MeV at this point. + efer = sqrt(pfer**2+targ%Mtar_struck**2) + + if(doing_deutpi.or.doing_hepi) then + efer = targ%M-sqrt(mn**2+pfer**2) + if(doing_hepi)efer=efer-mp +c mtar_offshell = sqrt(efer**2-pfer**2) + endif + +* calculate some kinematical variables +* 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 + 1 +vertex%up%z*vertex%uq%z + 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.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) + +c GH: +c calculate with target nucleon at rest (as in experimental replay) + s = (vertex%nu+targ%Mtar_struck)**2-vertex%q**2 + main%wcm = sqrt(s) + s_gev = s/1.e6 + +c GH: +c calculate t the same way as in experimental replay + pm2_tmp = (vertex%q*vertex%uq%x-vertex%p%P*vertex%up%x)**2 + + 1 (vertex%q*vertex%uq%y-vertex%p%P*vertex%up%y)**2 + + 2 (vertex%q*vertex%uq%z-vertex%p%P*vertex%up%z)**2 + t = -(mn-mp)**2 +2*targ%Mtar_struck* + 1 ( sqrt(targ%Mrec_struck**2+pm2_tmp)-targ%Mrec_struck ) + + t_gev = t/1.e6 !CONVERT TO (GeV/c)**2 + main%t = t + +******************************************************************************* +c VERSION WHERE TARGET NUCLEON IS AT REST (AS IN EXPERIMENTAL REPLAY) +* Calculate velocity of PHOTON-NUCLEON C.M. system in the lab frame. Use beta +* and gamma of the cm system (bstar and gstar) to transform particles into +* c.m. frame. Define z along the direction of q, and x to be along the +* direction of the pion momentum perpendicular to q. + + dummy=sqrt((vertex%uq%x**2+vertex%uq%y**2) * + 1 (vertex%uq%x**2+vertex%uq%y**2+vertex%uq%z**2)) + new_x_x = -(-vertex%uq%x)*vertex%uq%z/dummy + new_x_y = -(-vertex%uq%y)*vertex%uq%z/dummy + new_x_z = ((-vertex%uq%x)**2 + (-vertex%uq%y)**2)/dummy + + dummy = sqrt(vertex%uq%x**2 + vertex%uq%y**2) + new_y_x = (-vertex%uq%y)/dummy + new_y_y = -(-vertex%uq%x)/dummy + new_y_z = 0.0 + +* get beam in q+nucleon CM system. + + pbeam = sqrt(vertex%Ein**2-me**2) + beam_newx = pbeam*new_x_z + beam_newy = pbeam*new_y_z + beam_newz = pbeam*vertex%uq%z + + bstar=vertex%q/(vertex%nu+targ%Mtar_struck) + gstar=1./sqrt(1. - bstar**2) + + zero =0.e0 + bstarx = zero + bstary = zero + bstarz = vertex%q/(targ%Mtar_struck+vertex%nu) + +* DJG: Boost virtual photon to q+nucleon CM. + + call loren(gstar,bstarx,bstary,bstarz,vertex%nu, + > zero,zero,vertex%q,nustar,qstarx,qstary,qstarz,qstar) + +* DJG: Boost pion to q+nucleon CM. + + ppiz = vertex%p%P*tcos + ppix = vertex%p%P*tsin*cos(phipq) + ppiy = vertex%p%P*tsin*sin(phipq) + call loren(gstar,bstarx,bstary,bstarz,vertex%p%E, + > ppix,ppiy,ppiz,epicm,ppicmx,ppicmy,ppicmz,ppicm) + thetacm = acos((ppicmx*qstarx+ppicmy*qstary+ppicmz*qstarz)/ppicm/qstar) + main%pcm = ppicm + +* DJG Boost the beam to q+nucleon CM. + + call loren(gstar,bstarx,bstary,bstarz,vertex%Ein,beam_newx, + > beam_newy,beam_newz,ebeamcm,pbeamcmx,pbeamcmy,pbeamcmz,pbeamcm) + +* Thetacm is defined as angle between ppicm and qstar. +* To get phicm, we need out of plane angle relative to scattering plane +* (plane defined by pbeamcm and qcm). For stationary target, this plane +* does not change. In general, the new coordinate system is defined such +* that the new y direction is given by (qcm x pbeamcm) and the new x +* is given by (qcm x pbeamcm) x qcm. + + dummy = sqrt((qstary*pbeamcmz-qstarz*pbeamcmy)**2+ + > (qstarz*pbeamcmx-qstarx*pbeamcmz)**2 + > +(qstarx*pbeamcmy-qstary*pbeamcmx)**2) + new_y_x = (qstary*pbeamcmz-qstarz*pbeamcmy)/dummy + new_y_y = (qstarz*pbeamcmx-qstarx*pbeamcmz)/dummy + new_y_z = (qstarx*pbeamcmy-qstary*pbeamcmx)/dummy + + dummy = sqrt((new_y_y*qstarz-new_y_z*qstary)**2 + > +(new_y_z*qstarx-new_y_x*qstarz)**2 + > +(new_y_x*qstary-new_y_y*qstarx)**2) + new_x_x = (new_y_y*qstarz-new_y_z*qstary)/dummy + new_x_y = (new_y_z*qstarx-new_y_x*qstarz)/dummy + new_x_z = (new_y_x*qstary-new_y_y*qstarx)/dummy + + new_z_x = qstarx/qstar + new_z_y = qstary/qstar + new_z_z = qstarz/qstar + + ppicm_newx = ppicmx*new_x_x + ppicmy*new_x_y + ppicmz*new_x_z + ppicm_newy = ppicmx*new_y_x + ppicmy*new_y_y + ppicmz*new_y_z + ppicm_newz = ppicmx*new_z_x + ppicmy*new_z_y + ppicmz*new_z_z + + phicm = atan2(ppicm_newy,ppicm_newx) + if(phicm.lt.0.) phicm = 2.*3.141592654+phicm + + main%thetacm = thetacm + main%phicm = phicm + +c write(6,*)' ' +c write(6,*)' pfer ',pfer +c write(6,*)' t ',t +c write(6,*)' s ',s +c write(6,*)' thetacm ',thetacm*180./3.14159 +c write(6,*)' phicm ',phicm*180./3.14159,phipq*180./3.14159 + +******************************************************************************* +* Interpolate model from tables. + + t_tmp = abs(t_gev) + Q2_tmp = Q2_g + if(Q2_tmp.lt.Q2_tab(1,1)) then + write(6,*)' WARNING: model table range too high Q2 ',Q2_tmp + Q2_tmp = Q2_tab(1,1) + endif + if(Q2_tmp.gt.Q2_tab(nfiles,1)) then + write(6,*)' WARNING: model table range too low Q2 ',Q2_tmp + Q2_tmp = Q2_tab(nfiles,1) + endif + + do Q2_count=1,(nfiles-1) + Q2_high=0. + Q2_low=0. + t_high=0. + t_low=0. + if((Q2_tmp.ge.Q2_tab(Q2_count,1)).and. + 1 (Q2_tmp.lt.Q2_tab(Q2_count+1,1))) then + Q2_high = Q2_tab(Q2_count+1,1) + Q2_low = Q2_tab(Q2_count,1) + delta_Q2 = (Q2_high-Q2_low) +c write(6,*)' Q2 ',Q2_tab(Q2_count,1),Q2_tmp + + if(t_tmp.lt.t_tab(Q2_count,1)) then + t_tmp = t_tab(Q2_count,1) + if (abs(t_tmp-t_tab(Q2_count,1)).gt.0.1) then + write(6,*)' WARNING: model table range too high -t ',t_tmp + endif + endif + if(t_tmp.gt.t_tab(Q2_count,tbins(Q2_count)-1)) then + if (abs(t_tmp-t_tab(Q2_count,tbins(Q2_count)-1)).gt.0.1) then + write(6,*)' WARNING: model table range too low -t ',t_tmp + endif + t_tmp = t_tab(Q2_count,tbins(Q2_count)-1) + endif + do t_count=1,(tbins(Q2_count)-1) + if((t_tmp.ge.t_tab(Q2_count,t_count)).and. + 1 (t_tmp.lt.t_tab(Q2_count,t_count+1))) then + t_high = t_tab(Q2_count,t_count+1) + t_low = t_tab(Q2_count,t_count) + delta_t = t_high-t_low +c write(6,*)' t ',t_tab(Q2_count,t_count),t_tmp + + do itab=1,4 + A1 = stab(Q2_count,t_count,itab) + A2 = stab(Q2_count+1,t_count,itab) + A3 = stab(Q2_count,t_count+1,itab) + A4 = stab(Q2_count+1,t_count+1,itab) + A12= (A1*(Q2_high-Q2_tmp)+A2*(Q2_tmp-Q2_low))/delta_Q2 + A34= (A3*(Q2_high-Q2_tmp)+A4*(Q2_tmp-Q2_low))/delta_Q2 + A1234 = (A12*(t_high-t_tmp)+ + 1 A34*(t_tmp-t_low))/delta_t + sinterp(itab) = A1234 + enddo + endif !t check + enddo !t + endif !Q2 check + enddo !Q2 + + sigl = sinterp(1) + sigt = sinterp(2) + siglt = sinterp(3) + sigtt = sinterp(4) + + sig219=(sigt+main%epsilon*sigl+main%epsilon*cos(2.*phicm)*sigtt + > +sqrt(2.0*main%epsilon*(1.+main%epsilon))*cos(phicm)*siglt)/1.e0 + +c now convert to different W +c W dependence given by 1/(W^2-M^2)^2 + + wfactor=(Wset**2-(targ%Mtar_struck/1000.)**2)**2/ + 1 (s_gev-(targ%Mtar_struck/1000.)**2)**2 + + sig=sig219*wfactor + sigl=sigl*wfactor + sigt=sigt*wfactor + sigtt=sigtt*wfactor + siglt=siglt*wfactor + +C--->Debug +c write(*,*) 's =',s_gev +c write(*,*) 'wfactor =',wfactor +c write(*,*) 'sig =',sig +c write(*,*) 'sigL =',sigL +c write(*,*) 'sigT =',sigT +c write(*,*) 'sigLT =',sigLT +c write(*,*) 'sigTT =',sigTT +c write(*,*) '-----------------------------------------------------' +C--->Debug + + sig=sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV**2/rad +c ntup%dsigdt = sig + +C--->Debug +c write(*,*) 'sig =',sig +c write(*,*) '=====================================================' +C--->Debug + +******************************************************************************* +* sigma_eepi is two-fold C.M. cross section: d2sigma/dt/dphi_cm [ub/MeV**2/rad] +* Convert from dt dphi_cm --> dOmega_lab using 'jacobian' [ub/sr] +* Convert to 5-fold by multiplying by flux factor, gtpr [1/MeV] +* to give d5sigma/dOmega_pi/dOmega_e/dE_e [ub/Mev/sr]. +******************************************************************************* +c VERSION WHERE TARGET NUCLEON IS AT REST (AS IN EXPERIMENTAL REPLAY) + + dt_dcos_lab = 2.*(vertex%q*vertex%p%P*targ%Mtar_struck) / + 1 ( targ%Mtar_struck+vertex%nu + 2 -vertex%q*tcos*(vertex%p%E/vertex%p%P) ) + + jacobian = abs(dt_dcos_lab) + main%davejac = jacobian + +c write(6,*)' jac ',davejac_fer,jacobian + +******************************************************************************* +* Get photon flux factor +* +* DJG: Replace targ.Mtar_pion in denominator of gammaflux with more general +* DJG: efer-pfer*tfcos, for pfer =0 this reverts to old form + + gtpr = alpha/2./(pi**2)*vertex%e%E/vertex%Ein*(s_gev-mtar_gev**2)/2./ + > (targ%Mtar_struck)/Q2_g/(1.-epsi) + + davesig = gtpr*sig*jacobian +******************************************************************************* + + sigma_eepi = davesig + peepi = sigma_eepi + + ntup%sigcm = sigma_eepi !sig_cm + + 202 format(/11X,f5.1/) + 203 format(11X,f5.0) + 204 format(6(/9X,7f8.3)) + + return + end + + +******************************************************************************* + real*8 function peeK(vertex,main,survivalprob) + +* output: +* peeK !d5sigma/(dE_e'*dOmega_e'*Omega_K) (microbarn/MeV/sr^2) + + implicit none + include 'simulate.inc' + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass, not the photon-NUCLEUS! The model gives +* the cross section in the photon-nucleon center of mass frame. + + real*8 sigma_eeK !final cross section (returned as peeK) + real*8 pathlen,zaero,betak,gammak,p_kaon + real*8 survivalprob + + real*8 sig219,sig,fac + real*8 wfactor,Wset + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + real*8 epsi !epsilon of virtual photon + real*8 gtpr !gamma_t prime. + real*8 tcos,tsin !cos/sin of theta between pK and q + real*8 tfcos,tfsin !cos/sin of theta between pfermi and q + real*8 pKx,pKy,pKz !kaon momentum in lab. + real*8 zero + + real*8 s,s_gev,t,t_gev,Q2_g !t,s, Q2 in (GeV/c)**2 + real*8 mtar_gev + + real*8 new_x_x,new_x_y,new_x_z + real*8 new_y_x,new_y_y,new_y_z + real*8 new_z_x,new_z_y,new_z_z + real*8 dummy,p_new_x,p_new_y + real*8 davesig,phipq,cospq,sinpq + real*8 square_root,dp_dcos_num,dp_dcos_den,dp_dcos + real*8 dp_dphi_num,dp_dphi_den,dp_dphi + real*8 dt_dcos_lab,dt_dphi_lab,psign + real*8 dpxdphi,dpydphi,dpxdcos,dpydcos,dpzdcos,dpzdphi + real*8 dpxnewdphi,dpynewdphi,dpxnewdcos,dpynewdcos + real*8 dpznewdphi,dpznewdcos + real*8 dphicmdphi,dphicmdcos + + real*8 pbeam,beam_newx,beam_newy,beam_newz + real*8 pKcm_newx,pKcm_newy,pKcm_newz + + real*8 dEcmdcos,dEcmdphi,dcoscmdcos,dcoscmdphi + real*8 qx,qy,qz,px,py,pz + + real*8 t_high,t_low,delta_t,delta_Q2,Q2_tmp,t_tmp + real*8 q2_high,q2_low + + complex*8 A1,A2,A3,A4,A12,A34,A1234 + complex*8 XL,XT,XTT,XLT + real*8 sinterp(4) + + integer Q2_count,t_count,itab,j + + logical first + +c Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 eKcm,pKcm,pKcmx,pKcmy,pKcmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian + real*8 pm2_tmp + + logical first_call + save first_call + + data first_call/.true./ + + real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) + character*35 filename(12) + integer nfiles, tbins(12) + nfiles=12 + Wset=3.28 + data filename /'VGL/ep_enpip_q21p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q21p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q22p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q22p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q23p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q23p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q24p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q24p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q25p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q25p50_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q26p00_w3p27_pirho.dat', + $ 'VGL/ep_enpip_q26p50_w3p27_pirho.dat'/ + +c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) +c character*35 filename(5) +c integer nfiles, tbins(5) +c nfiles=5 +c Wset=2.89 +c data filename /'VGL/ep_enpip_q27p50_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q28p00_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q28p50_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q29p00_w2p89_pirho.dat', +c $ 'VGL/ep_enpip_q29p50_w2p89_pirho.dat'/ + +c real*8 Q2_tab(12),t_tab(130),stab(12,130,4) +c character*35 filename(12) +c integer nfiles, tbins(12) +c nfiles=12 +c Wset=3.28 +c character*28 filename(12) +c data filename /'VR/ep_enpip_q21p00_w3p28.dat', +c $ 'VR/ep_enpip_q21p50_w3p28.dat', +c $ 'VR/ep_enpip_q22p00_w3p28.dat', +c $ 'VR/ep_enpip_q22p50_w3p28.dat', +c $ 'VR/ep_enpip_q23p00_w3p28.dat', +c $ 'VR/ep_enpip_q23p50_w3p28.dat', +c $ 'VR/ep_enpip_q24p00_w3p28.dat', +c $ 'VR/ep_enpip_q24p50_w3p28.dat', +c $ 'VR/ep_enpip_q25p00_w3p28.dat', +c $ 'VR/ep_enpip_q25p50_w3p28.dat', +c $ 'VR/ep_enpip_q26p00_w3p28.dat', +c $ 'VR/ep_enpip_q26p50_w3p28.dat'/ + +c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) +c character*35 filename(5) +c integer nfiles, tbins(5) +c nfiles=5 +c Wset=2.89 +c character*28 filename(5) +c data filename /'VR/ep_enpip_q27p50_w2p89.dat', +c $ 'VR/ep_enpip_q28p00_w2p89.dat', +c $ 'VR/ep_enpip_q28p50_w2p89.dat', +c $ 'VR/ep_enpip_q29p00_w2p89.dat', +c $ 'VR/ep_enpip_q29p50_w2p89.dat'/ + +******************************************************************************* +* Read model values when first called. +c Columns are: Q2, W, -t (GeV2), dsig_L, T, TL, TT (mubarn/GeV2) + + if(first_call) then + first_call=.false. + + do j=1,nfiles + OPEN(3,FILE=filename(j),STATUS='OLD') + write(6,*) 'reading model file', j + do t_count = 1,130 + read(3,*,end=100) Q2_tab(j,t_count), + 1 W_tab(j,t_count),t_tab(j,t_count), + 2 stab(j,t_count,1), stab(j,t_count,2), + 3 stab(j,t_count,3), stab(j,t_count,4) + if (abs(W_tab(j,t_count)-Wset).gt.0.01) then + write(6,*)' W read error ',W_tab(j,t_count),Wset + stop + endif + enddo + 100 continue + tbins(j)=t_count-1 +c write(6,*)' lines found ',tbins(j),t_tab(j,tbins(j)) + close(unit=3) + write(6,*) 'done' + enddo + endif !if first time. +******************************************************************************* + +* Initialize some stuff. + Q2_g = vertex%Q2/1.e6 +c NOTE: phipq calculation in event.f reverted to original version. + phipq= main%phi_pq + mtar_gev = targ%Mtar_struck/1000. + + cospq = cos(phipq) + sinpq = sin(phipq) + +* calculate energy of initial (struck) nucleon, using the same assumptions that +* go into calculating the kaon angle/momentum (in event.f). For A>1, the struck +* nucleon is off shell, the 2nd nucleon (always a neutron) is on shell, and has +* p = -p_fermi, and any additional nucleons are at rest. +* NOTE pfer, efer appear to be in MeV at this point. + efer = sqrt(pfer**2+targ%Mtar_struck**2) + +! if(doing_deutpi.or.doing_hepi) then +! efer = targ%M-sqrt(mn**2+pfer**2) +! if(doing_hepi)efer=efer-mp +!c mtar_offshell = sqrt(efer**2-pfer**2) +! endif + +* calculate some kinematical variables +* 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 + 1 +vertex%up%z*vertex%uq%z + 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.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) + +c GH: +c calculate with target nucleon at rest (as in experimental replay) + s = (vertex%nu+targ%Mtar_struck)**2-vertex%q**2 + main%wcm = sqrt(s) + s_gev = s/1.e6 + +c GH: +c calculate t the same way as in experimental replay + pm2_tmp = (vertex%q*vertex%uq%x-vertex%p%P*vertex%up%x)**2 + + 1 (vertex%q*vertex%uq%y-vertex%p%P*vertex%up%y)**2 + + 2 (vertex%q*vertex%uq%z-vertex%p%P*vertex%up%z)**2 + t = -(mn-mp)**2 +2*targ%Mtar_struck* + 1 ( sqrt(targ%Mrec_struck**2+pm2_tmp)-targ%Mrec_struck ) + + t_gev = t/1.e6 !CONVERT TO (GeV/c)**2 + main%t = t + +******************************************************************************* +c VERSION WHERE TARGET NUCLEON IS AT REST (AS IN EXPERIMENTAL REPLAY) +* Calculate velocity of PHOTON-NUCLEON C.M. system in the lab frame. Use beta +* and gamma of the cm system (bstar and gstar) to transform particles into +* c.m. frame. Define z along the direction of q, and x to be along the +* direction of the kaon momentum perpendicular to q. + + dummy=sqrt((vertex%uq%x**2+vertex%uq%y**2) * + 1 (vertex%uq%x**2+vertex%uq%y**2+vertex%uq%z**2)) + new_x_x = -(-vertex%uq%x)*vertex%uq%z/dummy + new_x_y = -(-vertex%uq%y)*vertex%uq%z/dummy + new_x_z = ((-vertex%uq%x)**2 + (-vertex%uq%y)**2)/dummy + + dummy = sqrt(vertex%uq%x**2 + vertex%uq%y**2) + new_y_x = (-vertex%uq%y)/dummy + new_y_y = -(-vertex%uq%x)/dummy + new_y_z = 0.0 + +* get beam in q+nucleon CM system. + + pbeam = sqrt(vertex%Ein**2-me**2) + beam_newx = pbeam*new_x_z + beam_newy = pbeam*new_y_z + beam_newz = pbeam*vertex%uq%z + + bstar=vertex%q/(vertex%nu+targ%Mtar_struck) + gstar=1./sqrt(1. - bstar**2) + + zero =0.e0 + bstarx = zero + bstary = zero + bstarz = vertex%q/(targ%Mtar_struck+vertex%nu) + +* DJG: Boost virtual photon to q+nucleon CM. + + call loren(gstar,bstarx,bstary,bstarz,vertex%nu, + > zero,zero,vertex%q,nustar,qstarx,qstary,qstarz,qstar) + +* DJG: Boost kaon to q+nucleon CM. + + pKz = vertex%p%P*tcos + pKx = vertex%p%P*tsin*cos(phipq) + pKy = vertex%p%P*tsin*sin(phipq) + call loren(gstar,bstarx,bstary,bstarz,vertex%p%E, + > pKx,pKy,pKz,eKcm,pKcmx,pKcmy,pKcmz,pKcm) + thetacm = acos((pKcmx*qstarx+pKcmy*qstary+pKcmz*qstarz)/pKcm/qstar) + main%pcm = pKcm + +* DJG Boost the beam to q+nucleon CM. + + call loren(gstar,bstarx,bstary,bstarz,vertex%Ein,beam_newx, + > beam_newy,beam_newz,ebeamcm,pbeamcmx,pbeamcmy,pbeamcmz,pbeamcm) + +* Thetacm is defined as angle between pKcm and qstar. +* To get phicm, we need out of plane angle relative to scattering plane +* (plane defined by pbeamcm and qcm). For stationary target, this plane +* does not change. In general, the new coordinate system is defined such +* that the new y direction is given by (qcm x pbeamcm) and the new x +* is given by (qcm x pbeamcm) x qcm. + + dummy = sqrt((qstary*pbeamcmz-qstarz*pbeamcmy)**2+ + > (qstarz*pbeamcmx-qstarx*pbeamcmz)**2 + > +(qstarx*pbeamcmy-qstary*pbeamcmx)**2) + new_y_x = (qstary*pbeamcmz-qstarz*pbeamcmy)/dummy + new_y_y = (qstarz*pbeamcmx-qstarx*pbeamcmz)/dummy + new_y_z = (qstarx*pbeamcmy-qstary*pbeamcmx)/dummy + + dummy = sqrt((new_y_y*qstarz-new_y_z*qstary)**2 + > +(new_y_z*qstarx-new_y_x*qstarz)**2 + > +(new_y_x*qstary-new_y_y*qstarx)**2) + new_x_x = (new_y_y*qstarz-new_y_z*qstary)/dummy + new_x_y = (new_y_z*qstarx-new_y_x*qstarz)/dummy + new_x_z = (new_y_x*qstary-new_y_y*qstarx)/dummy + + new_z_x = qstarx/qstar + new_z_y = qstary/qstar + new_z_z = qstarz/qstar + + pKcm_newx = pKcmx*new_x_x + pKcmy*new_x_y + pKcmz*new_x_z + pKcm_newy = pKcmx*new_y_x + pKcmy*new_y_y + pKcmz*new_y_z + pKcm_newz = pKcmx*new_z_x + pKcmy*new_z_y + pKcmz*new_z_z + + phicm = atan2(pKcm_newy,pKcm_newx) + if(phicm.lt.0.) phicm = 2.*3.141592654+phicm + + main%thetacm = thetacm + main%phicm = phicm + +c write(6,*)' ' +c write(6,*)' pfer ',pfer +c write(6,*)' t ',t +c write(6,*)' s ',s +c write(6,*)' thetacm ',thetacm*180./3.14159 +c write(6,*)' phicm ',phicm*180./3.14159,phipq*180./3.14159 + +******************************************************************************* +* Interpolate model from tables. + + t_tmp = abs(t_gev) + Q2_tmp = Q2_g + if(Q2_tmp.lt.Q2_tab(1,1)) then + write(6,*)' WARNING: model table range too high Q2 ',Q2_tmp + Q2_tmp = Q2_tab(1,1) + endif + if(Q2_tmp.gt.Q2_tab(nfiles,1)) then + write(6,*)' WARNING: model table range too low Q2 ',Q2_tmp + Q2_tmp = Q2_tab(nfiles,1) + endif + + do Q2_count=1,(nfiles-1) + Q2_high=0. + Q2_low=0. + t_high=0. + t_low=0. + if((Q2_tmp.ge.Q2_tab(Q2_count,1)).and. + 1 (Q2_tmp.lt.Q2_tab(Q2_count+1,1))) then + Q2_high = Q2_tab(Q2_count+1,1) + Q2_low = Q2_tab(Q2_count,1) + delta_Q2 = (Q2_high-Q2_low) +c write(6,*)' Q2 ',Q2_tab(Q2_count,1),Q2_tmp + + if(t_tmp.lt.t_tab(Q2_count,1)) then + t_tmp = t_tab(Q2_count,1) + if (abs(t_tmp-t_tab(Q2_count,1)).gt.0.1) then + write(6,*)' WARNING: model table range too high -t ',t_tmp + endif + endif + if(t_tmp.gt.t_tab(Q2_count,tbins(Q2_count)-1)) then + if (abs(t_tmp-t_tab(Q2_count,tbins(Q2_count)-1)).gt.0.1) then + write(6,*)' WARNING: model table range too low -t ',t_tmp + endif + t_tmp = t_tab(Q2_count,tbins(Q2_count)-1) + endif + do t_count=1,(tbins(Q2_count)-1) + if((t_tmp.ge.t_tab(Q2_count,t_count)).and. + 1 (t_tmp.lt.t_tab(Q2_count,t_count+1))) then + t_high = t_tab(Q2_count,t_count+1) + t_low = t_tab(Q2_count,t_count) + delta_t = t_high-t_low +c write(6,*)' t ',t_tab(Q2_count,t_count),t_tmp + + do itab=1,4 + A1 = stab(Q2_count,t_count,itab) + A2 = stab(Q2_count+1,t_count,itab) + A3 = stab(Q2_count,t_count+1,itab) + A4 = stab(Q2_count+1,t_count+1,itab) + A12= (A1*(Q2_high-Q2_tmp)+A2*(Q2_tmp-Q2_low))/delta_Q2 + A34= (A3*(Q2_high-Q2_tmp)+A4*(Q2_tmp-Q2_low))/delta_Q2 + A1234 = (A12*(t_high-t_tmp)+ + 1 A34*(t_tmp-t_low))/delta_t + sinterp(itab) = A1234 + enddo + endif !t check + enddo !t + endif !Q2 check + enddo !Q2 + + sigl = sinterp(1) + sigt = sinterp(2) + siglt = sinterp(3) + sigtt = sinterp(4) + + sig219=(sigt+main%epsilon*sigl+main%epsilon*cos(2.*phicm)*sigtt + > +sqrt(2.0*main%epsilon*(1.+main%epsilon))*cos(phicm)*siglt)/1.e0 + +c now convert to different W +c W dependence given by 1/(W^2-M^2)^2 + + wfactor=(Wset**2-(targ%Mtar_struck/1000.)**2)**2/ + 1 (s_gev-(targ%Mtar_struck/1000.)**2)**2 + + sig=sig219*wfactor + sigl=sigl*wfactor + sigt=sigt*wfactor + sigtt=sigtt*wfactor + siglt=siglt*wfactor + +C--->Debug +c write(*,*) 's =',s_gev +c write(*,*) 'wfactor =',wfactor +c write(*,*) 'sig =',sig +c write(*,*) 'sigL =',sigL +c write(*,*) 'sigT =',sigT +c write(*,*) 'sigLT =',sigLT +c write(*,*) 'sigTT =',sigTT +c write(*,*) '-----------------------------------------------------' +C--->Debug + + sig=sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV**2/rad +c ntup%dsigdt = sig + +C--->Debug +c write(*,*) 'sig =',sig +c write(*,*) '=====================================================' +C--->Debug + +******************************************************************************* +* sigma_eeK is two-fold C.M. cross section: d2sigma/dt/dphi_cm [ub/MeV**2/rad] +* Convert from dt dphi_cm --> dOmega_lab using 'jacobian' [ub/sr] +* Convert to 5-fold by multiplying by flux factor, gtpr [1/MeV] +* to give d5sigma/dOmega_K/dOmega_e/dE_e [ub/Mev/sr]. +******************************************************************************* +c VERSION WHERE TARGET NUCLEON IS AT REST (AS IN EXPERIMENTAL REPLAY) + + dt_dcos_lab = 2.*(vertex%q*vertex%p%P*targ%Mtar_struck) / + 1 ( targ%Mtar_struck+vertex%nu + 2 -vertex%q*tcos*(vertex%p%E/vertex%p%P) ) + + jacobian = abs(dt_dcos_lab) + main%davejac = jacobian + +c write(6,*)' jac ',davejac_fer,jacobian + +******************************************************************************* +* Get photon flux factor +* +* DJG: Replace targ.Mtar_kaon in denominator of gammaflux with more general +* DJG: efer-pfer*tfcos, for pfer =0 this reverts to old form + + gtpr = alpha/2./(pi**2)*vertex%e%E/vertex%Ein*(s_gev-mtar_gev**2)/2./ + > (targ%Mtar_struck)/Q2_g/(1.-epsi) + + davesig = gtpr*sig*jacobian +******************************************************************************* + + sigma_eeK = davesig + peeK = sigma_eeK + + ntup%sigcm = sigma_eeK !sig_cm + +c If doing_decay=.false., generate survival probability for main.weight. +c main.FP.p.path is dist. to back of detector, want decay prob. at aerogel. +C NOTE THAT ZAERO IS TAKEN WITH RESPECT TO THE POSITION AT WHICH PATHLEN +C IS CALCULATED (USUALLY THE BACK OF THE CALORIMETER). IF THE DRIFTS IN +C MC_SOS_HUT ARE CHANGED, THEN THE STARTING POINT MAY BE DIFFERENT AND THESE +C NUMBERS MAY BE WRONG. AERO BETWEEN S2Y AND S2X IN SOS. + +C Beta/Gamma for decay need to use momentum after radiation/eloss, not vertex +C momentum. Get particle momentum from main%SP%p%delta + + if (.not.doing_decay) then + if (hadron_arm.eq.1) then + zaero = 0. !no aerogel yet, use full length. + else if (hadron_arm.eq.2) then +* zaero = -76. !aero at 270cm,last project=346(cal). + zaero = -82.8 !From Rick: aero at 263.2cm,last project=346(cal). + else if (hadron_arm.eq.3) then + zaero = -183. !aero at 130cm,last project=313(S2) + else if (hadron_arm.eq.4) then + zaero = -183. + endif + pathlen = main%FP%p%path + zaero*(1+main%FP%p%dx**2+main%FP%p%dy**2) + p_kaon = spec%p%P*(1.+main%SP%p%delta/100.) + betak = spec%p%P/sqrt(spec%p%P**2+Mh2) + gammak = 1./sqrt(1.-betak**2) + survivalprob = 1./exp(pathlen/(ctau*betak*gammak)) + decdist = survivalprob !decdist in ntuple + endif + + 202 format(/11X,f5.1/) + 203 format(11X,f5.0) + 204 format(6(/9X,7f8.3)) + + return + end + + +******************************************************************************* + real*8 function sig_blok(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion) + +* Purpose: +* This routine calculates p(e,e'pi+)n cross sections from a fit to the data of +* Brauel et al., Z.Phys.C. 3(1979)101. +* Fit gives dsigma/dt/dphi_cm, which is returned as sig_blok [ub/MeV^2-rad]. + + implicit none + include 'constants.inc' + + real*8 sig219,sig + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + + real*8 mrho_emp + real*8 fpi,fpi2 + + real*8 thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev + integer which_pion + +* Fits to p(e,e'pi+)n cross-sections +* HPB: cross sections for pi-fits to Brauel's n(e,e'pi-)p +* HPB: dsigma/dt cross sections at W=2.19 and Q^2=0.70 MODIFIED BY HAND!!! + + sigl = 27.8*exp(-11.5*abs(t)) + sigt = 10.0*(5.*abs(t))*exp(-5.*abs(t)) + siglt= 0.0*sin(thetacm) + sigtt= -(4.0*sigl+0.5*sigt)*(sin(thetacm))**2 + + if (which_pion.eq.1 .or. which_pion.eq.11) then !pi- + sigt =sigt *0.25*(1.+3.*exp(-10.*abs(t))) + sigtt=sigtt*0.25*(1.+3.*exp(-10.*abs(t))) + endif + +* GMH: Now scale sigl by Q2*pion_formfactor +* HPB: parametrization of pion formfactor in the region 0.5 +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 + + sig=sig219*15.333/(s_gev-mtar_gev**2)**2 + sig=sig/2./pi/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + + sig_blok = sig + + return + end From cc063c94e869407e16cc36fed533545adf8a305c Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Sat, 9 Jan 2016 14:30:00 -0600 Subject: [PATCH 06/15] suppress warning after 500 prints --- physics_piKmodel.f | 91 ++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 39 deletions(-) diff --git a/physics_piKmodel.f b/physics_piKmodel.f index c696abd4..bbfaf164 100644 --- a/physics_piKmodel.f +++ b/physics_piKmodel.f @@ -63,7 +63,7 @@ real*8 function peepi(vertex,main) complex*8 XL,XT,XTT,XLT real*8 sinterp(4) - integer Q2_count,t_count,itab,j + integer Q2_count,t_count,itab,j,pcount logical first @@ -81,25 +81,25 @@ real*8 function peepi(vertex,main) data first_call/.true./ - real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) - character*35 filename(12) - integer nfiles, tbins(12) - nfiles=12 - Wset=3.28 - data filename /'VGL/ep_enpip_q21p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q21p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q22p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q22p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q23p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q23p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q24p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q24p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q25p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q25p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q26p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q26p50_w3p27_pirho.dat'/ - -c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) +c real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) +c character*35 filename(12) +c integer nfiles, tbins(12) +c nfiles=12 +c Wset=3.28 +c data filename /'VGL/ep_enpip_q21p00_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q21p50_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q22p00_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q22p50_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q23p00_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q23p50_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q24p00_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q24p50_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q25p00_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q25p50_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q26p00_w3p27_pirho.dat', +c $ 'VGL/ep_enpip_q26p50_w3p27_pirho.dat'/ + +c real*8 Q2_tab(5,130),W_tab(12,130),t_tab(5,130),stab(5,130,4) c character*35 filename(5) c integer nfiles, tbins(5) c nfiles=5 @@ -110,12 +110,11 @@ real*8 function peepi(vertex,main) c $ 'VGL/ep_enpip_q29p00_w2p89_pirho.dat', c $ 'VGL/ep_enpip_q29p50_w2p89_pirho.dat'/ -c real*8 Q2_tab(12),t_tab(130),stab(12,130,4) -c character*35 filename(12) +c real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) +c character*28 filename(12) c integer nfiles, tbins(12) c nfiles=12 c Wset=3.28 -c character*28 filename(12) c data filename /'VR/ep_enpip_q21p00_w3p28.dat', c $ 'VR/ep_enpip_q21p50_w3p28.dat', c $ 'VR/ep_enpip_q22p00_w3p28.dat', @@ -129,17 +128,22 @@ real*8 function peepi(vertex,main) c $ 'VR/ep_enpip_q26p00_w3p28.dat', c $ 'VR/ep_enpip_q26p50_w3p28.dat'/ -c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) -c character*35 filename(5) -c integer nfiles, tbins(5) -c nfiles=5 -c Wset=2.89 -c character*28 filename(5) -c data filename /'VR/ep_enpip_q27p50_w2p89.dat', -c $ 'VR/ep_enpip_q28p00_w2p89.dat', -c $ 'VR/ep_enpip_q28p50_w2p89.dat', -c $ 'VR/ep_enpip_q29p00_w2p89.dat', -c $ 'VR/ep_enpip_q29p50_w2p89.dat'/ + real*8 Q2_tab(11,130),W_tab(11,130),t_tab(11,130),stab(11,130,4) + character*28 filename(11) + integer nfiles, tbins(11) + nfiles=11 + Wset=2.89 + data filename /'VR/ep_enpip_q26p50_w2p89.dat', + $ 'VR/ep_enpip_q27p00_w2p89.dat', + $ 'VR/ep_enpip_q27p50_w2p89.dat', + $ 'VR/ep_enpip_q28p00_w2p89.dat', + $ 'VR/ep_enpip_q28p50_w2p89.dat', + $ 'VR/ep_enpip_q29p00_w2p89.dat', + $ 'VR/ep_enpip_q29p50_w2p89.dat', + $ 'VR/ep_enpip_q210p0_w2p89.dat', + $ 'VR/ep_enpip_q210p5_w2p89.dat', + $ 'VR/ep_enpip_q211p0_w2p89.dat', + $ 'VR/ep_enpip_q211p5_w2p89.dat'/ ******************************************************************************* * Read model values when first called. @@ -167,6 +171,7 @@ real*8 function peepi(vertex,main) close(unit=3) write(6,*) 'done' enddo + pcount=0 endif !if first time. ******************************************************************************* @@ -324,11 +329,17 @@ real*8 function peepi(vertex,main) t_tmp = abs(t_gev) Q2_tmp = Q2_g if(Q2_tmp.lt.Q2_tab(1,1)) then - write(6,*)' WARNING: model table range too high Q2 ',Q2_tmp + if (pcount.le.500) then + write(6,*)' WARNING: model table range too high Q2 ',Q2_tmp + pcount=pcount+1 + endif Q2_tmp = Q2_tab(1,1) endif if(Q2_tmp.gt.Q2_tab(nfiles,1)) then - write(6,*)' WARNING: model table range too low Q2 ',Q2_tmp + if (pcount.lt.500) then + write(6,*)' WARNING: model table range too low Q2 ',Q2_tmp + pcount=pcount+1 + endif Q2_tmp = Q2_tab(nfiles,1) endif @@ -345,14 +356,16 @@ real*8 function peepi(vertex,main) c write(6,*)' Q2 ',Q2_tab(Q2_count,1),Q2_tmp if(t_tmp.lt.t_tab(Q2_count,1)) then - t_tmp = t_tab(Q2_count,1) - if (abs(t_tmp-t_tab(Q2_count,1)).gt.0.1) then + if (pcount.le.500) then write(6,*)' WARNING: model table range too high -t ',t_tmp + pcount=pcount+1 endif + t_tmp = t_tab(Q2_count,1) endif if(t_tmp.gt.t_tab(Q2_count,tbins(Q2_count)-1)) then - if (abs(t_tmp-t_tab(Q2_count,tbins(Q2_count)-1)).gt.0.1) then + if (pcount.lt.500) then write(6,*)' WARNING: model table range too low -t ',t_tmp + pcount=pcount+1 endif t_tmp = t_tab(Q2_count,tbins(Q2_count)-1) endif From 9e0a242d02e18aac3abdb0281847704e81abfc83 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Mon, 29 Feb 2016 18:29:37 -0600 Subject: [PATCH 07/15] 1) Added HMS collimator routines from Fpi-2 analysis 2) Modified read in of VR mode in physics_piKmodel --- Makefile | 2 +- hms/coll_absorb.f | 87 +++++++++ hms/mc_hms.f | 28 +++ hms/mc_hms_coll.f | 146 +++++++++++++++ hms/struct_hms.inc | 4 +- infiles/dmn_830_275_14_+0100.inp | 116 ++++++++++++ infiles/dpl_830_275_14_+0100.inp | 116 ++++++++++++ infiles/fpi_830_275_14_+0100.inp | 116 ++++++++++++ infiles/kaonL_550_302_37_+0000.inp | 16 +- infiles/kaonS_550_302_37_+0000.inp | 16 +- physics_piKmodel.f | 289 ++++++++++++++++------------- 11 files changed, 790 insertions(+), 146 deletions(-) create mode 100644 hms/coll_absorb.f create mode 100644 hms/mc_hms_coll.f create mode 100644 infiles/dmn_830_275_14_+0100.inp create mode 100644 infiles/dpl_830_275_14_+0100.inp create mode 100644 infiles/fpi_830_275_14_+0100.inp diff --git a/Makefile b/Makefile index b6eb57a5..496d3949 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o OBJ4a = results_write.o event.o mt19937.o jacobians.o OBJ5 = $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o OBJ6 = $(A)rotate_haxis.o $(A)rotate_vaxis.o $(A)locforunt.o -OBJ7 = $(H)mc_hms.o $(H)mc_hms_hut.o $(H)mc_hms_recon.o +OBJ7 = $(H)mc_hms.o $(H)mc_hms_hut.o $(H)mc_hms_recon.o $(H)coll_absorb.o $(H)mc_hms_coll.o OBJ8 = $(S)mc_sos.o $(S)mc_sos_hut.o $(S)mc_sos_recon.o OBJ9 = $(R)mc_hrsr.o $(R)mc_hrsr_hut.o $(R)mc_hrsr_recon.o OBJA = $(L)mc_hrsl.o $(L)mc_hrsl_hut.o $(L)mc_hrsl_recon.o diff --git a/hms/coll_absorb.f b/hms/coll_absorb.f new file mode 100644 index 00000000..08758897 --- /dev/null +++ b/hms/coll_absorb.f @@ -0,0 +1,87 @@ + subroutine coll_absorb(ppi,thick,transmission) +c Subroutine to calculate probability that pion will be absorbed in the SOS +c collimator - can be used for HMS assuming same geometry applies. TH - checked that. + +C DJG For now, I use the "reaction" cross sections. Also, only implemented for +C DJG pi+ - no pi-. + +! TH - cross section from Dave's parameterization of the energy and A dependence up to +! TH pion momenta of ~ 2 GeV, we extended that to > 2 GeV during Fpi analysis + + implicit none + + real*8 Ppi,Epi,Tpi,mpi !pion kinematics + real*8 Navagadro + parameter(Navagadro = 6.0221367d+23) + parameter(mpi = 139.56995) + + real*8 mate_dens + real*8 mate_t + real*8 mate_A + real*8 T(14),sigreac(14),qreac(14) + + real*8 sighi,siglo,qhi,qlo,transmission,lambdai,thick + real*8 Tlo,Thi,sigA,sigAlo,sigAhi,sum + + integer i + + +! TH - DG original + TH extension for > 2GeV + data T /85.0,125.0,165.0,205.0,245.0,315.0,584.02,711.95,870.12, + > 1227.57,1446.58,1865.29,2858.0,4159.0/ + +CCCCCCCCCC TOTAL CROSS SECTIONS CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC +! data sigreac /170.12,189.49,178.61,158.11,116.9,85.86,55.5,55.5, +! > 55.5,55.5,55.5,55.5,55.5,55.5/ +! data qreac /0.59980,0.5753,0.58046,0.59842,0.65218,0.69421,.779 +! > ,.779,.779,.779,.779,.779,0.779,0.779/ +CCCCCCCCCCCCC REACTION CROSS SECTIONS CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC +! TH - DG Original + TH extension for > 2GeV + data sigreac /26.03,84.47,117.3,117.4,101.9,69.58,42.5,44.7,47.9, + > 46.5,45.2,39.6,35.34,33.15/ + data qreac /0.948,0.659,0.56,0.5342,0.5452,0.60796,0.699,0.689, + > 0.679,0.683,0.688,0.704,0.7483,0.7705/ +CCCCCCCCCCCCC ABSORPTION(?) CROSS SECTIONS CCCCCCCCCCCCCCCCCCCCCCCCCCC +c data sigreac /8.81,25.57,29.57,30.245,15.63,8.302,4.98,4.98,4.98, +c > 4.98,4.98,4.98/ +c data qreac /0.986,0.763,0.744,0.679,0.762,0.6506,0.75,0.75, +c > 0.75,0.75,0.75,0.75/ + +c data sigreac_minus /25.0,100.0,120.,110.0,100.0,80.0/ +c data qreac_minus /0.97,0.60,0.52,0.50,0.53,0.60/ + + + mate_dens = 17.0 !Collimator density (g/cm^3) + mate_t = 6.35 !Total aluminum seen by pion(cm) + mate_A = 171.57 + + Epi = sqrt(Ppi**2+mpi**2) + Tpi = Epi - mpi + + sigA = 0.0 + do i = 1,14 + if((Tpi.gt.T(i)).and.(Tpi.le.T(i+1))) then + Thi = T(i+1) + Tlo = T(i) + sighi = sigreac(i+1) + siglo = sigreac(i) + qhi = qreac(i+1) + qlo = qreac(i) + + sigAhi = sighi*mate_A**qhi + sigAlo = siglo*mate_A**qlo + sigA = (sigAlo*(Thi-Tpi) + sigAhi*(Tpi-Tlo))/(Thi-Tlo) + sigA = sigA*1.d-27 !convert to cm^2 + endif + enddo + + sum = 0.0 + + lambdai = mate_dens*Navagadro*sigA/mate_A + sum = sum + thick*lambdai + transmission = exp(-sum) + + end + + + diff --git a/hms/mc_hms.f b/hms/mc_hms.f index 586d7e4d..07847d69 100644 --- a/hms/mc_hms.f +++ b/hms/mc_hms.f @@ -130,6 +130,11 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, real*8 grnd +CDJG TEMP STUFF + real*8 save_collsuccess + logical collsuccess, coll_flag + common /save_coll/ save_collsuccess + ! Gaby's dipole shape stuff logical hit_dipole external hit_dipole @@ -193,6 +198,28 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, ! Check front of fixed slit. zdrift = z_entr call project(xs,ys,zdrift,decay_flag,dflag,m2,p,pathlen) !project and decay + +C------------------------------------------------------ +c SECTION ADDED FOR HMS COLLIMATOR +c write(*,*)'m2=',m2 +c write(*,*)'mpi2 =',mpi2 +c write(*,*)'-----------------------' + if (m2.gt.100.0**2) then ! check for pions/muons, if yes step through coll. + +c write(*,*) 'I found a pion',p + call mc_hms_coll(m2,p,p_spec,decay_flag,dflag,collsuccess,coll_flag,pathlen) +! save_collsuccess=1.25 +c write(*,*) 'TH - SANITY CHECK',collsuccess,p + + if(.not.collsuccess) then + save_collsuccess=1.5 + hSTOP_coll = hSTOP_coll + 1 + goto 500 + endif + + else !just apertures at front and back +C------------------------------------------------------ + if (abs(ys-y_off).gt.h_entr) then hSTOP_slit_hor = hSTOP_slit_hor + 1 goto 500 @@ -222,6 +249,7 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, hSTOP_slit_oct = hSTOP_slit_oct + 1 goto 500 endif + endif !check on pions/muons ! Go to Q1 IN mag bound. Drift rather than using COSY matrices diff --git a/hms/mc_hms_coll.f b/hms/mc_hms_coll.f new file mode 100644 index 00000000..b2a4100c --- /dev/null +++ b/hms/mc_hms_coll.f @@ -0,0 +1,146 @@ + subroutine mc_hms_coll(m2,p,p_spec,decay_flag,dflag,success,coll + -_flag,pathlen) +CDJG Subroutine to step a particle "through" the collimator,checking for +CDJG energy loss, multiple scattering. If particle doesn't make it (too +CDJG much energy loss for example), returns .FALSE. + +! TH - collimator thickness ~6.3 cm. He uses 20 steps for some reason +! TH Why not..seems ok. Note that keep going even if the particle +! TH is outside entrance specs. + + implicit none + include 'apertures_hms.inc' + include 'struct_hms.inc' + include '../spectrometers.inc' + + real*8 m2,p,p_spec + logical decay_flag, dflag,success,coll_flag + real*8 grnd + real*8 h_entr,h_exit,v_entr,v_exit + real*8 x_off,y_off,z_off + + parameter (h_entr = 4.575) + parameter (v_entr = 11.646) + parameter (h_exit = 4.759) + parameter (v_exit = 12.114) + + parameter (x_off = 0.000) + parameter (y_off = +0.028) + parameter (z_off = +40.17) + + integer nstep + parameter(nstep=20) + + real*8 coll_thick,coll_dens,zcoll,acoll,coll_radl,coll_radw + real*8 pathlen + parameter(coll_thick = 6.30) + parameter(coll_dens = 17.0) + parameter(zcoll = 69.45) + parameter(acoll = 171.56797) + parameter(coll_radl = 0.41753) + + real*8 step_size,h_step,v_step + logical step_flag + logical slit_h_flag,slit_v_flag,slit_o_flag,rantemp_flag,epart_flag + + real*8 epart,trans,eloss_tot,eloss,rantemp + real*8 thick,thick_temp + integer n + + eloss_tot=0. + eloss=0. + + step_size = 6.30/nstep + + coll_flag = .FALSE. + success = .FALSE. + + slit_h_flag = .FALSE. + slit_v_flag = .FALSE. + slit_o_flag = .FALSE. + rantemp_flag = .FALSE. + epart_flag = .FALSE. + + h_step = h_entr + v_step = v_entr + + epart = sqrt(p**2+m2) + +C Now start stepping +C Check aperture, if part. hits collimator, do multiple scattering,eloss +C for next step and then project. + do n=1,nstep + step_flag = .FALSE. + if (abs(ys-y_off).gt.h_step) then + coll_flag = .TRUE. + step_flag = .TRUE. + hSTOP_slit_hor = hSTOP_slit_hor + 1 + slit_h_flag = .TRUE. + thick_temp = step_size + endif + if (abs(xs-x_off).gt.v_step) then + coll_flag = .TRUE. + step_flag = .TRUE. + hSTOP_slit_vert = hSTOP_slit_vert + 1 + slit_v_flag = .TRUE. + thick_temp=step_size + endif + if (abs(xs-x_off).gt.(-v_step/h_step*abs(ys-y_off)+3*v_step/2)) then + coll_flag = .TRUE. + step_flag = .TRUE. + hSTOP_slit_oct = hSTOP_slit_oct + 1 + slit_o_flag = .TRUE. + thick_temp = step_size + endif + + thick = thick_temp + +C If we hit the collimator, check for hadronic reaction, do eloss, mult. scat. for first step + if(step_flag) then + +c TH - un-comment the following line if want no collimator punch through! +c goto 500 + + if(m2.gt.15000.) then !check if pion - if muon, don't check for hadronic interaction + call coll_absorb(p,thick,trans) + rantemp = grnd() + if(rantemp.gt.trans) then + rantemp_flag = .TRUE. + goto 500 + endif + endif + coll_radw = thick/coll_radl +! TH - some adjustment here for multiple scattering test +c call musc(m2,p,coll_radw,thick,dydzs,dxdzs) + call musc(m2,p,coll_radw,dydzs,dxdzs) + epart = sqrt(p**2+m2) + call enerloss_new(thick,coll_dens,zcoll,acoll,epart, + $ sqrt(m2),1,eloss) + epart = epart - eloss + eloss_tot = eloss_tot + eloss + if(epart.lt.sqrt(m2)) then + epart_flag = .TRUE. + goto 500 + endif + p = sqrt(epart**2-m2) + dpps = 100.*(p/p_spec - 1.) + endif + + call project(xs,ys,step_size,decay_flag,dflag,m2,p,pathlen) !drift and decay + + h_step = h_step + (h_exit-h_entr)/nstep + v_step = v_step + (v_exit-v_entr)/nstep +c write(6,*) 'step,eloss',n,eloss,step_flag,pathlen + enddo + + success = .TRUE. + + 500 continue +c write(6,*) 'step,eloss',n,eloss_tot,success,coll_flag,step_flag,xs,ys +c if (.not.success) then +c write(6,*) rantemp_flag,trans,epart_flag,eloss,slit_h_flag,slit_v_flag,slit_o_flag +c endif +c write(6,*) 'leaving collimator...',p + + return + end diff --git a/hms/struct_hms.inc b/hms/struct_hms.inc index 1df8fa14..0180ca8f 100644 --- a/hms/struct_hms.inc +++ b/hms/struct_hms.inc @@ -29,6 +29,7 @@ integer*4 hSTOP_D1_in,hSTOP_D1_out integer*4 hSTOP_hut,hSTOP_dc1,hSTOP_dc2 integer*4 hSTOP_scin,hSTOP_cal,hSTOP_successes + integer*4 hSTOP_coll ! HMS COLLIMATOR common/spectrometer1/ hSTOP_trials, > hSTOP_slit_hor,hSTOP_slit_vert,hSTOP_slit_oct, @@ -37,4 +38,5 @@ > hSTOP_Q3_in,hSTOP_Q3_mid,hSTOP_Q3_out, > hSTOP_D1_in,hSTOP_D1_out, > hSTOP_hut,hSTOP_dc1,hSTOP_dc2, - > hSTOP_scin,hSTOP_cal,hSTOP_successes + > hSTOP_scin,hSTOP_cal,hSTOP_successes, + > hSTOP_coll diff --git a/infiles/dmn_830_275_14_+0100.inp b/infiles/dmn_830_275_14_+0100.inp new file mode 100644 index 00000000..9d91f8df --- /dev/null +++ b/infiles/dmn_830_275_14_+0100.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 100000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 1 ; (ONE = TRUE) + which_pion = 1 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi- coherent) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 780.4 ; decay length (cm) +end parm experiment + +begin parm kinematics_main + Ebeam = 8900.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 916.0 ; e arm central momentum (MeV/c) + spec%e%theta = 60.570 ; e arm angle setting (degrees) + spec%p%P = 7685.2 ; p arm central momentum (MeV/c) + spec%p%theta = 5.50 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 2. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 2.01355 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.16743 ; target density (g/cm^3) + targ%thick = 1339.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 25.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 50.0 ; delta max + SPedge%p%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min =-140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/dpl_830_275_14_+0100.inp b/infiles/dpl_830_275_14_+0100.inp new file mode 100644 index 00000000..21b72f27 --- /dev/null +++ b/infiles/dpl_830_275_14_+0100.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 100000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 1 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi- coherent) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 780.4 ; decay length (cm) +end parm experiment + +begin parm kinematics_main + Ebeam = 8900.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 916.0 ; e arm central momentum (MeV/c) + spec%e%theta = 60.570 ; e arm angle setting (degrees) + spec%p%P = 7685.2 ; p arm central momentum (MeV/c) + spec%p%theta = 5.50 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 2. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 2.01355 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.16743 ; target density (g/cm^3) + targ%thick = 1339.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 25.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 50.0 ; delta max + SPedge%p%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min =-140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/fpi_830_275_14_+0100.inp b/infiles/fpi_830_275_14_+0100.inp new file mode 100644 index 00000000..9c63999b --- /dev/null +++ b/infiles/fpi_830_275_14_+0100.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 100000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 1 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi- coherent) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 780.4 ; decay length (cm) +end parm experiment + +begin parm kinematics_main + Ebeam = 8900.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 916.0 ; e arm central momentum (MeV/c) + spec%e%theta = 60.570 ; e arm angle setting (degrees) + spec%p%P = 7685.2 ; p arm central momentum (MeV/c) + spec%p%theta = 5.50 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 25.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 50.0 ; delta max + SPedge%p%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min =-140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/kaonL_550_302_37_+0000.inp b/infiles/kaonL_550_302_37_+0000.inp index 03d8943d..6356640a 100644 --- a/infiles/kaonL_550_302_37_+0000.inp +++ b/infiles/kaonL_550_302_37_+0000.inp @@ -43,8 +43,8 @@ begin parm debug ; (ONES give helpful debug info) end parm debug begin parm e_arm_accept - SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) - SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 25.0 ; delta max SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) @@ -52,12 +52,12 @@ begin parm e_arm_accept end parm e_arm_accept begin parm p_arm_accept - SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) - SPedge%p%delta%max = 40.0 ; delta max - SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) - SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 - SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) - SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 + SPedge%p%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 50.0 ; delta max + SPedge%p%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 end parm p_arm_accept begin parm beamandtargetinfo diff --git a/infiles/kaonS_550_302_37_+0000.inp b/infiles/kaonS_550_302_37_+0000.inp index 8a675b2b..3e1b9f15 100644 --- a/infiles/kaonS_550_302_37_+0000.inp +++ b/infiles/kaonS_550_302_37_+0000.inp @@ -43,8 +43,8 @@ begin parm debug ; (ONES give helpful debug info) end parm debug begin parm e_arm_accept - SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) - SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 25.0 ; delta max SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) @@ -52,12 +52,12 @@ begin parm e_arm_accept end parm e_arm_accept begin parm p_arm_accept - SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) - SPedge%p%delta%max = 40.0 ; delta max - SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) - SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 - SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) - SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 + SPedge%p%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 50.0 ; delta max + SPedge%p%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 end parm p_arm_accept begin parm beamandtargetinfo diff --git a/physics_piKmodel.f b/physics_piKmodel.f index bbfaf164..55d574cd 100644 --- a/physics_piKmodel.f +++ b/physics_piKmodel.f @@ -74,34 +74,125 @@ real*8 function peepi(vertex,main) real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian - real*8 pm2_tmp + real*8 pm2_tmp,q2_cent_g logical first_call save first_call data first_call/.true./ + real*8 Q2_tab(18,130),W_tab(18,130),t_tab(18,130),stab(18,130,4) + character*28 filename(18) + integer nfiles, tbins(18) + +******************************************************************************* +* Read model values when first called. +c Columns are: Q2, W, -t (GeV2), dsig_L, T, TL, TT (mubarn/GeV2) + + if(first_call) then + first_call=.false. + +c calculate central kinematics Q^2 + q2_cent_g = ( (Ebeam - spec%e%P*cos(spec%e%theta))**2 + c + (spec%e%P*sin(spec%e%theta))**2 + c - (Ebeam - spec%e%P)**2 ) /1.e6 +c write(6,*)' Q2_central = ',q2_cent_g + + if (which_pion.eq.0) then ! pi+ + if (q2_cent_g.lt.6.25) then + write(6,*)'Selecting VR pi+ model for Q^2=1.0-9.5, W=3.28' + nfiles=18 + Wset=3.28 + filename(1)='VR/ep_enpip_q21p00_w3p28.dat' + filename(2)='VR/ep_enpip_q21p50_w3p28.dat' + filename(3)='VR/ep_enpip_q22p00_w3p28.dat' + filename(4)='VR/ep_enpip_q22p50_w3p28.dat' + filename(5)='VR/ep_enpip_q23p00_w3p28.dat' + filename(6)='VR/ep_enpip_q23p50_w3p28.dat' + filename(7)='VR/ep_enpip_q24p00_w3p28.dat' + filename(8)='VR/ep_enpip_q24p50_w3p28.dat' + filename(9)='VR/ep_enpip_q25p00_w3p28.dat' + filename(10)='VR/ep_enpip_q25p50_w3p28.dat' + filename(11)='VR/ep_enpip_q26p00_w3p28.dat' + filename(12)='VR/ep_enpip_q26p50_w3p28.dat' + filename(13)='VR/ep_enpip_q27p00_w3p28.dat' + filename(14)='VR/ep_enpip_q27p50_w3p28.dat' + filename(15)='VR/ep_enpip_q28p00_w3p28.dat' + filename(16)='VR/ep_enpip_q28p50_w3p28.dat' + filename(17)='VR/ep_enpip_q29p00_w3p28.dat' + filename(18)='VR/ep_enpip_q29p50_w3p28.dat' + else + write(6,*)'Selecting VR pi+ model for Q^2=6.5-11.5, W=2.89' + nfiles=11 + Wset=2.89 + filename(1)='VR/ep_enpip_q26p50_w2p89.dat' + filename(2)='VR/ep_enpip_q27p00_w2p89.dat' + filename(3)='VR/ep_enpip_q27p50_w2p89.dat' + filename(4)='VR/ep_enpip_q28p00_w2p89.dat' + filename(5)='VR/ep_enpip_q28p50_w2p89.dat' + filename(6)='VR/ep_enpip_q29p00_w2p89.dat' + filename(7)='VR/ep_enpip_q29p50_w2p89.dat' + filename(8)='VR/ep_enpip_q210p0_w2p89.dat' + filename(9)='VR/ep_enpip_q210p5_w2p89.dat' + filename(10)='VR/ep_enpip_q211p0_w2p89.dat' + filename(11)='VR/ep_enpip_q211p5_w2p89.dat' + filename(12)=' ' + filename(13)=' ' + filename(14)=' ' + filename(15)=' ' + filename(16)=' ' + filename(17)=' ' + filename(18)=' ' + endif + + elseif (which_pion.eq.1) then !pi- + if (q2_cent_g.lt.6.25) then + write(6,*)'Selecting VR pi- model for Q^2=1.0-6.5, W=3.28' + nfiles=12 + Wset=3.28 + filename(1)='VR/en_eppim_q21p00_w3p28.dat' + filename(2)='VR/en_eppim_q21p50_w3p28.dat' + filename(3)='VR/en_eppim_q22p00_w3p28.dat' + filename(4)='VR/en_eppim_q22p50_w3p28.dat' + filename(5)='VR/en_eppim_q23p00_w3p28.dat' + filename(6)='VR/en_eppim_q23p50_w3p28.dat' + filename(7)='VR/en_eppim_q24p00_w3p28.dat' + filename(8)='VR/en_eppim_q24p50_w3p28.dat' + filename(9)='VR/en_eppim_q25p00_w3p28.dat' + filename(10)='VR/en_eppim_q25p50_w3p28.dat' + filename(11)='VR/en_eppim_q26p00_w3p28.dat' + filename(12)='VR/en_eppim_q26p50_w3p28.dat' + filename(13)=' ' + filename(14)=' ' + filename(15)=' ' + filename(16)=' ' + filename(17)=' ' + filename(18)=' ' + else + write(6,*)'Selecting VR pi- model for Q^2=6.5-11.5, W=2.89' + nfiles=11 + Wset=2.89 + filename(1)='VR/en_eppim_q26p50_w2p89.dat' + filename(2)='VR/en_eppim_q27p00_w2p89.dat' + filename(3)='VR/en_eppim_q27p50_w2p89.dat' + filename(4)='VR/en_eppim_q28p00_w2p89.dat' + filename(5)='VR/en_eppim_q28p50_w2p89.dat' + filename(6)='VR/en_eppim_q29p00_w2p89.dat' + filename(7)='VR/en_eppim_q29p50_w2p89.dat' + filename(8)='VR/en_eppim_q210p0_w2p89.dat' + filename(9)='VR/en_eppim_q210p5_w2p89.dat' + filename(10)='VR/en_eppim_q211p0_w2p89.dat' + filename(11)='VR/en_eppim_q211p5_w2p89.dat' + filename(12)=' ' + filename(13)=' ' + filename(14)=' ' + filename(15)=' ' + filename(16)=' ' + filename(17)=' ' + filename(18)=' ' + endif + + endif -c real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) -c character*35 filename(12) -c integer nfiles, tbins(12) -c nfiles=12 -c Wset=3.28 -c data filename /'VGL/ep_enpip_q21p00_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q21p50_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q22p00_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q22p50_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q23p00_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q23p50_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q24p00_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q24p50_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q25p00_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q25p50_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q26p00_w3p27_pirho.dat', -c $ 'VGL/ep_enpip_q26p50_w3p27_pirho.dat'/ - -c real*8 Q2_tab(5,130),W_tab(12,130),t_tab(5,130),stab(5,130,4) -c character*35 filename(5) -c integer nfiles, tbins(5) c nfiles=5 c Wset=2.89 c data filename /'VGL/ep_enpip_q27p50_w2p89_pirho.dat', @@ -110,51 +201,10 @@ real*8 function peepi(vertex,main) c $ 'VGL/ep_enpip_q29p00_w2p89_pirho.dat', c $ 'VGL/ep_enpip_q29p50_w2p89_pirho.dat'/ -c real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) -c character*28 filename(12) -c integer nfiles, tbins(12) -c nfiles=12 -c Wset=3.28 -c data filename /'VR/ep_enpip_q21p00_w3p28.dat', -c $ 'VR/ep_enpip_q21p50_w3p28.dat', -c $ 'VR/ep_enpip_q22p00_w3p28.dat', -c $ 'VR/ep_enpip_q22p50_w3p28.dat', -c $ 'VR/ep_enpip_q23p00_w3p28.dat', -c $ 'VR/ep_enpip_q23p50_w3p28.dat', -c $ 'VR/ep_enpip_q24p00_w3p28.dat', -c $ 'VR/ep_enpip_q24p50_w3p28.dat', -c $ 'VR/ep_enpip_q25p00_w3p28.dat', -c $ 'VR/ep_enpip_q25p50_w3p28.dat', -c $ 'VR/ep_enpip_q26p00_w3p28.dat', -c $ 'VR/ep_enpip_q26p50_w3p28.dat'/ - - real*8 Q2_tab(11,130),W_tab(11,130),t_tab(11,130),stab(11,130,4) - character*28 filename(11) - integer nfiles, tbins(11) - nfiles=11 - Wset=2.89 - data filename /'VR/ep_enpip_q26p50_w2p89.dat', - $ 'VR/ep_enpip_q27p00_w2p89.dat', - $ 'VR/ep_enpip_q27p50_w2p89.dat', - $ 'VR/ep_enpip_q28p00_w2p89.dat', - $ 'VR/ep_enpip_q28p50_w2p89.dat', - $ 'VR/ep_enpip_q29p00_w2p89.dat', - $ 'VR/ep_enpip_q29p50_w2p89.dat', - $ 'VR/ep_enpip_q210p0_w2p89.dat', - $ 'VR/ep_enpip_q210p5_w2p89.dat', - $ 'VR/ep_enpip_q211p0_w2p89.dat', - $ 'VR/ep_enpip_q211p5_w2p89.dat'/ - -******************************************************************************* -* Read model values when first called. -c Columns are: Q2, W, -t (GeV2), dsig_L, T, TL, TT (mubarn/GeV2) - - if(first_call) then - first_call=.false. - do j=1,nfiles OPEN(3,FILE=filename(j),STATUS='OLD') - write(6,*) 'reading model file', j + write(6,80) j,filename(j) + 80 format(' Reading model file',i3,' ',a28) do t_count = 1,130 read(3,*,end=100) Q2_tab(j,t_count), 1 W_tab(j,t_count),t_tab(j,t_count), @@ -169,7 +219,7 @@ real*8 function peepi(vertex,main) tbins(j)=t_count-1 c write(6,*)' lines found ',tbins(j),t_tab(j,tbins(j)) close(unit=3) - write(6,*) 'done' +c write(6,*) 'done' enddo pcount=0 endif !if first time. @@ -544,72 +594,16 @@ real*8 function peeK(vertex,main,survivalprob) real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian - real*8 pm2_tmp + real*8 pm2_tmp,q2_cent_g logical first_call save first_call data first_call/.true./ - real*8 Q2_tab(12,130),W_tab(12,130),t_tab(12,130),stab(12,130,4) - character*35 filename(12) - integer nfiles, tbins(12) - nfiles=12 - Wset=3.28 - data filename /'VGL/ep_enpip_q21p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q21p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q22p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q22p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q23p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q23p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q24p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q24p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q25p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q25p50_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q26p00_w3p27_pirho.dat', - $ 'VGL/ep_enpip_q26p50_w3p27_pirho.dat'/ - -c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) -c character*35 filename(5) -c integer nfiles, tbins(5) -c nfiles=5 -c Wset=2.89 -c data filename /'VGL/ep_enpip_q27p50_w2p89_pirho.dat', -c $ 'VGL/ep_enpip_q28p00_w2p89_pirho.dat', -c $ 'VGL/ep_enpip_q28p50_w2p89_pirho.dat', -c $ 'VGL/ep_enpip_q29p00_w2p89_pirho.dat', -c $ 'VGL/ep_enpip_q29p50_w2p89_pirho.dat'/ - -c real*8 Q2_tab(12),t_tab(130),stab(12,130,4) -c character*35 filename(12) -c integer nfiles, tbins(12) -c nfiles=12 -c Wset=3.28 -c character*28 filename(12) -c data filename /'VR/ep_enpip_q21p00_w3p28.dat', -c $ 'VR/ep_enpip_q21p50_w3p28.dat', -c $ 'VR/ep_enpip_q22p00_w3p28.dat', -c $ 'VR/ep_enpip_q22p50_w3p28.dat', -c $ 'VR/ep_enpip_q23p00_w3p28.dat', -c $ 'VR/ep_enpip_q23p50_w3p28.dat', -c $ 'VR/ep_enpip_q24p00_w3p28.dat', -c $ 'VR/ep_enpip_q24p50_w3p28.dat', -c $ 'VR/ep_enpip_q25p00_w3p28.dat', -c $ 'VR/ep_enpip_q25p50_w3p28.dat', -c $ 'VR/ep_enpip_q26p00_w3p28.dat', -c $ 'VR/ep_enpip_q26p50_w3p28.dat'/ - -c real*8 Q2_tab(5),t_tab(130),stab(5,130,4) -c character*35 filename(5) -c integer nfiles, tbins(5) -c nfiles=5 -c Wset=2.89 -c character*28 filename(5) -c data filename /'VR/ep_enpip_q27p50_w2p89.dat', -c $ 'VR/ep_enpip_q28p00_w2p89.dat', -c $ 'VR/ep_enpip_q28p50_w2p89.dat', -c $ 'VR/ep_enpip_q29p00_w2p89.dat', -c $ 'VR/ep_enpip_q29p50_w2p89.dat'/ + real*8 Q2_tab(18,130),W_tab(18,130),t_tab(18,130),stab(18,130,4) + character*28 filename(18) + integer nfiles, tbins(18) ******************************************************************************* * Read model values when first called. @@ -618,9 +612,48 @@ real*8 function peeK(vertex,main,survivalprob) if(first_call) then first_call=.false. +c calculate central kinematics Q^2 + q2_cent_g = ( (Ebeam - spec%e%P*cos(spec%e%theta))**2 + c + (spec%e%P*sin(spec%e%theta))**2 + c - (Ebeam - spec%e%P)**2 ) /1.e6 +c write(6,*)' Q2_central = ',q2_cent_g + + if (which_kaon.eq.0) then ! p->K+Lambda0 +c if (q2_cent_g.lt.6.25) then + write(6,*)'Selecting VR K+L0 model for Q^2=0.1-9.5, W=3.15' + nfiles=18 + Wset=3.15 + filename(1)='VR/ep_peekl_q20p10_w3p15.dat' + filename(2)='VR/ep_peekl_q20p50_w3p15.dat' + filename(3)='VR/ep_peekl_q21p00_w3p15.dat' + filename(4)='VR/ep_peekl_q21p50_w3p15.dat' + filename(5)='VR/ep_peekl_q22p00_w3p15.dat' + filename(6)='VR/ep_peekl_q22p50_w3p15.dat' + filename(7)='VR/ep_peekl_q23p00_w3p15.dat' + filename(8)='VR/ep_peekl_q23p50_w3p15.dat' + filename(9)='VR/ep_peekl_q24p00_w3p15.dat' + filename(10)='VR/ep_peekl_q24p50_w3p15.dat' + filename(11)='VR/ep_peekl_q25p00_w3p15.dat' + filename(12)='VR/ep_peekl_q25p50_w3p15.dat' + filename(13)='VR/ep_peekl_q26p00_w3p15.dat' + filename(14)='VR/ep_peekl_q26p50_w3p15.dat' + filename(15)='VR/ep_peekl_q27p00_w3p15.dat' + filename(16)='VR/ep_peekl_q28p50_w3p15.dat' + filename(17)='VR/ep_peekl_q29p00_w3p15.dat' + filename(18)='VR/ep_peekl_q29p50_w3p15.dat' +c endif + elseif (which_kaon.eq.1) then ! p->K+Sigma0 + write(6,*)'Selecting VR K+S0 model for Q^2=?, W=?' + stop + elseif (which_kaon.eq.2) then ! n->K+Lambda- + write(6,*)'Selecting VR K+L- model for Q^2=?, W=?' + stop + endif + do j=1,nfiles OPEN(3,FILE=filename(j),STATUS='OLD') - write(6,*) 'reading model file', j + write(6,80) j,filename(j) + 80 format(' Reading model file',i3,' ',a28) do t_count = 1,130 read(3,*,end=100) Q2_tab(j,t_count), 1 W_tab(j,t_count),t_tab(j,t_count), @@ -635,7 +668,7 @@ real*8 function peeK(vertex,main,survivalprob) tbins(j)=t_count-1 c write(6,*)' lines found ',tbins(j),t_tab(j,tbins(j)) close(unit=3) - write(6,*) 'done' +c write(6,*) 'done' enddo endif !if first time. ******************************************************************************* From 3355ed0d92956403c6328f15c7ffba113232eae2 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Thu, 28 Dec 2017 14:29:25 -0600 Subject: [PATCH 08/15] New release of u-channel generators for omega,phi and background channels: rho, eta, eta_prime following W.Li's thesis. Includes improved parameterizations of cross-sections and some bug fixes. --- Makefile | 9 +- NtupleInit.f | 12 +- constants.inc | 99 ++++---- dbase.f | 19 +- event.f | 56 +++-- hms/mc_hms_coll.f | 2 +- physics_Xphasespace.f | 15 +- physics_eta.f | 224 +++++++++++++++++ physics_eta_prime.f | 224 +++++++++++++++++ physics_omega.f | 574 +++++++++++++++++++++++++++++++++++++----- physics_phi.f | 389 +++++++++++++++++++++++++--- physics_rho_recoil.f | 93 ++++--- results_write.f | 5 + simc.f | 10 +- simulate.inc | 1 + 15 files changed, 1510 insertions(+), 222 deletions(-) create mode 100644 physics_eta.f create mode 100644 physics_eta_prime.f diff --git a/Makefile b/Makefile index 496d3949..2ca7b63f 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,11 @@ T = $(simcdir)/cteq5/ C = $(simcdir)/calo/ OBJ1 = target.o brem.o gauss1.o NtupleInit.o NtupleClose.o enerloss_new.o -#OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o -OBJ2 = radc.o init.o dbase.o physics_piKmodel.o physics_delta.o physics_proton.o loren.o sf_lookup.o +OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physics_proton.o loren.o sf_lookup.o +#OBJ2 = radc.o init.o dbase.o physics_piKmodel.o physics_delta.o physics_proton.o loren.o sf_lookup.o OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o -OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o +OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o +OBJ4b = physics_eta.o physics_eta_prime.o OBJ4a = results_write.o event.o mt19937.o jacobians.o OBJ5 = $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o OBJ6 = $(A)rotate_haxis.o $(A)rotate_vaxis.o $(A)locforunt.o @@ -47,7 +48,7 @@ OBJA = $(L)mc_hrsl.o $(L)mc_hrsl_hut.o $(L)mc_hrsl_recon.o OBJB = $(SH)mc_shms.o $(SH)mc_shms_hut.o $(SH)mc_shms_recon.o OBJC = $(T)Ctq5Pdf.o OBJD = $(C)mc_calo.o $(C)mc_calo_recon.o -my_objs = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ4a) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJA) $(OBJB) $(OBJC) $(OBJD) +my_objs = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ4b) $(OBJ4a) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJ9) $(OBJA) $(OBJB) $(OBJC) $(OBJD) my_deps = $(my_objs:.o=.d) diff --git a/NtupleInit.f b/NtupleInit.f index d6d995de..ee02184a 100644 --- a/NtupleInit.f +++ b/NtupleInit.f @@ -174,7 +174,17 @@ subroutine NtupleInit(filename) NtupleTag(m) = 'phimq' ! 59 or 67 m=m+1 NtupleTag(m) = 'minus_u' ! 60 or 68 - endif + m=m+1 + NtupleTag(m) = 'phicmi' ! 61 or 69 + m=m+1 + NtupleTag(m) = 'tprimei' ! 62 or 70 + m=m+1 + NtupleTag(m) = 'wcmi' ! 63 or 71 + m=m+1 + NtupleTag(m) = 'epsiloni' ! 64 or 72 + m=m+1 + NtupleTag(m) = 'ui' ! 65 or 73 + endif else if (doing_semi.or.doing_rho) then m = m+1 NtupleTag(m) = 'missmass' ! 34 <- Wprime for semi-inclusive folks diff --git a/constants.inc b/constants.inc index 0693b6cf..7a539d20 100644 --- a/constants.inc +++ b/constants.inc @@ -1,54 +1,55 @@ ! CONSTANTS.INC ! Note: All angles are in radians -! All distances are in cm -! All energies (momenta,masses) are in MeV -! All deltas are in percent -! All densities (thicknesses) are in g/cm3 (g/cm2) -! All B fields are in kG -! All roads lead to infinity +! All distances are in cm +! All energies (momenta,masses) are in MeV +! All deltas are in percent +! All densities (thicknesses) are in g/cm3 (g/cm2) +! All B fields are in kG +! All roads lead to infinity ! ... some physical constants - real*8 Me, Me2, Mp, Mp2, Mn, Mn2, Mpi, Mpi2, Mpi0, Mpi02 - real*8 Meta, Meta2, Mk, Mk2, Mrho, Mrho2, MrhoW - real*8 Momega, Momega2, MomegaW, Md, Md2 - real*8 Mphi, Mphi2, MphiW - real*8 Mlambda, Msigma0, Msigma_minus - real*8 amu, hbarc, pi, twopi, alpha, alpi, degrad, euler - parameter (Me=0.51099906) - parameter (Me2=Me**2) - parameter (Mp=938.27231) - parameter (Mp2=Mp**2) - parameter (Mn=939.56563) - parameter (Mn2=Mn**2) - parameter (Mphi=1019.460) !2006 PDG value - parameter (Mphi2=Mphi**2) - parameter (MphiW=4.26) !2006 PDG value - parameter (Mpi=139.57018) - parameter (Mpi2=Mpi**2) - parameter (Mpi0=134.9766) - parameter (Mpi02=Mpi0**2) - parameter (Meta=547.75) - parameter (Meta2=Meta**2) - parameter (Mk=493.677) - parameter (Mk2=Mk**2) -c parameter (Mrho=769.3) - parameter (Mrho=775.5) !2006 PDG value - parameter (Mrho2=Mrho**2) - parameter (MrhoW=149.4) !2006 PDG value - parameter (Momega=782.65) !2006 PDG value - parameter (Momega2=Momega**2) - parameter (MomegaW=8.49) !2006 PDG value - parameter (Md=1875.613) - parameter (Md2=Md**2) - parameter (Mlambda=1115.68) - parameter (Msigma0=1192.64) - parameter (Msigma_minus=1197.45) - parameter (amu=931.49432) - parameter (hbarc=197.327053) - parameter (pi=3.141592653589793) - parameter (twopi=2.*pi) - parameter (alpha=1./137.0359895) - parameter (alpi=alpha/pi) - parameter (degrad=180./pi) - parameter (euler=0.577215665) + real*8 Me, Me2, Mp, Mp2, Mn, Mn2, Mpi, Mpi2, Mpi0, Mpi02 + real*8 Meta, Meta2, Mk, Mk2, Mrho, Mrho2, MrhoW + real*8 Momega, Momega2, MomegaW, Md, Md2 + real*8 Metap, Metap2, Mphi, Mphi2, MphiW + real*8 Mlambda, Msigma0, Msigma_minus + real*8 amu, hbarc, pi, twopi, alpha, alpi, degrad, euler + parameter (Me=0.51099906) + parameter (Me2=Me**2) + parameter (Mpi=139.57018) + parameter (Mpi2=Mpi**2) + parameter (Mpi0=134.9766) + parameter (Mpi02=Mpi0**2) + parameter (Mk=493.677) + parameter (Mk2=Mk**2) + parameter (Meta=547.86) !2014 PDG value + parameter (Meta2=Meta**2) + parameter (Mrho=775.5) !2006 PDG value + parameter (Mrho2=Mrho**2) + parameter (MrhoW=149.4) !2006 PDG value + parameter (Momega=782.65) !2006 PDG value + parameter (Momega2=Momega**2) + parameter (MomegaW=8.49) !2006 PDG value + parameter (Mp=938.27231) + parameter (Mp2=Mp**2) + parameter (Mn=939.56563) + parameter (Mn2=Mn**2) + parameter (Metap=957.78) !2014 PDG value + parameter (Metap2=Metap**2) + parameter (Mphi=1019.455) + parameter (Mphi2=Mphi**2) + parameter (MphiW=4.26) + parameter (Mlambda=1115.68) + parameter (Msigma0=1192.64) + parameter (Msigma_minus=1197.45) + parameter (Md=1875.613) + parameter (Md2=Md**2) + parameter (amu=931.49432) + parameter (hbarc=197.327053) + parameter (pi=3.141592653589793) + parameter (twopi=2.*pi) + parameter (alpha=1./137.0359895) + parameter (alpi=alpha/pi) + parameter (degrad=180./pi) + parameter (euler=0.577215665) diff --git a/dbase.f b/dbase.f index ccb9b0a2..9bdc9ff7 100644 --- a/dbase.f +++ b/dbase.f @@ -17,7 +17,7 @@ subroutine dbase_read(H) ! which_pion = 10(11) gives pi+ (pi-) coherent production. ! This sets doing_hydpi true for ALL targets (i.e. treat as ! a heavy proton) but with targ.Mtar_struck and targ.Mrec_struck -! set appropriatly. +! set appropriately. ! ! 4. doing_phsp:Generate acceptance with radiation and cross section disabled, ! use doing_kaon or doing_pion to set hadron mass, then @@ -31,7 +31,11 @@ subroutine dbase_read(H) ! a 'shortcut' version to start with. ! 6. doing_semi: H(e,e'pi)X (doing_semipi) and H(e,e'k)X (doing_semika) ! 7. doing_rho: H(e,e'rho)p +! 8. doing_eepx: H(e,e'p)M, where M=pi0,eta,rho,omega,eta',phi selected +! according to the recoil mass +! 9. doing_Xphasespace: H(e,e'p)X where X is chosen according to 2pi phasespace + implicit none include 'radc.inc' include 'histograms.inc' @@ -321,12 +325,15 @@ subroutine dbase_read(H) else if(Meepx.gt.778.0.and.Meepx.lt.790.0) then targ%Mrec_struck = Momega which_eepx = 4 + else if(Meepx.gt.957.0.and.Meepx.lt.958.0) then + targ%Mrec_struck = Metap + which_eepx = 5 else if(Meepx.gt.1015.0.and.Meepx.lt.1025.0) then targ%Mrec_struck = Mphi - which_eepx = 5 + which_eepx = 6 else targ%Mrec_struck = Meepx - which_eepx = 6 + which_eepx = 7 endif else if (doing_delta) then !Strike (and detect) proton, pion 'recoil' @@ -768,6 +775,8 @@ subroutine dbase_read(H) else if(which_eepx.eq.4) then write(6,*) ' ****-------- H(e,e''p)omega --------****' else if(which_eepx.eq.5) then + write(6,*) ' ****-------- H(e,e''p)eta_prime --------****' + else if(which_eepx.eq.6) then write(6,*) ' ****-------- H(e,e''p)phi --------****' else write(6,*) ' ****-------- H(e,e''p)Mx --------****' @@ -783,6 +792,8 @@ subroutine dbase_read(H) else if(which_eepx.eq.4) then write(6,*) ' ****-------- D(e,e''p)omega --------****' else if(which_eepx.eq.5) then + write(6,*) ' ****-------- D(e,e''p)eta_prime --------****' + else if(which_eepx.eq.6) then write(6,*) ' ****-------- D(e,e''p)phi --------****' else write(6,*) ' ****-------- D(e,e''p)Mx --------****' @@ -798,6 +809,8 @@ subroutine dbase_read(H) else if(which_eepx.eq.4) then write(6,*) ' ****-------- A(e,e''p)omega --------****' else if(which_eepx.eq.5) then + write(6,*) ' ****-------- A(e,e''p)eta_prime --------****' + else if(which_eepx.eq.6) then write(6,*) ' ****-------- A(e,e''p)phi --------****' else write(6,*) ' ****-------- A(e,e''p)Mx --------****' diff --git a/event.f b/event.f index d268638b..9c936b93 100644 --- a/event.f +++ b/event.f @@ -309,8 +309,8 @@ subroutine generate(main,vertex,orig,success) > .or.doing_Xphasespace) then Emin=gen%e%E%min Emax=gen%e%E%max - if (doing_deuterium .or. doing_pion .or. doing_kaon .or. doing_eepx .or. - > doing_delta .or. doing_rho) then + if (doing_deuterium .or. doing_pion .or. doing_kaon .or. + > doing_eepx .or. doing_delta .or. doing_rho) then Emin = max(Emin,gen%sumEgen%min) Emax = min(Emax,gen%sumEgen%max) else if (doing_heavy) then ! A(e,e'p) @@ -612,8 +612,8 @@ subroutine complete_ev(main,vertex,success) if(doing_eepx) then if (debug(4)) write(6,*)'comp_ev: at 6.5a',which_eepx if (which_eepx.eq.3) then !rho -* the rho is very broad and gets a formula with more restricted width -* even so, masses will be generated down to about 375 MeV +c the rho is very broad and gets a formula with more restricted width +c even so, masses will be generated down to about 375 MeV c ranlux substituted for grnd - gh call ranlux (rannum4,1) rannum=dble(rannum4) @@ -623,20 +623,16 @@ subroutine complete_ev(main,vertex,success) c > tan((2.*grnd()-1.)*atan(2.*450./MrhoW)) c > tan((2.*grnd()-1.)*atan(2.*500./MrhoW)) else if (which_eepx.eq.4) then ! omega -* all other mesons get the standard formula -c ranlux substituted for grnd - gh +c all other mesons (with width) get the standard formula call ranlux (rannum4,1) rannum=dble(rannum4) targ%Mrec_struck = Momega + > 0.5*MomegaW*tan((2.*rannum-1.)*pi/2.) -c > 0.5*MomegaW*tan((2.*grnd()-1.)*pi/2.) - else if (which_eepx.eq.5) then ! phi -c ranlux substituted for grnd - gh + else if (which_eepx.eq.6) then ! phi call ranlux (rannum4,1) rannum=dble(rannum4) targ%Mrec_struck = Mphi + > 0.5*MphiW*tan((2.*rannum-1.)*pi/2.) -c > 0.5*MphiW*tan((2.*grnd()-1.)*pi/2.) endif if (debug(4)) write(6,*)'comp_ev: at 6.5b',targ%Mrec_struck if(targ%Mrec_struck.le.0.0) return @@ -682,7 +678,7 @@ subroutine complete_ev(main,vertex,success) > (vertex%uq%x*vertex%up%x+vertex%uq%y*vertex%up%y+vertex%uq%z*vertex%up%z) write(6,*) 'a,b,c=',a/1000.,b/1000000.,c/1000. write(6,*) 't=',t/1000000. - write(6,*) 'A,B,C=',QA/1.d6,QB/1.d9,QC/1.d12 + write(6,*) 'A,B,C=',QA/1.e6,QB/1.e9,QC/1.e12 write(6,*) 'rad=',QB**2 - 4.*QA*QC write(6,*) 'e1,e2=',(-QB-sqrt(radical))/2000./QA,(-QB+sqrt(radical))/2000./QA write(6,*) 'E_pi1,2=',vertex%nu+targ%M-(-QB-sqrt(radical))/2./QA, @@ -734,7 +730,6 @@ subroutine complete_ev(main,vertex,success) ! Compute some pion and kaon stuff. Some of these should be OK for proton too. - if (doing_pion .or. doing_kaon .or. doing_eepx.or.doing_delta > .or. doing_rho .or. doing_semi.or. doing_Xphasespace) then W2 = targ%Mtar_struck**2 + 2.*targ%Mtar_struck*vertex%nu - vertex%Q2 @@ -982,7 +977,6 @@ subroutine complete_ev(main,vertex,success) if (debug(5)) write(6,*) 'vertex%Pm,vertex%Trec,vertex%Em',vertex%Pm,vertex%Trec,vertex%Em if (debug(4)) write(6,*)'comp_ev: at 10' - ! calculate krel for deuteron/heavy pion(kaon). Deuteron is straightforward. ! A>2 case is some approximation for 3He (DJG). @@ -1226,7 +1220,9 @@ subroutine complete_recon_ev(recon,success) p_new_x = px*new_x_x + py*new_x_y + pz*new_x_z p_new_y = px*new_y_x + py*new_y_y + pz*new_y_z - if ((p_new_x**2+p_new_y**2).eq.0.) then +c gh 17.12.27 - modify because of real inequality comparison warning +c if ((p_new_x**2+p_new_y**2).eq.0.) then + if (abs(p_new_x**2+p_new_y**2).le.1.e-6) then recon%phi_pq = 0.0 else recon%phi_pq = acos(p_new_x/sqrt(p_new_x**2+p_new_y**2)) @@ -1470,14 +1466,15 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) implicit none include 'simulate.inc' - integer i, iPm1 - real*8 a, b, r, frac, peepi, peeK, peedelta, peerho, peepiX - real*8 peep_omega, peep_rho, peep_phi, peepph - real*8 survivalprob, semi_dilution - real*8 weight, width, sigep, deForest, tgtweight - real*8 Em_weight ! gh - integer iEm1 - logical force_sigcc, success + integer i, iPm1 + real*8 a, b, r, frac, peepi, peeK, peedelta, peerho, peepiX + real*8 peep_eta, peep_omega, peep_rho, peep_eta_prime,peep_phi + real*8 peepph + real*8 survivalprob, semi_dilution + real*8 weight, width, sigep, deForest, tgtweight + real*8 Em_weight ! gh + integer iEm1 + logical force_sigcc, success type(event_main):: main type(event):: vertex, vertex0, recon @@ -1585,18 +1582,21 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) main%sigcc = 1.0 main%sigcc_recon = 1.0 !Need new xsec model. else if(which_eepx.eq.2) then !eta - main%sigcc = 1.0 - main%sigcc_recon = 1.0 !Need new xsec model. + main%sigcc = peep_eta(vertex,main) + main%sigcc_recon = 1.0 else if(which_eepx.eq.3) then !rho main%sigcc = peep_rho(vertex,main) main%sigcc_recon = 1.0 else if(which_eepx.eq.4) then !omega main%sigcc = peep_omega(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.5) then !phi + else if(which_eepx.eq.5) then !eta prime + main%sigcc = peep_eta_prime(vertex,main) + main%sigcc_recon = 1.0 + else if(which_eepx.eq.6) then !phi main%sigcc = peep_phi(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.6) then + else if(which_eepx.eq.7) then main%sigcc = 1.0 main%sigcc_recon = 1.0 endif @@ -1698,7 +1698,9 @@ subroutine physics_angles(theta0,phi0,dx,dy,theta,phi) tmp=(costh - dy*sinth*sinph) / r if (abs(tmp).gt.1) write(6,*) 'tmp=',tmp theta = acos( (costh - dy*sinth*sinph) / r ) - if (dx.ne.0.0) then +c gh 17.12.27 - modify because of real inequality comparison warning +c if (dx.ne.0.0) then + if (abs(dx).lt.1.e-6) then phi = atan( (dy*costh + sinth*sinph) / dx ) !gives -90 to 90 deg. if (phi.le.0) phi=phi+pi !make 0 to 180 deg. if (sinph.lt.0.) phi=phi+pi !add pi to phi for HMS diff --git a/hms/mc_hms_coll.f b/hms/mc_hms_coll.f index b2a4100c..fce3cf8d 100644 --- a/hms/mc_hms_coll.f +++ b/hms/mc_hms_coll.f @@ -111,7 +111,7 @@ subroutine mc_hms_coll(m2,p,p_spec,decay_flag,dflag,success,coll endif coll_radw = thick/coll_radl ! TH - some adjustment here for multiple scattering test -c call musc(m2,p,coll_radw,thick,dydzs,dxdzs) +c call musc(m2,p,coll_radw,thick,dydzs,dxdzs) call musc(m2,p,coll_radw,dydzs,dxdzs) epart = sqrt(p**2+m2) call enerloss_new(thick,coll_dens,zcoll,acoll,epart, diff --git a/physics_Xphasespace.f b/physics_Xphasespace.f index 1d004bf0..b657d1e3 100644 --- a/physics_Xphasespace.f +++ b/physics_Xphasespace.f @@ -31,7 +31,7 @@ real*8 function peepph(vertex,main) real*8 mass ! recoil mass real*8 invm,Wsq ! invariant mass of hadronic system - real*8 tt ! Mandelstam variables + real*8 tt,tprime,uu ! Mandelstam variables real*8 e_xCM,t_min real*8 gamma_T ! flux of transversely polarized virt. photons @@ -107,7 +107,9 @@ real*8 function peepph(vertex,main) * main%t, so overwrite it * for the + sign I spent 1 hour to check. xucc tt = 2.0*(m_p**2-m_p*Ep) -c main%t =tt +c main%t =tt + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) e_photCM = (Wsq - qsq - m_psq)/invm/2. q_photCM = sqrt((Wsq-qsq-m_psq)**2 +4.*Wsq*qsq)/invm/2. @@ -116,7 +118,10 @@ real*8 function peepph(vertex,main) if ((e_xCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then t_min = -qsq + mass**2 -2.*(e_xCM*e_photCM- * sqrt((e_xCM**2-mass**2)*(e_photCM**2+qsq))) + else + write(6,*)' physics_Xphasespace: no valid t min ' endif + tprime = abs(tt)-abs(t_min) main%tmin=-t_min ****************************************************************************** @@ -126,6 +131,12 @@ real*8 function peepph(vertex,main) ntup%sigcm = 1./(32.*pi*pi)*mass/q_photCM*p_cm/invm**2 + ntup%phicmi=phicm + ntup%wcmi=invm/1.e3 + ntup%tprimei=tprime/1.e6 + ntup%epsiloni=epsilon + ntup%ui=-uu/1.e6 + ******************************************************************************* * Convert from d3sigma/dOmega_cm/dMx [ub/MeV/sr] --> * d3sigma/dOmega_lab/dEp [ub/MeV/sr] using 'Jttheta' diff --git a/physics_eta.f b/physics_eta.f new file mode 100644 index 00000000..a1349507 --- /dev/null +++ b/physics_eta.f @@ -0,0 +1,224 @@ + real*8 function peep_eta(vertex,main) + +C first version written by Wenliang Li, 2017 + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 m_eta/547.86/ + real*8 gamma_eta/0.0013/ + real*8 m_pisq, m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + real*8 E_cm,p_cm ! proton CM momentum + + real*8 mass ! omega mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt,t_min,tprime,uu ! Mandelstam variables + real*8 e_photCM,e_etaCM + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Breit_wigner + real*8 Jttheta ! Jacobian t - theta_LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_eta_test + real*8 sig1,sig2 + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_pisq= Mpi02 + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm + main%davejac = jacobian + main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = targ%Mrec_struck + if (mass**2.lt.m_pisq) then + write(6,*)mass,sqrt(m_pisq) + peep_eta=0.0 + return + endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + + E_cm = (invm**2 + m_p**2 - mass**2)/invm/2. + p_cm = sqrt(E_cm**2 - m_p**2) + +* cos/sin of theta between Pp and q in LAB +C DJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x + + > vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t =tt + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_etaCM = (Wsq + mass**2 - m_psq)/invm/2. + if ((e_etaCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_etaCM*e_photCM- + * sqrt((e_etaCM**2-mass**2)*(e_photCM**2+qsq))) + else + write(6,*)' physics_eta: no valid t min ' + endif + tprime = abs(tt)-abs(t_min) + main%tmin=-t_min + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +** + sig1 = sig_eta_test(mass/1.e3,qsq/1.e6,invm/1.e3,tt/1.e6,uu/1.e6, + 1 epsilon) + + ntup%sigcm=sig1 + + ntup%phicmi=phicm + ntup%wcmi=invm/1.e3 + ntup%tprimei=tprime/1.e6 + ntup%epsiloni=epsilon + ntup%ui=-uu/1.e6 + +C DJG Breit-Wigner in the event generation - not needed here anymore. +******************************************************************************* +* Multiply by Breit_wigner [1/MeV] to give proper Mx weighted cross section +* d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* +* gh - relativistic Breit-Wigner factor (eqn 38.52 of 2004 PDG book) + Breit_wigner=(m_eta*gamma_eta)**2/ + * ((mass**2-m_eta**2)**2 +(m_eta*gamma_eta)**2) + +* gh - since sigma_omega is integrated over the omega peak, normalize +* Breit-Wigner to unit integral + Breit_wigner=Breit_wigner/(gamma_eta*pi/2.) + +******************************************************************************* +* Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* --> d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG BW in event generation - also want Jacobian at fixed Mx ... + + peep_eta=Jttheta_fx*gamma_T*ntup%sigcm + + return + end + + + + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_eta_test(mass,q2_gev,w_gev,tt,uu,epsilon) + +* all calculations are in GeV + + implicit none + include 'constants.inc' + + real*8 mass,q2_gev,w_gev,tt,uu,epsilon + real*8 A,B,C,sig_eta + real*8 m_p,m_psq,wfactor + + + a = 0.0044 + b = 5 + c = 0.000011 + + sig_eta = a * exp( -b * abs(uu)) + c; + + wfactor=(2.21**2-mp**2)**2/(w_gev**2-mp**2)**2 + sig_eta = sig_eta*wfactor/1.e+06 + +c GH: check for weird behavior on upper side of peak + if (mass.gt.1. .and. abs(tt).gt.q2_gev .and. sig_eta.gt.1.e-7) + * then + write(6,*)' tt=',tt,' sig=',sig_eta + sig_eta=sig_eta*1.e-6 + endif + + sig_eta_test = sig_eta + + return + end diff --git a/physics_eta_prime.f b/physics_eta_prime.f new file mode 100644 index 00000000..6734dc36 --- /dev/null +++ b/physics_eta_prime.f @@ -0,0 +1,224 @@ + real*8 function peep_eta_prime(vertex,main) + +c first version written by Wenliang Li, 2017 + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 m_etap/957.78/ + real*8 gamma_etap/0.30/ + real*8 m_omsq, m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + real*8 E_cm,p_cm ! proton CM momentum + + real*8 mass ! omega mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt,t_min,tprime,uu ! Mandelstam variables + real*8 e_photCM,e_etapCM + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Breit_wigner + real*8 Jttheta ! Jacobian t - theta_LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_eta_prime_test + + real*8 sig1,sig2 + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_omsq= Momega2 + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm + main%davejac = jacobian + main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = targ%Mrec_struck + if (mass**2.lt.m_omsq) then + write(6,*)mass,sqrt(m_omsq) + peep_eta_prime=0.0 + return + endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + + E_cm = (invm**2 + m_p**2 - mass**2)/invm/2. + p_cm = sqrt(E_cm**2 - m_p**2) + +* cos/sin of theta between Pp and q in LAB +C DJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x + + > vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t =tt + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_etapCM = (Wsq + mass**2 - m_psq)/invm/2. + if ((e_etapCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_etapCM*e_photCM- + * sqrt((e_etapCM**2-mass**2)*(e_photCM**2+qsq))) + else + write(6,*)' physics_eta_prime: no valid t,u min ' + endif + main%tmin=-t_min + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +** + sig1 = sig_eta_prime_test(mass/1.e3,qsq/1.e6,invm/1.e3,tt/1.e6, + * uu/1.e6,epsilon) + + ntup%sigcm=sig1 + + ntup%phicmi=phicm + ntup%wcmi=invm/1.e3 + ntup%tprimei=tprime/1.e6 + ntup%epsiloni=epsilon + ntup%ui=-uu/1.e6 + +C DJG Breit-Wigner in the event generation - not needed here anymore. +******************************************************************************* +* Multiply by Breit_wigner [1/MeV] to give proper Mx weighted cross section +* d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* +* gh - relativistic Breit-Wigner factor (eqn 38.52 of 2004 PDG book) + Breit_wigner=(m_etap*gamma_etap)**2/ + * ((mass**2-m_etap**2)**2 +(m_etap*gamma_etap)**2) + +* gh - since sigma_omega is integrated over the omega peak, normalize +* Breit-Wigner to unit integral + Breit_wigner=Breit_wigner/(gamma_etap*pi/2.) + +******************************************************************************* +* Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* --> d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG BW in event generation - also want Jacobian at fixed Mx ... + + peep_eta_prime=Jttheta_fx*gamma_T*ntup%sigcm + + return + end + + + + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_eta_prime_test(mass,q2_gev,w_gev,tt,uu,epsilon) + +* all calculations are in GeV + + implicit none + include 'constants.inc' + + real*8 mass,q2_gev,w_gev,tt,uu,epsilon + real*8 A,B,C,sig_etap + real*8 m_p,m_psq,wfactor + + + a = 0.0088 + b = 5 + c = 0.000022 + + sig_etap = a * exp( -b * abs(uu)) + c; + + wfactor=(2.21**2-mp**2)**2/(w_gev**2-mp**2)**2 + sig_etap = sig_etap*wfactor/1.e+06 + +c GH: check for weird behavior on upper side of peak + if (mass.gt.1.5 .and. abs(tt).gt.q2_gev .and. sig_etap.gt.1.e-7) + * then + write(6,*)' tt=',tt,' sig=',sig_etap + sig_etap=sig_etap*1.e-6 + endif + + sig_eta_prime_test = sig_etap + + return + end diff --git a/physics_omega.f b/physics_omega.f index bc9519d3..45889e8b 100644 --- a/physics_omega.f +++ b/physics_omega.f @@ -2,7 +2,8 @@ real*8 function peep_omega(vertex,main) C This function is adapted from Pawel Ambrozewicz C noted by xucc -* checked and modifed by gh - 05.02.11 +c checked and modifed by gh - 05.02.11 +c new version incorporating W.Li's thesis work - 17.12.27 implicit none include 'simulate.inc' @@ -18,8 +19,6 @@ real*8 function peep_omega(vertex,main) * photon-NUCLEON center of mass real*8 sigma_omega -c real*8 m_omega/782.59/ -c real*8 gamma_omega/8.49/ real*8 m_pisq, m_p, m_psq real*8 E0 ! Electron beam energy @@ -34,8 +33,9 @@ real*8 function peep_omega(vertex,main) real*8 mass ! omega mass real*8 invm,Wsq ! invariant mass of hadronic system real*8 tt,uu ! Mandelstam variables - real*8 tprime - real*8 e_photCM,e_omCM,t_min + real*8 uu2,umin2,t_max + real*8 tprime,t_min,uprime,u_min + real*8 e_photCM,e_omCM,e_pCM real*8 gamma_T ! flux of transversely polarized virt. photons c real*8 Breit_wigner @@ -54,8 +54,14 @@ real*8 function peep_omega(vertex,main) real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian,jac_old - real*8 sig_joos,sig_gmh - real*8 sig1,sig2 + real*8 sig_joos,sig_gmh,sig_wli,sig_LT_extrapolation + real*8 sig1,sig2,sig3,sig4 + + real*8 nu_nominal, q_nominal_2, q2_nominal + + m_p = targ%Mtar_struck + m_psq = m_p**2 + m_pisq= Mpi2 if (debug(2)) write(6,*)' peep_omega: enter ' @@ -71,9 +77,17 @@ real*8 function peep_omega(vertex,main) C it actually stands for proton. But I am too lazy to change it. C noted by xucc - m_pisq= 139.57018**2 - m_p = targ%Mtar_struck - m_psq = m_p**2 +* print*, spec%e%p, spec%e%theta, Ebeam + + nu_nominal = Ebeam/1000 - spec%e%p/1000 + + q_nominal_2 = (Ebeam/1000 - spec%e%p/1000 * cos(spec%e%theta))**2+ + $ (spec%e%p/1000 * sin(spec%e%theta))**2 + + q2_nominal = abs(nu_nominal**2 - q_nominal_2) + +* print*, nu_nominal**2, q_nominal_2, nu_nominal**2 - q_nominal_2 +* stop main%thetacm = thetacm main%phicm = phicm !gh - verified that this is same as main%phi_pq @@ -106,45 +120,93 @@ real*8 function peep_omega(vertex,main) CDJG tcos = cos(main%theta_pq) C DJG: I changed theta_pq in event.f - need to recalculate tcos - tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y + 1 +vertex%up%z*vertex%uq%z -* since here the meson is the recoil particle, t for us is not the same thing as -* main%t, so overwrite it +* since here the meson is the recoil particle, t for us is not the same +* thing as main%t, so overwrite it * for the + sign I spent 1 hour to check. xucc tt = 2.0*(m_p**2-m_p*Ep) c main%t = tt + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + e_photCM = (Wsq - qsq - m_psq)/invm/2. e_omCM = (Wsq + mass**2 - m_psq)/invm/2. + e_pCM = (Wsq + m_psq - mass**2)/invm/2. + if ((e_omCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then - t_min = -qsq + mass**2 -2.*(e_omCM*e_photCM- - * sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) + t_min = -qsq + mass**2 -2.*(e_omCM*e_photCM + * -sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) + u_min = -qsq + m_psq -2.*(e_pCM*e_photCM + * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) + else + write(6,*)' physics_omega: no valid t,u min ' endif - main%tmin=t_min + +c check u using s+t+u relation + uu2=-qsq+2.*m_psq+mass**2-invm**2-tt + t_max = -qsq + mass**2 -2.*(e_omCM*e_photCM + * +sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) + umin2=-qsq+2.*m_psq+mass**2-invm**2-t_max +c write(6,*)' uu ',uu,uu2,u_min,umin2,uprime + tprime = abs(tt)-abs(t_min) + uprime = abs(uu)-abs(u_min) + main%tmin=t_min + if (tprime.lt.0.) then - write(6,*)' unphysical -t<-t_min ',tt,t_min + write(6,*)' unphysical -t<-t_min ',tt,t_min,t_max,tprime endif - - uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) - +c gh 17.12.27 +c for some reason, sometimes u takes an unphysical positive value +c even though everything else appears okay +c s+t+u double-check also confirms u,umin values +c maybe due to some radiative effect?? + if (uprime.lt.0.) then + write(6,*)' physics_omega: event with unphysical -u<-u_min' + write(6,100)u_min,uu,uprime + write(6,100)t_min,tt,t_max,tprime + 100 format(4f15.2) + endif + ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] ****************************************************************************** * * One Pion Exchange model used in DESY analysis of Joos et al. * W<2 GeV, Q^2<1.4 GeV^2 - sig1 = sig_joos(mass/1.e3,tt/1.e6,uu/1.e6, - * vertex%q2/1.e6,invm/1.e3,main%epsilon) +c sig1 = sig_joos(mass/1.e3,tt/1.e6,uu/1.e6, +c * vertex%q2/1.e6,invm/1.e3,main%epsilon) * Parameterization based on saturated Regge model of J.M.Laget. * 2 Q2,W,Phi_e' +c real*4 J ! Jacobian E,E',Theta_e' ---> Q2,W,Phi_e' C We no longer need such J because we want to keep sampling in Lab C system Noted by xucc real*8 m_pi, m_pisq, m_p, m_psq, m_rho, m_rhosq - real*8 mass ! omega mass + real*8 mass ! omega mass - real*8 invm ! invariant mass of hadronic system + real*8 invm ! invariant mass of hadronic system real*8 Wsq real*8 tt,uu ! Mandelstam variables - real*8 epsilon ! virtual photon polarisation - real*8 E_gamma ! Energy of equiv. real photon for norm of dif. - real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + real*8 E_gamma ! Energy of equiv. real photon for norm of dif. + real*8 qsq ! 4 momentum transfer of scattered electron real*8 gamma_wpg ! Partial width for omega->pi gamma real*8 Gsq/14.6/ ! pion-nucleon coupling real*8 Lamba_wp C real*8 Q_N_sq,Q_NT_sq - real*8 F_N ! form factor from pi-nucleon vertex - real*8 F_w ! form factor from gamma-pi-omega vertex + real*8 F_N ! form factor from pi-nucleon vertex + real*8 F_w ! form factor from gamma-pi-omega vertex real*8 U_ff,pcm - real*8 QT,QF ! momentum of on-shell and off-shell pion - ! in omega rest frame - real*8 B,C,N_3 ! parameters in Joos OPE model + real*8 QT,QF ! momentum of on-shell and off-shell pion + ! in omega rest frame + real*8 B,C,N_3 ! parameters in Joos OPE model real*8 sig_ope_t ! differential x-section for trans. photons real*8 sig_ope_l ! differential x-section for long. photons -c real*8 sig_dif ! differential x-section for diffraction +c real*8 sig_dif ! differential x-section for diffraction real*8 R ! real*8 Q_N,Q_NT !,L_piece,T_piece real*8 temp,temp1,temp2 c Convert masses to GeV - m_pi = Mpi/1.e3 - m_pisq= Mpi2/1.e6 - m_rho = Mrho/1.e3 - m_rhosq=Mrho2/1.e6 - m_p = Mp/1.e3 - m_psq = Mp2/1.e6 + parameter(m_pi = Mpi/1.e3) + parameter(m_pisq= Mpi2/1.e6) + parameter(m_rho = Mrho/1.e3) + parameter(m_rhosq=Mrho2/1.e6) + parameter(m_p = Mp/1.e3) + parameter(m_psq = Mp2/1.e6) Wsq = invm*invm @@ -343,16 +405,18 @@ real*8 function Pcm(m1sq,m2sq,m3sq) - real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, - * q2_gev,w_gev,eps) - -* This is a starting-point model to be used in the omega analysis of -* E01-004. Fits were made to the p(e,e'p)omega Regge model calculation -* at Q^2=2.35, W=2.47 by J.M. Laget, Phys.Rev.D 70(2004)054023. The -* model will be modified to best fit the omega data, as necessary. -* Subroutine calculates dsigma/dt/dphi_cm, which is returned as sig_gmh -* [ub/MeV^2/rad]. -* gh, 05.02.11 +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev,u_gev, + * uprime_gev,q2_gev,w_gev,mom_gev,eps) + +c Based on fits made to the t-channel p(e,e'p)omega Regge model calculation +c at Q^2=2.35, W=2.47 by J.M. Laget, Phys.Rev.D 70(2004)054023. +c Then, to adapt to u-channel, C. Weiss recommends to switch u-slope for +c t-slope and divide by 10, which is the approximate forward/backward peak +c ratio from W.Li's thesis +c Subroutine calculates dsigma/dt/dphi_cm, which is returned as sig_gmh +c [ub/MeV^2/rad]. +c gh, 05.02.11. Modified: 17.12.12 implicit none include 'constants.inc' @@ -360,17 +424,34 @@ real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, real*8 sig,wfactor real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt real*8 thetacm,phicm,t_gev,tprime_gev,q2_gev,w_gev,eps,tp + real*8 u_gev,uprime_gev,up,mom_gev real*8 lambda0_sq,lambdapi_sq,alphapi_t,alphapi_0 real*8 a,b,c,d,e,f,fpi,fpi235 - real*8 m_pi0sq - m_pi0sq= Mpi02/1.e6 + real*8 m_pi,m_pisq,m_rho,m_rhosq,m_p,m_psq,m_pi0sq + integer iflag + +c Convert masses to GeV + parameter(m_pi = Mpi/1.e3) + parameter(m_pisq= Mpi2/1.e6) + parameter(m_rho = Mrho/1.e3) + parameter(m_rhosq=Mrho2/1.e6) + parameter(m_p = Mp/1.e3) + parameter(m_psq = Mp2/1.e6) + parameter(m_pi0sq= Mpi02/1.e6) + + iflag=1 ! flag for t(0) or u(1) channel tp = abs(tprime_gev) ! just to make sure it's positive if (abs(t_gev)-tprime error',abs(t_gev),tp stop endif + up = abs(uprime_gev) ! just to make sure it's positive + if (abs(u_gev)-uprime error',abs(u_gev),up + stop + endif * Normally, this would equal m_rho**2, but Laget has adjusted the value * to reproduce the real photon data. @@ -405,7 +486,12 @@ real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, d = 6.4562 e = -9.6199 f = 5.8319 - sigl = a*exp(-b*tp)+c*exp(-d*(tp**0.5))+e*exp(-f*(tp**0.25)) + if (iflag.lt.1) then ! t-channel + sigl = a*exp(-b*tp)+c*exp(-d*(tp**0.5))+e*exp(-f*(tp**0.25)) + else ! u-channel + sigl = a*exp(-b*up)+c*exp(-d*(up**0.5))+e*exp(-f*(up**0.25)) + sigl = sigl/10. ! back angle peak is ~10% of forward angle peak + endif sigl = sigl *(fpi/fpi235)**2 a = -0.12286 @@ -414,14 +500,24 @@ real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, d = 2.1988 e = 0.65170 f = 18.501 - sigt = a*exp(-b*tp)+c*exp(-d*(tp**0.5))+e*exp(-f*(tp**2)) + if (iflag.lt.1) then ! t-channel + sigt = a*exp(-b*tp)+c*exp(-d*(tp**0.5))+e*exp(-f*(tp**2)) + else ! u-channel + sigt = a*exp(-b*up)+c*exp(-d*(up**0.5))+e*exp(-f*(up**2)) + sigt = sigt/10. ! back angle peak is ~10% of forward angle peak + endif sigt = sigt *(fpi/fpi235)**2 a = 0.46397 b = 4.9179 c = 3.3023 d = 3.1741 - siglt = a*exp(-b*tp)+c*exp(-d*(tp**0.5)) + if (iflag.lt.1) then ! t-channel + siglt = a*exp(-b*tp)+c*exp(-d*(tp**0.5)) + else ! u-channel + siglt = a*exp(-b*up)+c*exp(-d*(up**0.5)) + siglt = siglt/10. ! back angle peak is ~10% of forward angle peak + endif siglt = siglt*(fpi/fpi235)**2*sin(thetacm) * Laget uses -sqrt(e(1+e)) instead of +sqrt(2e(1+e)) siglt = -siglt/sqrt(2.) @@ -430,12 +526,17 @@ real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, b = 2.7655 c = 2.8034 d = 3.8586 - sigtt = a*exp(-b*tp)+c*exp(-d*(tp**0.5)) + if (iflag.lt.1) then ! t-channel + sigtt = a*exp(-b*tp)+c*exp(-d*(tp**0.5)) + else ! u-channel + sigtt = a*exp(-b*up)+c*exp(-d*(Up**0.5)) + sigtt = sigtt/10. ! back angle peak is ~10% of forward angle peak + endif sigtt= sigtt*(fpi/fpi235)**2*(sin(thetacm))**2 * Since I have nothing better to go on, for now I assume W scales as * 1/(W^2-mp^2)^2. - wfactor=(2.47**2-mp**2)**2/(w_gev**2-mp**2)**2 + wfactor=(2.47**2-m_p**2)**2/(w_gev**2-m_p**2)**2 sigl = sigl*wfactor sigt = sigt*wfactor @@ -451,8 +552,357 @@ real*8 function sig_gmh(thetacm,phicm,t_gev,tprime_gev, sig = sigt +eps*sigl +eps*cos(2.*phicm)*sigtt * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt - sig = sig/2./pi/1.d+06 !dsig/dtdphicm in microbarns/MeV^2/rad + sig = sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV^2/rad sig_gmh = sig return end + + + +*/*----------------------------------------------------*/ +*/*----------------------------------------------------*/ +** Model by Wenliang (Bill) Li used in the analysis of +** E01-004 u-channel data +** + + real*8 function sig_wli(thetacm,phicm,u_gev, + * q2_gev,w_gev,eps, q2_nominal) + + implicit none + include 'constants.inc' + + real*8 sig,wfactor,m_p + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + real*8 thetacm,phicm,u_gev,q2_gev,w_gev,eps,up + real*8 lambda0_sq,lambdapi_sq,alphapi_t,alphapi_0 + real*8 a,b,c,d,e,f,h,g,fpi,fpi235 + real*8 m_pi0sq + real*8 q2_nominal + + real*8 t0, t1, t2, t3 + real*8 l0, l1, l2, l3 + real*8 lt0,lt1,lt2,lt3 + real*8 tt0,tt1,tt2,tt3 + + parameter (m_p=Mp/1000.) + + up = abs(u_gev) ! just to make sure it's positive + +c a = 0.0024222 +c b = 1.10649 +c c = 0.0 +c sigl = a * exp( b * up) + c +c +c a = 0.05 +c b = 1.08755 +c c = 0.0027333 +c sigt = a * exp( b * up) + c +c +c a = 0.00424 +c b = 1.04 +c c = 0.00158 +c siglt = a * exp( b * up) + c +c +c a = 0.001 +c b = 1.1789 +c c = 0.00024 +c sigtt = a * exp( b * up) + c +c +c +c print*, q2_nominal +c +c if (abs(q2_nominal-1.6) < 0.3) then +c +cc print*, q2_nominal +cc stop +c +c a = 0.18881E+00 +c b = 0.14443E+02 +c c = 0.90201E-02 +c d = -0.75302E-01 +c e = -0.10392E+01 +c f = 0.11590E+00 +c g = 0.0; +c h = 0.0; +c +c else if (abs(q2_nominal-2.45) < 0.3) then +c +cc print*, q2_nominal +cc stop +c +c a = 0.82472E-01 +c b = 0.71359E+01 +c c = 0.13529E-02 +c d = 0.15738E+00 +c e = 0.69794E+01 +c f = 0.23247E-02 +c g = 0.0 +c h = 0.0 +c +c else +c print*, "Q2 dependent parameterization is not found, Exit!" +c stop +c endif +c +c +c sigt = a * exp( -b * up) + c; +c sigl = d * exp( -e * up) + f; +c sigtt = g*sin(thetacm)*sin(thetacm); +c siglt = h*sin(thetacm); + +cc /*--------------------------------------------------*/ +cc Itt_92 parameterization ! + + if (abs(q2_nominal-1.6) < 0.3) then + + t0 = 7.73587 + t1 = -7.9672 + t2 = 0.0000 + t3 = 0.0000 + l0 = 13.2553 + l1 = -47.2633 + l2 = 0.0000 + l3 = 0.0000 + lt0 = -0.3439 + lt1 = 5.9217 + lt2 = 0.0000 + lt3 = 0.0000 + tt0 = 8.1221 + tt1 = -139.8422 + tt2 = 0.0000 + tt3 = 0.0000 + + else if (abs(q2_nominal-2.45) < 0.3) then + + t0 = 6.16527 + t1 = -4.2124 + t2 = 0.0000 + t3 = 0.0000 + l0 = 12.2546 + l1 = -29.8629 + l2 = 0.0000 + l3 = 0.0000 + lt0 = -0.3620 + lt1 = 3.1028 + lt2 = 0.0000 + lt3 = 0.0000 + tt0 = -7.4032 + tt1 = 63.4705 + tt2 = 0.0000 + tt3 = 0.0000 + + else + print*, "No parameterization is available for Q2=", q2_nominal +c stop +c below are the Q2=2.45 parameters anyways + + t0 = 6.16527 + t1 = -4.2124 + t2 = 0.0000 + t3 = 0.0000 + l0 = 12.2546 + l1 = -29.8629 + l2 = 0.0000 + l3 = 0.0000 + lt0 = -0.3620 + lt1 = 3.1028 + lt2 = 0.0000 + lt3 = 0.0000 + tt0 = -7.4032 + tt1 = 63.4705 + tt2 = 0.0000 + tt3 = 0.0000 + + endif + + +c t0 = 0.05 ; +c t1 = 0.2 ; +c t2 = 0.25 ; +c t3 = -0.9 ; +c l0 = 0.7 ; +c l1 = -2.7 ; +c l2 = -0.5 ; +c l3 = 2.5 ; +c lt0 = 0.05 ; +c lt1 = -0.3 ; +c lt2 = -0.15; +c lt3 = 0.7 ; +c tt0 = 0.1 ; +c tt1 = -1.8 ; +c tt2 = -0.3 ; +c tt3 = 3 ; + +c /*--------------------------------------------------*/ +c // Sigma T +c sigt = t1 * exp( -t2 * up) + t3; + + sigt = t0/sqrt(q2_gev) + t1*up/sqrt(q2_gev) + t2/sqrt(q2_gev) + 1 + t3*up/sqrt(q2_gev) + +c sigt = t0 + +c /*--------------------------------------------------*/ +c // Sigma L +c sigl = l1* (exp(-l2*(up-l3)) + l2*(up-l3)); +c sigl = l1 + l2*up; +c sigl= l1 * exp( l2 * up ) + l3 / up +c sigl = l1 * (up-l2)**2 + l3 + + sigl = l0/(q2_gev*q2_gev) + l1*up/(q2_gev*q2_gev) + l2/(q2_gev) + 1 + l3*up/(q2_gev) + +c /*--------------------------------------------------*/ +c // Sigma LT + siglt = (lt0/q2_gev + lt1*up/q2_gev + lt2/q2_gev + 1 + lt3*up/q2_gev) * sin(thetacm) + +c /*--------------------------------------------------*/ +c // Sigma TT + sigtt = (tt0/q2_gev + tt1*up/q2_gev + tt2/q2_gev + 1 + tt3*up/q2_gev) * sin(thetacm) * sin(thetacm) + +c wfactor=(2.47**2-m_p**2)**2/(w_gev**2-m_p**2)**2 + wfactor= 1 / ((w_gev**2-m_p**2)**2) + + sigl = sigl*wfactor + sigt = sigt*wfactor + siglt= siglt*wfactor + sigtt= sigtt*wfactor + + sig = sigt +eps*sigl +eps*cos(2.*phicm)*sigtt + * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt + + sig = sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV^2/rad + sig_wli = sig + + return + end + + + +*/*--------------------------------------------------*/ +*/*--------------------------------------------------*/ +** +** Author: Wenliang (Bill) Li +** Date: 11/Dec/2017 +** LT extrapolation for the omega at higer Q2 and W +** start with thesis results (sigT 1/Q, sigL 1/Q8) and TDA Q^-8 scaling for Q2>2 + + real*8 function sig_LT_extrapolation(thetacm,phicm,u_gev,t_gev, + * q2_gev,w_gev,eps, q2_nominal) + + implicit none + include 'constants.inc' + + real*8 sig,wfactor,m_p + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + real*8 thetacm,phicm,u_gev,t_gev,q2_gev,w_gev,eps,up + real*8 lambda0_sq,lambdapi_sq,alphapi_t,alphapi_0 + real*8 a,b,c,d,e,f,h,g,fpi,fpi235 + real*8 m_pi0sq + real*8 q2_nominal + + real*8 t0, t1, t2, t3 + real*8 l0, l1, l2, l3 + real*8 lt0,lt1,lt2,lt3 + real*8 tt0,tt1,tt2,tt3 + + parameter (m_p=Mp/1000) + + up = abs(u_gev) ! just to make sure it's positive + +c print*, q2_nominal + + if ( q2_nominal .le. 2.0 ) then + + t0 = 7.73587 + t1 = -7.9672 + t2 = 0.0000 + t3 = 0.0000 + l0 = 13.2553 + l1 = -47.2633 + l2 = 0.0000 + l3 = 0.0000 + lt0 = -0.3439 + lt1 = 5.9217 + lt2 = 0.0000 + lt3 = 0.0000 + tt0 = 8.1221 + tt1 = -139.8422 + tt2 = 0.0000 + tt3 = 0.0000 + + else if (q2_nominal .gt. 2.0 ) then + + t0 = 20.16527 + t1 = -4.2124 + t2 = 0.0000 + t3 = 0.0000 + l0 = 12.2546 + l1 = -29.8629 + l2 = 0.0000 + l3 = 0.0000 + lt0 = -0.3620 + lt1 = 3.1028 + lt2 = 0.0000 + lt3 = 0.0000 + tt0 = -7.4032 + tt1 = 63.4705 + tt2 = 0.0000 + tt3 = 0.0000 + + else + print*, "No parameterization is available for Q2=", q2_nominal + stop + endif + + + if (q2_nominal .le. 2.0) then + +c /*--------------------------------------------------*/ +c // Sigma T + sigt = t0/sqrt(q2_gev) + t1*up/sqrt(q2_gev) + +c /*--------------------------------------------------*/ +c // Sigma L + sigl = l0/(q2_gev**4) + l1*up/(q2_gev**4) + + else if (q2_nominal .gt. 2.0 ) then + +c /*--------------------------------------------------*/ +c // Sigma T + sigt = t0/(q2_gev*q2_gev) + t1*up/(q2_gev*q2_gev) + +c /*--------------------------------------------------*/ +c // Sigma L + sigl = l0/(q2_gev**4) + l1*up/(q2_gev**4) + + endif + +c /*--------------------------------------------------*/ +c // Sigma LT + siglt = 0.0 + +c /*--------------------------------------------------*/ +c // Sigma TT + sigtt = 0.0 + +c wfactor=(2.47**2-m_p**2)**2/(w_gev**2-m_p**2)**2 + wfactor= 1 / ((w_gev**2-m_p**2)**2) + + sigl = sigl*wfactor + sigt = sigt*wfactor + siglt= siglt*wfactor + sigtt= sigtt*wfactor + + sig = sigt +eps*sigl +eps*cos(2.*phicm)*sigtt + * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt + + sig = sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV^2/rad + + sig_LT_extrapolation = sig + + return + end diff --git a/physics_phi.f b/physics_phi.f index af5f5a27..3d9a2a04 100644 --- a/physics_phi.f +++ b/physics_phi.f @@ -1,14 +1,12 @@ real*8 function peep_phi(vertex,main) -C This function is adapted from Pawel Ambrozewicz c gh - 14.12.18 - +c gh - modified 17.12.27 + implicit none include 'simulate.inc' C The following two record lines are from SIMC physics_kaon.f -C For we need these quantities as starting point which may be different -C from Pawel's noted by xucc type(event_main):: main type(event):: vertex @@ -17,9 +15,7 @@ real*8 function peep_phi(vertex,main) * photon-NUCLEON center of mass real*8 sigma_phi - real*8 m_phi/1019.460/ - real*8 gamma_phi/4.26/ - real*8 m_Ksq, m_p, m_psq + real*8 m_p, m_psq real*8 E0 ! Electron beam energy real*8 E_prime ! scattered electron energy @@ -33,8 +29,8 @@ real*8 function peep_phi(vertex,main) real*8 mass ! phi mass real*8 invm,Wsq ! invariant mass of hadronic system real*8 tt,uu ! Mandelstam variables - real*8 tprime - real*8 e_photCM,e_phiCM,t_min + real*8 tprime,t_min,t_max,uprime,u_min + real*8 e_photCM,e_phiCM,e_pCM real*8 gamma_T ! flux of transversely polarized virt. photons real*8 Breit_wigner @@ -50,7 +46,7 @@ real*8 function peep_phi(vertex,main) real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian,jac_old - real*8 sig_gmh,sig_diffract,sig_phigmh + real*8 sig_gmh,sig_diffract,sig_phigmh,sig_phiweiss real*8 sig1,sig2,sig3 if (debug(2)) write(6,*)' peep_phi: enter ' @@ -67,7 +63,6 @@ real*8 function peep_phi(vertex,main) C it actually stands for proton. But I am too lazy to change it. C noted by xucc - m_Ksq= 493.677**2 m_p = targ%Mtar_struck m_psq = m_p**2 @@ -83,7 +78,7 @@ real*8 function peep_phi(vertex,main) Wsq = invm*invm mass = targ%Mrec_struck - if (mass**2.lt.m_Ksq) then + if (mass**2.lt.Mk2) then peep_phi=0.0 return endif @@ -102,7 +97,8 @@ real*8 function peep_phi(vertex,main) CDJG tcos = cos(main%theta_pq) C DJG: I changed theta_pq in event.f - need to recalculate tcos - tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y+vertex%up%z*vertex%uq%z + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y + > +vertex%up%z*vertex%uq%z * since here the meson is the recoil particle, t for us is not the same thing as * main%t, so overwrite it @@ -110,39 +106,54 @@ real*8 function peep_phi(vertex,main) tt = 2.0*(m_p**2-m_p*Ep) c main%t = tt + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + e_photCM = (Wsq - qsq - m_psq)/invm/2. e_phiCM = (Wsq + mass**2 - m_psq)/invm/2. + e_pCM = (Wsq + m_psq - mass**2)/invm/2. if ((e_phiCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then - t_min = -qsq + mass**2 -2.*(e_phiCM*e_photCM- - * sqrt((e_phiCM**2-mass**2)*(e_photCM**2+qsq))) + t_min = -qsq + mass**2 -2.*(e_phiCM*e_photCM + * -sqrt( (e_phiCM**2-mass**2)*(e_photCM**2+qsq) )) + t_max = -qsq + mass**2 -2.*(e_phiCM*e_photCM + * +sqrt((e_phiCM**2-mass**2)*(e_photCM**2+qsq))) + u_min = -qsq + m_psq -2.*(e_pCM*e_photCM + * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) + else + write(6,*)' physics_phi: no valid t,u min ' endif - main%tmin=t_min tprime = abs(tt)-abs(t_min) + uprime = abs(uu)-abs(u_min) + main%tmin=t_min + if (tprime.lt.0.) then write(6,*)' unphysical -t<-t_min ',tt,t_min endif - - uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + if (uprime.lt.0.) then + write(6,*)' unphysical -u<-u_min ',uu,u_min + endif ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] ****************************************************************************** * -* Diffractive model used by P. Ambrosewicz - sig1 = sig_diffract(mass/1.e3,invm/1.e3,qsq/1.e6, - * tt/1.e6,t_min/1.e6) - * PYTHIA model with modifications from the HERMES MC - sig2 = sig_phigmh(qsq,tt,t_min,nu,invm/1.e3,epsilon) +c sig1 = sig_phigmh(mass/1.e3,qsq,tt,t_min,uu,u_min,nu,invm/1.e3, +c * epsilon) + + sig2 = sig_phiweiss(qsq/1.e6,tt/1.e6,t_min/1.e6,t_max/1.e6, + * uu/1.e6,u_min/1.e6,invm/1.e3,epsilon) -* Parameterization based on saturated Regge model of J.M.Laget. -* 2 itdep, itmin, iflag) + +c check tmin, tmax values + if (abs(ttmin-tmin).lt.1.e-10) then + write(6,*)' sig_phiweiss: tmin disagreement ',tmin,ttmin + endif + if (abs(ttmax-tmax).lt.1.e-10) then + write(6,*)' sig_phiweiss: tmax disagreement ',tmax,ttmax + endif + + sig = sigt +epsi*sigl + + sig_phiweiss = sig/2./pi*1.e-09 !dsig/dtdphicm in microbarns/MeV^2/rad return end + + +c--------------------------------------------------------------------- + subroutine xphi(dxt, dxl, tmin,tmax, w, t, u, qq, + > itdep, itmin, iflag) + +c subroutine xphi(xt, xl, dxt, dxl, tmin, tmax, b, uug, w, t, +c * qq, itdep, itmin) + +c c. weiss (weiss.at.jlab.org) +c v1 07mar12 +c v2 09mar12 argument w instead of s, tmax, input checking +c +c exclusive phi meson electroproduction gamma* + n to phi + n +c parametrization of virtual photoproduction cross sections +c (hand convention) +c +c masses/energies/momenta in GeV +c +c output: +c xt total transv. cross secn sigma-t (nb) +c xl total longit. cross secn sigma-l (nb) +c dxt diff. transv. cross secn dsigma-t/dt (nb/gev**2) +c dxl diff. longit. cross secn dsigma-l/dt (nb/gev**2) +c tmin kinematic upper limit of t +c tmax kinematic lower limit of t +c b exponential t-slope +c uug equivalent dipole mass squared +c +c +c input: +c w gamma*-n cm energy w = sqrt(s) (gev) +c t invariant momentum transfer t .le. 0 (gev**2) +c qq photon virtuality q**2 .ge. 0 (gev**2) +c +c +c itdep selects parametrization of t-dependence +c 1 exponential +c 2 dipole +c +c the dipole mass parameter is calculated from the exponential +c slope by matching the profiles at a fixed value t = t0. +c +c +c itmin determines check of kinematic bounds in t and actual value +c of t used in calculation of differential cross secn +c 0 t-actual = t. no check of bounds, allows t = 0 +c 1 t-actual = t. return zero if t.ge.tmin or t.le.tmax +c 2 t-actual = tmin +c +c if itmin = 0 is selected, the routine allows one to evaluate the +c differential cross secn parametrization for any fixed t, +c including unphysical values such as the point t = 0. +c +c if itmin = 1 is selected, the routine returns zero +c differential cross secn if t is outside of kinematic bounds +c +c if itmin = 2 is selected, the routine evaluates the differential +c cross secns at t = tmin, where tmin is calculated at the given +c values of w and qq. in this case the actual value of t on input +c is ignored. no change of the actual value of the argument t +c is made. +c +c +c if the energy is below threshold, w .lt. wth = 1.958, +c or if qq .lt. 0 (defined numerically as qq .lt. (-eps) = -1.d-15) +c the routine exits with zero values for all output variables. +c +c +c implicit double precision (a - h, o - z) + implicit real*8 (a - h, o - z) + implicit integer (i - n) + +c +c ...numerical limit for t, qq check +c + parameter(eps = 1.e-15) +c +c ...masses +c + parameter(un = 0.938e0, uphi = 1.020e0) +c + wth = un + uphi +c +c ...check w, qq input and return zero if out of bounds +c + if (w.lt.wth.or.qq.lt.(-eps)) then + tmin = 0.e0 + tmax = 0.e0 + xt = 0.e0 + xl = 0.e0 + b = 0.e0 + uug = 0.e0 + dxt = 0.e0 + dxl = 0.e0 + return + endif +c +c ...cross sections as function of w +c + al1 = 400. e0 + al2 = 1. e0 + al3 = 0.32e0 + unt = 3. e0 + cr = 0.4 e0 +c + xt = al1 *(1.e0 - wth**2/w**2)**al2 *w**al3 + * /(1.e0 + qq/uphi**2)**unt +c + xl = cr*qq/uphi**2 *xt +c +c ...calculate tmin, tmax +c + call ftcm(w, qq, 1.e0, un, uphi, tmin) + call ftcm(w, qq, -1.e0, un, uphi, tmax) +c +c ...check t input and set actual value of t +c + if (itmin.eq.0) then +c + ta = t +c + else if (itmin.eq.1) then +c + if (t.lt.tmin.and.t.gt.tmax) then + ta = t + else + b = 0.e0 + uug = 0.e0 + dxt = 0.e0 + dxl = 0.e0 + return + endif +c + else if (itmin.eq.2) then +c + ta = tmin +c + else + stop 'itmin out of bounds' + endif +c +c ...exponential t-slope as function of w +c + b0 = 2.2 e0 + alphp = 0.24 e0 +c + b = b0 + 4.e0*alphp*log(w) +c +c ...equivalent dipole mass squared +c + t0 = -0.5e0 + uug = -t0/(exp(-b*t0/4.e0) - 1.e0) +c +c ...normalized t-profile +c +c itdep = 1 exponential profile +c 2 dipole profile +c + if (itdep.eq.1) then + + if (iflag.lt.1) then + + f = exp(b*ta) + fi = exp(b*tmin)/b + * - exp(b*tmax)/b + +c write(6,*)' tt ',tmin,t,tmax +c write(6,*)f,fi,f/fi + + else + +c gh - 17.12.27 +c christian recommends the following change for u-channel: +c switch u-slope for t-slope, then divide by 10, since back angle peak +c is ~10% of forward angle peak (at least for omega electroproduction) + + f = exp(b*u) + umin=-qq+2.*un**2+uphi**2-w**2-tmax + umax=-qq+2.*un**2+uphi**2-w**2-tmin + fi = exp(b*umin)/b + * - exp(b*umax)/b + f = f/10. + +c write(6,*)' uu ',umin,u,umax +c write(6,*)f,fi,f/fi + + endif +c + else if (itdep.eq.2) then +c + f = uug**4/(uug - ta )**4 + fi = uug**4/(uug - tmin)**3/3.e0 + * - uug**4/(uug - tmax)**3/3.e0 +c + else + stop 'itdep out of bounds' + endif +c +c ...differential cross sections +c + dxt = xt*f/fi + dxl = xl*f/fi + + sigw=1.0 + + end +c +c--------------------------------------------------------------------- +c + subroutine ftcm(w, qq, costh, un, um, t) +c +c calculate t in meson electroproduction +c using exact kinematics in cm frame +c +c initial and final baryon mass are the same +c +c tmin is obtained for costh = 1 +c tmax costh = -1 +c +c implicit double precision (a - h, o - z) + implicit real*8 (a - h, o - z) +c + call lamfn(alam1, w**2, un**2, -qq) + call lamfn(alam2, w**2, un**2, um**2) + p1 = sqrt(alam1)/2.e0/w + p2 = sqrt(alam2)/2.e0/w + e1 = sqrt(p1**2 + un**2) + e2 = sqrt(p2**2 + un**2) +c + t = 2*un**2 - 2*e1*e2 + 2*costh*p1*p2 +c + end +c +c--------------------------------------------------------------------- +c + subroutine lamfn(alam, x, y, z) +c +c lambda function (invariant expression of cm momentum) +c +c implicit double precision (a - h, o - z) + implicit real*8 (a - h, o - z) +c + alam = x**2 + y**2 + z**2 - 2*x*y - 2*x*z - 2*y*z +c + end +c +c--------------------------------------------------------------------- +c diff --git a/physics_rho_recoil.f b/physics_rho_recoil.f index 58437649..879125c9 100644 --- a/physics_rho_recoil.f +++ b/physics_rho_recoil.f @@ -16,8 +16,6 @@ real*8 function peep_rho(vertex,main) * NOTE: when we refer to the center of mass system, it always refers to the * photon-NUCLEON center of mass - real*8 m_rho/775.8/ - real*8 gamma_rho/150.3/ real*8 m_pisq, m_p, m_psq real*8 E0 ! Electron beam energy @@ -33,8 +31,8 @@ real*8 function peep_rho(vertex,main) real*8 mass ! omega mass real*8 invm,Wsq ! invariant mass of hadronic system real*8 tt,uu ! Mandelstam variables - real*8 tprime - real*8 e_photCM,e_rhoCM,t_min + real*8 tprime,t_min,uprime,u_min + real*8 e_photCM,e_rhoCM,e_pCM real*8 gamma_T ! flux of transversely polarized virt. photons real*8 Breit_wigner,Soding @@ -56,6 +54,8 @@ real*8 function peep_rho(vertex,main) real*8 sig_diffract,sig_hermes real*8 sig1,sig2 + if (debug(2)) write(6,*)' peep_rho_recoil: enter ' + call transform_to_cm(vertex,main, & gstar,bstar,bstarx,bstary,bstarz, & nustar,qstar,qstarx,qstary,qstarz, @@ -68,7 +68,7 @@ real*8 function peep_rho(vertex,main) C it actually stands for proton. But I am too lazy to change it. C noted by xucc - m_pisq= 139.57018**2 + m_pisq= Mpi2 m_p = targ%Mtar_struck m_psq = m_p**2 @@ -114,47 +114,61 @@ real*8 function peep_rho(vertex,main) * main%t, so overwrite it * for the + sign I spent 1 hour to check. xucc tt = 2.0*(m_p**2-m_p*Ep) -c main%t =tt +c main%t =tt + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) e_photCM = (Wsq - qsq - m_psq)/invm/2. e_rhoCM = (Wsq + mass**2 - m_psq)/invm/2. + e_pCM = E_cm if ((e_rhoCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then - t_min = -qsq + mass**2 -2.*(e_rhoCM*e_photCM- - * sqrt((e_rhoCM**2-mass**2)*(e_photCM**2+qsq))) + t_min = -qsq + mass**2 -2.*(e_rhoCM*e_photCM + * -sqrt( (e_rhoCM**2-mass**2)*(e_photCM**2+qsq) )) + u_min = -qsq + m_psq -2.*(e_pCM*e_photCM + * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) + else + write(6,*)' physics_rho_recoil: no valid t,u min ' endif - main%tmin=-t_min tprime = abs(tt)-abs(t_min) + uprime = abs(uu)-abs(u_min) + main%tmin=t_min + if (tprime.lt.0.) then write(6,*)' unphysical -t<-t_min ',tt,t_min endif - uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) - ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] ****************************************************************************** * * Diffractive rho production model used by P. Ambrosewicz - sig1 = sig_diffract(mass/1.e3,invm/1.e3,qsq/1.e6, - * tt/1.e6,t_min/1.e6) +c sig1 = sig_diffract(mass/1.e3,invm/1.e3,qsq/1.e6, +c * tt/1.e6,t_min/1.e6) * PYTHIA model with modifications from the HERMES MC - sig2 = sig_hermes(qsq,tt,t_min,nu,invm/1.e3,epsilon) + sig2 = sig_hermes(mass/1.e3,qsq,tt,t_min,uu,u_min,nu,invm/1.e3, + * epsilon) ntup%sigcm=sig2 + ntup%phicmi=phicm + ntup%wcmi=invm/1.e3 + ntup%tprimei=tprime/1.e6 + ntup%epsiloni=epsilon + ntup%ui=-uu/1.e6 + C DJG Breit-Wigner in the event generation - not needed here anymore. ******************************************************************************* * Multiply by Breit_wigner [1/MeV] to give proper Mx weighted cross section * d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] * * gh - relativistic Breit-Wigner factor (eqn 38.52 of 2004 PDG book) - Breit_wigner=(m_rho*gamma_rho)**2/ - * ((mass**2-m_rho**2)**2 +(m_rho*gamma_rho)**2) + Breit_wigner=(Mrho*MrhoW)**2/ + * ((mass**2-Mrho**2)**2 +(Mrho*MrhoW)**2) * gh - since sigma_omega is integrated over the omega peak, normalize * Breit-Wigner to unit integral - Breit_wigner=Breit_wigner/(gamma_rho*pi/2.) + Breit_wigner=Breit_wigner/(MrhoW*pi/2.) * Soding model (skewness) correction * @@ -171,7 +185,7 @@ real*8 function peep_rho(vertex,main) * Soding=(mass/m_rho)**(-4.394+2.366*abs(tt/1.e6)) * GH: leave it fixed at the CLAS value for now - Soding=(m_rho/mass)**0.0 + Soding=(Mrho/mass)**0.0 ******************************************************************************* * Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] @@ -221,14 +235,14 @@ real*8 function sig_diffract(mass,invm,qsq,tt,t_min) * all calculations are in GeV implicit none + include 'constants.inc' real*8 mass,invm,Wsq,qsq,tt,t_min,e_gamma real*8 A,B,C,b_slope,sig_grho - real*8 m_p,m_psq,pi + real*8 m_pgev,m_pgevsq - pi = 3.141592653589793 - m_p = 0.93827231 - m_psq = m_p**2 + m_pgev = Mp/1.e3 + m_pgevsq = m_pgev**2 Wsq = invm*invm @@ -241,7 +255,7 @@ real*8 function sig_diffract(mass,invm,qsq,tt,t_min) b_slope = 0.0 endif - e_gamma = (Wsq - m_psq)/m_p/2. + e_gamma = (Wsq - m_pgevsq)/m_pgev/2. sig_grho = 29.4/e_gamma + 9.5 * returned cross section is d2sigma/dt/dphi_cm [ub/MeV^2/rad] @@ -256,7 +270,7 @@ real*8 function sig_diffract(mass,invm,qsq,tt,t_min) C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) + real*8 function sig_hermes(mass,Q2,t,tmin,u,umin,nu,w_gev,epsi) * This routine calculates p(e,e'rho)p cross sections using D. Gaskell's * attempt to code in the form used in PYTHIA with modifications @@ -265,12 +279,17 @@ real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) implicit none include 'constants.inc' - real*8 t,tmin,tprime - real*8 nu,epsi,Q2,w_gev,wfactor,m_p + real*8 t,tmin,tprime,u,umin,uprime + real*8 mass,nu,epsi,Q2,w_gev,wfactor,m_pgev real*8 sig0,sigt,sig219,R,cdeltatau,brho - m_p = 0.93827231 + integer iflag + + iflag=1 ! flag for t(0) or u(1) channel + + m_pgev = Mp/1.e3 tprime = abs(t-tmin)/1.e6 + uprime = abs(u-umin)/1.e6 cdeltatau = hbarc/(sqrt(nu**2+Q2+mrho2)-nu) !in fm! * Put in some W dependence from photoproduction data @@ -288,13 +307,13 @@ real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) * DJG: R=L/T is usually fit to the form c_0 (Q2/M2_rho)^c1 * GH: c_0 and c_1 taken from HERMES data, Rakness thesis, Fig 5.9 - R = 0.39*(Q2/mrho2)**(0.68) + R = 0.39*(Q2/Mrho2)**(0.68) if (R.gt.1) R=1 * DJG: The Q2 dependence is usually given by (M2_rho/(Q2+M2_rho))^2 * DJG: HERMES found that 2.575 works better than 2 in the exponent. - sigt = sig0*(1.0+epsi*R)*(mrho2/(Q2+mrho2))**(2.575) + sigt = sig0*(1.0+epsi*R)*(Mrho2/(Q2+Mrho2))**(2.575) * DJG: Need to parameterize t-dependence with b parameter as a function * of c-tau @@ -320,14 +339,20 @@ real*8 function sig_hermes(Q2,t,tmin,nu,w_gev,epsi) c GH: the conventional formula with exponential factor is for forward c diffractive, it might not be appropriate for u-channel production - sig219 = sigt*brho*exp(-brho*tprime)/2.0/pi !ub/GeV**2/rad - - sig_hermes=sig219/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + if (iflag.lt.1) then ! t-channel + sig219 = sigt*brho*exp(-brho*tprime)/2.0/pi !ub/GeV**2/rad + else + sig219 = sigt*brho*exp(-brho*uprime)/2.0/pi + sig219 = sig219/10. ! back angle peak is ~10% of forward angle peak + endif + + sig_hermes=sig219/1.e+06 !dsig/dtdphicm in microbarns/MeV**2/rad c GH: check for weird behavior on upper side of rho peak - if (tprime.gt.8. and. sig_hermes.gt.1.e-14) then + if (iflag.lt.1. .and. mass.gt.1.2 .and. tprime.gt.Q2 .and. + * sig_hermes.gt.1.e-14) then write(6,*)' tprime=',tprime,' sig=',sig_hermes - sig_hermes=1.e-14 + sig_hermes=sig_hermes*1.e-6 endif return diff --git a/results_write.f b/results_write.f index 4f0cfe00..b7d3a6a7 100644 --- a/results_write.f +++ b/results_write.f @@ -180,6 +180,11 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) ntu(58) = ntup%theta_mq ntu(59) = ntup%phi_mq ntu(60) = ntup%u/1.e6 + ntu(61) = ntup%phicmi + ntu(62) = ntup%tprimei + ntu(63) = ntup%wcmi + ntu(64) = ntup%epsiloni + ntu(65) = ntup%ui endif endif else if (doing_semi.or.doing_rho) then diff --git a/simc.f b/simc.f index 449eecbf..4c3b041e 100644 --- a/simc.f +++ b/simc.f @@ -93,7 +93,7 @@ program simc if (debug(2)) write(6,*)'central%sigcc=',central%sigcc if (debug(4)) write(6,*)'sim: at 1' - targetfac=targ%mass_amu/3.75914d+6/(targ%abundancy/100.) + targetfac=targ%mass_amu/3.75914e+6/(targ%abundancy/100.) > *abs(cos(targ%angle))/(targ%thick*1000.) if (debug(4)) write(6,*)'sim: at 2' @@ -207,7 +207,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 @@ -754,6 +754,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, else if(which_eepx.eq.4) then write(iun,*) ' ****-------- H(e,e''p)omega --------****' else if(which_eepx.eq.5) then + write(iun,*) ' ****-------- H(e,e''p)eta_prime --------****' + else if(which_eepx.eq.6) then write(iun,*) ' ****-------- H(e,e''p)phi --------****' else write(iun,*) ' ****-------- H(e,e''p)Mx --------****' @@ -769,6 +771,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, else if(which_eepx.eq.4) then write(iun,*) ' ****-------- D(e,e''p)omega --------****' else if(which_eepx.eq.5) then + write(iun,*) ' ****-------- D(e,e''p)eta_prime --------****' + else if(which_eepx.eq.6) then write(iun,*) ' ****-------- D(e,e''p)phi --------****' else write(iun,*) ' ****-------- D(e,e''p)Mx --------****' @@ -784,6 +788,8 @@ subroutine report(iun,timestring1,timestring2,central,contrib, else if(which_eepx.eq.4) then write(iun,*) ' ****-------- A(e,e''p)omega --------****' else if(which_eepx.eq.5) then + write(iun,*) ' ****-------- A(e,e''p)eta_prime --------****' + else if(which_eepx.eq.6) then write(iun,*) ' ****-------- A(e,e''p)phi --------****' else write(iun,*) ' ****-------- A(e,e''p)Mx --------****' diff --git a/simulate.inc b/simulate.inc index bfbb459d..9ccd5f5b 100644 --- a/simulate.inc +++ b/simulate.inc @@ -159,6 +159,7 @@ C Structure for variables that we want to available to the ntuple. real*8 xfermi, yfermi real*8 rhomass, rhotheta,PMsigned real*8 thetacm,theta_mq,phi_mq + real*8 phicmi,tprimei,wcmi,epsiloni,ui end type type (ntupvars):: ntup From fe88b2f7857e914eac007edbe5f27c89f817cacf Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Mon, 5 Feb 2018 15:04:19 -0600 Subject: [PATCH 09/15] Changes to u-channel generators: - new exclusive pi0 cross section model - corrections to umin check on other models - example u-channel infiles --- Makefile | 2 +- event.f | 6 +- hms/mc_hms.f | 3 +- hms/mc_hms_coll.f | 3 +- infiles/eta_600_320_17_+0590.inp | 117 +++++++++ infiles/etap_600_320_17_+0590.inp | 117 +++++++++ infiles/fpi_600_320_17_+0590.inp | 116 +++++++++ infiles/omega_600_320_17_+0590.inp | 117 +++++++++ infiles/phi_600_320_17_+0590.inp | 3 +- infiles/pizero_600_320_17_+0590.inp | 119 +++++++++ infiles/rho_600_320_17_+0590.inp | 117 +++++++++ infiles/xphsp_600_320_17_+0590.inp | 119 +++++++++ physics_eta.f | 21 +- physics_eta_prime.f | 19 +- physics_omega.f | 41 +-- physics_phi.f | 31 ++- physics_pizero.f | 372 ++++++++++++++++++++++++++++ physics_rho_recoil.f | 27 +- 18 files changed, 1303 insertions(+), 47 deletions(-) create mode 100644 infiles/eta_600_320_17_+0590.inp create mode 100644 infiles/etap_600_320_17_+0590.inp create mode 100644 infiles/fpi_600_320_17_+0590.inp create mode 100644 infiles/omega_600_320_17_+0590.inp create mode 100644 infiles/pizero_600_320_17_+0590.inp create mode 100644 infiles/rho_600_320_17_+0590.inp create mode 100644 infiles/xphsp_600_320_17_+0590.inp create mode 100644 physics_pizero.f diff --git a/Makefile b/Makefile index 2ca7b63f..8bdea592 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physi #OBJ2 = radc.o init.o dbase.o physics_piKmodel.o physics_delta.o physics_proton.o loren.o sf_lookup.o OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o -OBJ4b = physics_eta.o physics_eta_prime.o +OBJ4b = physics_eta.o physics_eta_prime.o physics_pizero.o OBJ4a = results_write.o event.o mt19937.o jacobians.o OBJ5 = $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o OBJ6 = $(A)rotate_haxis.o $(A)rotate_vaxis.o $(A)locforunt.o diff --git a/event.f b/event.f index 9c936b93..8a54ec45 100644 --- a/event.f +++ b/event.f @@ -1469,7 +1469,7 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) integer i, iPm1 real*8 a, b, r, frac, peepi, peeK, peedelta, peerho, peepiX real*8 peep_eta, peep_omega, peep_rho, peep_eta_prime,peep_phi - real*8 peepph + real*8 peepph, peep_pizero real*8 survivalprob, semi_dilution real*8 weight, width, sigep, deForest, tgtweight real*8 Em_weight ! gh @@ -1579,8 +1579,8 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) elseif (doing_eepx) then if(which_eepx.eq.1) then !pi0 - main%sigcc = 1.0 - main%sigcc_recon = 1.0 !Need new xsec model. + main%sigcc = peep_pizero(vertex,main) + main%sigcc_recon = 1.0 else if(which_eepx.eq.2) then !eta main%sigcc = peep_eta(vertex,main) main%sigcc_recon = 1.0 diff --git a/hms/mc_hms.f b/hms/mc_hms.f index 07847d69..4f520b1f 100644 --- a/hms/mc_hms.f +++ b/hms/mc_hms.f @@ -204,7 +204,8 @@ subroutine mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz, c write(*,*)'m2=',m2 c write(*,*)'mpi2 =',mpi2 c write(*,*)'-----------------------' - if (m2.gt.100.0**2) then ! check for pions/muons, if yes step through coll. + if (m2.gt.100.0**2 .and. m2.lt.350.**2) then +! check for pions/muons, if yes step through coll. c write(*,*) 'I found a pion',p call mc_hms_coll(m2,p,p_spec,decay_flag,dflag,collsuccess,coll_flag,pathlen) diff --git a/hms/mc_hms_coll.f b/hms/mc_hms_coll.f index fce3cf8d..c253cddd 100644 --- a/hms/mc_hms_coll.f +++ b/hms/mc_hms_coll.f @@ -101,7 +101,8 @@ subroutine mc_hms_coll(m2,p,p_spec,decay_flag,dflag,success,coll c TH - un-comment the following line if want no collimator punch through! c goto 500 - if(m2.gt.15000.) then !check if pion - if muon, don't check for hadronic interaction + if(m2.gt.15000. .and. m2.lt.350.**2) then +! check if pion - if muon, don't check for hadronic interaction call coll_absorb(p,thick,trans) rantemp = grnd() if(rantemp.gt.trans) then diff --git a/infiles/eta_600_320_17_+0590.inp b/infiles/eta_600_320_17_+0590.inp new file mode 100644 index 00000000..b2acce3c --- /dev/null +++ b/infiles/eta_600_320_17_+0590.inp @@ -0,0 +1,117 @@ +; This is a CTP file + +begin parm experiment +; ngen = 20000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 547.86 ; Meta=547.86 +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/etap_600_320_17_+0590.inp b/infiles/etap_600_320_17_+0590.inp new file mode 100644 index 00000000..d7a0881c --- /dev/null +++ b/infiles/etap_600_320_17_+0590.inp @@ -0,0 +1,117 @@ +; This is a CTP file + +begin parm experiment +; ngen = 20000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 957.78 ; Meta_prime +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/fpi_600_320_17_+0590.inp b/infiles/fpi_600_320_17_+0590.inp new file mode 100644 index 00000000..c8686825 --- /dev/null +++ b/infiles/fpi_600_320_17_+0590.inp @@ -0,0 +1,116 @@ +; This is a CTP file + +begin parm experiment + ngen = 20000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 1 ; (ONE = TRUE) + which_pion = 0 ; (0=p->pi+,1=n->pi-,10/11 for pi+/pi- coherent) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 780.4 ; decay length (cm) +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/omega_600_320_17_+0590.inp b/infiles/omega_600_320_17_+0590.inp new file mode 100644 index 00000000..20f1fc07 --- /dev/null +++ b/infiles/omega_600_320_17_+0590.inp @@ -0,0 +1,117 @@ +; This is a CTP file + +begin parm experiment +; ngen = 20000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 782.65 ; Momega=782.65 +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/phi_600_320_17_+0590.inp b/infiles/phi_600_320_17_+0590.inp index 8d0d3472..e07f2d48 100644 --- a/infiles/phi_600_320_17_+0590.inp +++ b/infiles/phi_600_320_17_+0590.inp @@ -1,7 +1,8 @@ ; This is a CTP file begin parm experiment - ngen = 20000 ; POS: # of successes; NEG: # of tries +# ngen = 20000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries EXPER%charge = 1.0 ; total charge (mC) doing_phsp = 0 ; (ONE = TRUE) doing_kaon = 0 ; (ONE = TRUE) diff --git a/infiles/pizero_600_320_17_+0590.inp b/infiles/pizero_600_320_17_+0590.inp new file mode 100644 index 00000000..17f5353a --- /dev/null +++ b/infiles/pizero_600_320_17_+0590.inp @@ -0,0 +1,119 @@ +; This is a CTP file + +begin parm experiment +; ngen = 10000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 134.98 ; Mpizero + doing_Xphasespace = 0 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/rho_600_320_17_+0590.inp b/infiles/rho_600_320_17_+0590.inp new file mode 100644 index 00000000..2bbe1ea2 --- /dev/null +++ b/infiles/rho_600_320_17_+0590.inp @@ -0,0 +1,117 @@ +; This is a CTP file + +begin parm experiment +# ngen = 20000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 1 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 775.5 ; Momega=782.65, Mrho=775.5 +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/infiles/xphsp_600_320_17_+0590.inp b/infiles/xphsp_600_320_17_+0590.inp new file mode 100644 index 00000000..f07d12cb --- /dev/null +++ b/infiles/xphsp_600_320_17_+0590.inp @@ -0,0 +1,119 @@ +; This is a CTP file + +begin parm experiment +# ngen = 20000 ; POS: # of successes; NEG: # of tries + ngen = 1000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 0 ; (ONE = TRUE) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 0 ; 1=decay ON, 0=decay OFF. + doing_eepx = 0 ; H(e,e'p)Mx (Mx=omega,rho,pi0,etc.) + Meepx = 0 ; Momega=782.65, Mrho=775.5 + doing_Xphasespace = 1 + doing_semi = 0 +end parm experiment + +begin parm kinematics_main + Ebeam = 9200.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 1015.0 ; e arm central momentum (MeV/c) + spec%e%theta = 47.240 ; e arm angle setting (degrees) + spec%p%P = 8069.8 ; p arm central momentum (MeV/c) + spec%p%theta = 5.010 ; p arm angle setting (degrees) +end parm kinematics_main + +begin parm target + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 578.4 ; target thick (mg/cm^2) 8cm + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) +end parm target + +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs. + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything. +end parm debug + +begin parm e_arm_accept + SPedge%e%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 20.0 ; delta max + SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 +end parm e_arm_accept + +begin parm p_arm_accept + SPedge%p%delta%min = -20.0 ; delta min (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 40.0 ; delta max + SPedge%p%yptar%min = -50.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 50.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -85.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 85.0 ; .xptar.max = {TF} / 1000 +end parm p_arm_accept + +begin parm beamandtargetinfo + gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) + gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) + targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular + targ%fr1 = 0.1 ; horizontal size OR inner radius(2) + targ%fr2 = 0.1 ; vertical size OR outer radius(2) + targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right + targ%yoffset = 0.0 ; target y-offset (cm): +y = up + targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream + ; zreal = znominal + zoffset +end parm beamandtergetinfo + +;These are offsets applied before the call to the single arm montecarlos. +; Offsets are in spectrometer coordinate system. Positive xptar offset +; means spectrometer is positioned at large xptar (i.e. below target, and +; thus pointing above target and giving a negative shift to particle's xptar) +begin parm spect_offset + spec%e%offset%x = 0.0 ; x offset (cm) + spec%e%offset%y = 0.014 ; y offset (cm) + spec%e%offset%z = 0. ; z offset (cm) + spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so + spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. + spec%p%offset%x = 0.0 ; x offset (cm) + spec%p%offset%y = 0.0 ; y offset (cm) + spec%p%offset%z = 0. ; z offset (cm) + spec%p%offset%xptar = 0. ; xptar offset (mr) + spec%p%offset%yptar = 0. ; yptar offset (mr) +end parm spect_offset + +begin parm simulate + hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) + using_rad = 1 ; (ONE = TRUE) + use_expon = 0 ; (LEAVE AT 0) + one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p + intcor_mode = 1 ; (LEAVE AT 1) + spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none + cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) + cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) + using_Eloss = 1 ; (ONE = TRUE) + correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. + correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. + mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. + deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL + rad_flag = 0 ; (radiative option #1...see init.f) + extrad_flag = 2 ; (rad. option #2...see init.f) + lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} + lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} + lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} + Nntu = 1 ; ONE = generate ntuples + using_Coulomb = 1 ; (ONE = TRUE) + dE_edge_test = 0. ; (move around energy edges) + use_offshell_rad = 1 ; (ONE = TRUE) + Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. +end parm simulate diff --git a/physics_eta.f b/physics_eta.f index a1349507..991e2f0b 100644 --- a/physics_eta.f +++ b/physics_eta.f @@ -29,7 +29,7 @@ real*8 function peep_eta(vertex,main) real*8 mass ! omega mass real*8 invm,Wsq ! invariant mass of hadronic system - real*8 tt,t_min,tprime,uu ! Mandelstam variables + real*8 tt,t_min,tprime,uu,t_max ! Mandelstam variables real*8 e_photCM,e_etaCM real*8 gamma_T ! flux of transversely polarized virt. photons @@ -116,12 +116,23 @@ real*8 function peep_eta(vertex,main) if ((e_etaCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then t_min = -qsq + mass**2 -2.*(e_etaCM*e_photCM- * sqrt((e_etaCM**2-mass**2)*(e_photCM**2+qsq))) + t_max = -qsq + mass**2 -2.*(e_etaCM*e_photCM + * +sqrt((e_etaCM**2-mass**2)*(e_photCM**2+qsq))) + else write(6,*)' physics_eta: no valid t min ' endif - tprime = abs(tt)-abs(t_min) + + tprime = abs(tt-t_min) main%tmin=-t_min + if (abs(tt).lt.abs(t_min)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime + endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime + endif + ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] ****************************************************************************** @@ -143,12 +154,12 @@ real*8 function peep_eta(vertex,main) * d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] * * gh - relativistic Breit-Wigner factor (eqn 38.52 of 2004 PDG book) - Breit_wigner=(m_eta*gamma_eta)**2/ - * ((mass**2-m_eta**2)**2 +(m_eta*gamma_eta)**2) +c Breit_wigner=(m_eta*gamma_eta)**2/ +c * ((mass**2-m_eta**2)**2 +(m_eta*gamma_eta)**2) * gh - since sigma_omega is integrated over the omega peak, normalize * Breit-Wigner to unit integral - Breit_wigner=Breit_wigner/(gamma_eta*pi/2.) +c Breit_wigner=Breit_wigner/(gamma_eta*pi/2.) ******************************************************************************* * Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] diff --git a/physics_eta_prime.f b/physics_eta_prime.f index 6734dc36..fe579b37 100644 --- a/physics_eta_prime.f +++ b/physics_eta_prime.f @@ -29,7 +29,7 @@ real*8 function peep_eta_prime(vertex,main) real*8 mass ! omega mass real*8 invm,Wsq ! invariant mass of hadronic system - real*8 tt,t_min,tprime,uu ! Mandelstam variables + real*8 tt,t_min,tprime,uu,t_max ! Mandelstam variables real*8 e_photCM,e_etapCM real*8 gamma_T ! flux of transversely polarized virt. photons @@ -117,11 +117,22 @@ real*8 function peep_eta_prime(vertex,main) if ((e_etapCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then t_min = -qsq + mass**2 -2.*(e_etapCM*e_photCM- * sqrt((e_etapCM**2-mass**2)*(e_photCM**2+qsq))) + t_max = -qsq + mass**2 -2.*(e_etapCM*e_photCM + * +sqrt((e_etapCM**2-mass**2)*(e_photCM**2+qsq))) else write(6,*)' physics_eta_prime: no valid t,u min ' endif + + tprime = abs(tt-t_min) main%tmin=-t_min + if (abs(tt).lt.abs(t_min)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime + endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime + endif + ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] ****************************************************************************** @@ -143,12 +154,12 @@ real*8 function peep_eta_prime(vertex,main) * d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] * * gh - relativistic Breit-Wigner factor (eqn 38.52 of 2004 PDG book) - Breit_wigner=(m_etap*gamma_etap)**2/ - * ((mass**2-m_etap**2)**2 +(m_etap*gamma_etap)**2) +c Breit_wigner=(m_etap*gamma_etap)**2/ +c * ((mass**2-m_etap**2)**2 +(m_etap*gamma_etap)**2) * gh - since sigma_omega is integrated over the omega peak, normalize * Breit-Wigner to unit integral - Breit_wigner=Breit_wigner/(gamma_etap*pi/2.) +c Breit_wigner=Breit_wigner/(gamma_etap*pi/2.) ******************************************************************************* * Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] diff --git a/physics_omega.f b/physics_omega.f index 45889e8b..fe7fb46e 100644 --- a/physics_omega.f +++ b/physics_omega.f @@ -135,39 +135,41 @@ real*8 function peep_omega(vertex,main) e_omCM = (Wsq + mass**2 - m_psq)/invm/2. e_pCM = (Wsq + m_psq - mass**2)/invm/2. +c gh - 18.02.04 +c although t is single valued (negative), this is not true for u +c right at the kinematic endpoint, u turns positive, so umin is positive +c even though for most events u is negative. This is surprising, but is +c confirmed by checking against s+t+u relation. + if ((e_omCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then t_min = -qsq + mass**2 -2.*(e_omCM*e_photCM * -sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) + t_max = -qsq + mass**2 -2.*(e_omCM*e_photCM + * +sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) u_min = -qsq + m_psq -2.*(e_pCM*e_photCM * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) else write(6,*)' physics_omega: no valid t,u min ' endif -c check u using s+t+u relation - uu2=-qsq+2.*m_psq+mass**2-invm**2-tt - t_max = -qsq + mass**2 -2.*(e_omCM*e_photCM - * +sqrt((e_omCM**2-mass**2)*(e_photCM**2+qsq))) - umin2=-qsq+2.*m_psq+mass**2-invm**2-t_max -c write(6,*)' uu ',uu,uu2,u_min,umin2,uprime +c check u using s+t+u relation +c uu2=-qsq+2.*m_psq+mass**2-invm**2-tt +c umin2=-qsq+2.*m_psq+mass**2-invm**2-t_max - tprime = abs(tt)-abs(t_min) - uprime = abs(uu)-abs(u_min) + tprime = abs(tt-t_min) + uprime = abs(uu-u_min) main%tmin=t_min - if (tprime.lt.0.) then - write(6,*)' unphysical -t<-t_min ',tt,t_min,t_max,tprime + if (abs(tt).lt.abs(t_min)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime + endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime endif -c gh 17.12.27 -c for some reason, sometimes u takes an unphysical positive value -c even though everything else appears okay -c s+t+u double-check also confirms u,umin values -c maybe due to some radiative effect?? - if (uprime.lt.0.) then + if (uu.gt.u_min) then write(6,*)' physics_omega: event with unphysical -u<-u_min' write(6,100)u_min,uu,uprime - write(6,100)t_min,tt,t_max,tprime - 100 format(4f15.2) + 100 format(3f15.2) endif ****************************************************************************** @@ -187,7 +189,7 @@ real*8 function peep_omega(vertex,main) * Wenliang Li's thesis parameterization c sig3 = sig_wli(thetacm,phicm,uu/1.e6,vertex%q2/1.e6, -c * invm/1.e3,epsilon,q2_nominal) +c * invm/1.e3,epsilon,q2_nominal) * Wenliang Li's extrapolation to higher Q2 sig4 = sig_LT_extrapolation(thetacm,phicm,uu/1.e6,tt/1.e6, @@ -198,6 +200,7 @@ real*8 function peep_omega(vertex,main) c c print*, " sig ",sig2,sig3,sig4 +c ntup%sigcm=sig3 ntup%sigcm=sig4 ntup%phicmi=phicm diff --git a/physics_phi.f b/physics_phi.f index 3d9a2a04..7e569240 100644 --- a/physics_phi.f +++ b/physics_phi.f @@ -29,7 +29,7 @@ real*8 function peep_phi(vertex,main) real*8 mass ! phi mass real*8 invm,Wsq ! invariant mass of hadronic system real*8 tt,uu ! Mandelstam variables - real*8 tprime,t_min,t_max,uprime,u_min + real*8 tprime,t_min,t_max,uprime,u_min,uu2,umin2 real*8 e_photCM,e_phiCM,e_pCM real*8 gamma_T ! flux of transversely polarized virt. photons @@ -111,6 +111,13 @@ real*8 function peep_phi(vertex,main) e_photCM = (Wsq - qsq - m_psq)/invm/2. e_phiCM = (Wsq + mass**2 - m_psq)/invm/2. e_pCM = (Wsq + m_psq - mass**2)/invm/2. + +c gh - 18.02.04 +c although t is single valued (negative), this is not true for u +c right at the kinematic endpoint, u turns positive, so umin is positive +c even though for most events u is negative. This is surprising, but is +c confirmed by checking against s+t+u relation. + if ((e_phiCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then t_min = -qsq + mass**2 -2.*(e_phiCM*e_photCM * -sqrt( (e_phiCM**2-mass**2)*(e_photCM**2+qsq) )) @@ -121,15 +128,25 @@ real*8 function peep_phi(vertex,main) else write(6,*)' physics_phi: no valid t,u min ' endif - tprime = abs(tt)-abs(t_min) - uprime = abs(uu)-abs(u_min) + +c check u using s+t+u relation +c uu2=-qsq+2.*m_psq+mass**2-invm**2-tt +c t_max = -qsq + mass**2 -2.*(e_phiCM*e_photCM +c * +sqrt((e_phiCM**2-mass**2)*(e_photCM**2+qsq))) +c umin2=-qsq+2.*m_psq+mass**2-invm**2-t_max + + tprime = abs(tt-t_min) + uprime = abs(uu-u_min) main%tmin=t_min - if (tprime.lt.0.) then - write(6,*)' unphysical -t<-t_min ',tt,t_min + if (abs(t_min).gt.abs(tt)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime + endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime endif - if (uprime.lt.0.) then - write(6,*)' unphysical -u<-u_min ',uu,u_min + if (uu.gt.u_min) then + write(6,*)' unphysical -u<-u_min ',uu,u_min,uprime endif ****************************************************************************** diff --git a/physics_pizero.f b/physics_pizero.f new file mode 100644 index 00000000..54ee2c47 --- /dev/null +++ b/physics_pizero.f @@ -0,0 +1,372 @@ + real*8 function peep_pizero(vertex,main) + +c gh - 18.02.04 + + implicit none + include 'simulate.inc' + +C The following two record lines are from SIMC physics_kaon.f + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 sigma_pi0 + real*8 m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + + real*8 mass ! pi0 mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt,uu ! Mandelstam variables + real*8 tprime,t_min,t_max,uprime,u_min,uu2,umin2 + real*8 e_photCM,e_pi0CM,e_pCM + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Breit_wigner + real*8 Jttheta ! Jacobian t-Mx - Ep,theta_p in LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + real*8 vertex_pi0_x,vertex_pi0_y,vertex_pi0_z + real*8 P_pi0,E_pi0,ucos,uu3 + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_pi0gmh + real*8 sig1,sig2,sig3 + + if (debug(2)) write(6,*)' peep_pizero: enter ' + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm +* main%davejac = jacobian +* main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = targ%Mrec_struck +c if (mass**2.lt.Mk2) then +c peep_pizero=0.0 +c return +c endif + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + +* cos/sin of theta between Pp and q in LAB +CDJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y + > +vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t = tt + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + +c use momentum conservation to get components of recoil meson + vertex_pi0_x = qvec*vertex%uq%x - Pp*vertex%up%x + vertex_pi0_y = qvec*vertex%uq%y - Pp*vertex%up%y + vertex_pi0_z = qvec*vertex%uq%z - Pp*vertex%up%z + P_pi0=sqrt(vertex_pi0_x**2 +vertex_pi0_y**2 +vertex_pi0_z**2) + E_pi0=sqrt(P_pi0**2+mass**2) + +c ucos = vertex_pi0_x/P_pi0*vertex%uq%x +c 1 +vertex_pi0_y/P_pi0*vertex%uq%y +c 2 +vertex_pi0_z/P_pi0*vertex%uq%z + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_pi0CM = (Wsq + mass**2 - m_psq)/invm/2. + e_pCM = (Wsq + m_psq - mass**2)/invm/2. + +c gh - 18.02.04 +c although t is single valued (negative), this is not true for u +c right at the kinematic endpoint, u turns positive, so umin is positive +c even though for most events u is negative. This is surprising, but is +c confirmed by checking against s+t+u relation. + + if ((e_pi0CM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq + mass**2 -2.*(e_pi0CM*e_photCM + * -sqrt( (e_pi0CM**2-mass**2)*(e_photCM**2+qsq) )) + t_max = -qsq + mass**2 -2.*(e_pi0CM*e_photCM + * +sqrt((e_pi0CM**2-mass**2)*(e_photCM**2+qsq))) + u_min = -qsq + m_psq -2.*(e_pCM*e_photCM + * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) + else + write(6,*)' physics_pizero: no valid t,u min ' + endif + +c check u using s+t+u relation +c uu2=-qsq+2.*m_psq+mass**2-invm**2-tt +c umin2=-qsq+2.*m_psq+mass**2-invm**2-t_max + + tprime = abs(tt-t_min) + uprime = abs(uu-u_min) + main%tmin=t_min + + if (abs(tt).lt.abs(t_min)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime + endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime + endif + if (uu.gt.u_min) then + write(6,*)' unphysical -u<-u_min ',uu,u_min,uprime + endif +c if (uprime.gt.0.) then +c write(6,*)' GOOD -u>-u_min ',uu,u_min,uprime,ucos +c endif +c write(6,*)' tt ',tt,t_min,t_max,tprime + + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +* + sig1 = sig_pi0gmh(qsq/1.e6,tt/1.e6,t_min/1.e6,t_max/1.e6, + * uu/1.e6,u_min/1.e6,invm/1.e3,epsilon,thetacm,phicm) + + ntup%sigcm=sig1 + + ntup%phicmi=phicm + ntup%wcmi=invm/1.e3 + ntup%tprimei=tprime/1.e6 + ntup%epsiloni=epsilon + ntup%ui=-uu/1.e6 + +c sigma_pizero=ntup%sigcm + +******************************************************************************* +* Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* --> d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG peep_omega=Jttheta*gamma_T*Breit_wigner*ntup.sigcm + +C DJG Now we want the "fixed Mx" Jacobian since we are only generating the hadron +C DJG angles. No Breit-Wigner now either. +C DJG Note to me: If we ever want to extend to deuterium, need to get rid of numerous +C DJG hard-wired proton masses above... + + peep_pizero = Jttheta_fx*gamma_T*ntup%sigcm + + if (debug(2)) write(6,*)' peep_pizero: end ',peep_pizero + return + end + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, + 1 nu,W_gev,eps,thetacm,phicm) + +c This routine calculates p(e,e'pi0)p cross sections, based on +c a parameterization of the Defurne Hall A data and a parameterization +c of a calculation by Goloskokov & Kroll +c Subroutine calculates dsigma/dt/dphi_cm, which is returned as sig_pi0gmh +c [ub/MeV^2/rad]. +c gh - 18.02.01 + + implicit none + include 'constants.inc' + + real*8 t_gev,tmin,tprime,u_gev,umin,uprime + real*8 mass,nu,eps,Q2_g,W_gev,wfactor,m_p + real*8 Q2hi,Q2lo,delQ2,Q2tmp + real*8 Whi,Wlo,Wfac_hi,Wfac_lo + real*8 sigThi,sigTlo,sigThiW,sigTloW + real*8 sigLhi,sigLlo,sigLhiW,sigLloW + real*8 sigTThi,sigTTlo,sigTThiW,sigTTloW + real*8 sigLThi,sigLTlo,sigLThiW,sigLTloW + real*8 thetacm,phicm,sig_phi0gmh + real*8 sig,sigT,sigL,sigLT,sigTT !components of dsigma/dt + +c use fit parameters for xB=0.36 data+model (nb/GeV2) + real*8 Q2tab(4) / 1.75, 3.00, 4.00, 5.50/ + real*8 Wtab(4) / 2.00, 2.46, 2.83, 3.26/ +c sigT is parameterized in the form p1+p2/(-t) + real*8 p1T(4) /1577., 168., 67.4, 24.7/ + real*8 p2T(4) /-125., -11.1, -4.6, -1.66/ +c sigL is simply constant vs t + real*8 p1L(4) / 0., 2.77, 1.16, 0.43/ +c sigTT p1+p2/(-t) + real*8 p1TT(4) /-674., -141., -57.6, -21.3/ + real*8 p2TT(4) / 102., 25.4, 10.4, 3.82/ +c sigLT p1+p2/(-t) + real*8 p1LT(4) / 156., 12.57, 5.17, 1.97/ + real*8 p2LT(4) /-60.0, -2.08, -0.85, -0.32/ + + integer iflag,pcount,ndat,Q2count + + iflag=1 ! flag for t(0) or u(1) channel + ndat=4 + + m_p = Mp/1.e3 + tprime = abs(t_gev-tmin)/1.e6 + uprime = abs(u_gev-umin)/1.e6 + + Q2tmp = Q2_g + if (Q2tmp.lt.Q2tab(1)) then + if (pcount.le.500) then + write(6,*)' WARNING: Q2 below model range ',Q2tmp + pcount=pcount+1 + endif + Q2tmp = Q2tab(1) + elseif(Q2tmp.gt.Q2tab(ndat)) then + if (pcount.lt.500) then + write(6,100)Q2tmp + 100 format(' WARNING: Q2 extrapolated above model range ',f7.3) + pcount=pcount+1 + endif + Q2tmp = Q2tab(ndat) + endif + +c calculate hi,lo cross sections + do Q2count=1,(ndat-1) + Q2hi=0. + Q2lo=0. + delQ2=1. + if( (Q2tmp.ge.Q2tab(Q2count)).and. (Q2tmp.lt.Q2tab(Q2count+1) ) + 1 .or. Q2tmp.ge.Q2tab(Q2count+1) ) then + Q2hi = Q2tab(Q2count+1) + Whi = Wtab(Q2count+1) + Q2lo = Q2tab(Q2count) + Wlo = Wtab(Q2count) + delQ2 = (Q2hi - Q2lo) +c write(6,*)' Q2 ',Q2tab(Q2count),Q2tmp + + if (iflag.lt.1) then ! t-channel + sigThi = p1T(Q2count+1)+p2T(Q2count+1)/(abs(t_gev)) + sigTlo = p1T(Q2count) +p2T(Q2count)/(abs(t_gev)) + sigLhi = p1L(Q2count+1) + sigLlo = p1L(Q2count) + sigTThi = p1TT(Q2count+1)+p2TT(Q2count+1)/(abs(t_gev)) + sigTTlo = p1TT(Q2count) +p2TT(Q2count)/(abs(t_gev)) + sigLThi = p1LT(Q2count+1)+p2LT(Q2count+1)/(abs(t_gev)) + sigLTlo = p1LT(Q2count) +p2LT(Q2count)/(abs(t_gev)) + + else ! u-channel +c christian weiss recommends the following change for u-channel: +c switch u-slope for t-slope, then divide by 10, since back angle peak +c is ~10% of forward angle peak (at least for omega electroproduction) + + sigThi = p1T(Q2count+1)+p2T(Q2count+1)/(abs(u_gev))/10. + sigTlo = p1T(Q2count) +p2T(Q2count)/(abs(u_gev))/10. + sigLhi = p1L(Q2count+1)/10. + sigLlo = p1L(Q2count)/10. + sigTThi = p1TT(Q2count+1)+p2TT(Q2count+1)/(abs(u_gev))/10. + sigTTlo = p1TT(Q2count) +p2TT(Q2count)/(abs(u_gev))/10. + sigLThi = p1LT(Q2count+1)+p2LT(Q2count+1)/(abs(u_gev))/10. + sigLTlo = p1LT(Q2count) +p2LT(Q2count)/(abs(u_gev))/10. + endif + + endif !Q2 check + enddo !Q2 + +c sighi,lo are at different W. scale both to the W needed for the event + + Wfac_hi= ((Whi**2-m_p**2)**2) / ((W_gev**2-m_p**2)**2) + Wfac_lo= ((Wlo**2-m_p**2)**2) / ((W_gev**2-m_p**2)**2) + + sigThiW = sigThi*Wfac_hi + sigTloW = sigTlo*Wfac_lo + sigLhiW = sigLhi*Wfac_hi + sigLloW = sigLlo*Wfac_lo + sigTThiW = sigTThi*Wfac_hi + sigTTloW = sigTTlo*Wfac_lo + sigLThiW = sigLThi*Wfac_hi + sigLTloW = sigLTlo*Wfac_lo + +c interpolate to get cross section at Q2 needed for the event + + if( (Q2tmp.ge.Q2tab(Q2count)).and.(Q2tmp.lt.Q2tab(Q2count+1))) + 1 then + + sigT = ( sigTloW*(Q2hi-Q2tmp)+ sigThiW*(Q2tmp-Q2lo))/delQ2 + sigL = ( sigLloW*(Q2hi-Q2tmp)+ sigLhiW*(Q2tmp-Q2lo))/delQ2 + sigTT = (sigTTloW*(Q2hi-Q2tmp)+sigTThiW*(Q2tmp-Q2lo))/delQ2 + sigLT = (sigLTloW*(Q2hi-Q2tmp)+sigLThiW*(Q2tmp-Q2lo))/delQ2 + + elseif (Q2tmp.ge.Q2tab(Q2count+1) ) then + + sigT = sigThiW+ (sigThiW-sigTloW) /delQ2 + sigL = sigLhiW+ (sigLhiW-sigLloW) /delQ2 + sigTT = sigTThiW+(sigTThiW-sigTTloW)/delQ2 + sigLT = sigLThiW+(sigLThiW-sigLTloW)/delQ2 + + endif + + sig = sigt +eps*sigl +eps*cos(2.*phicm)*sigtt + * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt + + sig_pi0gmh = sig/2./pi*1.e-09 !dsig/dtdphicm in microbarns/MeV^2/rad + + return + end diff --git a/physics_rho_recoil.f b/physics_rho_recoil.f index 879125c9..0913d62e 100644 --- a/physics_rho_recoil.f +++ b/physics_rho_recoil.f @@ -31,7 +31,7 @@ real*8 function peep_rho(vertex,main) real*8 mass ! omega mass real*8 invm,Wsq ! invariant mass of hadronic system real*8 tt,uu ! Mandelstam variables - real*8 tprime,t_min,uprime,u_min + real*8 tprime,t_min,t_max,uprime,u_min real*8 e_photCM,e_rhoCM,e_pCM real*8 gamma_T ! flux of transversely polarized virt. photons @@ -121,21 +121,38 @@ real*8 function peep_rho(vertex,main) e_photCM = (Wsq - qsq - m_psq)/invm/2. e_rhoCM = (Wsq + mass**2 - m_psq)/invm/2. e_pCM = E_cm + +c gh - 18.02.04 +c although t is single valued (negative), this is not true for u +c right at the kinematic endpoint, u turns positive, so umin is positive +c even though for most events u is negative. This is surprising, but is +c confirmed by checking against s+t+u relation. + if ((e_rhoCM**2-mass**2)*(e_photCM**2+qsq).ge.0.) then t_min = -qsq + mass**2 -2.*(e_rhoCM*e_photCM * -sqrt( (e_rhoCM**2-mass**2)*(e_photCM**2+qsq) )) + t_max = -qsq + mass**2 -2.*(e_rhoCM*e_photCM + * +sqrt((e_rhoCM**2-mass**2)*(e_photCM**2+qsq))) u_min = -qsq + m_psq -2.*(e_pCM*e_photCM * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) else write(6,*)' physics_rho_recoil: no valid t,u min ' endif - tprime = abs(tt)-abs(t_min) - uprime = abs(uu)-abs(u_min) + + tprime = abs(tt-t_min) + uprime = abs(uu-u_min) main%tmin=t_min - if (tprime.lt.0.) then - write(6,*)' unphysical -t<-t_min ',tt,t_min + if (abs(tt).lt.abs(t_min)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime + endif + if (uu.gt.u_min) then + write(6,*)' unphysical -u<-u_min ',uu,u_min,uprime + endif + ****************************************************************************** * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] From c8a27c5943cbd9adc4f3abf3b6ba2947e81121f3 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Fri, 23 Feb 2018 09:49:17 -0600 Subject: [PATCH 10/15] event.f physics_pizero.f -- bug fixes. physics_pion.f -- sig3000 param added. physics_piKmodel.f -- updated. --- event.f | 76 ++++++++++++++++++++++------------------------ physics_piKmodel.f | 34 ++++++++++++++++++--- physics_pion.f | 71 ++++++++++++++++++++++++++++++++++++++++--- physics_pizero.f | 33 +++++++++++++------- 4 files changed, 154 insertions(+), 60 deletions(-) diff --git a/event.f b/event.f index 8a54ec45..0d27edde 100644 --- a/event.f +++ b/event.f @@ -1,4 +1,4 @@ - subroutine limits_update(main,vertex,orig,recon,doing_deuterium, + subroutine limits_update(main,vertex,orig,recon,doing_deuterium, > doing_pion,doing_kaon,doing_eepx,doing_delta,doing_rho,contrib, > slop) @@ -263,12 +263,12 @@ subroutine generate(main,vertex,orig,success) ! Generate Electron Angles (all cases): c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dble(rannum4) - vertex%e%yptar=gen%e%yptar%min+rannum*(gen%e%yptar%max-gen%e%yptar%min) + rannum=dble(rannum4) + vertex%e%yptar=gen%e%yptar%min+rannum*(gen%e%yptar%max-gen%e%yptar%min) c vertex%e%yptar=gen%e%yptar%min+grnd()*(gen%e%yptar%max-gen%e%yptar%min) call ranlux (rannum4,1) - rannum=dble(rannum4) - vertex%e%xptar=gen%e%xptar%min+rannum*(gen%e%xptar%max-gen%e%xptar%min) + rannum=dble(rannum4) + vertex%e%xptar=gen%e%xptar%min+rannum*(gen%e%xptar%max-gen%e%xptar%min) c vertex%e%xptar=gen%e%xptar%min+grnd()*(gen%e%xptar%max-gen%e%xptar%min) ! Generate Hadron Angles (all but H(e,e'p)): @@ -277,13 +277,13 @@ subroutine generate(main,vertex,orig,success) > .or.doing_Xphasespace) then c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dble(rannum4) - vertex%p%yptar=gen%p%yptar%min+rannum* + rannum=dble(rannum4) + vertex%p%yptar=gen%p%yptar%min+rannum* c vertex%p%yptar=gen%p%yptar%min+grnd()* > (gen%p%yptar%max-gen%p%yptar%min) call ranlux (rannum4,1) - rannum=dble(rannum4) - vertex%p%xptar=gen%p%xptar%min+rannum* + rannum=dble(rannum4) + vertex%p%xptar=gen%p%xptar%min+rannum* c vertex%p%xptar=gen%p%xptar%min+grnd()* > (gen%p%xptar%max-gen%p%xptar%min) endif @@ -296,10 +296,10 @@ subroutine generate(main,vertex,orig,success) main%gen_weight=main%gen_weight*(Emax-Emin)/(gen%p%E%max-gen%p%E%min) c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dble(rannum4) - vertex%p%E = Emin + rannum*(Emax-Emin) + rannum=dble(rannum4) + vertex%p%E = Emin + rannum*(Emax-Emin) c vertex%p%E = Emin + grnd()*(Emax-Emin) - vertex%p%P = sqrt(vertex%p%E**2 - Mh2) + vertex%p%P = sqrt(vertex%p%E**2 - Mh2) vertex%p%delta = 100.*(vertex%p%P-spec%p%P)/spec%p%P endif @@ -321,11 +321,11 @@ subroutine generate(main,vertex,orig,success) main%gen_weight=main%gen_weight*(Emax-Emin)/(gen%e%E%max-gen%e%E%min) c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dble(rannum4) - vertex%e%E = Emin + rannum*(Emax-Emin) + rannum=dble(rannum4) + vertex%e%E = Emin + rannum*(Emax-Emin) c vertex%e%E = Emin + grnd()*(Emax-Emin) - vertex%e%P = vertex%e%E - vertex%e%delta = 100.*(vertex%e%P-spec%e%P)/spec%e%P + vertex%e%P = vertex%e%E + vertex%e%delta = 100.*(vertex%e%P-spec%e%P)/spec%e%P endif !not (doing_hyd_elast) @@ -616,33 +616,32 @@ subroutine complete_ev(main,vertex,success) c even so, masses will be generated down to about 375 MeV c ranlux substituted for grnd - gh call ranlux (rannum4,1) - rannum=dble(rannum4) - targ%Mrec_struck = Mrho + + rannum=dble(rannum4) + targ%Mrec_struck = Mrho + > 0.5*MrhoW* > tan((2.*rannum-1.)*atan(2.*450./MrhoW)) c > tan((2.*grnd()-1.)*atan(2.*450./MrhoW)) -c > tan((2.*grnd()-1.)*atan(2.*500./MrhoW)) - else if (which_eepx.eq.4) then ! omega + else if (which_eepx.eq.4) then ! omega c all other mesons (with width) get the standard formula call ranlux (rannum4,1) - rannum=dble(rannum4) - targ%Mrec_struck = Momega + + rannum=dble(rannum4) + targ%Mrec_struck = Momega + > 0.5*MomegaW*tan((2.*rannum-1.)*pi/2.) - else if (which_eepx.eq.6) then ! phi + else if (which_eepx.eq.6) then ! phi call ranlux (rannum4,1) - rannum=dble(rannum4) - targ%Mrec_struck = Mphi + + rannum=dble(rannum4) + targ%Mrec_struck = Mphi + > 0.5*MphiW*tan((2.*rannum-1.)*pi/2.) - endif - if (debug(4)) write(6,*)'comp_ev: at 6.5b',targ%Mrec_struck - if(targ%Mrec_struck.le.0.0) return - endif - - vertex%Pm = pfer !vertex%Em generated at beginning. - vertex%Mrec = targ%M - targ%Mtar_struck + vertex%Em - a = -1.*vertex%q*(vertex%uq%x*vertex%up%x+ + endif + if (debug(4)) write(6,*)'comp_ev: at 6.5b',targ%Mrec_struck + if(targ%Mrec_struck.le.0.0) return + endif + + vertex%Pm = pfer !vertex%Em generated at beginning. + vertex%Mrec = targ%M - targ%Mtar_struck + vertex%Em + a = -1.*vertex%q*(vertex%uq%x*vertex%up%x+ > vertex%uq%y*vertex%up%y+vertex%uq%z*vertex%up%z) - b = vertex%q**2 + b = vertex%q**2 c = vertex%nu + targ%M ! For nuclei, correct for fermi motion and missing energy. Also, check @@ -790,6 +789,7 @@ subroutine complete_ev(main,vertex,success) main%phi_pq = atan2(p_new_y,p_new_x) !atan2(y,x)=atan(y/x) if (main%phi_pq.lt.0.e0) main%phi_pq=main%phi_pq+2.*pi + ! if (p_new_y.lt.0.) then ! main.phi_pq = 2*pi - main.phi_pq ! endif @@ -1220,9 +1220,7 @@ subroutine complete_recon_ev(recon,success) p_new_x = px*new_x_x + py*new_x_y + pz*new_x_z p_new_y = px*new_y_x + py*new_y_y + pz*new_y_z -c gh 17.12.27 - modify because of real inequality comparison warning -c if ((p_new_x**2+p_new_y**2).eq.0.) then - if (abs(p_new_x**2+p_new_y**2).le.1.e-6) then + if ((p_new_x**2+p_new_y**2).eq.0.) then recon%phi_pq = 0.0 else recon%phi_pq = acos(p_new_x/sqrt(p_new_x**2+p_new_y**2)) @@ -1698,9 +1696,7 @@ subroutine physics_angles(theta0,phi0,dx,dy,theta,phi) tmp=(costh - dy*sinth*sinph) / r if (abs(tmp).gt.1) write(6,*) 'tmp=',tmp theta = acos( (costh - dy*sinth*sinph) / r ) -c gh 17.12.27 - modify because of real inequality comparison warning -c if (dx.ne.0.0) then - if (abs(dx).lt.1.e-6) then + if (dx.ne.0.0) then phi = atan( (dy*costh + sinth*sinph) / dx ) !gives -90 to 90 deg. if (phi.le.0) phi=phi+pi !make 0 to 180 deg. if (sinph.lt.0.) phi=phi+pi !add pi to phi for HMS diff --git a/physics_piKmodel.f b/physics_piKmodel.f index 55d574cd..ffbdab94 100644 --- a/physics_piKmodel.f +++ b/physics_piKmodel.f @@ -74,7 +74,7 @@ real*8 function peepi(vertex,main) real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian - real*8 pm2_tmp,q2_cent_g + real*8 pm2_tmp,q2_cent_g,W_cent_g logical first_call save first_call @@ -91,14 +91,40 @@ real*8 function peepi(vertex,main) if(first_call) then first_call=.false. -c calculate central kinematics Q^2 +c calculate central kinematics Q^2 and W q2_cent_g = ( (Ebeam - spec%e%P*cos(spec%e%theta))**2 c + (spec%e%P*sin(spec%e%theta))**2 c - (Ebeam - spec%e%P)**2 ) /1.e6 -c write(6,*)' Q2_central = ',q2_cent_g + W_cent_g = sqrt( (Ebeam - spec%e%P + Mp)**2 + c - (Ebeam - spec%e%P*cos(spec%e%theta))**2 + c - (spec%e%P*sin(spec%e%theta))**2 ) /1.e3 + +c write(6,*)' Q2_central = ',q2_cent_g,W_cent_g if (which_pion.eq.0) then ! pi+ - if (q2_cent_g.lt.6.25) then + if (q2_cent_g.lt.4.25 .and. W_cent_g.le.2.35) then + write(6,*)'Selecting VR pi+ model for Q^2=0.1-6.0, W=2.10' + nfiles=13 + Wset=2.10 + filename(1)='VR/ep_enpip_q20p10_w2p10.dat' + filename(2)='VR/ep_enpip_q20p50_w2p10.dat' + filename(3)='VR/ep_enpip_q21p00_w2p10.dat' + filename(4)='VR/ep_enpip_q21p50_w2p10.dat' + filename(5)='VR/ep_enpip_q22p00_w2p10.dat' + filename(6)='VR/ep_enpip_q22p50_w2p10.dat' + filename(7)='VR/ep_enpip_q23p00_w2p10.dat' + filename(8)='VR/ep_enpip_q23p50_w2p10.dat' + filename(9)='VR/ep_enpip_q24p00_w2p10.dat' + filename(10)='VR/ep_enpip_q24p50_w2p10.dat' + filename(11)='VR/ep_enpip_q25p00_w2p10.dat' + filename(12)='VR/ep_enpip_q25p50_w2p10.dat' + filename(13)='VR/ep_enpip_q26p00_w2p10.dat' + filename(14)=' ' + filename(15)=' ' + filename(16)=' ' + filename(17)=' ' + filename(18)=' ' + elseif (q2_cent_g.lt.6.25 .and. W_cent_g.gt.2.35) then write(6,*)'Selecting VR pi+ model for Q^2=1.0-9.5, W=3.28' nfiles=18 Wset=3.28 diff --git a/physics_pion.f b/physics_pion.f index 48b2bbe7..80c975b0 100644 --- a/physics_pion.f +++ b/physics_pion.f @@ -33,7 +33,7 @@ real*8 function peepi(vertex,main) real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. real*8 thetacm,phicm,phiqn,jacobian,jac_old - real*8 sig_multipole,sig_blok,sig_param04 + real*8 sig_multipole,sig_blok,sig_param04,sig_param_3000 integer final_state logical first,low_w_flag @@ -112,7 +112,9 @@ real*8 function peepi(vertex,main) 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.e6,vertex%q2/1.e6,s/1.e6,main%epsilon, +c ntup%sigcm1 = sig_param04(thetacm,phicm,main%t/1.e6,vertex%q2/1.e6,s/1.e6,main%epsilon, +c > targ%Mtar_struck/1000.,which_pion) + ntup%sigcm1 = sig_param_3000(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 @@ -421,7 +423,7 @@ real*8 function sig_blok(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion) * HPB: factor 15.333 therefore is value of (W**2-mp**2)**2 at W=2.19 sig=sig219*15.333/(s_gev-mtar_gev**2)**2 - sig=sig/2./pi/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + sig=sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV**2/rad sig_blok = sig @@ -464,7 +466,6 @@ real*8 function sig_param04(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion sigtt=sigtt*0.25*(1.+3.*exp(-10.*abs(t))) endif - sig219=(sigt+eps*sigl+eps*cos(2.*phicm)*sigtt > +sqrt(2.0*eps*(1.+eps))*cos(phicm)*siglt)/1.e0 @@ -472,9 +473,69 @@ real*8 function sig_param04(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion * HPB: factor 15.333 therefore is value of (W**2-mp**2)**2 at W=2.19 sig=sig219*8.539/(s_gev-mtar_gev**2)**2 - sig=sig/2./pi/1.d+06 !dsig/dtdphicm in microbarns/MeV**2/rad + sig=sig/2./pi/1.e+06 !dsig/dtdphicm in microbarns/MeV**2/rad sig_param04 = sig return end + + +*********************************************************************************************** + real*8 function sig_param_3000(thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev,which_pion) + +* Purpose: +* Fit that reproduces Fpi1 (larger Q2)and Fpi2 and Brauel separated xsec data. +* while reproducing Bebek unseparated data. +* The Fpi1 low Q2 data isn't fit terribly well, but not so bad (mostly, sigma_l is +* a little big). +* Fit gives dsigma/dt/dphi_cm, which is returned as sig_param_3000 [ub/MeV^2-rad]. + + implicit none + include 'constants.inc' + + real*8 sig219,sig + real*8 sigt,sigl,siglt,sigtt !components of dsigma/dt + + real*8 mrho_emp + real*8 fpi,fpi2,q2fpi2,q2fpi,polefactor + + real*8 thetacm,phicm,t,q2_gev,s_gev,eps,mtar_gev + integer which_pion + + + + fpi = 1.0/(1.0+1.77*q2_gev+0.12*q2_gev**2) + + q2fpi2=q2_gev*fpi**2 + + sigL = 19.8*abs(t)/(abs(t)+0.02)**2*q2fpi2*exp(-3.66*abs(t)) + sigT = 5.96/q2_gev*exp(-0.013*q2_gev**2) + + sigLT=(16.533/(1.0+q2_gev))*exp(-5.1437*abs(t))*sin(thetacm) + sigTT=(-178.06/(1.0+q2_gev))*exp(-7.1381*abs(t))*sin(thetacm)**2 + + + +CDG For now assume sigL(pi+)=sigL(pi-) + if (which_pion.eq.1 .or. which_pion.eq.11) then !pi- + sigt =sigt *0.25*(1.0+3.0*exp(-10.0*abs(t))) + sigtt=sigtt*0.25*(1.0+3.0*exp(-10.0*abs(t))) + endif + + + sig219=(sigt+eps*sigl+eps*cos(2.0*phicm)*sigtt + > +sqrt(2.0*eps*(1.0+eps))*cos(phicm)*siglt)/1.0e0 + +* 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 + + sig=sig219*8.539/(s_gev-mtar_gev**2)**2 + sig=sig/2.0/pi/1.0e+06 !dsig/dtdphicm in microbarns/MeV**2/rad + + sig_param_3000 = sig + + return + end + + diff --git a/physics_pizero.f b/physics_pizero.f index 54ee2c47..0171856a 100644 --- a/physics_pizero.f +++ b/physics_pizero.f @@ -263,7 +263,7 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, real*8 p1LT(4) / 156., 12.57, 5.17, 1.97/ real*8 p2LT(4) /-60.0, -2.08, -0.85, -0.32/ - integer iflag,pcount,ndat,Q2count + integer iflag,pcount,ndat,Q2count,Q2c iflag=1 ! flag for t(0) or u(1) channel ndat=4 @@ -289,12 +289,14 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, endif c calculate hi,lo cross sections - do Q2count=1,(ndat-1) - Q2hi=0. - Q2lo=0. - delQ2=1. - if( (Q2tmp.ge.Q2tab(Q2count)).and. (Q2tmp.lt.Q2tab(Q2count+1) ) - 1 .or. Q2tmp.ge.Q2tab(Q2count+1) ) then + Q2hi=0. + Q2lo=0. + delQ2=1. + Q2count=0 + do Q2c=1,(ndat-1) + if( (Q2tmp.ge.Q2tab(Q2c)).and. (Q2tmp.lt.Q2tab(Q2c+1) ) + 1 .or. Q2tmp.ge.Q2tab(Q2c+1) ) then + Q2count = Q2c Q2hi = Q2tab(Q2count+1) Whi = Wtab(Q2count+1) Q2lo = Q2tab(Q2count) @@ -346,27 +348,36 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, c interpolate to get cross section at Q2 needed for the event - if( (Q2tmp.ge.Q2tab(Q2count)).and.(Q2tmp.lt.Q2tab(Q2count+1))) - 1 then + if( Q2count.le.3 .and. Q2tmp.ge.Q2tab(Q2count) .and. + 1 Q2tmp.lt.Q2tab(Q2count+1) ) then sigT = ( sigTloW*(Q2hi-Q2tmp)+ sigThiW*(Q2tmp-Q2lo))/delQ2 sigL = ( sigLloW*(Q2hi-Q2tmp)+ sigLhiW*(Q2tmp-Q2lo))/delQ2 sigTT = (sigTTloW*(Q2hi-Q2tmp)+sigTThiW*(Q2tmp-Q2lo))/delQ2 sigLT = (sigLTloW*(Q2hi-Q2tmp)+sigLThiW*(Q2tmp-Q2lo))/delQ2 - elseif (Q2tmp.ge.Q2tab(Q2count+1) ) then +c write(6,*)' T1 ',Q2tmp,sigt,sigTloW,sigThiW + + elseif (Q2tmp.ge.Q2tab(4) ) then sigT = sigThiW+ (sigThiW-sigTloW) /delQ2 sigL = sigLhiW+ (sigLhiW-sigLloW) /delQ2 sigTT = sigTThiW+(sigTThiW-sigTTloW)/delQ2 sigLT = sigLThiW+(sigLThiW-sigLTloW)/delQ2 +c write(6,*)' T2 ',Q2tmp,sigt,sigTloW,sigThiW + + else + + write(6,*)' Q2tmp error ',Q2tmp,Q2count + endif sig = sigt +eps*sigl +eps*cos(2.*phicm)*sigtt * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt - + sig_pi0gmh = sig/2./pi*1.e-09 !dsig/dtdphicm in microbarns/MeV^2/rad + write(6,*)' phi ',phicm return end From d220033aea837c2a51be9f0b58f3f8da409b2156 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Fri, 23 Feb 2018 10:31:46 -0600 Subject: [PATCH 11/15] minor fix --- physics_pizero.f | 1 - 1 file changed, 1 deletion(-) diff --git a/physics_pizero.f b/physics_pizero.f index 0171856a..c9ce9857 100644 --- a/physics_pizero.f +++ b/physics_pizero.f @@ -377,7 +377,6 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, * +sqrt(2.*eps*(1.+eps))*cos(phicm)*siglt sig_pi0gmh = sig/2./pi*1.e-09 !dsig/dtdphicm in microbarns/MeV^2/rad - write(6,*)' phi ',phicm return end From 0894b3f184af161a6c0e5f56582b73d5571eb9df Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Sun, 11 Mar 2018 15:13:47 -0600 Subject: [PATCH 12/15] Initial u-channel DVCS generator based on KM15 model. Improvements and bug-fixes of u-channel pi0 model. Add MM**2 variable to Ntuple. --- Makefile | 2 +- NtupleInit.f | 3 +- dbase.f | 55 +++--- event.f | 26 +-- physics_dvcs.f | 431 +++++++++++++++++++++++++++++++++++++++++++++++ physics_pizero.f | 139 +++++++++------ results_write.f | 3 +- simc.f | 36 ++-- simulate.inc | 2 +- 9 files changed, 592 insertions(+), 105 deletions(-) create mode 100644 physics_dvcs.f diff --git a/Makefile b/Makefile index 8bdea592..5febef0b 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ OBJ2 = radc.o init.o dbase.o physics_kaon.o physics_pion.o physics_delta.o physi #OBJ2 = radc.o init.o dbase.o physics_piKmodel.o physics_delta.o physics_proton.o loren.o sf_lookup.o OBJ3 = semi_physics.o rho_physics.o rho_decay.o generate_rho.o trg_track.o semi_dilution.o OBJ4 = physics_omega.o physics_Xphasespace.o physics_rho_recoil.o physics_phi.o -OBJ4b = physics_eta.o physics_eta_prime.o physics_pizero.o +OBJ4b = physics_eta.o physics_eta_prime.o physics_pizero.o physics_dvcs.o OBJ4a = results_write.o event.o mt19937.o jacobians.o OBJ5 = $(A)musc.o $(A)musc_ext.o $(A)project.o $(A)transp.o OBJ6 = $(A)rotate_haxis.o $(A)rotate_vaxis.o $(A)locforunt.o diff --git a/NtupleInit.f b/NtupleInit.f index ee02184a..f2b92fac 100644 --- a/NtupleInit.f +++ b/NtupleInit.f @@ -129,7 +129,8 @@ subroutine NtupleInit(filename) m = m+1 NtupleTag(m) = 'Mhadron' ! 49 m = m+1 - NtupleTag(m) = 'pdotqhat' ! 50 +c NtupleTag(m) = 'pdotqhat' ! 50 + NtupleTag(m) = 'MM2' ! 50 m = m+1 NtupleTag(m) = 'Q2i' ! 51 m = m+1 diff --git a/dbase.f b/dbase.f index 9bdc9ff7..494d5799 100644 --- a/dbase.f +++ b/dbase.f @@ -313,27 +313,30 @@ subroutine dbase_read(H) ! gh NOT CLEAR TO ME THAT THE FOLLOWING IS APPROPRIATE FOR WIDE MESONS sign_hadron=1.0 - if(Meepx.gt.130.0.and.Meepx.lt.140.0) then - targ%Mrec_struck = Mpi0 + if(Meepx.lt..01) then + targ%Mrec_struck = 1.0e-6 which_eepx = 1 + elseif(Meepx.gt.130.0.and.Meepx.lt.140.0) then + targ%Mrec_struck = Mpi0 + which_eepx = 2 else if(Meepx.gt.500.0.and.Meepx.lt.600.0) then targ%Mrec_struck = Meta - which_eepx = 2 + which_eepx = 3 else if(Meepx.gt.765.0.and.Meepx.lt.778.0) then targ%Mrec_struck = Mrho - which_eepx = 3 + which_eepx = 4 else if(Meepx.gt.778.0.and.Meepx.lt.790.0) then targ%Mrec_struck = Momega - which_eepx = 4 + which_eepx = 5 else if(Meepx.gt.957.0.and.Meepx.lt.958.0) then targ%Mrec_struck = Metap - which_eepx = 5 + which_eepx = 6 else if(Meepx.gt.1015.0.and.Meepx.lt.1025.0) then targ%Mrec_struck = Mphi - which_eepx = 6 + which_eepx = 7 else targ%Mrec_struck = Meepx - which_eepx = 7 + which_eepx = 8 endif else if (doing_delta) then !Strike (and detect) proton, pion 'recoil' @@ -767,16 +770,18 @@ subroutine dbase_read(H) else if (doing_eepx) then if (doing_hydeepx) then if(which_eepx.eq.1) then + write(6,*) ' ****-------- H(e,e''p)gamma --------****' + elseif(which_eepx.eq.2) then write(6,*) ' ****-------- H(e,e''p)pi0 --------****' - else if(which_eepx.eq.2) then - write(6,*) ' ****-------- H(e,e''p)eta --------****' else if(which_eepx.eq.3) then - write(6,*) ' ****-------- H(e,e''p)rho --------****' + write(6,*) ' ****-------- H(e,e''p)eta --------****' else if(which_eepx.eq.4) then - write(6,*) ' ****-------- H(e,e''p)omega --------****' + write(6,*) ' ****-------- H(e,e''p)rho --------****' else if(which_eepx.eq.5) then - write(6,*) ' ****-------- H(e,e''p)eta_prime --------****' + write(6,*) ' ****-------- H(e,e''p)omega --------****' else if(which_eepx.eq.6) then + write(6,*) ' ****-------- H(e,e''p)eta_prime --------****' + else if(which_eepx.eq.7) then write(6,*) ' ****-------- H(e,e''p)phi --------****' else write(6,*) ' ****-------- H(e,e''p)Mx --------****' @@ -784,16 +789,18 @@ subroutine dbase_read(H) endif else if (doing_deuteepx) then if(which_eepx.eq.1) then + write(6,*) ' ****-------- D(e,e''p)gamma --------****' + elseif(which_eepx.eq.2) then write(6,*) ' ****-------- D(e,e''p)pi0 --------****' - else if(which_eepx.eq.2) then - write(6,*) ' ****-------- D(e,e''p)eta --------****' else if(which_eepx.eq.3) then - write(6,*) ' ****-------- D(e,e''p)rho --------****' + write(6,*) ' ****-------- D(e,e''p)eta --------****' else if(which_eepx.eq.4) then - write(6,*) ' ****-------- D(e,e''p)omega --------****' + write(6,*) ' ****-------- D(e,e''p)rho --------****' else if(which_eepx.eq.5) then - write(6,*) ' ****-------- D(e,e''p)eta_prime --------****' + write(6,*) ' ****-------- D(e,e''p)omega --------****' else if(which_eepx.eq.6) then + write(6,*) ' ****-------- D(e,e''p)eta_prime --------****' + else if(which_eepx.eq.7) then write(6,*) ' ****-------- D(e,e''p)phi --------****' else write(6,*) ' ****-------- D(e,e''p)Mx --------****' @@ -801,16 +808,18 @@ subroutine dbase_read(H) endif else if (doing_heeepx) then if(which_eepx.eq.1) then + write(6,*) ' ****-------- A(e,e''p)gamma --------****' + elseif(which_eepx.eq.2) then write(6,*) ' ****-------- A(e,e''p)pi0 --------****' - else if(which_eepx.eq.2) then - write(6,*) ' ****-------- A(e,e''p)eta --------****' else if(which_eepx.eq.3) then - write(6,*) ' ****-------- A(e,e''p)rho --------****' + write(6,*) ' ****-------- A(e,e''p)eta --------****' else if(which_eepx.eq.4) then - write(6,*) ' ****-------- A(e,e''p)omega --------****' + write(6,*) ' ****-------- A(e,e''p)rho --------****' else if(which_eepx.eq.5) then - write(6,*) ' ****-------- A(e,e''p)eta_prime --------****' + write(6,*) ' ****-------- A(e,e''p)omega --------****' else if(which_eepx.eq.6) then + write(6,*) ' ****-------- A(e,e''p)eta_prime --------****' + else if(which_eepx.eq.7) then write(6,*) ' ****-------- A(e,e''p)phi --------****' else write(6,*) ' ****-------- A(e,e''p)Mx --------****' diff --git a/event.f b/event.f index 0d27edde..ca618c5f 100644 --- a/event.f +++ b/event.f @@ -611,7 +611,7 @@ subroutine complete_ev(main,vertex,success) if(doing_eepx) then if (debug(4)) write(6,*)'comp_ev: at 6.5a',which_eepx - if (which_eepx.eq.3) then !rho + if (which_eepx.eq.4) then !rho c the rho is very broad and gets a formula with more restricted width c even so, masses will be generated down to about 375 MeV c ranlux substituted for grnd - gh @@ -621,13 +621,13 @@ subroutine complete_ev(main,vertex,success) > 0.5*MrhoW* > tan((2.*rannum-1.)*atan(2.*450./MrhoW)) c > tan((2.*grnd()-1.)*atan(2.*450./MrhoW)) - else if (which_eepx.eq.4) then ! omega + else if (which_eepx.eq.5) then ! omega c all other mesons (with width) get the standard formula call ranlux (rannum4,1) rannum=dble(rannum4) targ%Mrec_struck = Momega + > 0.5*MomegaW*tan((2.*rannum-1.)*pi/2.) - else if (which_eepx.eq.6) then ! phi + else if (which_eepx.eq.7) then ! phi call ranlux (rannum4,1) rannum=dble(rannum4) targ%Mrec_struck = Mphi + @@ -1405,6 +1405,7 @@ subroutine complete_recon_ev(recon,success) endif ntup%mm = mm ntup%mmA = mmA + ntup%mm2 = mm2 ntup%t = t ntup%thetacm=thetacm @@ -1467,7 +1468,7 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) integer i, iPm1 real*8 a, b, r, frac, peepi, peeK, peedelta, peerho, peepiX real*8 peep_eta, peep_omega, peep_rho, peep_eta_prime,peep_phi - real*8 peepph, peep_pizero + real*8 peepph, peep_pizero, peep_dvcs real*8 survivalprob, semi_dilution real*8 weight, width, sigep, deForest, tgtweight real*8 Em_weight ! gh @@ -1576,25 +1577,28 @@ subroutine complete_main(force_sigcc,main,vertex,vertex0,recon,success) endif elseif (doing_eepx) then - if(which_eepx.eq.1) then !pi0 + if(which_eepx.eq.1) then !dvcs + main%sigcc = peep_dvcs(vertex,main) + main%sigcc_recon = 1.0 + else if(which_eepx.eq.2) then !pi0 main%sigcc = peep_pizero(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.2) then !eta + else if(which_eepx.eq.3) then !eta main%sigcc = peep_eta(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.3) then !rho + else if(which_eepx.eq.4) then !rho main%sigcc = peep_rho(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.4) then !omega + else if(which_eepx.eq.5) then !omega main%sigcc = peep_omega(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.5) then !eta prime + else if(which_eepx.eq.6) then !eta prime main%sigcc = peep_eta_prime(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.6) then !phi + else if(which_eepx.eq.7) then !phi main%sigcc = peep_phi(vertex,main) main%sigcc_recon = 1.0 - else if(which_eepx.eq.7) then + else main%sigcc = 1.0 main%sigcc_recon = 1.0 endif diff --git a/physics_dvcs.f b/physics_dvcs.f new file mode 100644 index 00000000..da4424b1 --- /dev/null +++ b/physics_dvcs.f @@ -0,0 +1,431 @@ + real*8 function peep_dvcs(vertex,main) + +c gh - 18.02.26 + + implicit none + include 'simulate.inc' + + type(event_main):: main + type(event):: vertex + +* NOTE: when we refer to the center of mass system, it always refers to the +* photon-NUCLEON center of mass + + real*8 sigma_dvcs + real*8 m_p, m_psq + + real*8 E0 ! Electron beam energy + real*8 E_prime ! scattered electron energy + real*8 nu ! virtual photon energy + real*8 qvec ! virtual photon lab energy + real*8 qsq ! 4 momentum transfer of scattered electron + real*8 epsilon ! virtual photon polarisation + + real*8 Ep,Pp + ! low Q2 + real*8 mass ! pi0 mass + real*8 invm,Wsq ! invariant mass of hadronic system + real*8 tt,uu ! Mandelstam variables + real*8 tprime,t_min,t_max,uprime,u_min,uu2,umin2 + real*8 e_photCM,e_gammafCM,e_pCM,p_gammafCM + + real*8 gamma_T ! flux of transversely polarized virt. photons + real*8 Breit_wigner + real*8 Jttheta ! Jacobian t-Mx - Ep,theta_p in LAB + real*8 Jttheta_fx ! old Jacobian for fixed Mx + real*8 tcos ! cos of theta_LAB between Pp and q + real*8 vertex_gammaf_x,vertex_gammaf_y,vertex_gammaf_z + real*8 P_gammaf,E_gammaf,ucos,uu3 + +! Variables calculated in transformation to gamma-NUCLEON center of mass. + real*8 gstar,bstar,bstarx,bstary,bstarz !beta of boost to C.M. + real*8 nustar,qstar,qstarx,qstary,qstarz !q in C.M. + real*8 epicm,ppicm,ppicmx,ppicmy,ppicmz !p_hadron in C.M. + real*8 ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz !p_beam in C.M. + real*8 etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz !p_fermi in C.M. + real*8 thetacm,phicm,phiqn,jacobian,jac_old + + real*8 sig_dvcsgmh + real*8 sig1,sig2,sig3 + + if (debug(2)) write(6,*)' peep_dvcs: enter ' + + call transform_to_cm(vertex,main, + & gstar,bstar,bstarx,bstary,bstarz, + & nustar,qstar,qstarx,qstary,qstarz, + & epicm,ppicm,ppicmx,ppicmy,ppicmz, + & ebeamcm,pbeamcm,pbeamcmx,pbeamcmy,pbeamcmz, + & etarcm,ptarcm,ptarcmx,ptarcmy,ptarcmz, + & thetacm,phicm,phiqn,jacobian,jac_old) + +C notice that the above symbol "pi" is borrowed from physics_pion +C it actually stands for proton. But I am too lazy to change it. +C noted by xucc + + m_p = targ%Mtar_struck + m_psq = m_p**2 + + main%thetacm = thetacm + main%phicm = phicm !gh - verified that this is same as main%phi_pq + main%pcm = ppicm +* main%davejac = jacobian +* main%johnjac = jac_old !approx. assuming collinear boost. + + qsq = vertex%q2 + invm = sqrt((vertex%nu+m_p)**2-vertex%q**2) + main%wcm = invm + Wsq = invm*invm + + mass = targ%Mrec_struck + + E0 = vertex%Ein + E_prime= vertex%e%E + nu = vertex%nu + epsilon= main%epsilon + qvec = vertex%q +c qvec is the momentum of virtual gamma in lab system. + + Ep = vertex%p%E + Pp = vertex%p%P + +* cos/sin of theta between Pp and q in LAB +CDJG tcos = cos(main%theta_pq) + +C DJG: I changed theta_pq in event.f - need to recalculate tcos + tcos = vertex%up%x*vertex%uq%x+vertex%up%y*vertex%uq%y + > +vertex%up%z*vertex%uq%z + +* since here the meson is the recoil particle, t for us is not the same thing as +* main%t, so overwrite it +* for the + sign I spent 1 hour to check. xucc + tt = 2.0*(m_p**2-m_p*Ep) +c main%t = tt + + uu = -qsq +m_psq +2.*(qvec*Pp*tcos -nu*Ep ) + +c use momentum conservation to get components of recoil meson + vertex_gammaf_x = qvec*vertex%uq%x - Pp*vertex%up%x + vertex_gammaf_y = qvec*vertex%uq%y - Pp*vertex%up%y + vertex_gammaf_z = qvec*vertex%uq%z - Pp*vertex%up%z + P_gammaf=sqrt(vertex_gammaf_x**2 +vertex_gammaf_y**2 + 1 +vertex_gammaf_z**2) + E_gammaf=P_gammaf + +c ucos = vertex_gammaf_x/P_gammaf*vertex%uq%x +c 1 +vertex_gammaf_y/P_gammaf*vertex%uq%y +c 2 +vertex_gammaf_z/P_gammaf*vertex%uq%z + + e_photCM = (Wsq - qsq - m_psq)/invm/2. + e_gammafCM = (Wsq - m_psq)/invm/2. + p_gammafCM = e_gammafCM + e_pCM = (Wsq + m_psq)/invm/2. + +c gh - 18.02.04 +c although t is single valued (negative), this is not true for u +c right at the kinematic endpoint, u turns positive, so umin is positive +c even though for most events u is negative. This is surprising, but is +c confirmed by checking against s+t+u relation. + + if ((p_gammafCM**2)*(e_photCM**2+qsq).ge.0.) then + t_min = -qsq -2.*(e_gammafCM*e_photCM + * -sqrt( (p_gammafCM**2)*(e_photCM**2+qsq) )) + t_max = -qsq -2.*(e_gammafCM*e_photCM + * +sqrt((p_gammafCM**2)*(e_photCM**2+qsq))) + u_min = -qsq + m_psq -2.*(e_pCM*e_photCM + * -sqrt( (e_pCM**2-m_psq)*(e_photCM**2+qsq) )) + else + write(6,*)' physics_dvcs: no valid t,u min ' + endif + +c check u using s+t+u relation +c uu2=-qsq+2.*m_psq+mass**2-invm**2-tt +c umin2=-qsq+2.*m_psq+mass**2-invm**2-t_max + + tprime = abs(tt-t_min) + uprime = abs(uu-u_min) + main%tmin=t_min + + if (abs(tt).lt.abs(t_min)) then + write(6,*)' unphysical -t<-t_min ',tt,t_min,tprime + endif + if (abs(tt).gt.abs(t_max)) then + write(6,*)' unphysical -t>-t_max ',tt,t_max,tprime + endif + if (uu.gt.u_min) then + write(6,*)' unphysical -u<-u_min ',uu,u_min,uprime + endif +c if (uprime.gt.0.) then +c write(6,*)' GOOD -u>-u_min ',uu,u_min,uprime,ucos +c endif +c write(6,*)' tt ',tt,t_min,t_max,tprime + + +****************************************************************************** +* we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] +****************************************************************************** +* + sig1 = sig_dvcsgmh(Ebeam/1.e3,qsq/1.e6,tt/1.e6,t_min/1.e6, + * uu/1.e6,u_min/1.e6,invm/1.e3) + + ntup%sigcm=sig1 + + ntup%phicmi=phicm + ntup%wcmi=invm/1.e3 + ntup%tprimei=tprime/1.e6 + ntup%epsiloni=epsilon + ntup%ui=-uu/1.e6 + +c sigma_dvcs=ntup%sigcm + +******************************************************************************* +* Convert from d3sigma/dt/dphi_cm/dMx [ub/MeV^3/rad] +* --> d3sigma/dEp/dOmega_lab [ub/MeV/sr] using 'Jttheta' +* +* Jacobian for fixed Mx. Ep is a function of theta_pq. +* J=dt/dcos_LAB [MeV^2]. + Jttheta_fx = 2.*m_p*qvec*Pp / ( m_p+nu-qvec*Ep/Pp*tcos ) + +* Jacobian for varying Mx. Ep and theta_pq are independent since they +* are sampled separately. +* J=d(t,Mx)/d(Ep_LAB,cos_LAB) [MeV^2]. + Jttheta = 2.*m_p*qvec*Pp/mass + + main%davejac=Jttheta + main%johnjac=Jttheta_fx + +******************************************************************************* +* Convert to 6-fold d6sigma/dOmega_p/dE_p/dOmega_e/dE_e [ub/MeV^2/sr^2] +* by multiplying by virtual transverse photon flux factor, gamma_T [1/MeV/sr] +* +* gh - checked and this agrees with gtpr in physics_pion.f + gamma_T = (alpha*E_prime*(Wsq-m_psq))/(4.*pi*pi*E0*m_p*qsq* + $ (1-epsilon)) + +******************************************************************************* +* Lab differential cross section +* ub/MeV^2/rad-->ub/MeV^3/rad-->ub/MeV/sr-->ub/MeV^2/sr^2 +******************************************************************************* + +CDJG peep_omega=Jttheta*gamma_T*Breit_wigner*ntup.sigcm + +C DJG Now we want the "fixed Mx" Jacobian since we are only generating the hadron +C DJG angles. No Breit-Wigner now either. +C DJG Note to me: If we ever want to extend to deuterium, need to get rid of numerous +C DJG hard-wired proton masses above... + + peep_dvcs = Jttheta_fx*gamma_T*ntup%sigcm + + if (debug(2)) write(6,*)' peep_dvcs: end ',peep_dvcs + return + end + +C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + real*8 function sig_dvcsgmh(Eb_g,Q2_g,t_gev,tmin,u_gev,umin, + 1 W_gev) + +c This routine calculates p(e,e'gamma)p DVCS cross sections, based on +C the Kumericki and Mueller KM15 model at xB=0.36, which includes the +c 2015 CLAS and Hall A DVCS data in fixing the GPD parameters. + +c Subroutine calculates dsigma/dt/dphi_cm, which is returned as sig_dvcsgmh +c [ub/MeV^2/rad]. +c gh - 18.02.26 + + implicit none + include 'constants.inc' + + real*8 t_gev,tmin,tprime,u_gev,umin,uprime + real*8 Eb_g,mass,eps,Q2_g,W_gev,wfactor,m_p + real*8 Q2hi,Q2lo,delQ2,Q2tmp + real*8 Whi,Wlo,Wfac_hi,Wfac_lo + real*8 sighi,siglo,sighiW,sigloW + real*8 thetacm,phicm,sig_phi0gmh + real*8 sig ! dsigma/dt + +c use fit parameters for KM15 model at xB=0.36 (nb/GeV2) + real*8 Q2tab(4) / 2.30, 3.00, 3.80, 5.00/ + real*8 Wtab(4) / 2.23, 2.49, 2.76, 3.125/ + real*8 Ebtab(3) / 6.60, 8.80, 10.90/ + +c sig_unp is parameterized in the form p1*(-t-p3)/(-t-p2)**2+p4 +c fill parameter arrays in the order (x=Ee, y=Q2) + +c parameters for fit vs t (not tprime) +c Q2=2.30 for 3 beam energies + real*8 p1(3,4) / 0.004, 0.005, 0.005, +c Q2=3.0 + 1 0.004, 0.006, 0.005, +c Q2=3.8 + 2 -0.057, 0.007, 0.005, +c Q2=5.0 + 3 0.0003,0.0003, 0.006/ ! use Eb=8.8 params for 6.6 + +c Q2=2.30 + real*8 p2(3,4) / 0.098, 0.074, 0.062, +c Q2=3.0 + 1 0.107, 0.062, 0.055, +c Q2=3.8 + 2 -0.057, 0.061, 0.058, +c Q2=5.0 + 3 0.127, 0.127, 0.057/ ! use Eb=8.8 params for 6.6 + +c Q2=2.30 + real*8 p3(3,4) / 0.158, 0.136, 0.124, +c Q2=3.0 + 1 0.170, 0.136, 0.127, +c Q2=3.8 + 2 -0.057, 0.140, 0.133, +c Q2=5.0 + 3 0.275, 0.275, 0.137/ ! use Eb=8.8 params for 6.6 + +c Q2=2.30 + real*8 p4(3,4) / 0.045, 0.015, 0.008, +c Q2=3.0 + 1 0.051, 0.007, 0.002, +c Q2=3.8 + 2 0.359, 0.006, 0.001, +c Q2=5.0 + 3 0.062, 0.062, 0.000/ ! use Eb=8.8 params for 6.6 + + integer iflag,pcount,ndat,Q2count,Q2c,Ebc,Ebcount + + iflag=1 ! flag for t(0) or u(1) channel + ndat=4 + + m_p = Mp/1.e3 + tprime = abs(t_gev-tmin) + uprime = abs(u_gev-umin) + + Q2tmp = Q2_g + if (Q2tmp.lt.Q2tab(1)) then + if (pcount.le.500) then + write(6,100)Q2tmp + 100 format(' WARNING: Q2 extrapolated below model range ',f7.3) + pcount=pcount+1 + endif + Q2tmp = Q2tab(1) + elseif(Q2tmp.gt.Q2tab(ndat)) then + if (pcount.lt.500) then + write(6,101)Q2tmp + 101 format(' WARNING: Q2 extrapolated above model range ',f7.3) + pcount=pcount+1 + endif + Q2tmp = Q2tab(ndat) + endif + + Ebcount=0 + do Ebc=1,3 + if (abs(Eb_g-Ebtab(Ebc)).lt.0.5) then + Ebcount=Ebc + endif + enddo + if (Ebcount.lt.1 .or. Ebcount.gt.3) then + write(6,*)' Ebcount error ',Ebcount,Eb_g + endif + +c calculate hi,lo cross sections + Q2hi=0. + Q2lo=0. + delQ2=1. + Q2count=0 + if( Q2tmp.lt.Q2tab(1) ) then + Q2count = 1 + Q2hi = Q2tab(2) + Whi = Wtab(2) + Q2lo = Q2tab(1) + Wlo = Wtab(1) + delQ2 = (Q2hi - Q2lo) + else + do Q2c=1,(ndat-1) + if( (Q2tmp.ge.Q2tab(Q2c)).and. (Q2tmp.lt.Q2tab(Q2c+1) ) + 1 .or. Q2tmp.ge.Q2tab(Q2c+1) ) then + Q2count = Q2c + Q2hi = Q2tab(Q2count+1) + Whi = Wtab(Q2count+1) + Q2lo = Q2tab(Q2count) + Wlo = Wtab(Q2count) + delQ2 = (Q2hi - Q2lo) + endif !Q2 check + enddo !Q2 + endif + + if (iflag.lt.1) then ! t-channel + sighi = p1(Ebcount,Q2count+1)* + 1 (tprime+abs(tmin)-p3(Ebcount,Q2count+1)) + 2 /(tprime+abs(tmin)-p2(Ebcount,Q2count+1))**2 + 3 +p4(Ebcount,Q2count+1) + + siglo = p1(Ebcount,Q2count)* + 1 (tprime+abs(tmin)-p3(Ebcount,Q2count)) + 2 /(tprime+abs(tmin)-p2(Ebcount,Q2count))**2 + 3 +p4(Ebcount,Q2count) + + else ! u-channel +c christian weiss recommends the following change for u-channel: +c switch u-slope for t-slope, then divide by 10, since back angle peak +c is ~10% of forward angle peak (at least for omega electroproduction) + sighi = ( p1(Ebcount,Q2count+1)* + 1 (uprime+abs(tmin)-p3(Ebcount,Q2count+1)) + 2 /(uprime+abs(tmin)-p2(Ebcount,Q2count+1))**2 + 3 +p4(Ebcount,Q2count+1) )/10. + + siglo = ( p1(Ebcount,Q2count)* + 1 (abs(uprime)+abs(tmin)-p3(Ebcount,Q2count)) + 2 /(abs(uprime)+abs(tmin)-p2(Ebcount,Q2count))**2 + 3 +p4(Ebcount,Q2count) )/10. + endif + +c sighi,lo are at different W. scale both to the W needed for the event + Wfac_hi= ((Whi**2-m_p**2)**2) / ((W_gev**2-m_p**2)**2) + Wfac_lo= ((Wlo**2-m_p**2)**2) / ((W_gev**2-m_p**2)**2) + + sighiW = sighi*Wfac_hi + if (sighiW.lt.0.) then + write(6,*)' dvcs: sighiW<0 ',sighiW,uprime,abs(tmin),Wfac_hi + sighiW=0. + endif + + sigloW = siglo*Wfac_lo + if (sigloW.lt.0.) then + write(6,*)' dvcs: sigloW<0 ',sigloW,uprime,abs(tmin),Wfac_lo + sigloW=0. + endif + +c interpolate to get cross section at Q2 needed for the event +c units are nb/GeV2 (dsig/dt) + + if( Q2count.le.(ndat-1) .and. Q2tmp.ge.Q2tab(Q2count) .and. + 1 Q2tmp.lt.Q2tab(Q2count+1) ) then + + sig = ( sigloW*(Q2hi-Q2tmp)+ sighiW*(Q2tmp-Q2lo))/delQ2 + +c write(6,*)' sig1 ',Q2tmp,sig,sigloW,sighiW + + elseif (Q2tmp.ge.Q2tab(ndat) ) then + + sig = sighiW+ (sighiW-sigloW) /delQ2 + +c write(6,*)' sig2 ',Q2tmp,sig,sigloW,sighiW + + elseif (Q2tmp.le.Q2tab(1) ) then + + sig = sigloW- (sighiW-sigloW) /delQ2 + +c write(6,*)' sig3 ',Q2tmp,sig,sigloW,sighiW + + else + + write(6,*)' Q2tmp error ',Q2tmp,Q2count + + endif + + sig_dvcsgmh = sig/2./pi*1.e-09 !dsig/dtdphicm in microbarns/MeV^2/rad + + if (sig_dvcsgmh .gt. 1.e-6) then + write(6,*)' sig warning ',sig,Q2tmp,W_gev + write(6,*)uprime,abs(tmin),p2(Ebcount,Q2count+1) + write(6,*)sighiW,Wfac_hi,sigloW,Wfac_lo + endif + + return + end diff --git a/physics_pizero.f b/physics_pizero.f index c9ce9857..b7a58fac 100644 --- a/physics_pizero.f +++ b/physics_pizero.f @@ -79,10 +79,6 @@ real*8 function peep_pizero(vertex,main) Wsq = invm*invm mass = targ%Mrec_struck -c if (mass**2.lt.Mk2) then -c peep_pizero=0.0 -c return -c endif E0 = vertex%Ein E_prime= vertex%e%E @@ -168,8 +164,8 @@ real*8 function peep_pizero(vertex,main) * we keep the tradition that ntup.sigcm is d2sigma/dt/dphi_cm [ub/MeV^2/rad] ****************************************************************************** * - sig1 = sig_pi0gmh(qsq/1.e6,tt/1.e6,t_min/1.e6,t_max/1.e6, - * uu/1.e6,u_min/1.e6,invm/1.e3,epsilon,thetacm,phicm) + sig1 = sig_pi0gmh(qsq/1.e6,tt/1.e6,t_min/1.e6,uu/1.e6,u_min/1.e6, + 1 invm/1.e3,epsilon,thetacm,phicm) ntup%sigcm=sig1 @@ -225,7 +221,7 @@ real*8 function peep_pizero(vertex,main) C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, - 1 nu,W_gev,eps,thetacm,phicm) + 1 W_gev,eps,thetacm,phicm) c This routine calculates p(e,e'pi0)p cross sections, based on c a parameterization of the Defurne Hall A data and a parameterization @@ -238,7 +234,7 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, include 'constants.inc' real*8 t_gev,tmin,tprime,u_gev,umin,uprime - real*8 mass,nu,eps,Q2_g,W_gev,wfactor,m_p + real*8 mass,eps,Q2_g,W_gev,wfactor,m_p real*8 Q2hi,Q2lo,delQ2,Q2tmp real*8 Whi,Wlo,Wfac_hi,Wfac_lo real*8 sigThi,sigTlo,sigThiW,sigTloW @@ -269,20 +265,22 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, ndat=4 m_p = Mp/1.e3 - tprime = abs(t_gev-tmin)/1.e6 - uprime = abs(u_gev-umin)/1.e6 + tprime = abs(t_gev-tmin) + uprime = abs(u_gev-umin) +c write(6,*)' uprime ',u_gev,umin,uprime Q2tmp = Q2_g if (Q2tmp.lt.Q2tab(1)) then if (pcount.le.500) then - write(6,*)' WARNING: Q2 below model range ',Q2tmp + write(6,100)Q2tmp + 100 format(' WARNING: Q2 extrapolated below model range ',f7.3) pcount=pcount+1 endif Q2tmp = Q2tab(1) elseif(Q2tmp.gt.Q2tab(ndat)) then if (pcount.lt.500) then - write(6,100)Q2tmp - 100 format(' WARNING: Q2 extrapolated above model range ',f7.3) + write(6,101)Q2tmp + 101 format(' WARNING: Q2 extrapolated above model range ',f7.3) pcount=pcount+1 endif Q2tmp = Q2tab(ndat) @@ -293,44 +291,51 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, Q2lo=0. delQ2=1. Q2count=0 - do Q2c=1,(ndat-1) - if( (Q2tmp.ge.Q2tab(Q2c)).and. (Q2tmp.lt.Q2tab(Q2c+1) ) - 1 .or. Q2tmp.ge.Q2tab(Q2c+1) ) then - Q2count = Q2c - Q2hi = Q2tab(Q2count+1) - Whi = Wtab(Q2count+1) - Q2lo = Q2tab(Q2count) - Wlo = Wtab(Q2count) - delQ2 = (Q2hi - Q2lo) -c write(6,*)' Q2 ',Q2tab(Q2count),Q2tmp - - if (iflag.lt.1) then ! t-channel - sigThi = p1T(Q2count+1)+p2T(Q2count+1)/(abs(t_gev)) - sigTlo = p1T(Q2count) +p2T(Q2count)/(abs(t_gev)) - sigLhi = p1L(Q2count+1) - sigLlo = p1L(Q2count) - sigTThi = p1TT(Q2count+1)+p2TT(Q2count+1)/(abs(t_gev)) - sigTTlo = p1TT(Q2count) +p2TT(Q2count)/(abs(t_gev)) - sigLThi = p1LT(Q2count+1)+p2LT(Q2count+1)/(abs(t_gev)) - sigLTlo = p1LT(Q2count) +p2LT(Q2count)/(abs(t_gev)) - - else ! u-channel -c christian weiss recommends the following change for u-channel: -c switch u-slope for t-slope, then divide by 10, since back angle peak -c is ~10% of forward angle peak (at least for omega electroproduction) - - sigThi = p1T(Q2count+1)+p2T(Q2count+1)/(abs(u_gev))/10. - sigTlo = p1T(Q2count) +p2T(Q2count)/(abs(u_gev))/10. - sigLhi = p1L(Q2count+1)/10. - sigLlo = p1L(Q2count)/10. - sigTThi = p1TT(Q2count+1)+p2TT(Q2count+1)/(abs(u_gev))/10. - sigTTlo = p1TT(Q2count) +p2TT(Q2count)/(abs(u_gev))/10. - sigLThi = p1LT(Q2count+1)+p2LT(Q2count+1)/(abs(u_gev))/10. - sigLTlo = p1LT(Q2count) +p2LT(Q2count)/(abs(u_gev))/10. - endif + if( Q2tmp.lt.Q2tab(1) ) then + Q2count = 1 + Q2hi = Q2tab(2) + Whi = Wtab(2) + Q2lo = Q2tab(1) + Wlo = Wtab(1) + delQ2 = (Q2hi - Q2lo) + else + do Q2c=1,(ndat-1) + if( (Q2tmp.ge.Q2tab(Q2c)).and. (Q2tmp.lt.Q2tab(Q2c+1) ) + 1 .or. Q2tmp.ge.Q2tab(Q2c+1) ) then + Q2count = Q2c + Q2hi = Q2tab(Q2count+1) + Whi = Wtab(Q2count+1) + Q2lo = Q2tab(Q2count) + Wlo = Wtab(Q2count) + delQ2 = (Q2hi - Q2lo) + endif !Q2 check + enddo !Q2 + endif - endif !Q2 check - enddo !Q2 + if (iflag.lt.1) then ! t-channel + sigThi = p1T(Q2count+1)+p2T(Q2count+1)/(tprime+abs(tmin)) + sigTlo = p1T(Q2count) +p2T(Q2count)/(tprime+abs(tmin)) + sigLhi = p1L(Q2count+1) + sigLlo = p1L(Q2count) + sigTThi = p1TT(Q2count+1)+p2TT(Q2count+1)/(tprime+abs(tmin)) + sigTTlo = p1TT(Q2count) +p2TT(Q2count)/(tprime+abs(tmin)) + sigLThi = p1LT(Q2count+1)+p2LT(Q2count+1)/(tprime+abs(tmin)) + sigLTlo = p1LT(Q2count) +p2LT(Q2count)/(tprime+abs(tmin)) + + else ! u-channel +c christian weiss recommends the following change for u-channel: +c switch u-slope for t-slope, then divide by 10, since back angle peak +c is ~10% of forward angle peak (at least for omega electroproduction) + + sigThi = (p1T(Q2count+1)+p2T(Q2count+1)/(uprime+abs(tmin)))/10. + sigTlo = (p1T(Q2count) +p2T(Q2count)/(uprime+abs(tmin)))/10. + sigLhi = p1L(Q2count+1)/10. + sigLlo = p1L(Q2count)/10. + sigTThi = (p1TT(Q2count+1)+p2TT(Q2count+1)/(uprime+abs(tmin)))/10. + sigTTlo = (p1TT(Q2count) +p2TT(Q2count)/(uprime+abs(tmin)))/10. + sigLThi = (p1LT(Q2count+1)+p2LT(Q2count+1)/(uprime+abs(tmin)))/10. + sigLTlo = (p1LT(Q2count) +p2LT(Q2count)/(uprime+abs(tmin)))/10. + endif c sighi,lo are at different W. scale both to the W needed for the event @@ -338,17 +343,38 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, Wfac_lo= ((Wlo**2-m_p**2)**2) / ((W_gev**2-m_p**2)**2) sigThiW = sigThi*Wfac_hi + if (sigThiW.lt.0.) then + write(6,*)' pizero: sigThiW<0 ',sigThiW,uprime,abs(tmin) + sigThiW=0. + endif sigTloW = sigTlo*Wfac_lo + if (sigTloW.lt.0.) then + write(6,*)' pizero: sigTloW<0 ',sigTloW,uprime,abs(tmin) + sigTloW=0. + endif sigLhiW = sigLhi*Wfac_hi + if (sigLhiW.lt.0.) then + write(6,*)' pizero: sigLhiW<0 ',sigLhiW,uprime,abs(tmin) + sigLhiW=0. + endif sigLloW = sigLlo*Wfac_lo + if (sigLloW.lt.0.) then + write(6,*)' pizero: sigLloW<0 ',sigLloW,uprime,abs(tmin) + sigLloW=0. + endif sigTThiW = sigTThi*Wfac_hi +c SIGN(A,B) returns the value of A with the sign of B + if (abs(sigTThiW).gt.sigThiW) sigTThiW=sign(sigThiW,sigTThiW) sigTTloW = sigTTlo*Wfac_lo + if (abs(sigTTloW).gt.sigTloW) sigTTloW=sign(sigTloW,sigTTloW) sigLThiW = sigLThi*Wfac_hi + if (abs(sigLThiW).gt.sigThiW) sigLThiW=sign(sigThiW,sigLThiW) sigLTloW = sigLTlo*Wfac_lo + if (abs(sigLTloW).gt.sigTloW) sigLTloW=sign(sigTloW,sigLTloW) c interpolate to get cross section at Q2 needed for the event - if( Q2count.le.3 .and. Q2tmp.ge.Q2tab(Q2count) .and. + if( Q2count.le.(ndat-1) .and. Q2tmp.ge.Q2tab(Q2count) .and. 1 Q2tmp.lt.Q2tab(Q2count+1) ) then sigT = ( sigTloW*(Q2hi-Q2tmp)+ sigThiW*(Q2tmp-Q2lo))/delQ2 @@ -358,7 +384,7 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, c write(6,*)' T1 ',Q2tmp,sigt,sigTloW,sigThiW - elseif (Q2tmp.ge.Q2tab(4) ) then + elseif (Q2tmp.ge.Q2tab(ndat) ) then sigT = sigThiW+ (sigThiW-sigTloW) /delQ2 sigL = sigLhiW+ (sigLhiW-sigLloW) /delQ2 @@ -367,6 +393,15 @@ real*8 function sig_pi0gmh(Q2_g,t_gev,tmin,u_gev,umin, c write(6,*)' T2 ',Q2tmp,sigt,sigTloW,sigThiW + elseif (Q2tmp.le.Q2tab(1) ) then + + sigT = sigTloW- (sigThiW-sigTloW) /delQ2 + sigL = sigLloW- (sigLhiW-sigLloW) /delQ2 + sigTT = sigTTloW-(sigTThiW-sigTTloW)/delQ2 + sigLT = sigLTloW-(sigLThiW-sigLTloW)/delQ2 + +c write(6,*)' T3 ',Q2tmp,sigt,sigTloW,sigThiW + else write(6,*)' Q2tmp error ',Q2tmp,Q2count diff --git a/results_write.f b/results_write.f index b7d3a6a7..e8f1e9e0 100644 --- a/results_write.f +++ b/results_write.f @@ -146,7 +146,8 @@ subroutine results_ntu_write(main,vertex,orig,recon,success) ntu(47) = main%weight ntu(48) = decdist !decay distance (cm) ntu(49) = sqrt(Mh2_final) - ntu(50) = pfer/1000.*dummy !p_fermi along q. +c ntu(50) = pfer/1000.*dummy !p_fermi along q. + ntu(50) = ntup%mm2 ntu(51) = vertex%Q2/1.e6 ntu(52) = main%w/1.e3 ntu(53) = main%t/1.e6 diff --git a/simc.f b/simc.f index 4c3b041e..b83384ab 100644 --- a/simc.f +++ b/simc.f @@ -746,16 +746,18 @@ subroutine report(iun,timestring1,timestring2,central,contrib, else if (doing_eepx) then if (doing_hydeepx) then if(which_eepx.eq.1) then + write(iun,*) ' ****-------- H(e,e''p)gamma --------****' + elseif(which_eepx.eq.2) then write(iun,*) ' ****-------- H(e,e''p)pi0 --------****' - else if(which_eepx.eq.2) then - write(iun,*) ' ****-------- H(e,e''p)eta --------****' else if(which_eepx.eq.3) then - write(iun,*) ' ****-------- H(e,e''p)rho0 --------****' + write(iun,*) ' ****-------- H(e,e''p)eta --------****' else if(which_eepx.eq.4) then - write(iun,*) ' ****-------- H(e,e''p)omega --------****' + write(iun,*) ' ****-------- H(e,e''p)rho0 --------****' else if(which_eepx.eq.5) then - write(iun,*) ' ****-------- H(e,e''p)eta_prime --------****' + write(iun,*) ' ****-------- H(e,e''p)omega --------****' else if(which_eepx.eq.6) then + write(iun,*) ' ****-------- H(e,e''p)eta_prime --------****' + else if(which_eepx.eq.7) then write(iun,*) ' ****-------- H(e,e''p)phi --------****' else write(iun,*) ' ****-------- H(e,e''p)Mx --------****' @@ -763,16 +765,18 @@ subroutine report(iun,timestring1,timestring2,central,contrib, endif else if (doing_deuteepx) then if(which_eepx.eq.1) then + write(iun,*) ' ****-------- D(e,e''p)gamma --------****' + elseif(which_eepx.eq.2) then write(iun,*) ' ****-------- D(e,e''p)pi0 --------****' - else if(which_eepx.eq.2) then - write(iun,*) ' ****-------- D(e,e''p)eta --------****' else if(which_eepx.eq.3) then - write(iun,*) ' ****-------- D(e,e''p)rho0 --------****' + write(iun,*) ' ****-------- D(e,e''p)eta --------****' else if(which_eepx.eq.4) then - write(iun,*) ' ****-------- D(e,e''p)omega --------****' + write(iun,*) ' ****-------- D(e,e''p)rho0 --------****' else if(which_eepx.eq.5) then - write(iun,*) ' ****-------- D(e,e''p)eta_prime --------****' + write(iun,*) ' ****-------- D(e,e''p)omega --------****' else if(which_eepx.eq.6) then + write(iun,*) ' ****-------- D(e,e''p)eta_prime --------****' + else if(which_eepx.eq.7) then write(iun,*) ' ****-------- D(e,e''p)phi --------****' else write(iun,*) ' ****-------- D(e,e''p)Mx --------****' @@ -780,16 +784,18 @@ subroutine report(iun,timestring1,timestring2,central,contrib, endif else if (doing_heeepx) then if(which_eepx.eq.1) then + write(iun,*) ' ****-------- A(e,e''p)gamma --------****' + elseif(which_eepx.eq.2) then write(iun,*) ' ****-------- A(e,e''p)pi0 --------****' - else if(which_eepx.eq.2) then - write(iun,*) ' ****-------- A(e,e''p)eta --------****' else if(which_eepx.eq.3) then - write(iun,*) ' ****-------- A(e,e''p)rho0 --------****' + write(iun,*) ' ****-------- A(e,e''p)eta --------****' else if(which_eepx.eq.4) then - write(iun,*) ' ****-------- A(e,e''p)omega --------****' + write(iun,*) ' ****-------- A(e,e''p)rho0 --------****' else if(which_eepx.eq.5) then - write(iun,*) ' ****-------- A(e,e''p)eta_prime --------****' + write(iun,*) ' ****-------- A(e,e''p)omega --------****' else if(which_eepx.eq.6) then + write(iun,*) ' ****-------- A(e,e''p)eta_prime --------****' + else if(which_eepx.eq.7) then write(iun,*) ' ****-------- A(e,e''p)phi --------****' else write(iun,*) ' ****-------- A(e,e''p)Mx --------****' diff --git a/simulate.inc b/simulate.inc index 9ccd5f5b..d574ac15 100644 --- a/simulate.inc +++ b/simulate.inc @@ -154,7 +154,7 @@ C Structure for variables that we want to available to the ntuple. real*8 radphot, radarm real*8 resfac real*8 sigcm - real*8 krel,mm,mmA,t,u,dilu + real*8 krel,mm,mmA,mm2,t,u,dilu real*8 sigcm1, sigcm2, sigcm3, sigcm4 real*8 xfermi, yfermi real*8 rhomass, rhotheta,PMsigned From 4a278dbb13f8e7462a613356aa10ce83e96565b8 Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Mon, 20 Jan 2020 16:46:49 -0600 Subject: [PATCH 13/15] Misc input file changes --- infiles/kaonL_550_302_37_+0000.inp | 148 ++++++++++------------------- infiles/omega_160_33_+1.inp | 4 +- infiles/omega_245_54_00.inp | 4 +- worksim/.gitignore | 2 - 4 files changed, 54 insertions(+), 104 deletions(-) delete mode 100644 worksim/.gitignore diff --git a/infiles/kaonL_550_302_37_+0000.inp b/infiles/kaonL_550_302_37_+0000.inp index 6356640a..b30fe01b 100644 --- a/infiles/kaonL_550_302_37_+0000.inp +++ b/infiles/kaonL_550_302_37_+0000.inp @@ -1,116 +1,68 @@ ; This is a CTP file +; 'TF' stands for 'this field' +; ONE equals TRUE unless specified otherwise + + begin parm experiment - ngen = 20000 ; POS: # of successes; NEG: # of tries - EXPER%charge = 1.0 ; total charge (mC) - doing_phsp = 0 ; (ONE = TRUE) - doing_kaon = 1 ; (ONE = TRUE) - which_kaon = 0 ; (0=p-->K+lamda0,1=p-->K+sigma0,2=n-->K+sigma) - doing_pion = 0 ; (ONE = TRUE) - doing_decay = 1 ; 1=decay ON, 0=decay OFF. - ctau = 371.3 ; decay length (cm) + ngen = 250000 ; POS: # of successes; NEG: # of tries + EXPER%charge = 1.0 ; total charge (mC) + doing_phsp = 0 ; (ONE = TRUE) + doing_kaon = 1 ; (ONE = TRUE) + which_kaon = 0 ; (0=p-->K+lamda0,1=p-->K+sigma0,2=n-->K+sigma) + ; (+10 for bound hypernucleus in final state) + doing_pion = 0 ; (ONE = TRUE) + doing_decay = 1 ; 1=decay ON, 0=decay OFF. + ctau = 371.3 ; decay length (cm). 780.4 for pi, 371.3 for K + extra_dbase_file='extra_KAON' ; additional input parameters. end parm experiment begin parm kinematics_main - Ebeam = 9343.0 ; (MeV) - dEbeam = 0.05 ; beam energy variation (%) - electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms - hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms - spec%e%P = 2021.0 ; e arm central momentum (MeV/c) - spec%e%theta = 31.300 ; e arm angle setting (degrees) - spec%p%P = 6842.2 ; p arm central momentum (MeV/c) - spec%p%theta = 7.850 ; p arm angle setting (degrees) +; kinematics for hydrogen november + Ebeam = 9343.0 ; (MeV) + dEbeam = 0.05 ; beam energy variation (%) + electron_arm = 1 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + hadron_arm = 5 ; 1=hms,2=sos,3=hrsr,4=hrsl,5=shms + spec%e%P = 2021.0 ; e arm central momentum (MeV/c) + spec%e%theta = 31.30 ; e arm angle setting (degrees) + spec%p%P = 6842.0 ; p arm central momentum (MeV/c) + spec%p%theta = 7.85 ; p arm angle setting (degrees) end parm kinematics_main begin parm target - targ%A = 1. ; target A - targ%Z = 1. ; target Z - targ%mass_amu = 1.007276 ; target mass in amu - targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) - targ%rho = 0.0723 ; target density (g/cm^3) - targ%thick = 578.4 ; target thick (mg/cm^2) 8cm - targ%angle = 0. ; target angle (for solid target) (degrees) - targ%abundancy = 100. ; target purity (%) - targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) + targ%A = 1. ; target A + targ%Z = 1. ; target Z + targ%mass_amu = 1.007276 ; target mass in amu + targ%mrec_amu = 0. ; recoil mass in amu (eep=A-1 system,pion=A-2) + targ%rho = 0.0723 ; target density (g/cm^3) + targ%thick = 723.0 ; target thick (mg/cm^2) 8.0cm long + targ%angle = 0. ; target angle (for solid target) (degrees) + targ%abundancy = 100. ; target purity (%) + targ%can = 2 ; 1=beer can (fpi), 2=pudding can (nucpi) end parm target -begin parm debug ; (ONES give helpful debug info) - debug(1) = 0 ; turns on output from brem.f - debug(2) = 0 ; into/outa subs. - debug(3) = 0 ; spit out values (init. and main loop). - debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. - debug(5) = 0 ; a bit of everything. +begin parm debug ; (ONES give helpful debug info) + debug(1) = 0 ; turns on output from brem.f + debug(2) = 0 ; into/outa subs + debug(3) = 0 ; spit out values (init. and main loop). + debug(4) = 0 ; mostly comp_ev, gen_rad diagnostics. + debug(5) = 0 ; a bit of everything end parm debug begin parm e_arm_accept - SPedge%e%delta%min = -25.0 ; delta min (SPECTROMETER ACCEPTANCE!) - SPedge%e%delta%max = 25.0 ; delta max - SPedge%e%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) - SPedge%e%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 - SPedge%e%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) - SPedge%e%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 + SPedge%e%delta%min = -15.0 ; delta min (%) (SPECTROMETER ACCEPTANCE!) + SPedge%e%delta%max = 15.0 ; delta max (%) + SPedge%e%yptar%min = -35.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%e%yptar%max = 35.0 ; .yptar.max = {TF} / 1000 + SPedge%e%xptar%min = -80.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%e%xptar%max = 80.0 ; .xptar.max = {TF} / 1000 end parm e_arm_accept begin parm p_arm_accept - SPedge%p%delta%min = -35.0 ; delta min (SPECTROMETER ACCEPTANCE!) - SPedge%p%delta%max = 50.0 ; delta max - SPedge%p%yptar%min = -60.0 ; .yptar.min = {TF} / 1000 (mrad) - SPedge%p%yptar%max = 60.0 ; .yptar.max = {TF} / 1000 - SPedge%p%xptar%min = -140.0 ; .xptar.min = {TF} / 1000 (mrad) - SPedge%p%xptar%max = 140.0 ; .xptar.max = {TF} / 1000 + SPedge%p%delta%min = -20.0 ; delta min (%) (SPECTROMETER ACCEPTANCE!) + SPedge%p%delta%max = 30.0 ; delta max (%) + SPedge%p%yptar%min = -35.0 ; .yptar.min = {TF} / 1000 (mrad) + SPedge%p%yptar%max = 35.0 ; .yptar.max = {TF} / 1000 + SPedge%p%xptar%min = -60.0 ; .xptar.min = {TF} / 1000 (mrad) + SPedge%p%xptar%max = 60.0 ; .xptar.max = {TF} / 1000 end parm p_arm_accept - -begin parm beamandtargetinfo - gen%xwid = 0.008868 ; beam width - one sigma (cm) (89microns) - gen%ywid = 0.004235 ; beam width - one sigma (cm) (42microns) - targ%fr_pattern = 3. ; raster pattern: 1=square, 2=circular - targ%fr1 = 0.1 ; horizontal size OR inner radius(2) - targ%fr2 = 0.1 ; vertical size OR outer radius(2) - targ%xoffset = 0.025 ; target x-offset (cm): +x = beam right - targ%yoffset = 0.0 ; target y-offset (cm): +y = up - targ%zoffset = 0.221 ; target z-offset (cm): +z = downstream - ; zreal = znominal + zoffset -end parm beamandtergetinfo - -;These are offsets applied before the call to the single arm montecarlos. -; Offsets are in spectrometer coordinate system. Positive xptar offset -; means spectrometer is positioned at large xptar (i.e. below target, and -; thus pointing above target and giving a negative shift to particle's xptar) -begin parm spect_offset - spec%e%offset%x = 0.0 ; x offset (cm) - spec%e%offset%y = 0.014 ; y offset (cm) - spec%e%offset%z = 0. ; z offset (cm) - spec%e%offset%xptar = 1.10 ; xptar offset (mr) !x(y)ptar is slope, so - spec%e%offset%yptar = 0. ; yptar offset (mr) !it's really unitless. - spec%p%offset%x = 0.0 ; x offset (cm) - spec%p%offset%y = 0.0 ; y offset (cm) - spec%p%offset%z = 0. ; z offset (cm) - spec%p%offset%xptar = 0. ; xptar offset (mr) - spec%p%offset%yptar = 0. ; yptar offset (mr) -end parm spect_offset - -begin parm simulate - hard_cuts = 0 ; (ONE = TRUE) SPedge and Em.max are hard cuts(ntuple) - using_rad = 1 ; (ONE = TRUE) - use_expon = 0 ; (LEAVE AT 0) - one_tail = 0 ; 0=all, 1=e, 2=e', 3=p, -3=all but p - intcor_mode = 1 ; (LEAVE AT 1) - spect_mode = 0 ; 0=e+p arms, -1=p arm, -2=e arm only, 1=none - cuts%Em%min = 0. ; (Em.min=Em.max=0.0 gives wide open cuts) - cuts%Em%max = 0. ; Must be wider than cuts in analysis(elastic or e,e'p) - using_Eloss = 1 ; (ONE = TRUE) - correct_Eloss = 1 ; ONE = correct reconstructed events for eloss. - correct_raster = 1 ; ONE = Reconstruct events using 'raster' matrix elements. - mc_smear = 1 ; ONE = target & hut mult scatt AND DC smearing. - deForest_flag = 0 ; 0=sigcc1, 1=sigcc2, -1=sigcc1 ONSHELL - rad_flag = 0 ; (radiative option #1...see init.f) - extrad_flag = 2 ; (rad. option #2...see init.f) - lambda(1) = 0.0 ; if rad_flag.eq.4 then lambda(1) = {TF} - lambda(2) = 0.0 ; if rad_flag.eq.4 then lambda(2) = {TF} - lambda(3) = 0.0 ; if rad_flag.eq.4 then lambda(3) = {TF} - Nntu = 1 ; ONE = generate ntuples - using_Coulomb = 1 ; (ONE = TRUE) - dE_edge_test = 0. ; (move around energy edges) - use_offshell_rad = 1 ; (ONE = TRUE) - Egamma_gen_max = 0. ; Set >0 to hardwire the Egamma limits. -end parm simulate diff --git a/infiles/omega_160_33_+1.inp b/infiles/omega_160_33_+1.inp index fa7c529f..8cb12a2f 100644 --- a/infiles/omega_160_33_+1.inp +++ b/infiles/omega_160_33_+1.inp @@ -1,8 +1,8 @@ ; This is a CTP file begin parm experiment - ngen = 500000 ; POS: # of successes; NEG: # of tries -; ngen = 2000 ; POS: # of successes; NEG: # of tries +; ngen = 500000 ; POS: # of successes; NEG: # of tries + ngen = 50000 ; POS: # of successes; NEG: # of tries EXPER%charge = 1.0 ; total charge (mC) doing_phsp = 0 ; (ONE = TRUE) doing_kaon = 0 ; (ONE = TRUE) diff --git a/infiles/omega_245_54_00.inp b/infiles/omega_245_54_00.inp index bce85305..beb58459 100644 --- a/infiles/omega_245_54_00.inp +++ b/infiles/omega_245_54_00.inp @@ -1,8 +1,8 @@ ; This is a CTP file begin parm experiment - ngen = 500000 ; POS: # of successes; NEG: # of tries -; ngen = 500 ; POS: # of successes; NEG: # of tries +; ngen = 500000 ; POS: # of successes; NEG: # of tries + ngen = 10 ; POS: # of successes; NEG: # of tries EXPER%charge = 1.0 ; total charge (mC) doing_phsp = 0 ; (ONE = TRUE) doing_kaon = 0 ; (ONE = TRUE) diff --git a/worksim/.gitignore b/worksim/.gitignore deleted file mode 100644 index d6b7ef32..00000000 --- a/worksim/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore From e8f023dc257deea3a597229ebe944b827be0715a Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Thu, 24 Jun 2021 16:36:51 -0600 Subject: [PATCH 14/15] Update for latest changes in JLab Master --- physics_pion.f | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics_pion.f b/physics_pion.f index a73c68ed..850d197c 100644 --- a/physics_pion.f +++ b/physics_pion.f @@ -37,6 +37,7 @@ real*8 function peepi(vertex,main) integer final_state logical first,low_w_flag + save first data first /.TRUE./ data low_w_flag /.FALSE./ !Assume high W kinematics to start @@ -118,6 +119,7 @@ real*8 function peepi(vertex,main) ntup%sigcm1 = sig_param_3000(thetacm,phicm,main%t/1.e6,vertex%q2/1.e6,s/1.e6,main%epsilon, > targ%Mtar_struck/1000.,which_pion) + write(6,*)' epsilon ',main%epsilon sigma_eepi = ntup%sigcm1 * For low w, use multipole expansion as default cross section model. From 2e936684234a95224252a0b6a7fa4905b4daa3cc Mon Sep 17 00:00:00 2001 From: Garth Huber Date: Thu, 24 Jun 2021 16:38:30 -0600 Subject: [PATCH 15/15] Update for latest changes from JLab Master --- simc.f | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/simc.f b/simc.f index b93b1594..888b3f9f 100644 --- a/simc.f +++ b/simc.f @@ -693,13 +693,13 @@ subroutine report(iun,timestring1,timestring2,central,contrib, endif else if (doing_semi) then if (doing_semipi) then - if (targ%A .eq. 1) then + if (targ%A .eq. 1.) then if(doing_hplus) then write(iun,*) ' ****-------- H(e,e''pi+)X --------****' else write(iun,*) ' ****-------- H(e,e''pi-)X --------****' endif - elseif (targ%A .eq. 2) then + elseif (targ%A .eq. 2.) then if(doing_hplus) then write(iun,*) ' ****-------- D(e,e''pi+)X --------****' else @@ -709,13 +709,13 @@ subroutine report(iun,timestring1,timestring2,central,contrib, stop 'I don''t have ANY idea what A(e,e''pi)X we''re doing!!!' endif else if (doing_semika) then - if (targ%A .eq. 1) then + if (targ%A .eq. 1.) then if(doing_hplus) then write(iun,*) ' ****-------- H(e,e''k+)X --------****' else write(iun,*) ' ****-------- H(e,e''k-)X --------****' endif - elseif (targ%A .eq. 2) then + elseif (targ%A .eq. 2.) then if(doing_hplus) then write(iun,*) ' ****-------- D(e,e''k+)X --------****' else @@ -728,17 +728,17 @@ subroutine report(iun,timestring1,timestring2,central,contrib, stop 'I don''t have ANY idea what A(e,e''x)X we''re doing!!!' endif else if (doing_Xphasespace) then - if (targ%A .eq. 1) then + if (targ%A .eq. 1.) then write(iun,*) ' ****-------- H(e,e''p)X --------****' - else if (targ%A .eq. 2) then + else if (targ%A .eq. 2.) then write(iun,*) ' ****-------- D(e,e''p)X --------****' - else if (targ%A .eq. 3) then + else if (targ%A .eq. 3.) then write(iun,*) ' ****-------- A(e,e''p)X --------****' else stop 'I don''t have ANY idea what (e,e''p)X we''re doing!!!' endif else if (doing_rho) then - if (targ%A .eq. 1) then + if (targ%A .eq. 1.) then write(iun,*) ' ****-------- H(e,e''rho) --------****' else write(iun,*) 'I am not set up for anything else yet!' @@ -814,9 +814,9 @@ subroutine report(iun,timestring1,timestring2,central,contrib, endif else if (doing_pion) then if (doing_hydpi) then - if (targ%A .eq. 1) then + if (targ%A .eq. 1.) then write(iun,*) ' ****-------- H(e,e''pi) --------****' - else if (targ%A .ge.3) then + else if (targ%A .ge.3.) then write(iun,*) ' ****-------- A(e,e''pi) --------****' endif else if (doing_deutpi) then @@ -833,9 +833,9 @@ subroutine report(iun,timestring1,timestring2,central,contrib, endif else if (doing_kaon) then if (doing_hydkaon) then - if (targ%A .eq. 1) then + if (targ%A .eq. 1.) then write(iun,*) ' ****-------- H(e,e''K) --------****' - else if (targ%A .ge.3) then + else if (targ%A .ge.3.) then write(iun,*) ' ****-------- A(e,e''K) --------****' endif else if (doing_deutkaon) then @@ -977,9 +977,9 @@ subroutine report(iun,timestring1,timestring2,central,contrib, > 'doing_deutXphase', doing_deutXphase, 'doing_heXphase', doing_heXphase write(iun,'(5x,(2x,a19,''='',l2),2(2x,a19,''='',i2))') 'mc_smear', > mc_smear,'electron_arm',electron_arm,'hadron_arm',hadron_arm - write(iun,'(5x,3(2x,a19,''='',l2)))') 'using_Eloss', using_Eloss, + write(iun,'(5x,3(2x,a19,''='',l2))') 'using_Eloss', using_Eloss, > 'using_Coulomb',using_Coulomb,'deForest_flag',deForest_flag - write(iun,'(5x,3(2x,a19,''='',l2)))') 'correct_Eloss', correct_Eloss, + write(iun,'(5x,3(2x,a19,''='',l2))') 'correct_Eloss', correct_Eloss, > 'correct_raster',correct_raster, 'doing_decay', doing_decay write(iun,'(5x,3(2x,a19,''='',l2))') > 'using_E_arm_montecarlo', using_E_arm_montecarlo, @@ -1747,9 +1747,11 @@ subroutine montecarlo(orig,main,recon,success) > tmpfact, fry, ok_E_arm, pathlen, electron_arm, use_first_cer) else if (electron_arm.eq.7 .or. electron_arm .eq. 8) then if (abs(spec%p%phi-pi/2) .eq. 10.) then - zhadron = -recon%p%z*(cos(spec%p%theta)/tan(spec%p%theta+recon%p%yptar)+sin(spec%p%theta)) ! recon.p.z is really ytgt + zhadron = -recon%p%z*(cos(spec%p%theta) + > /tan(spec%p%theta+recon%p%yptar)+sin(spec%p%theta)) ! recon.p.z is really ytgt else - zhadron = recon%p%z*(cos(spec%p%theta)/tan(spec%p%theta-recon%p%yptar)+sin(spec%p%theta)) + zhadron = recon%p%z*(cos(spec%p%theta) + > /tan(spec%p%theta-recon%p%yptar)+sin(spec%p%theta)) endif call mc_calo(spec%e%p, spec%e%theta, delta_e_arm, x_e_arm, > y_e_arm, z_e_arm, dx_e_arm, dy_e_arm, xfp, dxfp, yfp, dyfp,