5 * Revision 1.1.1.1 1999/05/18 15:55:20 fca
8 * Revision 1.1.1.1 1995/10/24 10:21:37 cernlib
12 #include "geant321/pilot.h"
13 #if defined(CERNLIB_ASHO)
14 *CMZ : 3.21/02 29/03/94 15.41.25 by S.Giani
16 SUBROUTINE GDIFMG(DEL)
18 #include "geant321/gccuts.inc"
19 #include "geant321/gcasho.inc"
20 C-----------------------------------------------------------------------
21 C This program calculates the final distribution coef-
22 C ficients until the integral S is more or equal to L2.
23 C In case of S < L2 or miscalculations due to FORTRAN
24 C limits DONE = FALSE.
25 C-----------------------------------------------------------------------
26 C Update history: 10-08-93
28 C-----------------------------------------------------------------------
29 REAL BN(50),BNA(50),L2
33 C-----------------------------------------------------------------------
34 C Initialization steps
35 C-----------------------------------------------------------------------
39 BN(K) = BOSC(K)*IOSC(K)
40 BNA(K) = BN(K)*(AOSC(K) - 1.)
41 XX = XX + AOSC(K)*BOSC(K)
46 CMGO(1) = EXP(-CORMAX)
47 CMGO(2) = CMGO(1)*BNA(1)
48 Z = Z-(CMGO(1)+CMGO(2))*EXP(CORR)
49 C-----------------------------------------------------------------------
50 C Calculation of the current Ci
51 C-----------------------------------------------------------------------
60 CMGO(NMGO) = CMGO(NMGO - 1)*BNA(1)
65 IF(MOD(J+1,IOSC(K)).EQ.0) THEN
74 CMGO(NMGO) = CMGO(NMGO) + X*CMGO(M)
76 CMGO(NMGO) = CMGO(NMGO)/(NMGO-1)
77 Z = Z - CMGO(NMGO)*EXP(CORR)
81 50 IF (FLMAX.EQ.1) THEN
82 DEL = (NMGO-1)*EOSC(1)
84 DEL = (NMGO-1)*EOSC(1)*L2/RNDM
86 IF (DEL.GE.DCUTE*1E6) DEL = DCUTE*1E6
90 SUBROUTINE GDIFMG_DUMMY