~useakat/cfmc/gg_4g_cfmc

« back to all changes in this revision

Viewing changes to mylib/set_pdf.f

  • Committer: useakat at gmail
  • Date: 2012-10-01 07:45:50 UTC
  • mfrom: (4.1.13 gg_3g_cfmc_dev)
  • Revision ID: useakat@gmail.com-20121001074550-zs09eu30khm4yvyx
independent ver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine set_pdf(lpp,pdg,x,Q, pdf)
 
2
C     ****************************************************
 
3
C     The subroutine for setting PDFs
 
4
C
 
5
C     Input:
 
6
C           lpp(2): beam types; 0: NO PDF, 1: proton, -1: anti-proton       
 
7
C           pdg(2): PDG code of initial partons
 
8
C           x(2): longitudinal momentum fractions of initial partons
 
9
C           Q(2): factorization scales
 
10
C
 
11
C     Output:
 
12
C            pdf(2): PDF of initial partons
 
13
C
 
14
C     By Yoshitaro Takaesu @KEK Dec.19 2011
 
15
C     ****************************************************
 
16
      implicitnone
 
17
C     
 
18
C     ARGUMENTS 
 
19
C     
 
20
      integer lpp(2),pdg(2)
 
21
      real*8 pdf(2),x(2),Q(2)
 
22
C     
 
23
C     LOCAL VARIABLES 
 
24
C     
 
25
      integer lp
 
26
      real*8 xpq(-7:7)
 
27
C     ----------
 
28
C     BEGIN CODE
 
29
C     ----------
 
30
      call pftopdg(abs(lpp(1)),x(1),Q(1),xpq)
 
31
      lp = sign(1,lpp(1))
 
32
      pdf(1) = xpq(pdg(1)*lp)
 
33
      call pftopdg(abs(lpp(2)),x(2),Q(2),xpq)
 
34
      lp = sign(1,lpp(2))
 
35
      pdf(2) = xpq(pdg(2)*lp)
 
36
 
 
37
      end