source: trunk/MagicSoft/Simulation/Corsika/Mmcs/selcor.f@ 6783

Last change on this file since 6783 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.5 KB
Line 
1 SUBROUTINE SELCOR(X,Y)
2
3C-----------------------------------------------------------------------
4C SEL(ECT) COR(E LOCATION)
5C
6C SELECT A QUASI RANDOM CORE LOCATION
7C THIS SUBROUTINE IS CALLED FROM INPRM
8C
9C DESIGN : J. KNAPP IK1 FZK KARLSRUHE
10C-----------------------------------------------------------------------
11
12 IMPLICIT NONE
13*KEEP,RUNPAR.
14 COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
15 * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
16 * MONIOU,MDEBUG,NUCNUC,
17 * CETAPE,
18 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
19 * N1STTR,MDBASE,
20 * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
21 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
22 * ,GHEISH,GHESIG
23 COMMON /RUNPAC/ DSN,HOST,USER
24 DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
25 REAL STEPFC
26 INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
27 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
28 * N1STTR,MDBASE
29 INTEGER CETAPE
30 CHARACTER*79 DSN
31 CHARACTER*20 HOST,USER
32
33 LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
34 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
35 * ,GHEISH,GHESIG
36*KEEP,CEREN2.
37 COMMON /CEREN2/ PHOTCM,XCER,YCER,UEMIS,VEMIS,CARTIM,ZEMIS,
38 * DCERX,DCERY,ACERX,ACERY,
39 * XCMAX,YCMAX,EPSX,EPSY,
40 * DCERXI,DCERYI,FCERX,FCERY,
41 * XSCATT,YSCATT,CERXOS,CERYOS,
42 * NCERX,NCERY,ICERML
43 REAL PHOTCM,XCER,YCER,UEMIS,VEMIS,CARTIM,ZEMIS,
44 * DCERX,DCERY,ACERX,ACERY,
45 * XCMAX,YCMAX,EPSX,EPSY,
46 * DCERXI,DCERYI,FCERX,FCERY,
47 * XSCATT,YSCATT,CERXOS(20),CERYOS(20)
48 INTEGER NCERX,NCERY,ICERML
49*KEND.
50
51 REAL RD(2),X,Y
52 LOGICAL FIRST
53 SAVE FIRST
54 DATA FIRST /.TRUE./
55C-----------------------------------------------------------------------
56
57 IF ( DEBUG ) WRITE(MDEBUG,*) 'SELCOR:'
58
59C INITIALIZE SOBOL NUMBER GENERATOR
60 IF ( FIRST ) THEN
61 FIRST = .FALSE.
62 CALL SOBSEQ(-2,RD)
63 ENDIF
64C TAKE A PAIR OF QUASI RANDOM NUMBERS
65 CALL SOBSEQ(2,RD)
66 X = XSCATT * (2.*RD(1)-1.)
67 Y = YSCATT * (2.*RD(2)-1.)
68
69 IF ( DEBUG ) WRITE(MDEBUG,*)'SELCOR: CORE LOCATION X=',X,' Y=',Y
70 RETURN
71 END
Note: See TracBrowser for help on using the repository browser.