This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gphys / ghsigm.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:36  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.23  by  S.Giani
11 *-- Author :
12       FUNCTION GHSIGM(P,IPART,A)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *   Returns absorption cross-section in millibarns               *
17 C.    *   for a particle with                                          *
18 C.    *                momentum P (GEV/C)                              *
19 C.    *                GEANT type IPART                                *
20 C.    *      on a nucleus of atomic number A                           *
21 C.    *                                                                *
22 C.    *    ==>Called by : GPHADR                                       *
23 C.    *       Author    R.Barlow  *********                            *
24 C.    *       Modified to deal with K0 and extend to 41 particle       *
25 C.    *                types by John Allison, 31/1/84. *               *
26 C.    *                                                                *
27 C.    ******************************************************************
28 C.
29 C              The array NTYPE maps the GEANT particle type (IPART)
30 C              onto GHSIG's internal particle type.  Simple assumptions
31 C              are made for highly flavoured particles.  The K0 is
32 C              given a non-existent internal type 6 which causes the
33 C              mean of the K+ and K- cross sections to be calculated.
34 C
35       DIMENSION NTYPE(41)
36       DATA NTYPE/6*0,3*5,6,3,4,2*1,2,6,
37      +  8*1,8*2,2*0,4,3,2*6,2*3,1/
38 C.
39 C.    ------------------------------------------------------------------
40 C.
41       GHSIGM = 1.E-20
42       IF (IPART .GT. 41) RETURN
43       ITYPE  = NTYPE(IPART)
44       IF (ITYPE .EQ. 0) RETURN
45 C
46       IF (ITYPE .NE. 6)THEN
47          GHSIGM = GHSIG(P, ITYPE, A)
48       ELSE
49          GHSIGM = 0.5 * (GHSIG(P, 3, A) + GHSIG(P, 4, A))
50       ENDIF
51 C
52       END