This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gphoti.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:29  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.22  by  S.Giani
11 *-- Author :
12       SUBROUTINE GPHOTI
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *  Calculates cross-section in current material                  *
17 C     *  for PHOTOELECTRIC EFFECT using the empirical                  *
18 C     *  formula of L.Urban (see WRITE UP) for Z > 100                 *
19 C.    *                                                                *
20 C     *  otherwise Sandia parametrization                              *
21 C     *   F.Biggs & R. Lighthill, SAND87-0070, UC-34, May 1990         *
22 C     *                                                                *
23 C     *  NOTE:                                                         *
24 C     *  (1) Above 0.050 GeV ( 50 MeV) a cut is imposed as the         *
25 C     *   contribution from photoeffect is negligible for EGAM.GT.0.050*
26 C     *  (2) From 10KeV to 100KeV a special parametrization            *
27 C     *       has been introduced                                      *
28 C.    *                                                                *
29 C.    *    ==>Called by : GPHYSI                                       *
30 C.    *       Author    L.Urban  *********                             *
31 C.    *                                                                *
32 C.    ******************************************************************
33 C.
34 #include "geant321/gcbank.inc"
35 #include "geant321/gctrak.inc"
36 #include "geant321/gconsp.inc"
37 #include "geant321/gcmate.inc"
38 #include "geant321/gcjloc.inc"
39 #include "geant321/gcmulo.inc"
40 C.
41 C.    ------------------------------------------------------------------
42 C.
43 C             universal energy cut-off
44 C
45       SIG=0.
46       EGAM=ELOW(IEKBIN)
47       IF(EGAM.LE.0.05) THEN
48 C
49          IF(Z.GT.100) THEN
50 C Below good old stuff
51             IF(JMIXT.EQ.0)THEN
52 C
53 C             simple material (element)
54 C
55                JPROB=LQ(JMA-4)
56                SIG=GPHSIG(Z,EGAM)*AVO*DENS/A
57             ELSE
58 C
59 C             compound/mixture
60 C
61                NLMAT=Q(JMA+11)
62                NLM=IABS(NLMAT)
63                SIG=0.
64                DO 10 I=1,NLM
65                   J=JMIXT+I
66                   AA=Q(J)
67                   ZZ=Q(J+NLM)
68                   WMAT=Q(J+2*NLM)
69                   S=GPHSIG(ZZ,EGAM)
70                   S=S*WMAT/AA
71                   SIG=SIG+AVO*DENS*S
72    10          CONTINUE
73             ENDIF
74 C
75 C
76          ELSEIF(Z.GE.1.) THEN
77 C New x-sections. Sandia parametrization
78             JPROB=LQ(JMA-4)
79             SIG = 0.0
80             IF(EGAM.GE.1.E-8) SIG=GPHSG1(EGAM)*DENS
81          ENDIF
82       ENDIF
83       IF(SIG.GT.0.)THEN
84          Q(JPHOT+IEKBIN)=1./SIG
85       ELSE
86          Q(JPHOT+IEKBIN)=BIG
87       ENDIF
88 C
89       END