8
c Book histograms in this routine. Use mbook or bookup. The entries
9
c of these routines are real*8
12
include 'reweight0.inc'
13
include 'reweightNLO.inc'
14
character*4 eesc(maxscales,maxscales)
15
character*4 eepdf(0:maxPDFs)
16
common/ceestrings/eesc,eepdf
17
c The following are useful, but not crucial. One has maxset replicas
18
c (corresponding eg to no-cuts, cuts1, cuts2,...) of up to maxplot plots
19
c (corresponding eg to pt1, eta1, pt2, ...), for each PDF and scale choices.
20
c The integers istartscales and istartPDFs are defined below
21
integer maxset,maxplot,istartscales,istartPDFs
22
common/cnumplots/maxset,maxplot,istartscales,istartPDFs
29
data cc/' NLO ',' Born '/
37
istartscales=maxset*maxplot
38
istartPDFs=(1+numscales*numscales)*maxset*maxplot
45
call bookup(kk+1,'total rate'//cc(i)//ddstr,
48
if(.not.doNLOscaleunc)goto 111
53
# maxset*maxplot*((isc-1)*numscales+(jsc-1))
54
call bookup(kk1+1,'total rate'//cc(i)//ddstr,
59
if(.not.doNLOPDFunc)goto 222
62
kk1=kk+istartPDFs+maxset*maxplot*ipdf
63
call bookup(kk1+1,'total rate'//cc(i)//ddstr,
76
logical usexinteg,mint
77
common/cusexinteg/usexinteg,mint
79
common/citmax/itmax,ncall
82
double precision evtsgn
83
common /c_unwgt/evtsgn,unwgt
87
include 'reweight0.inc'
88
include 'reweightNLO.inc'
89
character*4 eesc(maxscales,maxscales)
90
character*4 eepdf(0:maxPDFs)
91
common/ceestrings/eesc,eepdf
93
c The following are defined in initplot
94
integer maxset,maxplot,istartscales,istartPDFs
95
common/cnumplots/maxset,maxplot,istartscales,istartPDFs
101
ytit='sigma per bin '
103
xnorm1=1.d0/float(itmax)
104
xnorm2=1.d0/float(ncall*itmax)
106
if(usexinteg.and..not.mint) then
107
call mopera(i,'+',i,i,xnorm1,0.d0)
109
call mopera(i,'+',i,i,xnorm2,0.d0)
116
call multitop(kk+1,3,2,'total rate',ytit,'LIN')
119
if(.not.doNLOscaleunc)goto 111
122
c within these do loops, repeat what done for default
126
# maxset*maxplot*((isc-1)*numscales+(jsc-1))
127
call multitop(kk1+1,3,2,'total rate',ytit,'LIN')
133
if(.not.doNLOPDFunc)goto 222
135
c within this do loop, repeat what done for default
138
kk1=kk+istartPDFs+maxset*maxplot*ipdf
139
call multitop(kk1+1,3,2,'total rate',ytit,'LIN')
149
subroutine outfun(pp,ybst_til_tolab,www,itype)
151
C *WARNING**WARNING**WARNING**WARNING**WARNING**WARNING**WARNING**WARNING*
153
C In MadFKS, the momenta PP given in input to this function are in the
154
C reduced parton c.m. frame. If need be, boost them to the lab frame.
155
C The rapidity of this boost is
159
C also given in input
161
C This is the rapidity that enters in the arguments of the sinh() and
162
C cosh() of the boost, in such a way that
163
C ylab = ycm - ybst_til_tolab
164
C where ylab is the rapidity in the lab frame and ycm the rapidity
165
C in the center-of-momentum frame.
167
C *WARNING**WARNING**WARNING**WARNING**WARNING**WARNING**WARNING**WARNING*
169
include 'nexternal.inc'
170
real*8 pp(0:3,nexternal),ybst_til_tolab,www
175
include 'reweight.inc'
176
include 'reweightNLO.inc'
177
integer irwgt,isc,jsc,ipdf
178
double precision wgtden,wwwrsc
180
c The following are defined in initplot
181
integer maxset,maxplot,istartscales,istartPDFs
182
common/cnumplots/maxset,maxplot,istartscales,istartPDFs
184
double precision pmass(nexternal)
193
elseif(itype.eq.12)then
196
elseif(itype.eq.20)then
200
write(*,*)'Error in outfun: unknown itype',itype
206
call mfill(kk+1,var,www)
208
if(.not.doNLOscaleunc.or.wgtden.eq.0.d0)goto 111
212
# maxset*maxplot*((isc-1)*numscales+(jsc-1))
213
wwwrsc=www * wgtNLOxsecmu(irwgt,isc,jsc)/wgtden
214
call mfill(kk1+1,var,wwwrsc)
218
if(.not.doNLOPDFunc.or.wgtden.eq.0.d0)goto 222
220
kk1=kk+istartPDFs+maxset*maxplot*ipdf
221
wwwrsc=www * wgtNLOxsecPDF(irwgt,ipdf)/wgtden
222
call mfill(kk1+1,var,wwwrsc)
236
subroutine plotunc_setup()
238
include 'reweight0.inc'
239
include 'reweightNLO.inc'
241
character*4 eesc(maxscales,maxscales)
242
character*4 eepdf(0:maxPDFs)
243
common/ceestrings/eesc,eepdf
245
if(.not.doNLOscaleunc)goto 111
246
c numscales*numscales tags sij
247
if(numscales.gt.9)then
248
write(*,*)'Number of scales too large: wrong sij tags',
255
call fk88strnum(eesc(i,j),i)
256
call fk88strnum(eesc(i,j),j)
260
if(.not.doNLOPDFunc)goto 222
262
if(numPDFs.gt.999)then
263
write(*,*)'Number of PDFs too large: wrong pxyz tags',
275
call fk88strnum(eepdf(i),i)
282
subroutine fk88strnum(string,num)
283
c- writes the number num on the string string starting at the blank
284
c- following the last non-blank character
285
character * (*) string
288
write(tmp,'(i15)')num
290
dowhile(tmp(j:j).eq.' ')
293
ipos = ifk88istrl(string)
296
write(*,*)'error, string too short'
302
string(ipos+1:ito)=tmp(j:)
304
function ifk88istrl(string)
305
c returns the position of the last non-blank character in string
306
character * (*) string
308
dowhile(i.gt.0.and.string(i:i).eq.' ')