source: branches/start/MagicSoft/Simulation/Corsika/Mmcs/shower.f@ 20115

Last change on this file since 20115 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: 3.2 KB
Line 
1 SUBROUTINE SHOWER
2C
3C*********************************************************************
4C DESIGN : D. HECK IK3 FZK KARLSRUHE
5C DATE : AUG 11, 1988
6C*********************************************************************
7C THIS ROUTINE LOOKS, WHAT IS ON TOP OF STACK, AND CALLS THE
8C APPROPRIATE ROUTINE TO TREAT THIS PARTICLE.
9C*********************************************************************
10 COMMON/MISC/KMPI,KMPO,DUNIT,NOSCAT,MED(6),RHOR(6),IRAYLR(6)
11*KEEP,RUNPAR.
12 COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
13 * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
14 * MONIOU,MDEBUG,NUCNUC,
15 * CETAPE,
16 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
17 * N1STTR,MDBASE,
18 * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
19 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
20 * ,GHEISH,GHESIG
21 COMMON /RUNPAC/ DSN,HOST,USER
22 DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
23 REAL STEPFC
24 INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
25 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
26 * N1STTR,MDBASE
27 INTEGER CETAPE
28 CHARACTER*79 DSN
29 CHARACTER*20 HOST,USER
30
31 LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
32 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
33 * ,GHEISH,GHESIG
34*KEEP,STACKE.
35 COMMON/STACKE/ E,TIME,X,Y,Z,U,V,W,DNEAR,IQ,IGEN,IR,IOBS,LPCTE,NP
36 DOUBLE PRECISION E(60),TIME(60)
37 REAL X(60),Y(60),Z(60),U(60),V(60),W(60),DNEAR(60)
38 INTEGER IQ(60),IGEN(60),IR(60),IOBS(60),LPCTE(60),NP
39*KEND.
40C*** TAKE FIRST PARTICLE IN STACK
41 NP=1
42 IF((DEBUG))CALL AUSGB2
43251 CONTINUE
44C *** DECIDE WHAT IS ON TOP OF STACK
45261 CONTINUE
46C *** JUMP TO PARTICLE IN QUESTION
47C *** THE FOLLOWING PARTICLE IDENTIFICATION IS MADE BY THE
48C *** VALUE OF IQ(NP) (ACCORDING TO PROGRAM 'GEANT')
49C *** IQ = 1 PHOTON
50C *** = 2 POSITRON E (+)
51C *** = 3 ELECTRON E (-)
52C *** = 5 POSITIVE MUON (+)
53C *** = 6 NEGATIVE MUON (-)
54C *** = 7 NEUTRAL PION (0)
55C *** = 8 POSITIVE PION (+)
56C *** = 9 NEGATIVE PION (-)
57C *** IF IQ = OTHER VALUE, JUMP TO ERROR MESSAGE
58 GO TO(270,280,280,290, 300,300,300,300,300) (IQ(NP))
59C *** IQ OUT OF RANGE?
60290 WRITE(KMPO,320) IQ(NP)
61320 FORMAT(' SHOWER: PARTICLE TYPE ',I5,' NOT IDENTIFIED')
62 CALL AUSGB2
63 NP=NP-1
64 GO TO262
65300 CALL MPPROP
66 GO TO262
67270 CALL PHOTON(IRCODE)
68C *** PHOTON DISCARDED ?
69 IF((IRCODE.EQ.2))GO TO262
70 IF((IQ(NP).LT.2 .OR. IQ(NP).GT.3))GO TO261
71280 CALL ELECTR(IRCODE)
72C *** ELECTRON DISCARDED ?
73 IF((IRCODE.EQ.2))GO TO262
74 IF((IQ(NP).EQ.1))GO TO 270
75C *** LOOP BACK UP TO PARTICLE SELECTION
76 GO TO 261
77262 CONTINUE
78C *** CHECK TO SEE IF ANYTHING LEFT ON STACK
79C *** NOTHING ON STACK, SO JUMP OUT OF LOOP
80 IF((NP.LE.0))GO TO252
81 GO TO 251
82252 CONTINUE
83C*** TOP STACK LOOP END
84 RETURN
85 END
Note: See TracBrowser for help on using the repository browser.