]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gphys/gbteth.F
Minor corrections after big transformer changes
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gbteth.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:22  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.21  by  S.Giani
11 *-- Author :
12       REAL FUNCTION GBTETH(ENER,PARTM,EFRAC)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *   Universal distribution function for the Bremsstrahlung       *
17 C.    *   and pair production angles. This function approximates       *
18 C.    *   the real distribution function which can be found in         *
19 C.    *   Yung-Su Tsai: Rev. Mod. Phys. 46,815(1974)                   *
20 C.    *     +erratum  : Rev. Mod. Phys. 49,421(1977)                   *
21 C.    *                                                                *
22 C.    *   Called by : GBREME, GBREMM, GPAIRG                           *
23 C.    *   Authors   : L.Urban                                          *
24 C.    *                                                                *
25 C.    ******************************************************************
26 C.
27 #include "geant321/gconsp.inc"
28 #include "geant321/gcmate.inc"
29       DIMENSION RNDM(3)
30       PARAMETER (ALFA=0.625)
31 *     ----------------------------------------------------------
32 * GEANT 3.15
33 *     GBTETH=1.
34 *     GOTO 999
35 * Angular distribution with d=const
36 *     D=27.
37 * Angular distribution with d=d(Z,E,y)
38       D=0.13*(0.8+1.3/Z)*(100.+1./ENER)*(1.+EFRAC)
39 *     -------------------------------------------------------------
40 *
41       W1=9./(9.+D)
42       UMAX=ENER*PI/PARTM
43 *
44 10    CALL GRNDM(RNDM,3)
45 *
46       IF(RNDM(1).LE.W1) THEN
47          BETA=ALFA
48       ELSE
49          BETA=3.*ALFA
50       ENDIF
51 *
52       U=-(LOG(RNDM(2)*RNDM(3)))/BETA
53 *
54 *     cut : theta should be .LE. PI  !!
55 *     this condition depend on E in the case of d=const too!!!!!
56 *
57       IF(U.GE.UMAX) GOTO 10
58 *
59       GBTETH=U
60 *
61  999  END