1
subroutine read_event(lun,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed,done)
2
c********************************************************************
3
c Reads one event from data file #lun
4
c ic(*,1) = Particle ID
9
c ic(*,6) = ISTUP -1=initial state +1=final +2=decayed
11
c********************************************************************
17
parameter (MaxParticles=15)
19
parameter (pi = 3.1415926d0)
24
integer nexternal, ic(7,MaxParticles)
26
double precision P(0:3,MaxParticles),wgt,aqcd,aqed,scale
38
c logical fixed_ren_scale,fixed_fac_scale
39
c common/to_scale/scale,fixed_ren_scale,fixed_fac_scale
43
common/to_banner/banner_open, lun_ban
46
data banner_open/.false./
51
if (.not. banner_open) then
52
open (unit=lun_ban, status='scratch')
55
11 read(lun,'(a132)',end=99,err=99) buff
56
do while(index(buff,"#") .ne. 0)
57
write(lun_ban,'(a)') buff
58
read(lun,'(a132)',end=99,err=99) buff
60
read(buff,*,err=11, end=11) nexternal,k,wgt,scale,aqed,aqcd
62
read(lun,*,err=99,end=99) (ic(j,i),i=1,nexternal)!This is info
65
read(lun,55,err=99,end=99) k,(p(i,j),i=0,3)
67
c gal(1) = sqrt(4d0*pi*aqed)
68
c g = sqrt(4d0*pi*aqcd)
75
subroutine write_event(lun,P,wgt,nexternal,ic,ievent,scale,aqcd,aqed)
76
c********************************************************************
77
c Writes one event from data file #lun according to LesHouches
78
c ic(*,1) = Particle ID
83
c ic(*,6) = ISTUP -1=initial state +1=final +2=decayed
85
c********************************************************************
91
parameter (MaxParticles=15)
93
parameter (pi = 3.1415926d0)
98
integer nexternal, ic(7,MaxParticles)
99
double precision P(0:3,MaxParticles),wgt
100
double precision aqcd, aqed, scale
112
c aqed= gal(1)*gal(1)/4d0/pi
114
write(lun,'(2i8,4e15.7)') nexternal,ievent,wgt,scale,aqed,aqcd
116
write(lun,51) (ic(j,i),i=1,nexternal) !This is info
119
write(lun,55) j,(p(i,j),i=0,3)
123
55 format(i3,4e19.11)
126
subroutine write_comments(lun)
127
c********************************************************************
128
c Outputs all of the banner comment lines back at the top of
130
c********************************************************************
145
common/to_banner/banner_open, lun_ban
150
c write(*,*) 'Writing comments'
151
if (banner_open) then
154
read(lun_ban,'(a79)',end=99,err=99) buff
155
write(lun,'(a79)') buff
159
banner_open = .false.