Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gcbrem.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:23  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       FUNCTION GCBREM(T)
13 C.    ******************************************************************
14 C.    *                                                                *
15 C.    *  It calculates the ratio of positron to electron               *
16 C.    *       bremsstrahlung energy loss.                              *
17 C.    *                                                                *
18 C.    *  Input:kinetic energy in GeV                                   *
19 C.    *  Output: ratio of positron to electron brems energy loss       *
20 C.    *                                                                *
21 C.    *  ( The ratio is calculated from a function fitted to the       *
22 C.    *    results of L.Kim et al.,PHYS.REV.A33,3002(1986)    )        *
23 C.    *                                                                *
24 C.    *  Author   L. Urban                                             *
25 C.    *                                                                *
26 C.    ******************************************************************
27 C.
28 #include "geant321/gcmate.inc"
29 #include "geant321/gconsp.inc"
30       PARAMETER (AA=7522100.,A1=0.415,A3=0.0021,A5=0.00054)
31 C.
32       CFAC=0.
33       IF(Z.LE.0.) GOTO 10
34       X=LOG(AA*T/Z**2)
35 *
36       IF(X.LE.-8.) GOTO 10
37 *
38       IF(X.GE.+9.) THEN
39          CFAC=1.
40       ELSE
41          W=A1*X+A3*X**3+A5*X**5
42          CFAC=0.5+ATAN(W)/PI
43       ENDIF
44 *
45    10 GCBREM = CFAC
46 *
47       END