Some function moved to AliZDC
[u/mrichter/AliRoot.git] / GEANT321 / gstrag / goscmg.F
CommitLineData
fe4da5cc 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 :
13C
14 SUBROUTINE GOSCMG
15
16#include "geant321/gcmate.inc"
17#include "geant321/gcasho.inc"
18C-----------------------------------------------------------------------
19C This program calculates the parameters of the oscillators.
20C The input data are in the GCASHO. The lowest poten-
21C tials are convoluted to escape unreasonably high accuracy.
22C-----------------------------------------------------------------------
23C Update history: 10-8-93
24C
25C-----------------------------------------------------------------------
26 REAL KSI0
27 PARAMETER (ENERR=0.02,TWOELM=2*511)
28C-----------------------------------------------------------------------
29C Convolution of the first shells
30C-----------------------------------------------------------------------
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
59C-----------------------------------------------------------------------
60C Calculation of the oscillator parameters
61C-----------------------------------------------------------------------
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