]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gstrag/gasho.F
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / gstrag / gasho.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1999/05/18 15:55:20  fca
6 * AliRoot sources
7 *
8 * Revision 1.1.1.1  1995/10/24 10:21:37  cernlib
9 * Geant
10 *
11 *
12 #include "geant321/pilot.h"
13 #if defined(CERNLIB_ASHO)
14 *CMZ :  3.21/02 29/03/94  15.41.24  by  S.Giani
15 *-- Author :
16       SUBROUTINE GASHO(P,XXMASS,GSTEP,DE)
17 #include "geant321/gcbank.inc"
18 #include "geant321/gcjloc.inc"
19 #include "geant321/gccuts.inc"
20 #include "geant321/gcmate.inc"
21 #include "geant321/gcasho.inc"
22 C-----------------------------------------------------------------------
23 C      ASHO model for energy loss straggling
24 C      The main subprograms are:
25 C      - MIXMGO - prepares the parameters of a mixture
26 C          or compound used (called from GIASHO);
27 C      - GOSCMG - prepares the parameters of the oscillators;
28 C      - GDIFMG - calculates the differential spectrum of the
29 C          energy loss;
30 C      The main initial data bank is in COMMON block GCASHO contai-
31 C      ning the parameters of a number of elements.
32 C-----------------------------------------------------------------------
33 C      Update history: 16-8-93
34 C
35 C-----------------------------------------------------------------------
36 C      The main initial common block and its components.
37 C      NELM - number of basic elements;
38 C      ZELM - atomic numbers of the elements;
39 C      AELM - atomic weights of the elements;
40 C      DELM - densities of the elements (g/cm3);
41 C      E0ELM - ionization potentials of the elements (keV);
42 C      NSELM - numbers of the electron shells in the atoms;
43 C      ZSELM - numbers of electrons in each of the shells;
44 C      ESELM - binding energies of the shell electrons (keV).
45 C       This information may be included in JMATE by GSMATE or GMATE.
46 C      *)   The density values for gases are given at
47 C           0 C 1 atm. Those for solids are not precise and
48 C           should be substituted for particular
49 C           samples used.
50 C      **)  The current number of the elements used is equal to 16.
51 C      ***) To change the energy scale from keV to GeV, as it is
52 C           used in GEANT, it is needed to add 1.E-6 to E0ELM, ESELM,
53 C           PLASM, TRNSMA, 6. (in RESMGO), SL (in REAMGO), SL (in
54 C           SLDMGO) and extract 1.E-6 in DE (in DELMGO).
55 C-----------------------------------------------------------------------
56 C      GCASHO contains also the kinematical parame-
57 C      ters as well as some thermodynamical ones:
58 C      PLIN (P/mc), PLOG (log10(PLIN)), BE2 (velocity/c squared),
59 C      the path length STEP of the particle,
60 C      and the medium plasma energy
61 C      PLASM. TRNSMA is the maximum transferable energy (now
62 C      it is set to correspond to TCUT in GEANT !).
63 C      In GEANT the initial parameters are P, E, XMASS, STEP
64 C      and DENSIT.
65 C-----------------------------------------------------------------------
66 C      In addition, it contains the parameters of the oscillators:
67 C      - BOSC is the array of "ksi/I",
68 C      - AOSC is the array of "lnA",
69 C      - NOSC is the number of the oscillators,
70 C      - EOSC is the array of the oscillator energies,
71 C      - IOSC is the upper array in integers,
72 C      - ZOSC is the array of the oscillator weights,
73 C      - EMEAN is the mean energy loss.
74 C-----------------------------------------------------------------------
75 C      Finally, GCASHO contains the parameters of the energy loss
76 C      distribution:
77 C      - CMGO is the differential or integral distribution coeff.,
78 C      - NMGO is the number of bins,
79 C      - NMGOMA is the maximum of possible NMGO,
80 C      - EMGO is the energy corresponding to one bin,
81 C      - EMGOMI is the energy corresponding to 0th bin.
82 C-----------------------------------------------------------------------
83       PARAMETER (DNMGOM=2000)
84 C-----------------------------------------------------------------------
85       JASHO = LQ(JMA-20)
86       NSMED = Q(JASHO+1)
87       ZMED  = Q(JASHO+2)
88       AMED  = Q(JASHO+3)
89       ALFA  = Q(JASHO+4)
90       E0MED = Q(JASHO+5)
91       DO 10 KMED=1,NSMED
92          ZSMED(KMED) = Q(JASHO+5+KMED)
93          ESMED(KMED) = Q(JASHO+5+NSMED+KMED)
94    10 CONTINUE
95       PLASM = 0.028817*SQRT((ZMED/AMED)*DENS)
96       STEP  = GSTEP
97       NMGOMA = DNMGOM
98 C-----------------------------------------------------------------------
99 C      In GEANT the initial kinematic parameters : P, E, XMASS.
100 C      The following gets the kinematic parameters of the particle:
101 C      PLIN (P/mc), PLOG (lg(PLIN)), BE2 (velocity/c squared) and
102 C      its path length STEP.
103 C-----------------------------------------------------------------------
104       PLIN = P/XXMASS
105       PLOG = LOG10(PLIN)
106       BE2 = PLIN**2/(1.+PLIN**2)
107 C-----------------------------------------------------------------------
108 C      Now we set TRNSMA to correspond to TCUT in GEANT.
109 C-----------------------------------------------------------------------
110       TRNSMA = DCUTE*1E6
111 C-----------------------------------------------------------------------
112 C      Here is the calculation of the parameters of the oscillators
113 C-----------------------------------------------------------------------
114       CALL GOSCMG
115 C-----------------------------------------------------------------------
116 C      Here is the calculation of the diffrential distribution
117 C-----------------------------------------------------------------------
118       CALL GDIFMG(DE)
119       DE = 1E-6*DE
120 C-----------------------------------------------------------------------
121       END
122 #else
123       SUBROUTINE GASHO_DUMMY
124       END
125 #endif