]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HERWIG/jimmy/jimmy/jmgrid.F
Add AliMUONRawStream class
[u/mrichter/AliRoot.git] / HERWIG / jimmy / jimmy / jmgrid.F
1       SUBROUTINE JMGRID
2 C     ------------------------------------------------------------------------
3 C     Purpose: Calculate the total hadronic cross section grid with
4 C     eikonalisation. This routine uses the functions QCDRES (to
5 C     calculate the uneikonalised gp cross section) and EIKON (to
6 C     eikonalise it).
7 C     ------------------------------------------------------------------------
8
9 #include "herwig65.inc"
10 #include "jimmy.inc"
11
12       INTEGER I
13       DOUBLE PRECISION XSECN, EPFUN, H, Y, SUM, TMP, DELTA
14
15       DELTA = 0.005D0
16
17       IF (JCMVAR.GT.0) THEN
18
19 c     Step-size
20          H = (ONE - JMZMIN)/FLOAT(NPSIMP)
21          
22 c     Lower limit of integration
23          Y = JMZMIN+DELTA
24          
25          SUM = EPFUN( Y, 0 )
26          
27          Y = JMZMIN
28          
29          DO 2, I=1, NPSIMP/2
30             
31             Y = Y + H
32             TMP = EPFUN(Y, 2*I-1 )*FOUR
33             SUM = SUM + TMP
34             
35             Y = Y + H
36             TMP = EPFUN(Y, 2*I )*TWO
37             SUM = SUM + TMP
38             
39  2       CONTINUE
40          
41 C     Get the weight for the end point correct
42          SUM = SUM - TMP/TWO
43          XSECN = SUM*H/THREE
44
45       ELSE
46          
47          SUM   = EPFUN( 1.D0, 1 )
48          XSECN = SUM
49          
50       ENDIF
51          
52       RETURN
53    50 FORMAT(8F10.5)
54       END
55
56
57