~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to vendor/StdHEP/example/readPythiaLH.F

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      program readPythiaLH
 
2
C
 
3
C      read in events and histogram contents
 
4
C
 
5
#include "stdlun.inc"
 
6
#include "stdcm1.inc"
 
7
 
 
8
      integer lok,ifl,istr,ntries,i
 
9
      character*20 filrd
 
10
 
 
11
      data filrd/'pythiaLHExample.io'/
 
12
 
 
13
C initialize HEP logical units
 
14
      lnhwrt=0
 
15
      lnhrd=23
 
16
      lnhdcy=0
 
17
      lnhout=22
 
18
      lnhpdf=0
 
19
      lnhdmp=0
 
20
      open(unit=lnhout,file='readPythiaLH.lpt',status='new')
 
21
      call pythiabkem
 
22
C...initialize MCFio once only
 
23
      call mcfio_init()
 
24
C...now open and read events
 
25
      call stdxropen(filrd,ntries,istr,lok)
 
26
      if(lok.ne.0) write(lnhout,1001) filrd
 
27
      if(lok.ne.0) go to 200
 
28
      write(lnhout,1002) filrd
 
29
      lok = 0
 
30
      do while( lok .eq. 0 ) 
 
31
          call stdxrd(ifl,istr,lok)
 
32
          if(lok.eq.0)then
 
33
C... keep looping if this is not a STDHEP record
 
34
              if(ifl.eq.4) call pythiaflem
 
35
              if(ifl.eq.100) 
 
36
     1             write(lnhout,1003) filrd, generatorname, pdfname
 
37
          endif
 
38
      enddo
 
39
      call stdxend(istr)
 
40
 200  continue
 
41
C...print histograms
 
42
      call houtpu(lnhout)
 
43
      call histdo
 
44
1001  format(' could not open file ',a20)
 
45
1002  format(' file ',a20,' has been opened')
 
46
1003  format(/' file ',a20,' was generated by ',a20,' with ',a20)
 
47
      end
 
48