1 |
* |
* |
2 |
* $Id$ |
* $Id: gptofv.F,v 3.6 2006/11/16 18:45:29 pam-ba Exp $ |
3 |
|
* |
4 |
|
* $Log: gptofv.F,v $ |
5 |
|
* Revision 3.6 2006/11/16 18:45:29 pam-ba |
6 |
|
* Simulated an aluminum container for S4 |
7 |
|
* |
8 |
|
* Revision 3.5 2006/05/18 10:52:32 pam-ba |
9 |
|
* TOF geometry completed and a new material, the polystyrene (density 35 g/l), added |
10 |
|
* |
11 |
|
* Revision 3.4 2006/05/02 10:40:13 pam-ba |
12 |
|
* TOF geometry and position updated and a new material, the mylar, added |
13 |
|
* |
14 |
|
* Revision 3.3 2006/04/09 23:29:22 cafagna |
15 |
|
* Several new things, among this: ND and CARD |
16 |
|
* |
17 |
|
* Revision 3.2 2005/06/21 02:42:29 cafagna |
18 |
|
* Major modification to the geometry and to the random number chain |
19 |
|
* |
20 |
|
* Revision 3.1.1.1 2002/07/11 16:02:01 cafagna |
21 |
|
* First GPAMELA release on CVS |
22 |
* |
* |
|
* $Log$ |
|
23 |
* |
* |
24 |
*CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola |
*CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola |
25 |
*CMZ : 2.00/00 03/03/2000 15.39.05 by Francesco Cafagna |
*CMZ : 2.00/00 03/03/2000 15.39.05 by Francesco Cafagna |
40 |
INTEGER IROT,IVOLU,N,NMED,NUM |
INTEGER IROT,IVOLU,N,NMED,NUM |
41 |
REAL X,Y,Z |
REAL X,Y,Z |
42 |
* |
* |
43 |
|
NMED=MAL |
44 |
|
* |
45 |
|
* Define the S1 volume |
46 |
|
* |
47 |
|
CALL GSVOLU('S1 ','BOX ',NMED,S1, 3,IVOLU) |
48 |
|
* |
49 |
|
* Define the S2 volume |
50 |
|
* |
51 |
|
CALL GSVOLU('S2 ','BOX ',NMED,S2, 3,IVOLU) |
52 |
|
* |
53 |
NMED=MN2 |
NMED=MN2 |
54 |
* |
* |
55 |
* Define the S11 volume |
* Define the S1A volume |
56 |
|
* |
57 |
|
CALL GSVOLU('S1A ','BOX ',NMED,S1A, 3,IVOLU) |
58 |
|
* |
59 |
|
* Define the S2A volume |
60 |
|
* |
61 |
|
CALL GSVOLU('S2A ','BOX ',NMED,S2A, 3,IVOLU) |
62 |
|
* |
63 |
|
* Define the S3 volume |
64 |
|
* |
65 |
|
CALL GSVOLU('S3 ','BOX ',NMED,S3, 3,IVOLU) |
66 |
|
* |
67 |
|
NMED=MMYL |
68 |
|
* |
69 |
|
* Define the S11M volume |
70 |
|
* |
71 |
|
CALL GSVOLU('S11M','BOX ',NMED,S11M, 3,IVOLU) |
72 |
* |
* |
73 |
CALL GSVOLU('S11 ','BOX ',NMED,S11, 3,IVOLU) |
* Define the S12M volume |
74 |
* |
* |
75 |
* Define the S12 volume |
CALL GSVOLU('S12M','BOX ',NMED,S12M, 3,IVOLU) |
76 |
* |
* |
77 |
CALL GSVOLU('S12 ','BOX ',NMED,S12, 3,IVOLU) |
* Define the S21M volume |
78 |
* |
* |
79 |
* Define the S21 volume |
CALL GSVOLU('S21M','BOX ',NMED,S21M, 3,IVOLU) |
80 |
* |
* |
81 |
CALL GSVOLU('S21 ','BOX ',NMED,S21, 3,IVOLU) |
* Define the S22M volume |
82 |
* |
* |
83 |
* Define the S22 volume |
CALL GSVOLU('S22M','BOX ',NMED,S22M, 3,IVOLU) |
84 |
* |
* |
85 |
CALL GSVOLU('S22 ','BOX ',NMED,S22, 3,IVOLU) |
* Define the S31M volume |
86 |
* |
* |
87 |
* Define the S31 volume |
CALL GSVOLU('S31M','BOX ',NMED,S31M, 3,IVOLU) |
88 |
* |
* |
89 |
CALL GSVOLU('S31 ','BOX ',NMED,S31, 3,IVOLU) |
* Define the S32M volume |
90 |
* |
* |
91 |
* Define the S32 volume |
CALL GSVOLU('S32M','BOX ',NMED,S32M, 3,IVOLU) |
92 |
|
* |
93 |
|
* Define the POL1 volume |
94 |
|
* |
95 |
|
NMED=MPOL |
96 |
|
CALL GSVOLU('POL1','BOX ',NMED,POL1, 3,IVOLU) |
97 |
|
* |
98 |
|
* Define the POL2 volume |
99 |
|
* |
100 |
|
CALL GSVOLU('POL2','BOX ',NMED,POL2, 3,IVOLU) |
101 |
|
* |
102 |
|
* Define the POLY volume |
103 |
|
* |
104 |
|
CALL GSVOLU('POLY','BOX ',NMED,POLY, 3,IVOLU) |
105 |
|
* |
106 |
|
* |
107 |
|
* S4 container volume. |
108 |
|
* |
109 |
|
NMED=MAL |
110 |
|
CALL GSVOLU('S4AL','BOX ',NMED,S4AL, 3,IVOLU) |
111 |
* |
* |
|
CALL GSVOLU('S32 ','BOX ',NMED,S32, 3,IVOLU) |
|
112 |
* |
* |
113 |
* Change medium just for S4. |
* Change medium just for S4. |
114 |
* |
* |
121 |
* Start subvolume definition. |
* Start subvolume definition. |
122 |
* |
* |
123 |
* |
* |
124 |
* Define the S11X volume |
* Define the S11Y volume |
125 |
* |
* |
126 |
CALL GSVOLU('S11X','BOX ',NMED,S11X, 3,IVOLU) |
CALL GSVOLU('S11Y','BOX ',NMED,S11Y, 3,IVOLU) |
127 |
* |
* |
128 |
* Define the S12Y volume |
* Define the S12X volume |
129 |
* |
* |
130 |
CALL GSVOLU('S12Y','BOX ',NMED,S12Y, 3,IVOLU) |
CALL GSVOLU('S12X','BOX ',NMED,S12X, 3,IVOLU) |
131 |
* |
* |
132 |
* Define the S21X volume |
* Define the S21X volume |
133 |
* |
* |
145 |
* |
* |
146 |
CALL GSVOLU('S32X','BOX ',NMED,S32X, 3,IVOLU) |
CALL GSVOLU('S32X','BOX ',NMED,S32X, 3,IVOLU) |
147 |
|
|
148 |
NMED=MCF |
c$$$<<<<<<< gptofv.F |
149 |
* |
c$$$======= |
150 |
* Define the SC11 volume |
c$$$c ml: 21/12/04: |
151 |
* |
c$$$ NMED=MAL |
152 |
CALL GSVOLU('SC11','BOX ',NMED,SC11, 3,IVOLU) |
c$$$* |
153 |
* |
c$$$* Define the SC11 volume |
154 |
* Define the SC12 volume |
c$$$* |
155 |
* |
c$$$ CALL GSVOLU('SC11','BOX ',NMED,SC11, 3,IVOLU) |
156 |
CALL GSVOLU('SC12','BOX ',NMED,SC12, 3,IVOLU) |
c$$$* |
157 |
* |
c$$$* Define the SC12 volume |
158 |
* Define the SC21 volume |
c$$$* |
159 |
* |
c$$$ CALL GSVOLU('SC12','BOX ',NMED,SC12, 3,IVOLU) |
160 |
CALL GSVOLU('SC21','BOX ',NMED,SC21, 3,IVOLU) |
c$$$* |
161 |
* |
c$$$* Define the SC21 volume |
162 |
* Define the SC22 volume |
c$$$* |
163 |
* |
c$$$ CALL GSVOLU('SC21','BOX ',NMED,SC21, 3,IVOLU) |
164 |
CALL GSVOLU('SC22','BOX ',NMED,SC22, 3,IVOLU) |
c$$$* |
165 |
|
c$$$* Define the SC22 volume |
166 |
* |
c$$$* |
167 |
* Define the SC31 volume |
c$$$ CALL GSVOLU('SC22','BOX ',NMED,SC22, 3,IVOLU) |
168 |
* |
c$$$ |
169 |
CALL GSVOLU('SC31','BOX ',NMED,SC31, 3,IVOLU) |
c$$$>>>>>>> 3.3 |
|
* |
|
|
* Define the SC32 volume |
|
|
* |
|
|
CALL GSVOLU('SC32','BOX ',NMED,SC32, 3,IVOLU) |
|
|
|
|
170 |
* |
* |
171 |
* Positioning volumes |
* Positioning volumes |
172 |
* |
* |
173 |
Y= 0 |
X=0. |
174 |
Z= 0 |
Y=0. |
175 |
DO I=1,NS11X |
Z=0. |
176 |
N= I |
CALL GSPOS('S1A ',N,'S1 ',X,Y,Z,0,'ONLY') |
177 |
X= -S11(1) + (2*I-1)*S11X(1) |
* |
178 |
CALL GSPOS('S11X',N,'S11 ',X,Y,Z,0,'ONLY') |
N=1 |
179 |
|
X=0. |
180 |
|
Y=0. |
181 |
|
Z=-S1A(3)+HGLUTOF+HPVCMIN/2. |
182 |
|
CALL GSPOS('POL2',N,'S1A ',X,Y,Z,0,'ONLY') |
183 |
|
* |
184 |
|
X=0. |
185 |
|
Z=-S1A(3)+HGLUTOF+HPVCMIN+S12M(3) |
186 |
|
DO I=1,NS12X |
187 |
|
N= I |
188 |
|
c ab mod Y= -S1A(2) + HMYLTOF + (2*I-1)*S12M(2) |
189 |
|
Y= -S1A(2) + (2*I-1)*S12M(2) |
190 |
|
CALL GSPOS('S12M',N,'S1A ',X,Y,Z,0,'ONLY') |
191 |
ENDDO |
ENDDO |
192 |
X= 0. |
* |
193 |
Y= 0. |
Y= 0. |
194 |
DO I=1,2 |
Z=-S1A(3)+HGLUTOF+HPVCMIN+2*S12M(3)+S11M(3) |
195 |
|
DO I=1,NS11Y |
196 |
N= I |
N= I |
197 |
Z= (-1.)**I*S11(3) + (-1.)**(I+1)*SC11(3) |
c ab mod X= -S1A(1) + HMYLTOF + (2*I-1)*S11M(1) |
198 |
CALL GSPOS('SC11',N,'S11 ',X,Y,Z,0,'ONLY') |
X= -S1A(1) + (2*I-1)*S11M(1) |
199 |
ENDDO |
CALL GSPOS('S11M',N,'S1A ',X,Y,Z,0,'ONLY') |
200 |
|
ENDDO |
201 |
|
* |
202 |
|
N=1 |
203 |
|
X=0. |
204 |
|
Y=0. |
205 |
|
Z=-S1A(3)+HGLUTOF+HPVCMIN+2*S12M(3)+2.*S11M(3)+HPVCMAX/2. |
206 |
|
CALL GSPOS('POL1',N,'S1A ',X,Y,Z,0,'ONLY') |
207 |
|
C Z=-S1A(3)+HGLUTOF+HPVCMAX+S12M(3) |
208 |
|
C CALL GSPOS('S12M',N,'S1A ',X,Y,Z,0,'ONLY') |
209 |
|
C Z=-S1A(3)+HGLUTOF+0.4+2*S12M(3)+S11M(3) |
210 |
|
C CALL GSPOS('S11M',N,'S1A ',X,Y,Z,0,'ONLY') |
211 |
|
* |
212 |
|
X=0. |
213 |
|
Y=0. |
214 |
|
Z=0. |
215 |
|
CALL GSPOS('S2A ',N,'S2 ',X,Y,Z,0,'ONLY') |
216 |
* |
* |
|
X= 0 |
|
|
Z= 0 |
|
|
DO I=1,NS12Y |
|
|
N= I |
|
|
Y= -S12(2) + (2*I-1)*S12Y(2) |
|
|
CALL GSPOS('S12Y',N,'S12 ',X,Y,Z,0,'ONLY') |
|
|
ENDDO |
|
|
X= 0. |
|
217 |
Y= 0. |
Y= 0. |
218 |
DO I=1,2 |
Z=-S2A(3)+HGLUTOF+S22M(3) |
219 |
|
DO I=1,NS22Y |
220 |
N= I |
N= I |
221 |
Z= (-1.)**I*S12(3) + (-1.)**(I+1)*SC12(3) |
c ab mod X= -S2A(1) + HMYLTOF + (2*I-1)*S22M(1) |
222 |
CALL GSPOS('SC12',N,'S12 ',X,Y,Z,0,'ONLY') |
X= -S2A(1) + (2*I-1)*S22M(1) |
223 |
|
CALL GSPOS('S22M',N,'S2A ',X,Y,Z,0,'ONLY') |
224 |
ENDDO |
ENDDO |
225 |
* |
* |
|
Y= 0 |
|
|
Z= 0 |
|
|
DO I=1,NS21X |
|
|
N= I |
|
|
X= -S21(1) + (2*I-1)*S21X(1) |
|
|
CALL GSPOS('S21X',N,'S21 ',X,Y,Z,0,'ONLY') |
|
|
ENDDO |
|
226 |
X= 0. |
X= 0. |
227 |
Y= 0. |
Z=-S2A(3)+HGLUTOF+2*S22M(3)+S21M(3) |
228 |
DO I=1,2 |
DO I=1,NS21X |
229 |
N= I |
N= I |
230 |
Z= (-1.)**I*S21(3) + (-1.)**(I+1)*SC21(3) |
c ab mod Y= -S2A(2) + HMYLTOF+ (2*I-1)*S21M(2) |
231 |
CALL GSPOS('SC21',N,'S21 ',X,Y,Z,0,'ONLY') |
Y= -S2A(2) + (2*I-1)*S21M(2) |
232 |
|
CALL GSPOS('S21M',N,'S2A ',X,Y,Z,0,'ONLY') |
233 |
ENDDO |
ENDDO |
234 |
* |
* |
235 |
X= 0 |
N=1 |
236 |
Z= 0 |
X=0. |
237 |
DO I=1,NS22Y |
Y=0. |
238 |
N= I |
Z=-S2A(3)+HGLUTOF+2*S22M(3)+2.*S21M(3)+HPVCMIN/2. |
239 |
Y= -S22(2) + (2*I-1)*S22Y(2) |
CALL GSPOS('POLY',N,'S2A ',X,Y,Z,0,'ONLY') |
240 |
CALL GSPOS('S22Y',N,'S22 ',X,Y,Z,0,'ONLY') |
C Z=-S2A(3)+HGLUTOF+S22M(3) |
241 |
ENDDO |
C CALL GSPOS('S22M',N,'S2A ',X,Y,Z,0,'ONLY') |
242 |
|
C Z=-S2A(3)+HGLUTOF+2*S22M(3)+S21M(3) |
243 |
|
C CALL GSPOS('S21M',N,'S2A ',X,Y,Z,0,'ONLY') |
244 |
|
* |
245 |
X= 0. |
X= 0. |
246 |
Y= 0. |
ccC Z=-S3(3)+HAIRS3+S32M(3) |
247 |
DO I=1,2 |
Z=-S3(3)+S32M(3) |
248 |
|
DO I=1,NS32X |
249 |
N= I |
N= I |
250 |
Z= (-1.)**I*S22(3) + (-1.)**(I+1)*SC22(3) |
Y= -S3(2)+ (2*I-1)*S32M(2) |
251 |
CALL GSPOS('SC22',N,'S22 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S32M',N,'S3 ',X,Y,Z,0,'ONLY') |
252 |
ENDDO |
ENDDO |
253 |
* |
* |
254 |
X= 0 |
Y= 0. |
255 |
Z= 0 |
ccC Z= -S3(3)+HAIRS3+2*S32M(3)+HAIRS3+S31M(3) |
256 |
|
Z=-S3(3)+2*S32M(3)+HAIRS3+S31M(3) |
257 |
DO I=1,NS31Y |
DO I=1,NS31Y |
258 |
N= I |
N= I |
259 |
Y= -S31(2) + (2*I-1)*S31Y(2) |
X= -S3(1)+(2*I-1)*S31M(1) |
260 |
CALL GSPOS('S31Y',N,'S31 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S31M',N,'S3 ',X,Y,Z,0,'ONLY') |
261 |
ENDDO |
ENDDO |
262 |
X= 0. |
|
263 |
|
* |
264 |
|
C Z=-S3(3)+HAIRS3+S32M(3) |
265 |
|
C CALL GSPOS('S32M',N,'S3 ',X,Y,Z,0,'ONLY') |
266 |
|
C Z=-S32(3)+HAIRS3+2*S32M(3)+HAIRS3+S31M(3) |
267 |
|
C CALL GSPOS('S31M',N,'S3 ',X,Y,Z,0,'ONLY') |
268 |
|
**************************************** |
269 |
|
c ml: 21/12/04: |
270 |
|
X=0. |
271 |
Y= 0. |
Y= 0. |
272 |
DO I=1,2 |
Z= 0. |
273 |
N= I |
N=1 |
274 |
Z= (-1.)**I*S31(3) + (-1.)**(I+1)*SC31(3) |
c ml: 27/10/04: |
275 |
CALL GSPOS('SC31',N,'S31 ',X,Y,Z,0,'ONLY') |
c DO I=1,NS11Y |
276 |
ENDDO |
c N= I |
277 |
|
c X= -S11M(1) + HMYLTOF + (2*I-1)*S11Y(1) |
278 |
|
CALL GSPOS('S11Y',N,'S11M',X,Y,Z,0,'ONLY') |
279 |
|
c ENDDO |
280 |
|
c end ml. |
281 |
* |
* |
|
Y= 0 |
|
|
Z= 0 |
|
|
DO I=1,NS32X |
|
|
N= I |
|
|
X= -S32(1) + (2*I-1)*S32X(1) |
|
|
CALL GSPOS('S32X',N,'S32 ',X,Y,Z,0,'ONLY') |
|
|
ENDDO |
|
282 |
X= 0. |
X= 0. |
283 |
|
Y=0. |
284 |
|
Z= 0. |
285 |
|
N=1 |
286 |
|
c ml: 27/10/04 |
287 |
|
C DO I=1,NS12X |
288 |
|
C N= I |
289 |
|
C Y= -S11M(2) + HMYLTOF + (2*I-1)*S12X(2) |
290 |
|
CALL GSPOS('S12X',N,'S12M',X,Y,Z,0,'ONLY') |
291 |
|
C ENDDO |
292 |
|
c end ml. |
293 |
|
* |
294 |
|
X=0. |
295 |
|
y=0. |
296 |
|
Z= 0. |
297 |
|
N=1 |
298 |
|
C DO I=1,NS21X |
299 |
|
C N= I |
300 |
|
c Y= -S21M(2) + HMYLTOF+ (2*I-1)*S21X(2) |
301 |
|
CALL GSPOS('S21X',N,'S21M',X,Y,Z,0,'ONLY') |
302 |
|
C ENDDO |
303 |
|
* |
304 |
|
X=0. |
305 |
Y= 0. |
Y= 0. |
306 |
DO I=1,2 |
Z= 0. |
307 |
N= I |
N=1 |
308 |
Z= (-1.)**I*S32(3) + (-1.)**(I+1)*SC32(3) |
C DO I=1,NS22Y |
309 |
CALL GSPOS('SC32',N,'S32 ',X,Y,Z,0,'ONLY') |
C N= I |
310 |
ENDDO |
C X= -S22M(1) + HMYLTOF + (2*I-1)*S22Y(1) |
311 |
|
CALL GSPOS('S22Y',N,'S22M',X,Y,Z,0,'ONLY') |
312 |
|
C ENDDO |
313 |
|
Y= 0. |
314 |
|
Z= -S31M(3)+HMYLTOF+S31Y(3) |
315 |
|
N=1 |
316 |
|
C DO I=1,NS31Y |
317 |
|
C N= I |
318 |
|
C X= -S31M(1) + HMYLTOF+(2*I-1)*S31Y(1) |
319 |
|
X= -S31M(1) + 2*(HMYLTOF/2)+S31Y(1) |
320 |
|
CALL GSPOS('S31Y',N,'S31M',X,Y,Z,0,'ONLY') |
321 |
|
C ENDDO |
322 |
|
* |
323 |
|
X= 0. |
324 |
|
Z= -S32M(3)+HMYLTOF+S32X(3) |
325 |
|
N=1 |
326 |
|
C DO I=1,NS32X |
327 |
|
C N= I |
328 |
|
C Y= -S32M(2) + HMYLTOF+ (2*I-1)*S32X(2) |
329 |
|
Y= -S32M(2) + 2*(HMYLTOF/2)+ S32X(2) |
330 |
|
CALL GSPOS('S32X',N,'S32M',X,Y,Z,0,'ONLY') |
331 |
|
C ENDDO |
332 |
|
X=0. |
333 |
|
Y=0. |
334 |
|
Z=0. |
335 |
|
CALL GSPOS('S4 ',N,'S4AL',X,Y,Z,0,'ONLY') |
336 |
* |
* |
337 |
RETURN |
RETURN |
338 |
END |
END |