~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

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

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine pdfwrap
 
2
      implicit none
 
3
C
 
4
C     INCLUDE
 
5
C
 
6
      include 'pdf.inc'
 
7
      include '../alfas.inc'
 
8
      real*8 zmass
 
9
      data zmass/91.188d0/
 
10
      Character*150 LHAPath
 
11
      character*20 parm(20)
 
12
      double precision value(20)
 
13
      real*8 alphasPDF
 
14
      external alphasPDF
 
15
 
 
16
 
 
17
c-------------------
 
18
c     START THE CODE
 
19
c-------------------      
 
20
 
 
21
c     initialize the pdf set
 
22
      call FindPDFPath(LHAPath)
 
23
      CALL SetPDFPath(LHAPath)
 
24
      value(1)=lhaid
 
25
      parm(1)='DEFAULT'
 
26
      call pdfset(parm,value)
 
27
      call GetOrderAs(nloop)
 
28
      nloop=nloop+1  
 
29
      asmz=alphasPDF(zmass)
 
30
      
 
31
      return
 
32
      end
 
33
 
 
34
 
 
35
      subroutine FindPDFPath(LHAPath)
 
36
c********************************************************************
 
37
c generic subroutine to open the table files in the right directories
 
38
c********************************************************************
 
39
      implicit none
 
40
c
 
41
      Character LHAPath*150,up*3
 
42
      data up/'../'/
 
43
      logical exists
 
44
      integer i
 
45
 
 
46
c     first try in the current directory
 
47
      LHAPath='./PDFsets'
 
48
      Inquire(File=LHAPath, exist=exists)
 
49
      if(exists)return
 
50
      do i=1,6
 
51
         LHAPath=up//LHAPath
 
52
         Inquire(File=LHAPath, exist=exists)
 
53
         if(exists)return
 
54
      enddo
 
55
      LHAPath='lib/PDFsets'
 
56
      Inquire(File=LHAPath, exist=exists)
 
57
      if(exists)return
 
58
      do i=1,6
 
59
         LHAPath=up//LHAPath
 
60
         Inquire(File=LHAPath, exist=exists)
 
61
         if(exists)return
 
62
      enddo
 
63
      print*,'Could not find PDFsets directory, quitting'
 
64
      stop
 
65
      
 
66
      return
 
67
      end
 
68