This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gstrag / goscmg.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:38  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 #if defined(CERNLIB_ASHO)
11 *CMZ :  3.21/02 29/03/94  15.41.25  by  S.Giani
12 *-- Author :
13 C
14       SUBROUTINE GOSCMG
15  
16 #include "geant321/gcmate.inc"
17 #include "geant321/gcasho.inc"
18 C-----------------------------------------------------------------------
19 C      This program calculates the parameters of the oscillators.
20 C      The input data are in the GCASHO. The lowest poten-
21 C      tials are convoluted to escape unreasonably high accuracy.
22 C-----------------------------------------------------------------------
23 C      Update history: 10-8-93
24 C
25 C-----------------------------------------------------------------------
26       REAL KSI0
27       PARAMETER (ENERR=0.02,TWOELM=2*511)
28 C-----------------------------------------------------------------------
29 C      Convolution of the first shells
30 C-----------------------------------------------------------------------
31       C1 = 153.6*STEP*DENS/(BE2*AMED)
32       C2 = 2.*LOG(PLIN)-BE2
33       KSI0 = C1*ZMED
34       X = 2.*LOG(E0MED/PLASM) + 1.
35       CALL GSTCOR(X,E0MED,PLOG,DENS,D)
36       A0 = LOG(TWOELM*TRNSMA/E0MED**2)+C2-D
37       EMEAN = KSI0*A0
38       DO 10 I = 1,NSMED
39          IF (ESMED(I).GT.EMEAN*ENERR/ALFA) GOTO 20
40    10 CONTINUE
41    20 J = MAX(I - 1,1)
42       S1 = 0.
43       Z1 = 0.
44       DO 30 I = 1,J
45          S1 = S1 + LOG(ESMED(I))*ZSMED(I)
46          Z1 = Z1 + ZSMED(I)
47    30 CONTINUE
48       S1  = EXP(S1/Z1)
49       NOSC = NSMED - J + 1
50       DO 40 I = 2,NOSC
51          X = ESMED(I + J - 1)/S1
52          IOSC(I) = X + 0.5
53          EOSC(I) = S1*IOSC(I)*ALFA
54          ZOSC(I) = ZSMED(I + J - 1)
55    40 CONTINUE
56       EOSC(1) = S1*ALFA
57       IOSC(1) = 1
58       ZOSC(1) = Z1
59 C-----------------------------------------------------------------------
60 C      Calculation of the oscillator parameters
61 C-----------------------------------------------------------------------
62       C3 = C2 + 0.423
63       DO 50 I = 1,NOSC
64          X = C1*ZOSC(I)
65          BOSC(I) = X/EOSC(I)
66          X = 2.*LOG(EOSC(I)/PLASM)+1.
67          CALL GSTCOR(X,EOSC(I),PLOG,DENS,D)
68          AOSC(I) = LOG(TWOELM/EOSC(I)) +C3 -D
69    50 CONTINUE
70       END
71 #endif