]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gphys/gbirk.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gbirk.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       SUBROUTINE GBIRK(EDEP)
13 *
14 ************************************************************************
15 *                                                                      *
16 * *** apply BIRK's saturation law to energy deposition ***             *
17 * *** only organic scintillators implemented in this version MODEL=1   *
18 *                                                                      *
19 * Note : the material is assumed ideal, which means that impurities    *
20 *        and aging effects are not taken into account                  *
21 *                                                                      *
22 * algorithm : edep = destep / (1. + RKB*dedx + C*(dedx)**2)            *
23 *                                                                      *
24 * the values of RKB and C can be entered via :                         *
25 *                                                                      *
26 * call gstpar(imate,'BIRK1',value) to set the model (must be 1 or 2)   *
27 * call gstpar(imate,'BIRK2',value) to set RKB                          *
28 * call gstpar(imate,'BIRK3',value) to set C                            *
29 *                                                                      *
30 * the basic units of the coefficient are g/(Mev*cm**2)                 *
31 * because the de/dx is obtained in Mev/cm                              *
32 *                                                                      *
33 * exp. values from NIM 80 (1970) 239-244 :                             *
34 *                                                                      *
35 * RKB = 0.013  g/mev*cm**2  and  C = 9.6e-6  g**2/(Mev**2)(cm**4)      *
36 *                                                                      *
37 *    ==>Called by : <USER>,GUSTEP                                      *
38 *       Author    R.Brun , N.Van Eijndhoven    *********               *
39 *                                                                      *
40 ************************************************************************
41 *
42 #include "geant321/gcbank.inc"
43 #include "geant321/gcjloc.inc"
44 #include "geant321/gckine.inc"
45 #include "geant321/gcmate.inc"
46 #include "geant321/gctrak.inc"
47 C.
48 C.    ------------------------------------------------------------------
49 C.
50       EDEP=DESTEP
51 C
52 C --- no saturation law for neutral particles ---
53       IF (ABS(CHARGE) .LE. 1.E-10) GO TO 99
54 C
55 C --- get the values for the BIRK coefficients stored via GSTPAR ---
56       JTMN=LQ(JTM)
57       IF (JTMN .LE. 0)GO TO 99
58       MODEL=Q(JTMN+27)
59       IF(MODEL.GT.2)GO TO 99
60       RKB=Q(JTMN+28)/DENS
61       C=Q(JTMN+29)/DENS**2
62 C
63 C --- correction for particles with more than 1 charge unit ---
64 C --- based on alpha particle data (only apply for MODEL=1) ---
65       IF(MODEL.EQ.1)THEN
66          IF (ABS(CHARGE) .GE. 2.) RKB=RKB*7.2/12.6
67       ENDIF
68 C
69       DEDXCM=1000.*Q(JLOSS+IEKBIN)
70 C
71       EDEP=DESTEP/(1.+RKB*DEDXCM+C*DEDXCM**2)
72 C
73   99  RETURN
74       END
75