source: trunk/MagicSoft/Simulation/Corsika/Mmcs/parrap.f@ 5138

Last change on this file since 5138 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: 6.7 KB
Line 
1 SUBROUTINE PARRAP
2
3C-----------------------------------------------------------------------
4C PAR(TICLE) RAP(IDITY)
5C
6C ROUTINE GIVES THE NEW PARTICLES OF HDPM THEIR RAPIDITIES
7C THIS SUBROUTINE IS CALLED FROM HDPM
8C-----------------------------------------------------------------------
9
10 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
11*KEEP,INTER.
12 COMMON /INTER/ AVCH,AVCH3,DC0,DLOG,DMLOG,ECMDIF,ECMDPM,ELAB,
13 * FNEUT,FNEUT2,GNU,PLAB,POSC2,POSC3,POSN2,POSN3,
14 * RC3TO2,S,SEUGF,SEUGP,SLOG,SLOGSQ,SMLOG,
15 * WIDC2,WIDC3,WIDN2,WIDN3,YCM,YY0,ZN,
16 * IDIF,ITAR
17 DOUBLE PRECISION AVCH,AVCH3,DC0,DLOG,DMLOG,ECMDIF,ECMDPM,ELAB,
18 * FNEUT,FNEUT2,GNU,PLAB,POSC2,POSC3,POSN2,POSN3,
19 * RC3TO2,S,SEUGF,SEUGP,SLOG,SLOGSQ,SMLOG,
20 * WIDC2,WIDC3,WIDN2,WIDN3,YCM,YY0,ZN
21 INTEGER IDIF,ITAR
22*KEEP,NEWPAR.
23 COMMON /NEWPAR/ EA,PT2,PX,PY,TMAS,YR,ITYP,
24 * IA1,IA2,IB1,IB2,IC1,IC2,ID1,ID2,IE1,IE2,IF1,IF2,
25 * IG1,IG2,IH1,IH2,II1,II2,IJ1,NTOT
26 DOUBLE PRECISION EA(3000),PT2(3000),PX(3000),PY(3000),TMAS(3000),
27 * YR(3000)
28 INTEGER ITYP(3000),
29 * IA1,IA2,IB1,IB2,IC1,IC2,ID1,ID2,IE1,IE2,IF1,IF2,
30 * IG1,IG2,IH1,IH2,II1,II2,IJ1,NTOT
31*KEEP,RANDPA.
32 COMMON /RANDPA/ FAC,U1,U2,RD,NSEQ,ISEED,KNOR
33 DOUBLE PRECISION FAC,U1,U2
34 REAL RD(3000)
35 INTEGER ISEED(103,10),NSEQ
36 LOGICAL KNOR
37*KEEP,RUNPAR.
38 COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
39 * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
40 * MONIOU,MDEBUG,NUCNUC,
41 * CETAPE,
42 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
43 * N1STTR,MDBASE,
44 * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
45 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
46 * ,GHEISH,GHESIG
47 COMMON /RUNPAC/ DSN,HOST,USER
48 DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
49 REAL STEPFC
50 INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
51 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
52 * N1STTR,MDBASE
53 INTEGER CETAPE
54 CHARACTER*79 DSN
55 CHARACTER*20 HOST,USER
56
57 LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
58 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
59 * ,GHEISH,GHESIG
60*KEND.
61
62 REAL RAND(3000)
63C-----------------------------------------------------------------------
64
65 IF ( DEBUG ) WRITE(MDEBUG,*) 'PARRAP: NTOT=',NTOT
66
67C PROTON ANTIPROTON PAIRS
68 CALL RMMAR( RAND(3),IJ1-2,1 )
69 DO 1013 K = 3,IB1
70C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
71 IF ( K .LE. IA2 ) THEN
72 YR(K) = RANNOR(-POSC3,WIDC3)
73 ELSE
74C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
75 IF ( RAND(K) .LE. 0.5 ) THEN
76 YR(K) = RANNOR(POSC2,WIDC2)
77 ELSE
78 YR(K) = RANNOR(-POSC2,WIDC2)
79 ENDIF
80 ENDIF
81 1013 CONTINUE
82
83C K+ K- PAIRS
84 DO 1014 K = IB1+1,IC1
85 IF ( K .LE. IB2 ) THEN
86C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
87 YR(K) = RANNOR(-POSC3,WIDC3)
88 ELSE
89C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
90 IF ( RAND(K) .LE. 0.5 ) THEN
91 YR(K) = RANNOR(POSC2,WIDC2)
92 ELSE
93 YR(K) = RANNOR(-POSC2,WIDC2)
94 ENDIF
95 ENDIF
96 1014 CONTINUE
97
98C CHARGED HYPERON PAIRS
99 DO 1015 K = IC1+1,ID1
100 IF ( K .LE. IC2 ) THEN
101C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
102 YR(K) = RANNOR(-POSC3,WIDC3)
103 ELSE
104C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
105 IF ( RAND(K) .LE. 0.5 ) THEN
106 YR(K) = RANNOR(POSC2,WIDC2)
107 ELSE
108 YR(K) = RANNOR(-POSC2,WIDC2)
109 ENDIF
110 ENDIF
111 1015 CONTINUE
112
113C PI +-
114 DO 1017 K = ID1+1,IE1
115 IF ( K .LE. ID2 ) THEN
116C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
117 YR(K) = RANNOR(-POSC3,WIDC3)
118 ELSE
119C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
120 IF ( RAND(K) .LE. 0.5 ) THEN
121 YR(K) = RANNOR(POSC2,WIDC2)
122 ELSE
123 YR(K) = RANNOR(-POSC2,WIDC2)
124 ENDIF
125 ENDIF
126 1017 CONTINUE
127
128C NEUTRON ANTINEUTRON PAIRS
129 DO 1021 K = IE1+1,IF1
130 IF ( K .LE. IE2 ) THEN
131C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
132 YR(K) = RANNOR(-POSC3,WIDC3)
133 ELSE
134C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
135 IF ( RAND(K) .LE. 0.5 ) THEN
136 YR(K) = RANNOR(POSC2,WIDC2)
137 ELSE
138 YR(K) = RANNOR(-POSC2,WIDC2)
139 ENDIF
140 ENDIF
141 1021 CONTINUE
142
143C K0L K0S PAIRS
144 DO 1022 K = IF1+1,IG1
145 IF ( K .LE. IF2 ) THEN
146C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
147 YR(K) = RANNOR(-POSC3,WIDC3)
148 ELSE
149C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
150 IF ( RAND(K) .LE. 0.5 ) THEN
151 YR(K) = RANNOR(POSC2,WIDC2)
152 ELSE
153 YR(K) = RANNOR(-POSC2,WIDC2)
154 ENDIF
155 ENDIF
156 1022 CONTINUE
157
158C NEUTRAL HYPERON PAIRS
159 DO 1023 K = IG1+1,IH1
160 IF ( K .LE. IG2 ) THEN
161C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
162 YR(K) = RANNOR(-POSC3,WIDC3)
163 ELSE
164C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
165 IF ( RAND(K) .LE. 0.5 ) THEN
166 YR(K) = RANNOR(POSC2,WIDC2)
167 ELSE
168 YR(K) = RANNOR(-POSC2,WIDC2)
169 ENDIF
170 ENDIF
171 1023 CONTINUE
172
173C ETA
174 DO 1025 K = IH1+1,II1
175 IF ( K .LE. IH2 ) THEN
176C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
177 YR(K) = RANNOR(-POSN3,WIDN3)
178 ELSE
179C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
180 IF ( RAND(K) .LE. 0.5 ) THEN
181 YR(K) = RANNOR(POSN2,WIDN2)
182 ELSE
183 YR(K) = RANNOR(-POSN2,WIDN2)
184 ENDIF
185 ENDIF
186 1025 CONTINUE
187
188C PI(0)
189 DO 1026 K = II1+1,IJ1
190 IF ( K .LE. II2 ) THEN
191C GENERATION OF RAPIDITY FOR EXTRA PARTICLES FROM TARGET.
192 YR(K) = RANNOR(-POSN3,WIDN3)
193 ELSE
194C GENERATION OF RAPIDITY FOR PARTICLES FROM PP-COLLISION AND PROJECTILE
195 IF ( RAND(K) .LE. 0.5 ) THEN
196 YR(K) = RANNOR(POSN2,WIDN2)
197 ELSE
198 YR(K) = RANNOR(-POSN2,WIDN2)
199 ENDIF
200 ENDIF
201 1026 CONTINUE
202
203 RETURN
204 END
Note: See TracBrowser for help on using the repository browser.