Some function moved to AliZDC
[u/mrichter/AliRoot.git] / GEANT321 / gstrag / goscin.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:21:38 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.25 by S.Giani
11*-- Author :
12 FUNCTION GOSCIN(EIN1EV,EIN2EV)
13C.
14C. ******************************************************************
15C. * *
16C. * Input energy in eV, Sandia tables in keV *
17C. * *
18C. * *
19C. ******************************************************************
20C.
21#include "geant321/gcbank.inc"
22#include "geant321/gcjloc.inc"
23#include "geant321/gconsp.inc"
24#include "geant321/gcmate.inc"
25#include "geant321/gc10ev.inc"
26#if !defined(CERNLIB_SINGLE)
27 DOUBLE PRECISION ONE,RES,ZERO,EIN1,EIN2,REST,EBEG,EEND
28 DOUBLE PRECISION E1IN,E2IN,TWO,THREE,C1,C2,C3,C4
29#endif
30 PARAMETER (ZERO=0,ONE=1,TWO=2,THREE=3)
31C.
32C. ------------------------------------------------------------------
33C.
34 REST = ZERO
35 EIN1 = EIN1EV*1E-3
36 EIN2 = EIN2EV*1E-3
37C Use Sandia data
38 JPHXS = LQ(JPHOT-1)
39 NZ = Q(JPHXS+1)
40 JWEIGH = JPHXS+1+2*NZ
41 DO 30 JZ=1,NZ
42 RES = ZERO
43 EBEG = TENEV
44 WEIGHT = Q(JWEIGH+JZ)
45 JPHFN = LQ(JPHXS-JZ)
46 IPOINT = JPHFN+1
47 IMAX = Q(IPOINT)
48 IPOINT = IPOINT-4
49 DO 10 I = 1,IMAX
50 IPOINT = IPOINT+5
51 EEND = Q(IPOINT)
52 IF(EIN2.GT.EBEG.AND.EIN1.LT.EEND) THEN
53 E1IN = ONE/MAX(EBEG,EIN1)
54 E2IN = ONE/MIN(EEND,EIN2)
55 J = IPOINT+1
56 C1 = -Q(J )
57 C2 = -Q(J+1)
58 C3 = -Q(J+2)/TWO
59 C4 = -Q(J+3)/THREE
60 RES = RES
61 + +C1*LOG(E2IN)+E2IN*(C2+E2IN*(C3+E2IN*C4))
62 + -C1*LOG(E1IN)-E1IN*(C2+E1IN*(C3+E1IN*C4))
63 ENDIF
64 EBEG = EEND
65 10 CONTINUE
66 20 REST = REST+WEIGHT*RES
67 30 CONTINUE
68C RES value is in cm**2/(g keV)
69 GOSCIN = REST*1E-3*A/AVO
70C Now in Megabarns/eV
71C
72 END