1 |
* |
* |
2 |
* $Id: gptofv.F,v 3.2 2005/06/21 02:42:29 cafagna Exp $ |
* $Id: gptofv.F,v 3.4 2006/05/02 10:40:13 pam-ba Exp $ |
3 |
* |
* |
4 |
* $Log: gptofv.F,v $ |
* $Log: gptofv.F,v $ |
5 |
|
* Revision 3.4 2006/05/02 10:40:13 pam-ba |
6 |
|
* TOF geometry and position updated and a new material, the mylar, added |
7 |
|
* |
8 |
|
* Revision 3.3 2006/04/09 23:29:22 cafagna |
9 |
|
* Several new things, among this: ND and CARD |
10 |
|
* |
11 |
* Revision 3.2 2005/06/21 02:42:29 cafagna |
* Revision 3.2 2005/06/21 02:42:29 cafagna |
12 |
* Major modification to the geometry and to the random number chain |
* Major modification to the geometry and to the random number chain |
13 |
* |
* |
34 |
INTEGER IROT,IVOLU,N,NMED,NUM |
INTEGER IROT,IVOLU,N,NMED,NUM |
35 |
REAL X,Y,Z |
REAL X,Y,Z |
36 |
* |
* |
37 |
|
NMED=MAL |
38 |
|
* |
39 |
|
* Define the S1 volume |
40 |
|
* |
41 |
|
CALL GSVOLU('S1 ','BOX ',NMED,S1, 3,IVOLU) |
42 |
|
* |
43 |
|
* Define the S2 volume |
44 |
|
* |
45 |
|
CALL GSVOLU('S2 ','BOX ',NMED,S2, 3,IVOLU) |
46 |
|
* |
47 |
NMED=MN2 |
NMED=MN2 |
48 |
* |
* |
49 |
* Define the S11 volume |
* Define the S1A volume |
50 |
|
* |
51 |
|
CALL GSVOLU('S1A ','BOX ',NMED,S1A, 3,IVOLU) |
52 |
|
* |
53 |
|
* Define the S2A volume |
54 |
|
* |
55 |
|
CALL GSVOLU('S2A ','BOX ',NMED,S2A, 3,IVOLU) |
56 |
|
* |
57 |
|
* Define the S3 volume |
58 |
* |
* |
59 |
CALL GSVOLU('S11 ','BOX ',NMED,S11, 3,IVOLU) |
CALL GSVOLU('S3 ','BOX ',NMED,S3, 3,IVOLU) |
60 |
* |
* |
61 |
* Define the S12 volume |
NMED=MMYL |
62 |
* |
* |
63 |
CALL GSVOLU('S12 ','BOX ',NMED,S12, 3,IVOLU) |
* Define the S11M volume |
64 |
* |
* |
65 |
* Define the S21 volume |
CALL GSVOLU('S11M','BOX ',NMED,S11M, 3,IVOLU) |
66 |
* |
* |
67 |
CALL GSVOLU('S21 ','BOX ',NMED,S21, 3,IVOLU) |
* Define the S12M volume |
68 |
* |
* |
69 |
* Define the S22 volume |
CALL GSVOLU('S12M','BOX ',NMED,S12M, 3,IVOLU) |
70 |
* |
* |
71 |
CALL GSVOLU('S22 ','BOX ',NMED,S22, 3,IVOLU) |
* Define the S21M volume |
72 |
* |
* |
73 |
* Define the S31 volume |
CALL GSVOLU('S21M','BOX ',NMED,S21M, 3,IVOLU) |
74 |
* |
* |
75 |
CALL GSVOLU('S31 ','BOX ',NMED,S31, 3,IVOLU) |
* Define the S22M volume |
76 |
* |
* |
77 |
* Define the S32 volume |
CALL GSVOLU('S22M','BOX ',NMED,S22M, 3,IVOLU) |
78 |
|
* |
79 |
|
* Define the S31M volume |
80 |
|
* |
81 |
|
CALL GSVOLU('S31M','BOX ',NMED,S31M, 3,IVOLU) |
82 |
|
* |
83 |
|
* Define the S32M volume |
84 |
|
* |
85 |
|
CALL GSVOLU('S32M','BOX ',NMED,S32M, 3,IVOLU) |
86 |
|
* |
87 |
|
* Define the POL1 volume |
88 |
|
* |
89 |
|
NMED=MPOL |
90 |
|
CALL GSVOLU('POL1','BOX ',NMED,POL1, 3,IVOLU) |
91 |
|
* |
92 |
|
* Define the POL2 volume |
93 |
|
* |
94 |
|
CALL GSVOLU('POL2','BOX ',NMED,POL2, 3,IVOLU) |
95 |
|
* |
96 |
|
* Define the POLY volume |
97 |
|
* |
98 |
|
CALL GSVOLU('POLY','BOX ',NMED,POLY, 3,IVOLU) |
99 |
* |
* |
|
CALL GSVOLU('S32 ','BOX ',NMED,S32, 3,IVOLU) |
|
100 |
* |
* |
101 |
* Change medium just for S4. |
* Change medium just for S4. |
102 |
* |
* |
108 |
* |
* |
109 |
* Start subvolume definition. |
* Start subvolume definition. |
110 |
* |
* |
|
c ml: 27/10/04: |
|
111 |
* |
* |
|
c* Define the S11X volume |
|
112 |
* Define the S11Y volume |
* Define the S11Y volume |
113 |
* |
* |
|
c CALL GSVOLU('S11X','BOX ',NMED,S11X, 3,IVOLU) |
|
114 |
CALL GSVOLU('S11Y','BOX ',NMED,S11Y, 3,IVOLU) |
CALL GSVOLU('S11Y','BOX ',NMED,S11Y, 3,IVOLU) |
115 |
* |
* |
|
c* Define the S12Y volume |
|
116 |
* Define the S12X volume |
* Define the S12X volume |
117 |
* |
* |
|
c CALL GSVOLU('S12Y','BOX ',NMED,S12Y, 3,IVOLU) |
|
118 |
CALL GSVOLU('S12X','BOX ',NMED,S12X, 3,IVOLU) |
CALL GSVOLU('S12X','BOX ',NMED,S12X, 3,IVOLU) |
|
c end ml. |
|
119 |
* |
* |
120 |
* Define the S21X volume |
* Define the S21X volume |
121 |
* |
* |
133 |
* |
* |
134 |
CALL GSVOLU('S32X','BOX ',NMED,S32X, 3,IVOLU) |
CALL GSVOLU('S32X','BOX ',NMED,S32X, 3,IVOLU) |
135 |
|
|
136 |
c ml: 21/12/04: |
c$$$<<<<<<< gptofv.F |
137 |
NMED=MAL |
c$$$======= |
138 |
* |
c$$$c ml: 21/12/04: |
139 |
* Define the SC11 volume |
c$$$ NMED=MAL |
140 |
* |
c$$$* |
141 |
CALL GSVOLU('SC11','BOX ',NMED,SC11, 3,IVOLU) |
c$$$* Define the SC11 volume |
142 |
* |
c$$$* |
143 |
* Define the SC12 volume |
c$$$ CALL GSVOLU('SC11','BOX ',NMED,SC11, 3,IVOLU) |
144 |
* |
c$$$* |
145 |
CALL GSVOLU('SC12','BOX ',NMED,SC12, 3,IVOLU) |
c$$$* Define the SC12 volume |
146 |
* |
c$$$* |
147 |
* Define the SC21 volume |
c$$$ CALL GSVOLU('SC12','BOX ',NMED,SC12, 3,IVOLU) |
148 |
* |
c$$$* |
149 |
CALL GSVOLU('SC21','BOX ',NMED,SC21, 3,IVOLU) |
c$$$* Define the SC21 volume |
150 |
* |
c$$$* |
151 |
* Define the SC22 volume |
c$$$ CALL GSVOLU('SC21','BOX ',NMED,SC21, 3,IVOLU) |
152 |
* |
c$$$* |
153 |
CALL GSVOLU('SC22','BOX ',NMED,SC22, 3,IVOLU) |
c$$$* Define the SC22 volume |
154 |
|
c$$$* |
155 |
c* |
c$$$ CALL GSVOLU('SC22','BOX ',NMED,SC22, 3,IVOLU) |
156 |
c* Define the STOF volume |
c$$$ |
157 |
c* |
c$$$>>>>>>> 3.3 |
|
c NMED=MAL |
|
|
c CALL GSVOLU('STOF','BOX ',NMED,STOF, 3,IVOLU) |
|
|
c* |
|
|
c* Define the SGLU volume |
|
|
c* |
|
|
cC COLLA ARALDITICA (DA VERIFICARNE LA COMPOSIZIONE) |
|
|
c NMED=MSIC |
|
|
c CALL GSVOLU('SGLU','BOX ',NMED,SGLU, 3,IVOLU) |
|
|
c* |
|
|
c* Define the SPV1 volume |
|
|
c* |
|
|
c NMED=? (PVC espanso) |
|
|
c CALL GSVOLU('SPV1','BOX ',NMED,SPV1, 3,IVOLU) |
|
|
c* |
|
|
c* Define the SMYL volume |
|
|
c* |
|
|
c NMED=? (MYLAR) |
|
|
c CALL GSVOLU('SMYL','BOX ',NMED,SMYL, 3,IVOLU) |
|
|
c* |
|
|
c* Define the SPV2 volume |
|
|
c* |
|
|
c NMED=? (PVC espanso) |
|
|
c CALL GSVOLU('SPV2','BOX ',NMED,SPV2, 3,IVOLU) |
|
|
cc end ml. |
|
|
* |
|
|
* Define the SC31 volume |
|
|
* |
|
|
CALL GSVOLU('SC31','BOX ',NMED,SC31, 3,IVOLU) |
|
|
* |
|
|
* Define the SC32 volume |
|
|
* |
|
|
CALL GSVOLU('SC32','BOX ',NMED,SC32, 3,IVOLU) |
|
|
|
|
158 |
* |
* |
159 |
* Positioning volumes |
* Positioning volumes |
160 |
* |
* |
161 |
c ml: 21/12/04: |
X=0. |
162 |
Y= 0 |
Y=0. |
163 |
Z= 0 |
Z=0. |
164 |
c ml: 27/10/04: |
CALL GSPOS('S1A ',N,'S1 ',X,Y,Z,0,'ONLY') |
165 |
c DO I=1,NS11X |
* |
166 |
DO I=1,NS11Y |
N=1 |
167 |
|
X=0. |
168 |
|
Y=0. |
169 |
|
Z=-S1A(3)+HGLUTOF+HPVCMIN/2. |
170 |
|
CALL GSPOS('POL2',N,'S1A ',X,Y,Z,0,'ONLY') |
171 |
|
* |
172 |
|
X=0. |
173 |
|
Z=-S1A(3)+HGLUTOF+HPVCMIN+S12M(3) |
174 |
|
DO I=1,NS12X |
175 |
N= I |
N= I |
176 |
c X= -S11(1) + (2*I-1)*S11X(1) |
Y= -S1A(2) + HMYLTOF + (2*I-1)*S12M(2) |
177 |
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') |
|
178 |
ENDDO |
ENDDO |
179 |
c end ml. |
* |
|
X= 0. |
|
180 |
Y= 0. |
Y= 0. |
181 |
DO I=1,2 |
Z=-S1A(3)+HGLUTOF+HPVCMIN+2*S12M(3)+S11M(3) |
182 |
|
DO I=1,NS11Y |
183 |
N= I |
N= I |
184 |
Z= (-1.)**I*S11(3) + (-1.)**(I+1)*SC11(3) |
X= -S1A(1) + HMYLTOF + (2*I-1)*S11M(1) |
185 |
CALL GSPOS('SC11',N,'S11 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S11M',N,'S1A ',X,Y,Z,0,'ONLY') |
186 |
ENDDO |
ENDDO |
187 |
* |
* |
188 |
X= 0 |
N=1 |
189 |
Z= 0 |
X=0. |
190 |
c ml: 27/10/04 |
Y=0. |
191 |
c DO I=1,NS12Y |
Z=-S1A(3)+HGLUTOF+HPVCMIN+2*S12M(3)+2.*S11M(3)+HPVCMAX/2. |
192 |
DO I=1,NS12X |
CALL GSPOS('POL1',N,'S1A ',X,Y,Z,0,'ONLY') |
193 |
N= I |
C Z=-S1A(3)+HGLUTOF+HPVCMAX+S12M(3) |
194 |
c Y= -S12(2) + (2*I-1)*S12Y(2) |
C CALL GSPOS('S12M',N,'S1A ',X,Y,Z,0,'ONLY') |
195 |
Y= -S12(2) + (2*I-1)*S12X(2) |
C Z=-S1A(3)+HGLUTOF+0.4+2*S12M(3)+S11M(3) |
196 |
c CALL GSPOS('S12Y',N,'S12 ',X,Y,Z,0,'ONLY') |
C CALL GSPOS('S11M',N,'S1A ',X,Y,Z,0,'ONLY') |
197 |
CALL GSPOS('S12X',N,'S12 ',X,Y,Z,0,'ONLY') |
* |
198 |
ENDDO |
X=0. |
199 |
c end ml. |
Y=0. |
200 |
X= 0. |
Z=0. |
201 |
|
CALL GSPOS('S2A ',N,'S2 ',X,Y,Z,0,'ONLY') |
202 |
|
* |
203 |
Y= 0. |
Y= 0. |
204 |
DO I=1,2 |
Z=-S2A(3)+HGLUTOF+S22M(3) |
205 |
|
DO I=1,NS22Y |
206 |
N= I |
N= I |
207 |
Z= (-1.)**I*S12(3) + (-1.)**(I+1)*SC12(3) |
X= -S2A(1) + HMYLTOF + (2*I-1)*S22M(1) |
208 |
CALL GSPOS('SC12',N,'S12 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S22M',N,'S2A ',X,Y,Z,0,'ONLY') |
209 |
ENDDO |
ENDDO |
210 |
* |
* |
211 |
Y= 0 |
X= 0. |
212 |
Z= 0 |
Z=-S2A(3)+HGLUTOF+2*S22M(3)+S21M(3) |
213 |
DO I=1,NS21X |
DO I=1,NS21X |
214 |
N= I |
N= I |
215 |
c ml: 27/10/04 X= -S21(1) + (2*I-1)*S21X(1) |
Y= -S2A(2) + HMYLTOF+ (2*I-1)*S21M(2) |
216 |
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') |
|
217 |
ENDDO |
ENDDO |
218 |
|
* |
219 |
|
N=1 |
220 |
|
X=0. |
221 |
|
Y=0. |
222 |
|
Z=-S2A(3)+HGLUTOF+2*S22M(3)+2.*S21M(3)+HPVCMIN/2. |
223 |
|
CALL GSPOS('POLY',N,'S2A ',X,Y,Z,0,'ONLY') |
224 |
|
C Z=-S2A(3)+HGLUTOF+S22M(3) |
225 |
|
C CALL GSPOS('S22M',N,'S2A ',X,Y,Z,0,'ONLY') |
226 |
|
C Z=-S2A(3)+HGLUTOF+2*S22M(3)+S21M(3) |
227 |
|
C CALL GSPOS('S21M',N,'S2A ',X,Y,Z,0,'ONLY') |
228 |
|
* |
229 |
X= 0. |
X= 0. |
230 |
Y= 0. |
ccC Z=-S3(3)+HAIRS3+S32M(3) |
231 |
DO I=1,2 |
Z=-S3(3)+S32M(3) |
232 |
|
DO I=1,NS32X |
233 |
N= I |
N= I |
234 |
Z= (-1.)**I*S21(3) + (-1.)**(I+1)*SC21(3) |
Y= -S3(2)+ (2*I-1)*S32M(2) |
235 |
CALL GSPOS('SC21',N,'S21 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S32M',N,'S3 ',X,Y,Z,0,'ONLY') |
236 |
ENDDO |
ENDDO |
237 |
* |
* |
|
X= 0 |
|
|
Z= 0 |
|
|
DO I=1,NS22Y |
|
|
N= I |
|
|
c ml: 27/10/04 Y= -S22(2) + (2*I-1)*S22Y(2) |
|
|
X= -S22(1) + (2*I-1)*S22Y(1) |
|
|
c end ml. |
|
|
CALL GSPOS('S22Y',N,'S22 ',X,Y,Z,0,'ONLY') |
|
|
ENDDO |
|
|
X= 0. |
|
238 |
Y= 0. |
Y= 0. |
239 |
DO I=1,2 |
ccC Z= -S3(3)+HAIRS3+2*S32M(3)+HAIRS3+S31M(3) |
240 |
|
Z=-S3(3)+2*S32M(3)+HAIRS3+S31M(3) |
241 |
|
DO I=1,NS31Y |
242 |
N= I |
N= I |
243 |
Z= (-1.)**I*S22(3) + (-1.)**(I+1)*SC22(3) |
X= -S3(1)+(2*I-1)*S31M(1) |
244 |
CALL GSPOS('SC22',N,'S22 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S31M',N,'S3 ',X,Y,Z,0,'ONLY') |
245 |
ENDDO |
ENDDO |
246 |
c* |
|
247 |
c* Positioning volumes into S11: |
* |
248 |
c+ |
C Z=-S3(3)+HAIRS3+S32M(3) |
249 |
c X=0. |
C CALL GSPOS('S32M',N,'S3 ',X,Y,Z,0,'ONLY') |
250 |
c Y=0. |
C Z=-S32(3)+HAIRS3+2*S32M(3)+HAIRS3+S31M(3) |
251 |
c Z=-S11(3)+SMYL(3) |
C CALL GSPOS('S31M',N,'S3 ',X,Y,Z,0,'ONLY') |
252 |
c N=1 |
**************************************** |
253 |
c CALL GSPOS('SMYL',N,'SMYL',X,Y,Z,0,'ONLY') |
c ml: 21/12/04: |
254 |
c Z=Z+SMYL(3)+S11Y(3) |
X=0. |
255 |
|
Y= 0. |
256 |
|
Z= 0. |
257 |
|
N=1 |
258 |
|
c ml: 27/10/04: |
259 |
c DO I=1,NS11Y |
c DO I=1,NS11Y |
260 |
c N= I |
c N= I |
261 |
c X= -S11(1) + (2*I-1)*S11Y(1) |
c X= -S11M(1) + HMYLTOF + (2*I-1)*S11Y(1) |
262 |
c CALL GSPOS('S11Y',N,'S11 ',X,Y,Z,0,'ONLY') |
CALL GSPOS('S11Y',N,'S11M',X,Y,Z,0,'ONLY') |
263 |
c ENDDO |
c ENDDO |
|
c N=2 |
|
|
c Z=Z+S11Y(3)+SMYL(3) |
|
|
c CALL GSPOS('SMYL',N,'SMYL',X,Y,Z,0,'ONLY') |
|
|
c Z=Z+SMYL(3)+SPV1(3) |
|
|
c N=1 |
|
|
c CALL GSPOS('SPV1',N,'SPV1',X,Y,Z,0,'ONLY') |
|
|
c Z=Z+SPV1(3)+SGLU(3) |
|
|
c N=1 |
|
|
c CALL GSPOS('SGLU',N,'SGLU',X,,Y,Z,0,'ONLY') |
|
|
c Z=Z+SGLU(3)+STOF(3) |
|
|
c N=1 |
|
|
c CALL GSPOS('STOF',N,'STOF',X,Y,Z,0,'ONLY') |
|
|
c* |
|
|
c* Positioning volumes into S12: |
|
|
c* |
|
|
c Z=-S12(3)+STOF(3) |
|
|
c N=2 |
|
|
c CALL GSPOS('STOF',N,'STOF',X,Y,Z,0,'ONLY') |
|
|
c Z=Z+STOF(3)+SGLU(3) |
|
|
c CALL GSPOS('SGLU',N,'SGLU',X,Y,Z,0,'ONLY') |
|
|
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) |
|
264 |
c end ml. |
c end ml. |
265 |
CALL GSPOS('S31Y',N,'S31 ',X,Y,Z,0,'ONLY') |
* |
|
ENDDO |
|
266 |
X= 0. |
X= 0. |
267 |
|
Y=0. |
268 |
|
Z= 0. |
269 |
|
N=1 |
270 |
|
c ml: 27/10/04 |
271 |
|
C DO I=1,NS12X |
272 |
|
C N= I |
273 |
|
C Y= -S11M(2) + HMYLTOF + (2*I-1)*S12X(2) |
274 |
|
CALL GSPOS('S12X',N,'S12M',X,Y,Z,0,'ONLY') |
275 |
|
C ENDDO |
276 |
|
c end ml. |
277 |
|
* |
278 |
|
X=0. |
279 |
|
y=0. |
280 |
|
Z= 0. |
281 |
|
N=1 |
282 |
|
C DO I=1,NS21X |
283 |
|
C N= I |
284 |
|
c Y= -S21M(2) + HMYLTOF+ (2*I-1)*S21X(2) |
285 |
|
CALL GSPOS('S21X',N,'S21M',X,Y,Z,0,'ONLY') |
286 |
|
C ENDDO |
287 |
|
* |
288 |
|
X=0. |
289 |
Y= 0. |
Y= 0. |
290 |
DO I=1,2 |
Z= 0. |
291 |
N= I |
N=1 |
292 |
Z= (-1.)**I*S31(3) + (-1.)**(I+1)*SC31(3) |
C DO I=1,NS22Y |
293 |
CALL GSPOS('SC31',N,'S31 ',X,Y,Z,0,'ONLY') |
C N= I |
294 |
ENDDO |
C X= -S22M(1) + HMYLTOF + (2*I-1)*S22Y(1) |
295 |
|
CALL GSPOS('S22Y',N,'S22M',X,Y,Z,0,'ONLY') |
296 |
|
C ENDDO |
297 |
|
Y= 0. |
298 |
|
Z= -S31M(3)+HMYLTOF+S31Y(3) |
299 |
|
N=1 |
300 |
|
C DO I=1,NS31Y |
301 |
|
C N= I |
302 |
|
C X= -S31M(1) + HMYLTOF+(2*I-1)*S31Y(1) |
303 |
|
X= -S31M(1) + 2*(HMYLTOF/2)+S31Y(1) |
304 |
|
CALL GSPOS('S31Y',N,'S31M',X,Y,Z,0,'ONLY') |
305 |
|
C ENDDO |
306 |
* |
* |
|
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 |
|
307 |
X= 0. |
X= 0. |
308 |
Y= 0. |
Z= -S32M(3)+HMYLTOF+S32X(3) |
309 |
DO I=1,2 |
N=1 |
310 |
N= I |
C DO I=1,NS32X |
311 |
Z= (-1.)**I*S32(3) + (-1.)**(I+1)*SC32(3) |
C N= I |
312 |
CALL GSPOS('SC32',N,'S32 ',X,Y,Z,0,'ONLY') |
C Y= -S32M(2) + HMYLTOF+ (2*I-1)*S32X(2) |
313 |
ENDDO |
Y= -S32M(2) + 2*(HMYLTOF/2)+ S32X(2) |
314 |
|
CALL GSPOS('S32X',N,'S32M',X,Y,Z,0,'ONLY') |
315 |
|
C ENDDO |
316 |
* |
* |
317 |
RETURN |
RETURN |
318 |
END |
END |