More volume overlaps corrected
[u/mrichter/AliRoot.git] / ISAJET / code / estruc.F
1 #include "isajet/pilot.h"
2       FUNCTION ESTRUC(X,QS)
3 C
4 C     THIS IS ELECTRON PARTON DISTRIBUTION FUNCTION;
5 C     SAME AS USED IN PYTHIA; NOTE! ESTRUC=0 FOR X>.999999
6 C
7 #if defined(CERNLIB_IMPNONE)
8       IMPLICIT NONE
9 #endif
10       REAL ESTRUC,AL,PI,AME,QS,X,BT,XM,T,A,B
11 C
12       AL=1./128.
13       PI=4*ATAN(1.)
14       AME=.511E-3
15       BT=2*AL/PI*(LOG(QS/AME/AME)-1.)
16 C     KLEISS/SJOSTRAND PRESCRIPTION
17 C      IF (X.LE..9999) THEN
18 C        ESTRUC=BT/2.*(1.-X)**(BT/2.-1.)
19 C      ELSE IF (X.LE..999999.AND.X.GT..9999) THEN
20 C        ESTRUC=100.**(BT/2.)/(100.**(BT/2.)-1.)*BT/2.*
21 C    $          (1.-X)**(BT/2.-1.)
22 C      ELSE
23 C        ESTRUC=0.
24 C      END IF
25 C     FADIN-KURAEV/DREES PRESCRIPTION
26       XM=.998
27       IF(X.GT.XM) THEN
28         T = (1.+.375*BT)*(1.-XM)**(BT/2.)
29         A = ((1.0-BT/2.)*T
30      &        -.25*BT*(1.5-XM*(1.+XM/2.)))/(1.-XM)
31      &        +.25*BT*(1.0+XM)
32         A = 2*A/(1.-XM)
33         B = .5*BT*T/(1.-XM) - .25*BT*(1.+XM) - A*XM
34         ESTRUC = A*X+B
35       ELSE
36         ESTRUC = .5*BT*((1.-X)**(.5*BT-1.)) * (1.+.375*BT)
37      &            -.25*BT*(1.+X)
38       ENDIF
39       RETURN
40       END