source: branches/start/MagicSoft/Simulation/Corsika/Mmcs/coorin.f@ 19921

Last change on this file since 19921 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 COORIN( HEIGHT )
2
3C-----------------------------------------------------------------------
4C COOR(DINATE) IN(ITIALIZATION)
5C
6C INITIALIZES COORDINATE CORRECTION FOR EACH OBSERVATION LEVEL
7C ROUTINE SHOULD BE CALLED AFTER HEIGHT OF FIRST INTERACTION IS
8C DETERMINED. X,Y COORDINATES OF 1. INERACTION ARE ASSUMED TO BE 0,0.
9C THIS SUBROUTINE IS CALLED FROM MAIN, ELECTR, AND PHOTON
10C ARGUMENT:
11C HEIGHT = HEIGHT OF 1. INTERACTION
12C
13C AUTHOR : J. KNAPP IK1 FZK KARLSRUHE
14C-----------------------------------------------------------------------
15
16 IMPLICIT NONE
17*KEEP,OBSPAR.
18 COMMON /OBSPAR/ OBSLEV,THCKOB,XOFF,YOFF,THETAP,PHIP,
19 * THETPR,PHIPR,NOBSLV
20 DOUBLE PRECISION OBSLEV(10),THCKOB(10),XOFF(10),YOFF(10),
21 * THETAP,THETPR(2),PHIP,PHIPR(2)
22 INTEGER NOBSLV
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
48 DOUBLE PRECISION DXY,HEIGHT,TANTE
49 INTEGER I
50C-----------------------------------------------------------------------
51
52 IF ( DEBUG ) WRITE(MDEBUG,*) 'COORIN: HEIGHT,THETA,PHI =',
53 * SNGL(HEIGHT),SNGL(THETAP),SNGL(PHIP)
54
55 TANTE = TAN( THETAP )
56 DO 1 I = 1,NOBSLV
57 DXY = TANTE * ( HEIGHT - OBSLEV(I) )
58 XOFF(I) = COS( PHIP ) * DXY
59 YOFF(I) = SIN( PHIP ) * DXY
60 1 CONTINUE
61
62 IF ( DEBUG ) WRITE(MDEBUG,100)
63 * (OBSLEV(I),XOFF(I),YOFF(I),I=1,NOBSLV)
64 100 FORMAT(' COORIN: OBSLVL,XOFF,YOFF= ',1P,3E12.4)
65
66 RETURN
67 END
Note: See TracBrowser for help on using the repository browser.