All pastes #1186723 Raw Edit

Mantoine

public text v1 · immutable
#1186723 ·published 2008-08-27 20:21 UTC
rendered paste body
Subroutine PhotonIntegration(x,Table,IntEPU,iGmax,PhIn)
      
      implicit none
      Real*8 x,Table(100,2.D3),PhIn,m,p,y
      Integer ll,ix,TGamma,iGmax,IntEPU,TGammaOld    
      ix=INT(x/500.)
      TGammaOld=1.D30

      do 81 ll=1,iGMax
         
         TGamma=INT(ll*500.)

         if (x.eq.1.0*TGamma) then
            y=Table(IntEPu,ix)
            write(*,*)'EQ PhontonInt=',y,
     &           ' Gamma=',x,' TGamma=',TGamma
            goto 6000
         endif

         if (x.lt.1.D0*TGamma.and.x.gt.TGammaOld) then
            m=(Table(IntEPU,ll)-Table(IntEPU,ll-1))
     &           /500.
            p=Table(IntEPU,ll)-(m*1.D0*TGamma)
            y=(m*x)+p
c     write(*,*)'LR PhotonInt=',y,
c     &           ' Gamma=',x,' TGamma=',TGamma
            goto 6000
         endif

         TGammaOld=1.D0*TGamma

 81   enddo
 6000 PhIn=y
c      write(*,*)'PhotonInt=',y
      end