This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gdreli.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:24  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       SUBROUTINE GDRELI(A1,Z1,A2,Z2,DENS,T,DEDX)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *  Calculates the mean 1/DENS*dE/dx of an ion with charge Z1,    *
17 C.    *  atomic weight A1 and kinetic energy T in an element           *
18 C.    *  of atomic number Z2, atomic weight A2 and density             *
19 C.    *    DENS  ( the density is just used for the calculation        *
20 C.    *  of the density effect in the case of high T ).                *
21 C.    *  The routine reproduces the experimental and/or tabulated      *
22 C.    *  mean energy losses reasonably well.                           *
23 C.    *                                                                *
24 C.    *  The mean stopping power is obtained by calculating the proton *
25 C.    *  energy loss S at the equivalent proton kinetic energy  and    *
26 C.    *  multiplying this value by the effective charge of the ion.    *
27 C.    *  This method is used for high T ( T/A1 > Tamax , where         *
28 C.    *   Tamax depend on Z1 and Z2 , Tamax .le. few MeV).             *
29 C.    *  In the case of low T , the energy loss curve has been         *
30 C.    *  extrapolated down to T -> 0.                                  *
31 C.    *                                                                *
32 C.    *    ==>Called by : GDRELA                                       *
33 C.    *       Author    L.Urban    *********                           *
34 C.    *                                                                *
35 C.    ******************************************************************
36 C.
37 #include "geant321/gconsp.inc"
38 #include "geant321/gccuts.inc"
39 #include "geant321/gcunit.inc"
40       PARAMETER (AMU=0.93149432,D=0.00015357)
41 *
42       EM=A1*AMU
43       TA=PMASS*T/EM
44 *
45       Z11=Z1*Z1
46       TAMAX=(120.902-3.121*Z1+0.270*Z11)-(35.988-27.794*Z1+0.120*Z11)*
47      +                                                   LOG(Z2)
48       TAMAX=0.000001*TAMAX
49 *
50 *     calculate  stopping power (total loss) , save DCUTM before
51 *
52       CUTSAV=DCUTM
53       DCUTM=BIG
54 *
55       IF(TA.GE.TAMAX) THEN
56 *
57 *     "high energy" case
58 *
59          CALL GDRELP(A2,Z2,DENS,TA,S)
60          S=Z1**2*GEFCH2(Z1,Z2,TA)*S
61       ELSE
62 *
63 *     "low energy" case
64 *
65          CALL GDRELP(A2,Z2,DENS,TAMAX,S0)
66          S0=Z1**2*GEFCH2(Z1,Z2,TAMAX)*S0
67          R=TA/TAMAX
68          S=S0*(2.*SQRT(R)-R)
69       ENDIF
70 *
71       DCUTM=CUTSAV
72       TMAX=2.*EMASS*T*(T+2.*EM)/EM**2
73 *
74 *     check whether restricted loss needed ?
75 *     if restricted loss , calculate the loss from delta rays
76 *
77       IF(DCUTM.LT.TMAX) THEN
78          BET2=T*(T+2.*EM)/(T+EM)**2
79          R=DCUTM/TMAX
80          DELTA=-LOG(R)-BET2*(1.-R)
81          DELTA=D*Z2*Z1**2*DELTA/(A2*BET2)
82          S=S-DELTA
83          IF(S.LT.0.) S=0.
84       ENDIF
85 *
86       DEDX=S
87 *
88       END