2 subroutine weightPDF(x)
4 integer nset,imem,nfmax
7 call weightPDFM(nset,x)
12 call GetNFM(nset,nfmax)
15 entry GetThreshold(imem,Q)
17 call GetThresholdM(nset,imem,Q)
22 subroutine parmPDF(nset,x,pdf)
24 include 'parmsetup.inc'
26 character*16 name(nmxset)
27 integer nmem(nmxset),ndef(nmxset),mem
28 common/NAME/name,nmem,ndef,mem
29 real*4 xp(40),x4,fgdis4
31 integer i,j,imem,nop,parmN,Nfunc(nmxset),Fw(nmxset),nfmax,M
32 real*8 x,N,b0,Poly,pdf(-6:6),Fparm(nopmax),F(nofmax)
33 real*8 Ccoef(nmxset,-6:6,nofmax),Fpow(nmxset,nofmax)
34 real*8 Q,Treshold(nmxset,-6:6)
35 c data Treshold/39*0d0/
36 integer Fmap(nmxset,nofmax,npfmax)
37 integer Ftype(nmxset,nofmax),Fn(nmxset,nofmax),Ctype(nmxset,-6:6)
39 common/lhasilent/lhasilent
42 save Nfunc,Fn,Fw,Fpow,Fmap,Ccoef,Fparm,Ftype,Ctype,first,Treshold
45 if (Ftype(nset,i).eq.1) then
49 Poly=Poly+Fparm(Fmap(nset,i,j))*x**(float(j-3)/Fpow(nset,i))
51 Poly=Fparm(Fmap(nset,i,1))*Poly
52 F(i)=x**Fparm(Fmap(nset,i,2))*(1.0-x)**Fparm(Fmap(nset,i,3))*Poly
54 if (Ftype(nset,i).eq.2) then
55 if (x.lt.0.9999999) then
56 Poly=Fparm(Fmap(nset,i,2))*log(x)+Fparm(Fmap(nset,i,3))*log(1.0-x)
57 . +Fparm(Fmap(nset,i,4))*x
58 . +Fparm(Fmap(nset,i,6))*log(1.0+x*exp(Fparm(Fmap(nset,i,5))))
59 F(i)=Fparm(Fmap(nset,i,1))*exp(Poly)
64 if (Ftype(nset,i).eq.101) then
65 Poly=exp(Fparm(Fmap(nset,i,1)))*x**(Fparm(Fmap(nset,i,2))-1)
66 . *(1d0-x)**Fparm(Fmap(nset,i,3))
68 . Poly+(1d0+Fparm(Fmap(nset,i,4))*x)*(1d0-x)**Fparm(Fmap(nset,i,5))
72 elseif (Poly.lt.-b0) then
75 F(i)=Poly+log(1d0+exp(-b0*Poly)-exp(-b0))/b0
78 c - to add the mrst2004 gluon convolution
79 if (Ftype(nset,i).eq.201) then
80 xp(2) = Fparm(Fmap(nset,i,1))
81 xp(3) = Fparm(Fmap(nset,i,2))
82 xp(23)= Fparm(Fmap(nset,i,3))
83 xp(16)= Fparm(Fmap(nset,i,4))
84 xp(5) = Fparm(Fmap(nset,i,5))
85 xp(40)= Fparm(Fmap(nset,i,6))
86 xp(24)= Fparm(Fmap(nset,i,7))
87 xp(20)= Fparm(Fmap(nset,i,8))
88 xp(4) = Fparm(Fmap(nset,i,9))
89 xp(1) = Fparm(Fmap(nset,i,10))
91 call gconv(x4,xp,fgdis4)
98 if (Ctype(nset,i).gt.0) then
99 if (Ctype(nset,i).eq.1) then
101 pdf(i)=pdf(i)+Ccoef(nset,i,j)*F(j)
102 c print *,i,j,Ccoef(i,j),F(j)
105 if (Ctype(nset,i).eq.101) then
107 pdf(i)=F(int(Ccoef(nset,i,1)))/(F(int(Ccoef(nset,i,2)))+1d0)
111 .F(int(Ccoef(nset,i,1)))/(1d0/F(int(Ccoef(nset,i,2)))+1d0)
125 entry weightPDFM(nset,x)
126 if (Fw(nset).ge.0) then
134 c entry GetParmPDFM(nset,imem,x)
135 entry GetParmPDF(nset,imem,x)
139 entry GetNfM(nset,nfmax)
142 if (Treshold(nset,-i).ge.0d0) nfmax=nfmax+1
143 if (Treshold(nset,i).ge.0d0) nfmax=nfmax+1
148 entry GetThresholdM(nset,imem,Q)
149 Q=Treshold(nset,imem)
152 c entry InitEvolvePDFM(nset,imem)
153 entry InitEvolvePDF(nset,imem)
154 c print*, 'calling listPDF',nset,imem
155 call listPDF(nset,imem,Fparm)
159 c entry initInputPDFM(nset)
160 entry initInputPDF(nset)
170 read(1,*) s1,Fw(nset),Nfunc(nset)
171 c print *,s1,Fw,Nfunc
172 if(lhasilent.eq.0) then
173 write(*,*) 'Parametrization: ',s1
179 if (index(s2,'x-taylor').eq.1) then
181 read(1,*) FPow(nset,i),Fn(nset,i)
182 read(1,*) (Fmap(nset,i,j),j=1,Fn(nset,i))
184 if (index(s2,'log-pade').eq.1) then
188 read(1,*) (Fmap(nset,i,j),j=1,Fn(nset,i))
190 if (index(s2,'cteq6-ratio').eq.1) then
194 read(1,*) (Fmap(nset,i,j),j=1,Fn(nset,i))
196 if (index(s2,'convol').eq.1) then
199 read(1,*) (Fmap(nset,i,j),j=1,Fn(nset,i))
201 if (Ftype(nset,i).lt.0) then
202 write(*,*) 'File description error:'
203 write(*,*) 'Unknown functional ',s2
212 if (index(s2,'none').eq.1) then
214 Treshold(nset,i)=-1d0
216 if (index(s2,'treshold').eq.1) then
218 read(1,*) Treshold(nset,i)
220 if (index(s2,'composite').eq.1) then
223 read(1,*) (Ccoef(nset,i,j),j=1,Nfunc(nset))
225 if (index(s2,'cteq6-ratio').eq.1) then
228 read(1,*) (Ccoef(nset,i,j),j=1,3)
230 if (Ctype(nset,i).lt.0) then
231 write(*,*) 'File description error:'
232 write(*,*) 'Unknown composit type ',s2
236 if (Fw(nset).ge.0) then
237 write(*,*) '***********************************************'
238 write(*,*) '* Note that this is a weigthed PDF set. *'
239 write(*,*) '* See manual for proper use. *'
240 write(*,*) '***********************************************'
246 FUNCTION BETA_LHA(X1,X2)
247 CALL GAMMA_LHA(X1,G1,IER)
248 IF(IER.NE.0) write(16,*) 'GAMMA_LHA ERROR: IER= ',IER,X1,X2
249 CALL GAMMA_LHA(X2,G2,IER)
250 IF(IER.NE.0) write(16,*) 'GAMMA_LHA ERROR: IER= ',IER,X1,X2
252 CALL GAMMA_LHA(X3,G3,IER)
253 IF(IER.NE.0) write(16,*) 'GAMMA_LHA ERROR: IER= ',IER,X1,X2
258 SUBROUTINE GAMMA_LHA(XX,GX,IER)
268 10 IF(X-2.0)110,110,15
272 50 IF(X-1.0)60,120,110
273 C SEE IF X IS NEAR NEGATIVE INTEGER OR ZERO
277 IF(ABS(Y)-ERR)130,130,64
278 64 IF(1.0-Y-ERR)130,130,70
279 C X NOT NEAR A NEGATIVE INTEGER OR ZERO
280 70 IF(X-1.0)80,80,110
285 GY=1.0+Y*(-0.5771017+Y*(+0.9858540+Y*(-0.8764218+Y*(+0.8328212+
286 1Y*(-0.5684729+Y*(+0.2548205+Y*(-0.05149930)))))))
294 COMMON/AINPUT/IORD,QSCT,QSDT
295 COMMON/PARAM/PARA(40)
307 if(qs.lt.0.5d0) then !! running stops below 0.5
313 IF(QS.gt.QSCTT) GO TO 12
314 IF(QS.lt.QSDTT) GO TO 312
318 c IF(IORD)2,2,2 !TAKE CARE !!
326 AS=X1/T*(1.-X2*aLOG(T)/T)
328 F=-T+X1/AS-X2*aLOG(X1/AS+X2)
329 FP=-X1/AS**2*(1.-X2/(X1/AS+X2))
352 ALFINV=1./ALFQS5+1./ALFQC4-1./ALFQC5
359 c IF(IORD)32,32,32 !TAKE CARE !!
367 AS=X1/T*(1.-X2*aLOG(T)/T)
369 F=-T+X1/AS-X2*aLOG(X1/AS+X2)
370 FP=-X1/AS**2*(1.-X2/(X1/AS+X2))
377 GO TO (313,314,315) ITH
393 ALFINV=1./ALFQS3+1./ALFQC4-1./ALFQC3
399 C*******************************************************************
401 C***** THE X(I) AND W(I) ARE THE DIRECT OUTPUT FROM A PROGRAM *****
402 C***** USING NAG ROUTINE D01BCF TO CALCULATE THE *****
403 C***** GAUSS-LEGENDRE WEIGHTS FOR 96 POINT INTEGRATION. *****
404 C***** THEY AGREE TO TYPICALLY 14 DECIMAL PLACES WITH THE *****
405 C***** TABLE IN ABRAMOWITZ & STEGUN, PAGE 919. *****
407 C***** ----> PETER HARRIMAN, APRIL 3RD 1990. *****
409 C*******************************************************************
410 DIMENSION X(48),W(48)
411 COMMON/GAUS96/XI(96),WI(96),nterms,XX(97)
414 X( 1)= 0.01627674484960183561
415 X( 2)= 0.04881298513604856015
416 X( 3)= 0.08129749546442434360
417 X( 4)= 0.11369585011066471632
418 X( 5)= 0.14597371465489567682
419 X( 6)= 0.17809688236761733390
420 X( 7)= 0.21003131046056591064
421 X( 8)= 0.24174315616383866556
422 X( 9)= 0.27319881259104774468
423 X(10)= 0.30436494435449495954
424 X(11)= 0.33520852289262397655
425 X(12)= 0.36569686147231213885
426 X(13)= 0.39579764982890709712
427 X(14)= 0.42547898840729897474
428 X(15)= 0.45470942216774136446
429 X(16)= 0.48345797392059470382
430 X(17)= 0.51169417715466604391
431 X(18)= 0.53938810832435567233
432 X(19)= 0.56651041856139533470
433 X(20)= 0.59303236477757022282
434 X(21)= 0.61892584012546672523
435 X(22)= 0.64416340378496526886
436 X(23)= 0.66871831004391424358
437 X(24)= 0.69256453664216964528
438 X(25)= 0.71567681234896561582
439 X(26)= 0.73803064374439816819
440 X(27)= 0.75960234117664555964
441 X(28)= 0.78036904386743123629
442 X(29)= 0.80030874413913884180
443 X(30)= 0.81940031073792957139
444 X(31)= 0.83762351122818502758
445 X(32)= 0.85495903343459936363
446 X(33)= 0.87138850590929436968
447 X(34)= 0.88689451740241818933
448 X(35)= 0.90146063531585023110
449 X(36)= 0.91507142312089592706
450 X(37)= 0.92771245672230655266
451 X(38)= 0.93937033975275308073
452 X(39)= 0.95003271778443564022
453 X(40)= 0.95968829144874048809
454 X(41)= 0.96832682846326217918
455 X(42)= 0.97593917458513455843
456 X(43)= 0.98251726356301274934
457 X(44)= 0.98805412632962202890
458 X(45)= 0.99254390032376081654
459 X(46)= 0.99598184298720747465
460 X(47)= 0.99836437586317963722
461 X(48)= 0.99968950388322870559
462 W( 1)= 0.03255061449236316962
463 W( 2)= 0.03251611871386883307
464 W( 3)= 0.03244716371406427668
465 W( 4)= 0.03234382256857594104
466 W( 5)= 0.03220620479403026124
467 W( 6)= 0.03203445623199267876
468 W( 7)= 0.03182875889441101874
469 W( 8)= 0.03158933077072719007
470 W( 9)= 0.03131642559686137819
471 W(10)= 0.03101033258631386231
472 W(11)= 0.03067137612366917839
473 W(12)= 0.03029991542082762553
474 W(13)= 0.02989634413632842385
475 W(14)= 0.02946108995816795100
476 W(15)= 0.02899461415055528410
477 W(16)= 0.02849741106508543861
478 W(17)= 0.02797000761684838950
479 W(18)= 0.02741296272602931385
480 W(19)= 0.02682686672559184485
481 W(20)= 0.02621234073567250055
482 W(21)= 0.02557003600534944960
483 W(22)= 0.02490063322248370695
484 W(23)= 0.02420484179236479915
485 W(24)= 0.02348339908592633665
486 W(25)= 0.02273706965832950717
487 W(26)= 0.02196664443874448477
488 W(27)= 0.02117293989219144572
489 W(28)= 0.02035679715433347898
490 W(29)= 0.01951908114014518992
491 W(30)= 0.01866067962741165898
492 W(31)= 0.01778250231604547316
493 W(32)= 0.01688547986424539715
494 W(33)= 0.01597056290256253144
495 W(34)= 0.01503872102699521608
496 W(35)= 0.01409094177231515264
497 W(36)= 0.01312822956696188190
498 W(37)= 0.01215160467108866759
499 W(38)= 0.01116210209983888144
500 W(39)= 0.01016077053500880978
501 W(40)= 0.00914867123078384552
502 W(41)= 0.00812687692569928101
503 W(42)= 0.00709647079115442616
504 W(43)= 0.00605854550423662775
505 W(44)= 0.00501420274292825661
506 W(45)= 0.00396455433844564804
507 W(46)= 0.00291073181793626202
508 W(47)= 0.00185396078894924657
509 W(48)= 0.00079679206555731759
517 2 XX(I)=0.5*(XI(I)+1.)
521 YI=2.*(0.5*(1.+XI(I)))**EXPON-1.
522 WI(I)=WI(I)/(1.+XI(I))*(1.+YI)*EXPON
529 subroutine gconv(x,xp,fgdis)
530 COMMON/AINPUT/IORD,QSCT,QSDT
531 common/GAUS96/XI(96),WI(96),NTERMS,XX(97)
542 qsdt=8.18 !! This is the value of 4m_c^2
543 qsct=74.0 !! This is the value of 4m_b^2
547 c AL = 0.550/(4.* 3.14159)
548 AL=ALPHA(T,xp(1))/(4.* pi)
550 FF1=BETA_LHA(XP(2),XP(3)+1.)+XP(16)*BETA_LHA(XP(2)+1.,XP(3)+1.)+
551 XXP(23)*BETA_LHA(XP(2)+0.5,XP(3)+1.)
552 FF2=BETA_LHA(XP(2)+1.,XP(3)+1.)+
553 XXP(16)*BETA_LHA(XP(2)+2.,XP(3)+1.)+
554 XXP(23)*BETA_LHA(XP(2)+1.5,XP(3)+1.)
555 FF3=BETA_LHA(XP(5),ETA4+1.)+XP(20)*BETA_LHA(XP(5)+1.,ETA4+1.)+
556 XXP(24)*BETA_LHA(XP(5)+0.5,ETA4+1.)
557 FF4=BETA_LHA(XP(5)+1.,ETA4+1.)+XP(20)*BETA_LHA(XP(5)+2.,ETA4+1.)+
558 XXP(24)*BETA_LHA(XP(5)+1.5,ETA4+1.)
561 c print *,'coefu ',coefu
562 c print *,'coefd ',coefd
563 UV=coefu*X**XP(2)*(1.-X)**XP(3)*(1.+XP(16)*X+XP(23)*SQRT(X))
564 DV=coefd*X**XP(5)*(1.-X)**ETA4*(1.+XP(20)*X+XP(24)*SQRT(X))
565 FGDIS=al*CF*(-9.-2.*PI2/3.+alog(1.-x)*(-3.+
566 .2.*alog(1.-x)))*(UV+DV)
569 Y=0.5*(1.-X)*XI(M)+0.5*(1.+X)
571 UVXY=coefu*XY**XP(2)*(1.-XY)**XP(3)*(1.+XP(16)*XY
573 DVXY=coefd*XY**XP(5)*(1.-XY)**ETA4*(1.+XP(20)*XY
576 C22=CF*(6.+4.*Y-2.*(1.+Y*Y)/(1.-Y)*ALOG(Y)-2.*(1.+Y)*ALOG(1.-Y))
577 C23=CF*(-3.+4.*ALOG(1.-Y))/(1.-Y)
579 FGDIS=FGDIS+.5*(1.-X)*WI(M)*al*
580 .(C22*(uvxy+dvxy)+C23*(uvxy+dvxy-uv-dv))