(file) Return to gukine.f CVS log (file) (dir) Up to [HallC] / geant_gep / src

Diff for /geant_gep/src/gukine.f between version 1.10 and 1.16

version 1.10, 2006/01/18 15:50:44 version 1.16, 2006/02/05 20:32:28
Line 25 
Line 25 
       integer i,j,k,ichoice,ichoice2,iremain       integer i,j,k,ichoice,ichoice2,iremain
       real*8 rotmat,xyz(3),xyznew(3),termang       real*8 rotmat,xyz(3),xyznew(3),termang
       integer ic,ii,jj       integer ic,ii,jj
       integer*4 junk1,ikinsetting        integer*4 junk1,ikinsetting,isectrack
       real*8 xfp,yfp,tthfp,tphfp,pfp,junk2,junk3,thfp,phfp       real*8 xfp,yfp,tthfp,tphfp,pfp,junk2,junk3,thfp,phfp
       real*8 e0(10),eang(10),hang(10),targ_thick(10)       real*8 e0(10),eang(10),hang(10),targ_thick(10)
       real*8 xtgt,ytgt,thtgt,phtgt,ptgt,dptgt       real*8 xtgt,ytgt,thtgt,phtgt,ptgt,dptgt
       real yf,ff,thetaf,dptgt2        real yf,ff,thetaf
       character*80 junkline       character*80 junkline
 c c
 c The following variables are the SIMC variables c The following variables are the SIMC variables
Line 57 
Line 57 
 c      include 'option.h' c      include 'option.h'
 c c
       common/kincom/rotmat(3,3)       common/kincom/rotmat(3,3)
   c
         nhu1=0
         nhx1=0
         nhv1=0
         nhu2=0
         nhx2=0
         nhv2=0
         nhu3=0
         nhx3=0
         nhv3=0
         nhu4=0
         nhx4=0
         nhv4=0
         theta_front=999.0
         theta_rear=999.0
   c
       call grndm ( rndm , 3 )       call grndm ( rndm , 3 )
 c c
  111  format(a80)  111  format(a80)
Line 69 
Line 85 
 c         write(*,*)'Getting kinematics setting ...' c         write(*,*)'Getting kinematics setting ...'
          open(unit=1,file='geant_kinematics.dat',type='UNKNOWN')          open(unit=1,file='geant_kinematics.dat',type='UNKNOWN')
          read(1,*)ikinsetting          read(1,*)ikinsetting
            read(1,*)isectrack
          close(unit=1)          close(unit=1)
            if(isectrack.eq.1) then
                   sectrack=.true.
            else
                   sectrack=.false.
            endif
          open(unit=1,file='hdr_gep.dat',status='old')          open(unit=1,file='hdr_gep.dat',status='old')
          do i=1,10          do i=1,10
             read(1,*)e0(i),eang(i),hang(i),targ_thick(i)             read(1,*)e0(i),eang(i),hang(i),targ_thick(i)
Line 92 
Line 114 
      $        thtgt,phtgt,ptgt,dptgt)      $        thtgt,phtgt,ptgt,dptgt)
  
 c c
       p_spec=ptgt  c At this point, after using polynomials from Lerose, we should
   c have x,y,theta,phi, and dpmom at the focal plane.
 c c
   c      write(*,*)'Back from kincalc ...'
   c      write(*,*)xtgt,ytgt,thtgt,phtgt,dptgt
   c      x(1)=tan(phtgt)
   c      x(2)=ytgt
   c      x(3)=tan(thtgt)
   c      x(4)=dptgt
         y_target=ytgt*100.0
   c
   c Here is where we call the SIMC routines to calculate the focal plane
   c quantities from the target quantities.
   c
   c      xfp=xfinal(x,4)*100.0
   c      phfp=atan(thetaf(x,4))/3.14159265*180.0
   c      yfp=yf(x,4)*100.0
   c      thfp=atan(ff(x,4))/3.14159265*180.0
         p_spec=ptgt
         th_spec=hrsh_ang
         dpp=dptgt*100.00
         x=xtgt
         y=ytgt
         z=0.0
         dxdz=tan(phtgt*3.14159265/180.0)
         dydz=tan(thtgt*3.14159265/180.0)
       if(nevent.le.2)write(*,*)'******** mom = ',p_spec,' ******'       if(nevent.le.2)write(*,*)'******** mom = ',p_spec,' ******'
   c      write(*,*)x,y,z
   c      write(*,*)dxdz,dydz
 c c
       call grndm(rndm,3)  c Call to SIMC routine
       dptgt2=rndm(1)*0.200-0.100  
       xfp=rndm(2)*80.00-40.00  
       phfp=rndm(3)*5.0-2.5  
 c  
       call grndm(rndm,3)  
       yfp=rndm(1)*60.00-30.00  
       thfp=rndm(2)*5.0-2.5  
 c c
         decay_flag=.false.
         wcs_flag=.false.
         ms_flag=.false.
         m2=(938.2796**2)
         call mc_hms (p_spec, th_spec, dpp, x, y, z, dxdz, dydz,
        >          x_fp, dx_fp, y_fp, dy_fp, m2,
        >          ms_flag, wcs_flag, decay_flag, resmult, fry,
        > ok_spec, pathlen)
   c      write(*,*)'Momentum = ',p_spec,' Angle = ',th_spec
   c      write(*,*)x,y,z
   c      write(*,*)dxdz,dydz
   c      write(6,*)x_fp,dx_fp,y_fp,dy_fp,ok_spec
   c      write(*,*)m2,ms_flag,wcs_flag,decay_flag
   c      write(*,*)resmult,fry,ok_spec,pathlen
   
         xfp=x_fp
         phfp=atan(dx_fp)/3.14159265*180.0
         yfp=y_fp*100.0
         thfp=atan(dy_fp)/3.14159265*180.0*100.0
 c      write(6,*)'x,phi,y,theta,ok_spec =' c      write(6,*)'x,phi,y,theta,ok_spec ='
 c      write(6,*)xfp,phfp,yfp,thfp,ok_spec c      write(6,*)xfp,phfp,yfp,thfp,ok_spec
 c c
Line 117 
Line 177 
       ntuple_array(14)=real(phfp)       ntuple_array(14)=real(phfp)
 c c
       pcentral=ptgt       pcentral=ptgt
       pfp=dptgt2        pfp=dptgt
   c
   c
   c       write(*,*)'Focal plane quantities ...'
   c       write(*,*)xfp,yfp,thfp,phfp,pcentral,pfp
   
   c      xfp=xtgt      ! in cm
   c      yfp=ytgt      ! in cm
   c      thfp=thtgt/3.14159265*180.0   ! in degrees
   c      phfp=phtgt/3.14159265*180.0   ! in degrees
   c      pcentral=ptgt ! in MeV/c
   c      pfp=dptgt     ! fraction of central momentum
 c c
 c Finally, we convert this information over to a format that GEANT likes. c Finally, we convert this information over to a format that GEANT likes.
 c c


Legend:
Removed from v.1.10  
changed lines
  Added in v.1.16

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0