~maddevelopers/mg5amcnlo/3.0.2-alpha0

« back to all changes in this revision

Viewing changes to Template/Source/banner.f

Added Template and HELAS into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine create_banner(lunw, swgt, nw)
 
2
      implicit none
 
3
c      include 'nexternal.inc'
 
4
c
 
5
c     parameters
 
6
c
 
7
      integer    MaxParticles
 
8
      parameter (MaxParticles=15)
 
9
c
 
10
c     Arguments
 
11
c
 
12
      integer lunw,  nw
 
13
      double precision swgt(99999)
 
14
c
 
15
c     Local
 
16
c
 
17
      integer ic(7,MaxParticles),next, luni
 
18
      double precision P(0:3,MaxParticles),wgt
 
19
      real*8 sum,mxwgt
 
20
      logical done
 
21
      integer i,imax,j, nevent, nfound
 
22
      character*35 infile,outfile
 
23
      integer iseed
 
24
      data iseed/9999/
 
25
      character*30 process,QED,QCD
 
26
c--cuts
 
27
c      double precision etmin(3:nexternal),etamax(3:nexternal)
 
28
c      double precision                    r2min(3:nexternal,3:nexternal)
 
29
c      double precision s_min(nexternal,nexternal)
 
30
c      common/to_cuts/  etmin     ,etamax     , r2min, s_min
 
31
c
 
32
c     open the Process/input.dat
 
33
c
 
34
      luni = 67
 
35
      infile='Process/input.dat'
 
36
      i=0
 
37
      done=.false.
 
38
      do while (.not. done .and. i .lt. 5)
 
39
c         write(*,*) 'Attempting to open file ',infile
 
40
         open(unit=luni,file=infile,status='old',err=101)
 
41
         done = .true.
 
42
 101     i = i+1
 
43
         infile='../' // infile         
 
44
      enddo
 
45
      if (done) then
 
46
         read(luni,'(a30)') process
 
47
         read(luni,'(a30)') QCD
 
48
         read(luni,'(a30)') QED
 
49
         close(luni)
 
50
      else
 
51
         process = '???? Process'
 
52
         QCD     = '???? QCD'
 
53
         QED     = '???? QED'
 
54
      endif
 
55
 
 
56
c      call get_seed(iseed)
 
57
c
 
58
c     All the info is gathered. Now start writing it out.
 
59
c
 
60
 
 
61
      call write_para(lunw)
 
62
      write(lunw,'(a70)') '##                                                                    '
 
63
      write(lunw,'(a70)') '##===================                                                 '
 
64
      write(lunw,'(a70)') '## Run-time options                                                   '
 
65
      write(lunw,'(a70)') '##===================                                                 '
 
66
      write(lunw,'(a70)') '##                                                                    '
 
67
      write(lunw,'(a70)') '##********************************************************************'     
 
68
      write(lunw,'(a70)') '## Random Number seed                                                *'
 
69
      write(lunw,'(a70)') '##********************************************************************'    
 
70
      write(lunw,'(a3,i8,a)') '## ',iseed,'   = iseed'    
 
71
c      write(lunw,'(a70)') '##********************************************************************'     
 
72
c      write(lunw,'(a70)') '## Standard Cuts                                                     *'
 
73
c      write(lunw,'(a70)') '##********************************************************************'    
 
74
c      write(lunw,'(a13,8i8)')   '## Particle  ',(i,i=3,nexternal)
 
75
c      write(lunw,'(a13,8f8.1)') '## Et       >',(etmin(i),i=3,nexternal)
 
76
c      write(lunw,'(a13,8f8.1)') '## Eta      <',(etamax(i),i=3,nexternal)
 
77
c      do j=3,nexternal-1
 
78
c         write(lunw,'(a,i2,a,8f8.1)') '## d R #',j,'  >',(-0.0,i=3,j),
 
79
c     &        (r2min(i,j),i=j+1,nexternal)
 
80
c         do i=j+1,nexternal
 
81
c            r2min(i,j)=r2min(i,j)**2 !Since r2 returns distance squared
 
82
c         enddo
 
83
c      enddo
 
84
c      do j=1,nexternal-1
 
85
c         write(lunw,'(a,i2,a,8f8.1)') '## s min #',j,'>',
 
86
c     &        (s_min(i,j),i=3,nexternal)
 
87
c      enddo
 
88
c      write(lunw,'(a70)') '##********************************************************************'    
 
89
c
 
90
c     Now write out specific information on the event set
 
91
c
 
92
      done=.false.
 
93
      nevent=0
 
94
      nfound=0
 
95
      sum=0d0
 
96
      mxwgt=-1d0
 
97
      do i=1,nw
 
98
         sum=sum+swgt(i)
 
99
         mxwgt = max(swgt(i),mxwgt)
 
100
      enddo
 
101
      nevent = nw
 
102
      write(lunw,'(a70)') '##                                                                    '
 
103
      write(lunw,'(a70)') '##===================                                                 '
 
104
      write(lunw,'(a70)') '## Event information                                                  '
 
105
      write(lunw,'(a70)') '##===================                                                 '
 
106
      write(lunw,'(a70)') '##                                                                    '
 
107
      write(lunw,'(a70)') '##********************************************************************'    
 
108
      write(lunw,'(a12,a30)') '## Process: ',process                
 
109
      write(lunw,'(a12,a30)') '## Max QCD: ',QCD
 
110
      write(lunw,'(a12,a30)') '## Max QED: ',QED              
 
111
      write(lunw,'(a70)') '##********************************************************************'    
 
112
      write(lunw,'(a30,i10)')   '##  Number of Events       :  ',nevent
 
113
      write(lunw,'(a30,e10.5)') '##  Integrated weight (pb) :  ',sum
 
114
      write(lunw,'(a30,e10.5)') '##  Max wgt                :  ',mxwgt
 
115
      write(lunw,'(a30,e10.5)') '##  Average wgt            :  ',sum/nevent
 
116
      write(lunw,'(a70)') '##********************************************************************'    
 
117
 
 
118
c      close(lunw)
 
119
 
 
120
      end