1 |
* |
* |
2 |
* $Id: gptofv.F,v 3.1.1.1 2002/07/11 16:02:01 cafagna Exp $ |
* $Id: gptofv.F,v 3.3 2006/04/09 23:29:22 cafagna Exp $ |
3 |
* |
* |
4 |
* $Log: gptofv.F,v $ |
* $Log: gptofv.F,v $ |
5 |
|
* Revision 3.3 2006/04/09 23:29:22 cafagna |
6 |
|
* Several new things, among this: ND and CARD |
7 |
|
* |
8 |
|
* Revision 3.2 2005/06/21 02:42:29 cafagna |
9 |
|
* Major modification to the geometry and to the random number chain |
10 |
|
* |
11 |
* Revision 3.1.1.1 2002/07/11 16:02:01 cafagna |
* Revision 3.1.1.1 2002/07/11 16:02:01 cafagna |
12 |
* First GPAMELA release on CVS |
* First GPAMELA release on CVS |
13 |
* |
* |
31 |
INTEGER IROT,IVOLU,N,NMED,NUM |
INTEGER IROT,IVOLU,N,NMED,NUM |
32 |
REAL X,Y,Z |
REAL X,Y,Z |
33 |
* |
* |
34 |
|
NMED=MAL |
35 |
|
* |
36 |
|
* Define the S1 volume |
37 |
|
* |
38 |
|
CALL GSVOLU('S1 ','BOX ',NMED,S1, 3,IVOLU) |
39 |
|
* |
40 |
|
* Define the S2 volume |
41 |
|
* |
42 |
|
CALL GSVOLU('S2 ','BOX ',NMED,S2, 3,IVOLU) |
43 |
|
* |
44 |
NMED=MN2 |
NMED=MN2 |
45 |
* |
* |
46 |
* Define the S11 volume |
* Define the S1A volume |
47 |
|
* |
48 |
|
CALL GSVOLU('S1A ','BOX ',NMED,S1A, 3,IVOLU) |
49 |
|
* |
50 |
|
* Define the S2A volume |
51 |
|
* |
52 |
|
CALL GSVOLU('S2A ','BOX ',NMED,S2A, 3,IVOLU) |
53 |
|
* |
54 |
|
* Define the S3A volume |
55 |
* |
* |
56 |
CALL GSVOLU('S11 ','BOX ',NMED,S11, 3,IVOLU) |
CALL GSVOLU('S3A ','BOX ',NMED,S3A, 3,IVOLU) |
57 |
* |
* |
58 |
* Define the S12 volume |
NMED=MMYL |
59 |
* |
* |
60 |
CALL GSVOLU('S12 ','BOX ',NMED,S12, 3,IVOLU) |
* Define the S11M volume |
61 |
* |
* |
62 |
* Define the S21 volume |
CALL GSVOLU('S11M','BOX ',NMED,S11M, 3,IVOLU) |
63 |
* |
* |
64 |
CALL GSVOLU('S21 ','BOX ',NMED,S21, 3,IVOLU) |
* Define the S12M volume |
65 |
* |
* |
66 |
* Define the S22 volume |
CALL GSVOLU('S12M','BOX ',NMED,S12M, 3,IVOLU) |
67 |
* |
* |
68 |
CALL GSVOLU('S22 ','BOX ',NMED,S22, 3,IVOLU) |
* Define the S21M volume |
69 |
* |
* |
70 |
* Define the S31 volume |
CALL GSVOLU('S21M','BOX ',NMED,S21M, 3,IVOLU) |
71 |
* |
* |
72 |
CALL GSVOLU('S31 ','BOX ',NMED,S31, 3,IVOLU) |
* Define the S22M volume |
73 |
* |
* |
74 |
* Define the S32 volume |
CALL GSVOLU('S22M','BOX ',NMED,S22M, 3,IVOLU) |
75 |
|
* |
76 |
|
* Define the S31M volume |
77 |
|
* |
78 |
|
CALL GSVOLU('S31M','BOX ',NMED,S31M, 3,IVOLU) |
79 |
|
* |
80 |
|
* Define the S32M volume |
81 |
|
* |
82 |
|
CALL GSVOLU('S32M','BOX ',NMED,S32M, 3,IVOLU) |
83 |
* |
* |
|
CALL GSVOLU('S32 ','BOX ',NMED,S32, 3,IVOLU) |
|
84 |
* |
* |
85 |
* Change medium just for S4. |
* Change medium just for S4. |
86 |
* |
* |
92 |
* |
* |
93 |
* Start subvolume definition. |
* Start subvolume definition. |
94 |
* |
* |
|
c ml: 27/10/04: |
|
95 |
* |
* |
|
c* Define the S11X volume |
|
96 |
* Define the S11Y volume |
* Define the S11Y volume |
97 |
* |
* |
|
c CALL GSVOLU('S11X','BOX ',NMED,S11X, 3,IVOLU) |
|
98 |
CALL GSVOLU('S11Y','BOX ',NMED,S11Y, 3,IVOLU) |
CALL GSVOLU('S11Y','BOX ',NMED,S11Y, 3,IVOLU) |
99 |
* |
* |
|
c* Define the S12Y volume |
|
100 |
* Define the S12X volume |
* Define the S12X volume |
101 |
* |
* |
|
c CALL GSVOLU('S12Y','BOX ',NMED,S12Y, 3,IVOLU) |
|
102 |
CALL GSVOLU('S12X','BOX ',NMED,S12X, 3,IVOLU) |
CALL GSVOLU('S12X','BOX ',NMED,S12X, 3,IVOLU) |
|
c end ml. |
|
103 |
* |
* |
104 |
* Define the S21X volume |
* Define the S21X volume |
105 |
* |
* |
117 |
* |
* |
118 |
CALL GSVOLU('S32X','BOX ',NMED,S32X, 3,IVOLU) |
CALL GSVOLU('S32X','BOX ',NMED,S32X, 3,IVOLU) |
119 |
|
|
120 |
c ml: 21/12/04: |
c$$$<<<<<<< gptofv.F |
121 |
NMED=MCF |
c$$$======= |
122 |
* |
c$$$c ml: 21/12/04: |
123 |
* Define the SC11 volume |
c$$$ NMED=MAL |
124 |
* |
c$$$* |
125 |
CALL GSVOLU('SC11','BOX ',NMED,SC11, 3,IVOLU) |
c$$$* Define the SC11 volume |
126 |
* |
c$$$* |
127 |
* Define the SC12 volume |
c$$$ CALL GSVOLU('SC11','BOX ',NMED,SC11, 3,IVOLU) |
128 |
* |
c$$$* |
129 |
CALL GSVOLU('SC12','BOX ',NMED,SC12, 3,IVOLU) |
c$$$* Define the SC12 volume |
130 |
* |
c$$$* |
131 |
* Define the SC21 volume |
c$$$ CALL GSVOLU('SC12','BOX ',NMED,SC12, 3,IVOLU) |
132 |
* |
c$$$* |
133 |
CALL GSVOLU('SC21','BOX ',NMED,SC21, 3,IVOLU) |
c$$$* Define the SC21 volume |
134 |
* |
c$$$* |
135 |
* Define the SC22 volume |
c$$$ CALL GSVOLU('SC21','BOX ',NMED,SC21, 3,IVOLU) |
136 |
* |
c$$$* |
137 |
CALL GSVOLU('SC22','BOX ',NMED,SC22, 3,IVOLU) |
c$$$* Define the SC22 volume |
138 |
|
c$$$* |
139 |
|
c$$$ CALL GSVOLU('SC22','BOX ',NMED,SC22, 3,IVOLU) |
140 |
|
c$$$ |
141 |
|
c$$$>>>>>>> 3.3 |
142 |
c* |
c* |
143 |
c* Define the STOF volume |
c* Define the STOF volume |
144 |
c* |
c* |
167 |
c CALL GSVOLU('SPV2','BOX ',NMED,SPV2, 3,IVOLU) |
c CALL GSVOLU('SPV2','BOX ',NMED,SPV2, 3,IVOLU) |
168 |
cc end ml. |
cc end ml. |
169 |
* |
* |
|
* Define the SC31 volume |
|
|
* |
|
|
CALL GSVOLU('SC31','BOX ',NMED,SC31, 3,IVOLU) |
|
|
* |
|
|
* Define the SC32 volume |
|
|
* |
|
|
CALL GSVOLU('SC32','BOX ',NMED,SC32, 3,IVOLU) |
|
|
|
|
|
* |
|
170 |
* Positioning volumes |
* Positioning volumes |
171 |
* |
* |
172 |
c ml: 21/12/04: |
X=0. |
173 |
Y= 0 |
Y=0. |
174 |
Z= 0 |
Z=0. |
175 |
c ml: 27/10/04: |
CALL GSPOS('S1A ',N,'S1 ',X,Y,Z,0,'ONLY') |
176 |
c DO I=1,NS11X |
* |
177 |
DO I=1,NS11Y |
X=0. |
178 |
|
Z=-S1A(3)+HGLUTOF+HPVCMIN+S12M(3) |
179 |
|
DO I=1,NS12X |
180 |
N= I |
N= I |
181 |
c X= -S11(1) + (2*I-1)*S11X(1) |
Y= -S1A(2) + HMYLTOF + (2*I-1)*S12M(2) |
182 |
X= -S11(1) + (2*I-1)*S11Y(1) |
CALL GSPOS('S12M',N,'S1A ',X,Y,Z,0,'ONLY') |
|
c CALL GSPOS('S11X',N,'S11 ',X,Y,Z,0,'ONLY') |
|
|
CALL GSPOS('S11Y',N,'S11 ',X,Y,Z,0,'ONLY') |
|
183 |
ENDDO |
ENDDO |
|
c end ml. |
|
|
X= 0. |
|
184 |
Y= 0. |
Y= 0. |
185 |
DO I=1,2 |
Z=-S1A(3)+HGLUTOF+HPVCMIN+2*S12M(3)+S11M(3) |
186 |
|
DO I=1,NS11Y |
187 |
N= I |
N= I |
188 |
Z= (-1.)**I*S11(3) + (-1.)**(I+1)*SC11(3) |
X= -S1A(1) + HMYLTOF + (2*I-1)*S11M(1) |
189 |
CALL GSPOS('SC11',N,'S11 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S11M',N,'S1A ',X,Y,Z,0,'ONLY') |
190 |
ENDDO |
ENDDO |
191 |
|
C Z=-S1A(3)+HGLUTOF+HPVCMAX+S12M(3) |
192 |
|
C CALL GSPOS('S12M',N,'S1A ',X,Y,Z,0,'ONLY') |
193 |
|
C Z=-S1A(3)+HGLUTOF+0.4+2*S12M(3)+S11M(3) |
194 |
|
C CALL GSPOS('S11M',N,'S1A ',X,Y,Z,0,'ONLY') |
195 |
|
* |
196 |
|
X=0. |
197 |
|
Y=0. |
198 |
|
Z=0. |
199 |
|
CALL GSPOS('S2A ',N,'S2 ',X,Y,Z,0,'ONLY') |
200 |
* |
* |
|
X= 0 |
|
|
Z= 0 |
|
|
c ml: 27/10/04 |
|
|
c DO I=1,NS12Y |
|
|
DO I=1,NS12X |
|
|
N= I |
|
|
c Y= -S12(2) + (2*I-1)*S12Y(2) |
|
|
Y= -S12(2) + (2*I-1)*S12X(2) |
|
|
c CALL GSPOS('S12Y',N,'S12 ',X,Y,Z,0,'ONLY') |
|
|
CALL GSPOS('S12X',N,'S12 ',X,Y,Z,0,'ONLY') |
|
|
ENDDO |
|
|
c end ml. |
|
|
X= 0. |
|
201 |
Y= 0. |
Y= 0. |
202 |
DO I=1,2 |
Z=-S2A(3)+HGLUTOF+S22M(3) |
203 |
|
DO I=1,NS22Y |
204 |
N= I |
N= I |
205 |
Z= (-1.)**I*S12(3) + (-1.)**(I+1)*SC12(3) |
X= -S2A(1) + HMYLTOF + (2*I-1)*S22M(1) |
206 |
CALL GSPOS('SC12',N,'S12 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S22M',N,'S2A ',X,Y,Z,0,'ONLY') |
207 |
ENDDO |
ENDDO |
208 |
* |
* |
209 |
Y= 0 |
X= 0. |
210 |
Z= 0 |
Z=-S2A(3)+HGLUTOF+2*S22M(3)+S21M(3) |
211 |
DO I=1,NS21X |
DO I=1,NS21X |
212 |
N= I |
N= I |
213 |
c ml: 27/10/04 X= -S21(1) + (2*I-1)*S21X(1) |
Y= -S2A(2) + HMYLTOF+ (2*I-1)*S21M(2) |
214 |
Y= -S21(2) + (2*I-1)*S21X(2) |
CALL GSPOS('S21M',N,'S2A ',X,Y,Z,0,'ONLY') |
|
c end ml. |
|
|
CALL GSPOS('S21X',N,'S21 ',X,Y,Z,0,'ONLY') |
|
215 |
ENDDO |
ENDDO |
216 |
|
C Z=-S2A(3)+HGLUTOF+S22M(3) |
217 |
|
C CALL GSPOS('S22M',N,'S2A ',X,Y,Z,0,'ONLY') |
218 |
|
C Z=-S2A(3)+HGLUTOF+2*S22M(3)+S21M(3) |
219 |
|
C CALL GSPOS('S21M',N,'S2A ',X,Y,Z,0,'ONLY') |
220 |
|
* |
221 |
X= 0. |
X= 0. |
222 |
Y= 0. |
Z=-S3A(3)+HAIRS3+S32M(3) |
223 |
DO I=1,2 |
DO I=1,NS32X |
224 |
N= I |
N= I |
225 |
Z= (-1.)**I*S21(3) + (-1.)**(I+1)*SC21(3) |
Y= -S3A(2)+ (2*I-1)*S32M(2) |
226 |
CALL GSPOS('SC21',N,'S21 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S32M',N,'S3A ',X,Y,Z,0,'ONLY') |
227 |
ENDDO |
ENDDO |
228 |
* |
* |
229 |
X= 0 |
Y= 0. |
230 |
Z= 0 |
Z= -S3A(3)+HAIRS3+2*S32M(3)+HAIRS3+S31M(3) |
231 |
DO I=1,NS22Y |
DO I=1,NS31Y |
232 |
N= I |
N= I |
233 |
c ml: 27/10/04 Y= -S22(2) + (2*I-1)*S22Y(2) |
X= -S3A(1)+(2*I-1)*S31M(1) |
234 |
X= -S22(1) + (2*I-1)*S22Y(1) |
CALL GSPOS('S31M',N,'S3A ',X,Y,Z,0,'ONLY') |
|
c end ml. |
|
|
CALL GSPOS('S22Y',N,'S22 ',X,Y,Z,0,'ONLY') |
|
235 |
ENDDO |
ENDDO |
236 |
|
* |
237 |
|
C Z=-S3A(3)+HAIRS3+S32M(3) |
238 |
|
C CALL GSPOS('S32M',N,'S3A ',X,Y,Z,0,'ONLY') |
239 |
|
C Z=-S32(3)+HAIRS3+2*S32M(3)+HAIRS3+S31M(3) |
240 |
|
C CALL GSPOS('S31M',N,'S3A ',X,Y,Z,0,'ONLY') |
241 |
|
**************************************** |
242 |
|
c ml: 21/12/04: |
243 |
|
X=0. |
244 |
|
Y= 0. |
245 |
|
Z= 0. |
246 |
|
N=1 |
247 |
|
c ml: 27/10/04: |
248 |
|
c DO I=1,NS11Y |
249 |
|
c N= I |
250 |
|
c X= -S11M(1) + HMYLTOF + (2*I-1)*S11Y(1) |
251 |
|
CALL GSPOS('S11Y',N,'S11M',X,Y,Z,0,'ONLY') |
252 |
|
c ENDDO |
253 |
|
c end ml. |
254 |
|
* |
255 |
X= 0. |
X= 0. |
256 |
|
Y=0. |
257 |
|
Z= 0. |
258 |
|
N=1 |
259 |
|
c ml: 27/10/04 |
260 |
|
C DO I=1,NS12X |
261 |
|
C N= I |
262 |
|
C Y= -S11M(2) + HMYLTOF + (2*I-1)*S12X(2) |
263 |
|
CALL GSPOS('S12X',N,'S12M',X,Y,Z,0,'ONLY') |
264 |
|
C ENDDO |
265 |
|
c end ml. |
266 |
|
* |
267 |
|
X=0. |
268 |
|
y=0. |
269 |
|
Z= 0. |
270 |
|
N=1 |
271 |
|
C DO I=1,NS21X |
272 |
|
C N= I |
273 |
|
c Y= -S21M(2) + HMYLTOF+ (2*I-1)*S21X(2) |
274 |
|
CALL GSPOS('S21X',N,'S21M',X,Y,Z,0,'ONLY') |
275 |
|
C ENDDO |
276 |
|
* |
277 |
|
X=0. |
278 |
Y= 0. |
Y= 0. |
279 |
DO I=1,2 |
Z= 0. |
280 |
N= I |
N=1 |
281 |
Z= (-1.)**I*S22(3) + (-1.)**(I+1)*SC22(3) |
C DO I=1,NS22Y |
282 |
CALL GSPOS('SC22',N,'S22 ',X,Y,Z,0,'ONLY') |
C N= I |
283 |
ENDDO |
C X= -S22M(1) + HMYLTOF + (2*I-1)*S22Y(1) |
284 |
|
CALL GSPOS('S22Y',N,'S22M',X,Y,Z,0,'ONLY') |
285 |
|
C ENDDO |
286 |
c* |
c* |
287 |
c* Positioning volumes into S11: |
c* Positioning volumes into S11: |
288 |
c+ |
c+ |
318 |
c Z=Z+STOF(3)+SGLU(3) |
c Z=Z+STOF(3)+SGLU(3) |
319 |
c CALL GSPOS('SGLU',N,'SGLU',X,Y,Z,0,'ONLY') |
c CALL GSPOS('SGLU',N,'SGLU',X,Y,Z,0,'ONLY') |
320 |
c Z=Z+SGLU(3)+SPV2 |
c Z=Z+SGLU(3)+SPV2 |
|
X= 0 |
|
|
Z= 0 |
|
|
DO I=1,NS31Y |
|
|
N= I |
|
|
c ml: 27/10/04: |
|
|
c Y= -S31(2) + (2*I-1)*S31Y(2) |
|
|
X= -S31(1) + (2*I-1)*S31Y(1) |
|
|
c end ml. |
|
|
CALL GSPOS('S31Y',N,'S31 ',X,Y,Z,0,'ONLY') |
|
|
ENDDO |
|
|
X= 0. |
|
321 |
Y= 0. |
Y= 0. |
322 |
DO I=1,2 |
Z= -S31M(3)+HMYLTOF+S31Y(3) |
323 |
N= I |
N=1 |
324 |
Z= (-1.)**I*S31(3) + (-1.)**(I+1)*SC31(3) |
C DO I=1,NS31Y |
325 |
CALL GSPOS('SC31',N,'S31 ',X,Y,Z,0,'ONLY') |
C N= I |
326 |
ENDDO |
C X= -S31M(1) + HMYLTOF+(2*I-1)*S31Y(1) |
327 |
|
X= -S31M(1) + 2*(HMYLTOF/2)+S31Y(1) |
328 |
|
CALL GSPOS('S31Y',N,'S31M',X,Y,Z,0,'ONLY') |
329 |
|
C ENDDO |
330 |
* |
* |
|
Y= 0 |
|
|
Z= 0 |
|
|
DO I=1,NS32X |
|
|
N= I |
|
|
c ml: 27/10/04: |
|
|
c X= -S32(1) + (2*I-1)*S32X(1) |
|
|
Y= -S32(2) + (2*I-1)*S32X(2) |
|
|
c end ml. |
|
|
CALL GSPOS('S32X',N,'S32 ',X,Y,Z,0,'ONLY') |
|
|
|
|
|
ENDDO |
|
331 |
X= 0. |
X= 0. |
332 |
Y= 0. |
Z= -S32M(3)+HMYLTOF+S32X(3) |
333 |
DO I=1,2 |
N=1 |
334 |
N= I |
C DO I=1,NS32X |
335 |
Z= (-1.)**I*S32(3) + (-1.)**(I+1)*SC32(3) |
C N= I |
336 |
CALL GSPOS('SC32',N,'S32 ',X,Y,Z,0,'ONLY') |
C Y= -S32M(2) + HMYLTOF+ (2*I-1)*S32X(2) |
337 |
ENDDO |
Y= -S32M(2) + 2*(HMYLTOF/2)+ S32X(2) |
338 |
|
CALL GSPOS('S32X',N,'S32M',X,Y,Z,0,'ONLY') |
339 |
|
C ENDDO |
340 |
* |
* |
341 |
RETURN |
RETURN |
342 |
END |
END |