source: trunk/MagicSoft/Simulation/Corsika/Mmcs/pcl.f@ 379

Last change on this file since 379 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.1 KB
Line 
1 DOUBLE PRECISION FUNCTION PCL( A,B )
2
3C-----------------------------------------------------------------------
4C P (MOMENTUM) C(ENTER OF MASS) L(ONGITUDINAL)
5C
6C RANDOM SELECTION OF LONGITUDINAL MOMENTUM IN CENTER OF MASS
7C EXPONENTIAL DISTRIBUTION PCL(X) = EXP(-X/A)
8C THIS FUNCTION IS CALLED FORM HMESON, ISOBAR, AND VHMESO
9C ARGUMENTS:
10C A = MEAN VALUE OF DISTRIBUTION
11C B = CUT FOR LIMITING MOMENTUM
12C
13C CHANGES : J. KNAPP IK1 FZK KARLSRUHE
14C-----------------------------------------------------------------------
15
16 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
17*KEEP,RANDPA.
18 COMMON /RANDPA/ FAC,U1,U2,RD,NSEQ,ISEED,KNOR
19 DOUBLE PRECISION FAC,U1,U2
20 REAL RD(3000)
21 INTEGER ISEED(103,10),NSEQ
22 LOGICAL KNOR
23*KEEP,RUNPAR.
24 COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
25 * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
26 * MONIOU,MDEBUG,NUCNUC,
27 * CETAPE,
28 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
29 * N1STTR,MDBASE,
30 * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
31 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
32 * ,GHEISH,GHESIG
33 COMMON /RUNPAC/ DSN,HOST,USER
34 DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
35 REAL STEPFC
36 INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
37 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
38 * N1STTR,MDBASE
39 INTEGER CETAPE
40 CHARACTER*79 DSN
41 CHARACTER*20 HOST,USER
42
43 LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
44 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
45 * ,GHEISH,GHESIG
46*KEND.
47
48C-----------------------------------------------------------------------
49
50C IF ( DEBUG ) WRITE(MDEBUG,*) 'PCL : A,B=',SNGL(A),SNGL(B)
51
52 1 CONTINUE
53 CALL RMMAR( RD,1,1 )
54 PCL = -A * LOG ( RD(1) )
55 IF ( PCL .GT. B ) GOTO 1
56 IF ( DEBUG ) WRITE(MDEBUG,*) 'PCL : PCL =',SNGL(PCL)
57
58 RETURN
59 END
Note: See TracBrowser for help on using the repository browser.