~maddevelopers/mg5amcnlo/2.7.1.3

« back to all changes in this revision

Viewing changes to Template/NLO/Source/PDF/pdg2pdf_lhapdf.f

  • Committer: olivier Mattelaer
  • Date: 2016-05-12 11:00:18 UTC
  • mfrom: (262.1.150 2.3.4)
  • Revision ID: olivier.mattelaer@uclouvain.be-20160512110018-sevb79f0wm4g8mpp
pass to 2.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
      include 'pdf.inc'
36
36
C      
37
37
      integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem
38
 
     &     ,i_replace,ii
 
38
     &     ,i_replace,ii,isetlast(20)
39
39
      double precision xlast(20),xmulast(20),pdflast(-7:7,20)
40
40
      save ihlast,xlast,xmulast,pdflast,imemlast
41
41
      data ihlast/20*-99/
43
43
      data xmulast/20*-99d9/
44
44
      data pdflast/300*-99d9/
45
45
      data imemlast/20*-99/
 
46
      data isetlast/20*-99/
46
47
      data i_replace/20/
47
48
 
48
49
      if (ih.eq.0) then
59
60
         return
60
61
      elseif (x.lt.0d0 .or. x.gt.1d0) then
61
62
         write (*,*) 'PDF not supported for Bjorken x ', x
62
 
         open(unit=26,file='../../../error',status='unknown')
63
 
         write(26,*) 'Error: PDF not supported for Bjorken x ',x
64
63
         stop 1
65
64
      endif
66
65
 
74
73
         write(*,*) 'PDF not supported for pdg ',ipdg
75
74
         write(*,*) 'For lepton colliders, please set the lpp* '//
76
75
     $    'variables to 0 in the run_card'  
77
 
         open(unit=26,file='../../../error',status='unknown')
78
 
         write(26,*) 'Error: PDF not supported for pdg ',ipdg
79
76
         stop 1
80
77
      endif
81
78
 
82
79
c     Determine the iset used in lhapdf
83
80
      call getnset(iset)
84
 
      if (iset.ne.1) then
85
 
         write (*,*) 'PDF not supported for Bjorken x ', x
86
 
         open(unit=26,file='../../../error',status='unknown')
87
 
         write(26,*) 'Error: PDF not supported for Bjorken x ',x
88
 
         stop 1
89
 
      endif
90
81
 
91
82
c     Determine the member of the set (function of lhapdf)
92
83
      call getnmem(iset,imem)
100
91
            if (x.eq.xlast(ii)) then
101
92
               if (xmu.eq.xmulast(ii)) then
102
93
                  if (imem.eq.imemlast(ii)) then
103
 
                     ireuse = ii
104
 
                     exit
 
94
                     if (iset.eq.isetlast(ii)) then
 
95
                        ireuse = ii
 
96
                        exit
 
97
                     endif
105
98
                  endif
106
99
               endif
107
100
            endif
128
121
      xmulast(i_replace)=xmu
129
122
      ihlast(i_replace)=ih
130
123
      imemlast(i_replace)=imem
 
124
      isetlast(i_replace)=iset
131
125
c
132
126
      pdg2pdf=pdflast(ipart,i_replace)
133
127
      return