]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA6/POWHEG-BOX/lhefread.f
add armenteros calculations and plots
[u/mrichter/AliRoot.git] / PYTHIA6 / POWHEG-BOX / lhefread.f
CommitLineData
64da86aa 1c...lhefheader(nlf)
2c...reads initialization information from a les houches events file on unit nlf.
3 subroutine lhefreadhdr(nlf)
4 implicit none
5 integer nlf
6 character * 100 string
7 integer ipr
8 include 'LesHouches.h'
9 1 read(nlf,fmt='(a)',err=998,end=998) string
10 if(string(1:5).eq.'<init') then
11 read(nlf,*) idbmup(1),idbmup(2),ebmup(1),ebmup(2),
12 & pdfgup(1),pdfgup(2),pdfsup(1),pdfsup(2),idwtup,nprup
13 do ipr=1,nprup
14 read(nlf,*) xsecup(ipr),xerrup(ipr),xmaxup(ipr),
15 & lprup(ipr)
16 enddo
17 goto 999
18 else
19 goto 1
20 endif
21 998 write(*,*) 'lhefreadhdr: could not find <init> data'
22 call exit(1)
23 999 end
24
25
26c...reads event information from a les houches events file on unit nlf.
27 subroutine lhefreadev(nlf)
28 implicit none
29 integer nlf
30 character * 100 string
31 include 'LesHouches.h'
32 integer i,j
33 1 continue
34 string=' '
35 read(nlf,fmt='(a)',err=777,end=666) string
36 if(string.eq.'</LesHouchesEvents>') then
37 goto 998
38 endif
39 if(string(1:6).eq.'<event') then
40c on error try next event. The error may be cause by merging
41c truncated event files. On EOF return with no event found
42 read(nlf,*,end=998,err=1)nup,idprup,xwgtup,scalup,aqedup,aqcdup
43 do i=1,nup
44 read(nlf,*,end=998,err=1) idup(i),istup(i),mothup(1,i),
45 & mothup(2,i),icolup(1,i),icolup(2,i),(pup(j,i),j=1,5),
46 & vtimup(i),spinup(i)
47 enddo
48 goto 999
49 else
50 goto 1
51 endif
52c no event found:
53 777 continue
54 print *,"Error in reading"
55 print *,string
56 stop
57 666 continue
58 print *,"reached EOF"
59 print *,string
60 stop
61 998 continue
62 print *,"read </LesHouchesEvents>"
63 nup=0
64 999 end