source: trunk/MagicSoft/Simulation/Corsika/Mmcs/age.f@ 2611

Last change on this file since 2611 was 286, checked in by harald, 25 years ago
This is the start point for further developments of the Magic Monte Carlo Simulation written by Jose Carlos Gonzales. Now it is under control of one CVS repository for the whole collaboration. Everyone should use this CVS repository for further developments.
File size: 2.4 KB
Line 
1 SUBROUTINE AGE( R,S )
2
3C-----------------------------------------------------------------------
4C AGE
5C
6C CALCULATES LONGITUDINAL AGE PARAMETER
7C ORIGINALLY DEVELOPED BY: J. KEMPA, UNIVERSITY OF LODZ, POLAND
8C THIS SUBROUTINE IS CALLED FROM AVAGE
9C ARGUMENTS:
10C R = AVERAGED AGE PARAMETER
11C S = LONGITUDINAL AGE PARAMETER OF TOTAL SHOWER
12C-----------------------------------------------------------------------
13
14 IMPLICIT NONE
15*KEEP,RUNPAR.
16 COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
17 * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
18 * MONIOU,MDEBUG,NUCNUC,
19 * CETAPE,
20 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
21 * N1STTR,MDBASE,
22 * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
23 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
24 * ,GHEISH,GHESIG
25 COMMON /RUNPAC/ DSN,HOST,USER
26 DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
27 REAL STEPFC
28 INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
29 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
30 * N1STTR,MDBASE
31 INTEGER CETAPE
32 CHARACTER*79 DSN
33 CHARACTER*20 HOST,USER
34
35 LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
36 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
37 * ,GHEISH,GHESIG
38*KEND.
39
40 DOUBLE PRECISION A,B,C,R,R1,R2,R3,R4,R5,S
41 DATA R1 / 1.9096D-02 /, R2 / 1.7964D-01 /, R3 / 5.3644D-01 /,
42 * R4 / 1.0332D0 /, R5 / 1.4856D0 /
43C-----------------------------------------------------------------------
44
45 IF ( DEBUG ) WRITE(MDEBUG,*) 'AGE : R=',SNGL(R)
46
47 R = MAX( R, R1 )
48 R = MIN( R, R5 )
49
50 IF ( R .LT. R2 ) THEN
51 A = 3.109121D-1
52 B = 2.146465D-1
53 C = -5.451040D-3
54 ELSEIF ( R .LT. R3 ) THEN
55 A = 3.666449D-1
56 B = 1.639189D-1
57 C = 5.970362D-3
58 ELSEIF ( R .LT. R4 ) THEN
59 A = 1.459842D-1
60 B = 6.317027D-1
61 C = -2.420241D-1
62 ELSEIF ( R .LE. R5 ) THEN
63 A = -3.375703D-1
64 B = 2.090333D0
65 C = -1.343802D0
66 ENDIF
67
68 S = ( SQRT(B**2 - 4.D0 * A * (C-R)) - B ) / ( 2.D0 * A )
69
70 IF ( DEBUG ) WRITE(MDEBUG,*) 'AGE : S=',SNGL(S)
71
72 RETURN
73 END
Note: See TracBrowser for help on using the repository browser.