1 |
* |
* |
2 |
* $Id$ |
* $Id: gpcalv.F,v 3.3 2003/12/17 11:32:48 pamela Exp $ |
3 |
|
* |
4 |
|
* $Log: gpcalv.F,v $ |
5 |
|
* Revision 3.3 2003/12/17 11:32:48 pamela |
6 |
|
* CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation |
7 |
|
* |
8 |
|
* Revision 3.2 2002/12/05 10:17:41 pamela |
9 |
|
* Update CAS and CALO geometries and positions. Makefile updated as well |
10 |
|
* |
11 |
|
* Revision 3.1.1.1 2002/07/11 16:02:14 cafagna |
12 |
|
* First GPAMELA release on CVS |
13 |
* |
* |
|
* $Log$ |
|
14 |
* |
* |
15 |
*CMZ : 3.00/00 14/11/2000 10.17.50 by Emiliano Mocchiutti |
*CMZ : 3.00/00 14/11/2000 10.17.50 by Emiliano Mocchiutti |
16 |
*CMZ : 2.02/00 12/10/2000 18.19.42 by Francesco Cafagna |
*CMZ : 2.02/00 12/10/2000 18.19.42 by Francesco Cafagna |
33 |
* |
* |
34 |
INTEGER IROT,IVOLU,N,NMED |
INTEGER IROT,IVOLU,N,NMED |
35 |
REAL X,Y,Z |
REAL X,Y,Z |
36 |
|
* MA |
37 |
|
REAL X1, Y1 |
38 |
|
INTEGER m |
39 |
|
* END MA |
40 |
* |
* |
41 |
* Define the CALB volume |
* Define the CALB volume |
42 |
* |
* |
52 |
* |
* |
53 |
NMED= MN2 |
NMED= MN2 |
54 |
CALL GSVOLU('CAPL','BOX ',NMED,CAPL, 3,IVOLU) |
CALL GSVOLU('CAPL','BOX ',NMED,CAPL, 3,IVOLU) |
55 |
|
* F.V.&ML: |
56 |
|
* |
57 |
|
* Define the CANS volume |
58 |
|
* |
59 |
|
NMED= MN2 |
60 |
|
CALL GSVOLU('CANS','BOX ',NMED,CANS, 3,IVOLU) |
61 |
|
* END F.V.&ML. |
62 |
* |
* |
63 |
* Define the CAPD volume |
* Define the CAPD volume |
64 |
* |
* |
72 |
* |
* |
73 |
* Division in CASI |
* Division in CASI |
74 |
* |
* |
75 |
CALL GSDVN ('CAST','CASI',NCASTR,1) |
* ML: |
76 |
|
C CALL GSDVN ('CAST','CASI',NCASTR,1) |
77 |
|
CALL GSDVN ('CAST','CASI',NCASTR,2) |
78 |
|
* END ML: |
79 |
* |
* |
80 |
* Define the CG10 volume |
* Define the CG10 volume |
81 |
* |
* |
116 |
X = 0. |
X = 0. |
117 |
Y = 0. |
Y = 0. |
118 |
*EM: |
*EM: |
119 |
Z = -CAPL(3) + CAKA(3) |
*F.V.&ML: |
120 |
CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY') |
c CALL GPVOLU(-2) |
121 |
CALL GSPOS('CAKA',N,'CAPD',X,Y,Z,0,'ONLY') |
C Z = -CAPL(3) + CAKA(3) |
122 |
|
C CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY') |
123 |
|
Z = -CANS(3) + CAKA(3) |
124 |
|
CALL GSPOS('CAKA',N,'CANS',X,Y,Z,0,'ONLY') |
125 |
|
C CALL GSPOS('CAKA',N,'CAPD',X,Y,Z,0,'ONLY') |
126 |
Z = Z + CAKA(3) + C10C(3) |
Z = Z + CAKA(3) + C10C(3) |
127 |
CALL GSPOS('C10C',N,'CAPL',X,Y,Z,0,'ONLY') |
C CALL GSPOS('C10C',N,'CAPL',X,Y,Z,0,'ONLY') |
128 |
CALL GSPOS('C10C',N,'CAPD',X,Y,Z,0,'ONLY') |
CALL GSPOS('C10C',N,'CANS',X,Y,Z,0,'ONLY') |
129 |
|
C CALL GSPOS('C10C',N,'CAPD',X,Y,Z,0,'ONLY') |
130 |
Z = Z + C10C(3) + CAGL(3) |
Z = Z + C10C(3) + CAGL(3) |
131 |
CALL GSPOS('CAGL',N,'CAPL',X,Y,Z,0,'ONLY') |
C CALL GSPOS('CAGL',N,'CAPL',X,Y,Z,0,'ONLY') |
132 |
|
CALL GSPOS('CAGL',N,'CANS',X,Y,Z,0,'ONLY') |
133 |
Z = Z + CAGL(3) + CAKP(3) |
Z = Z + CAGL(3) + CAKP(3) |
134 |
CALL GSPOS('CAKP',N,'CAPL',X,Y,Z,0,'ONLY') |
C CALL GSPOS('CAKP',N,'CAPL',X,Y,Z,0,'ONLY') |
135 |
|
CALL GSPOS('CAKP',N,'CANS',X,Y,Z,0,'ONLY') |
136 |
|
* END F.V.&ML |
137 |
* |
* |
138 |
* Positioning volume CASI into the mother CAPL |
* Positioning volume CASI into the mother CAPL |
139 |
* |
* |
140 |
N = 0 |
N = 0 |
141 |
Z = Z + CAKP(3) + CASI(3) |
* F.V.&ML: |
142 |
|
C Z= Z + CAKP(3) + CASI(3) |
143 |
|
Z = -CAPL(3)+CASI(3) |
144 |
|
* END F.V.&ML |
145 |
DO I=-1,1 |
DO I=-1,1 |
146 |
Y = I*(2.*CASI(2)+ DCASIY) |
Y = I*(2.*CASI(2)+ DCASIY) |
147 |
DO II=-1,1 |
DO II=-1,1 |
155 |
ENDDO |
ENDDO |
156 |
ENDDO |
ENDDO |
157 |
*END EM. |
*END EM. |
158 |
* |
* MA |
159 |
* Positioning volume CAPL and CAAB into the mother CALB |
* 11 MODULI DI 2 W |
160 |
* |
Z = CALB(3) - CAPL(3) - DCASIZ/2 |
161 |
X= 0. |
N = 0 |
162 |
Y= 0. |
DO M = 0,20,2 |
163 |
C Z= CALB(3) + CAPL(3) |
* Positioning CAPL CANS CAAB in CALB to form a module |
164 |
*EM: |
X = .10 |
165 |
Z= CALB(3) + CAPL(3) - DCASIZ/2. |
y = .05 |
166 |
*END EM. (we have 0.15 cm from the top to the first Si) |
DO I = 1,2 |
167 |
N= 0 |
* Positioning CAPL |
168 |
DO I=1,NCAPL |
N = N + 1 |
169 |
* |
C if(N.EQ.1) print *,'z ini = ',Z |
170 |
* X view, absorber and Y view on the other |
IF(.NOT.NOCAPL(N)) |
171 |
* |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
172 |
Z= Z - 2*CAPL(3) |
* Positioning CANS |
173 |
N= N + 1 |
Z = Z - CAPL(3) - CANS(3) |
174 |
* |
CALL GSPOS('CANS',N,'CALB',0,0,Z,0,'ONLY') |
175 |
* Check if this plane is excluded |
* Positioning CAAB |
176 |
* |
Z = Z - CANS(3) - CAAB(3) |
177 |
IF(.NOT.NOCAPL(N)) |
IF(.NOT.NOCAAB(M+I)) |
178 |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
+ CALL GSPOS('CAAB',(M+I),'CALB',0,0,Z,0,'ONLY') |
179 |
Z= Z - CAPL(3) - CAAB(3) |
* Positioning CANS (ruotato) |
180 |
* |
N = N + 1 |
181 |
* Check if this absorber is excluded |
Z = Z - CAAB(3) - CANS(3) |
182 |
* |
CALL GSPOS('CANS',N,'CALB',0,0,Z,3,'ONLY') |
183 |
IF(.NOT.NOCAAB(I)) |
* Positioning CAPL (ruotato e shiftato) |
184 |
+ CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
X1 = X |
185 |
Z= Z - CAAB(3) - CAPL(3) |
Y1 = Y |
186 |
N= N + 1 |
X = -Y1 |
187 |
* |
Y = X1 |
188 |
* Check if this detector is excluded |
Z = Z - CANS(3) - CAPL(3) |
189 |
* |
C if(N.EQ.44) print *,'z fin = ',Z |
190 |
IF(.NOT.NOCAPL(N)) |
IF(.NOT.NOCAPL(N)) |
191 |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
192 |
ENDDO |
IF(I.EQ.1) THEN |
193 |
* |
Z = Z - 2*CAPL(3) - DZMO ! SPESSORE TRA I SILICI CHE SI GUARDANO |
194 |
* Positioning volume CAPD and CAAD into the mother CALB |
X1 = X ! SHIFT PER IL CAPL PROSSIMO CICLO |
195 |
* |
Y1 = Y |
196 |
N= 0 |
X = -Y1 |
197 |
DO I=1,NCAPLD |
Y = X1 |
198 |
IF(I.EQ.1) THEN |
ENDIF |
199 |
Z= Z - CAPD(3) - CAPL(3) |
ENDDO |
200 |
ELSE |
Z = Z - DZST - 2*CAPL(3) |
|
Z= Z - 2*CAPD(3) |
|
|
ENDIF |
|
|
N= N + 1 |
|
|
CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY') |
|
|
Z= Z - CAPD(3) - CAAD(3) |
|
|
CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY') |
|
|
Z= Z - CAAD(3) - CAPD(3) |
|
|
N= N + 1 |
|
|
CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY') |
|
201 |
ENDDO |
ENDDO |
202 |
|
* END MA |
203 |
|
|
204 |
|
C # *F.V.&ML: |
205 |
|
C # C commenting the original code with a 'C' per raw: |
206 |
|
C # C* |
207 |
|
C # C* Positioning volume CAPL and CAAB into the mother CALB |
208 |
|
C # C* |
209 |
|
C # C X= 0. |
210 |
|
C # C Y= 0. |
211 |
|
C # CC Z= CALB(3) + CAPL(3) |
212 |
|
C # C*EM: |
213 |
|
C # C Z= CALB(3) + CAPL(3) - DCASIZ/2. |
214 |
|
C # C*END EM. (we have 0.15 cm from the top to the first Si) |
215 |
|
C # C N= 0 |
216 |
|
C # C DO I=1,NCAPL |
217 |
|
C # C* |
218 |
|
C # C* X view, absorber and Y view on the other |
219 |
|
C # C* |
220 |
|
C # C Z= Z - 2*CAPL(3) |
221 |
|
C # C N= N + 1 |
222 |
|
C # C* |
223 |
|
C # C* Check if this plane is excluded |
224 |
|
C # C* |
225 |
|
C # C IF(.NOT.NOCAPL(N)) |
226 |
|
C # C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
227 |
|
C # C Z= Z - CAPL(3) - CAAB(3) |
228 |
|
C # C* |
229 |
|
C # C* Check if this absorber is excluded |
230 |
|
C # C* |
231 |
|
C # C IF(.NOT.NOCAAB(I)) |
232 |
|
C # C + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
233 |
|
C # C Z= Z - CAAB(3) - CAPL(3) |
234 |
|
C # C N= N + 1 |
235 |
|
C # C* |
236 |
|
C # C* Check if this detector is excluded |
237 |
|
C # C* |
238 |
|
C # C IF(.NOT.NOCAPL(N)) |
239 |
|
C # C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
240 |
|
C # C ENDDO |
241 |
|
C # C end comments. |
242 |
|
C # * |
243 |
|
C # * Positioning volume CANS ,CAPL and CAAB into the mother CALB |
244 |
|
C # * |
245 |
|
C # X= 0. |
246 |
|
C # Y= 0. |
247 |
|
C # Z= CALB(3) + CAPL(3) - DCASIZ/2. |
248 |
|
C # *END EM. (we have 0.15 cm from the top to the first Si) |
249 |
|
C # N= 0 |
250 |
|
C # * |
251 |
|
C # * I DISPARI |
252 |
|
C # DO I=1,NCAPL,2 |
253 |
|
C # * |
254 |
|
C # * X view, absorber and Y view on the other |
255 |
|
C # * |
256 |
|
C # X=0.10 |
257 |
|
C # Y=0.05 |
258 |
|
C # Z= Z - 2*CAPL(3) |
259 |
|
C # N= N + 1 |
260 |
|
C # * |
261 |
|
C # * Check if this plane is excluded |
262 |
|
C # * |
263 |
|
C # * |
264 |
|
C # IF(.NOT.NOCAPL(N)) |
265 |
|
C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
266 |
|
C # * |
267 |
|
C # X = 0. |
268 |
|
C # Y = 0. |
269 |
|
C # Z= Z - CAPL(3) - CANS(3) |
270 |
|
C # * |
271 |
|
C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY') |
272 |
|
C # * |
273 |
|
C # Z= Z - CANS(3) - CAAB(3) |
274 |
|
C # * |
275 |
|
C # * Check if this absorber is excluded |
276 |
|
C # * |
277 |
|
C # * |
278 |
|
C # IF(.NOT.NOCAAB(I)) |
279 |
|
C # + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
280 |
|
C # * |
281 |
|
C # Z = Z - CAAB(3)- CANS(3) |
282 |
|
C # N = N + 1 |
283 |
|
C # * |
284 |
|
C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY') |
285 |
|
C # Z= Z - CANS(3) - CAPL(3) |
286 |
|
C # X=-0.05 |
287 |
|
C # Y=0.10 |
288 |
|
C # * |
289 |
|
C # * Check if this detector is excluded |
290 |
|
C # * |
291 |
|
C # IF(.NOT.NOCAPL(N)) |
292 |
|
C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
293 |
|
C # N=N+2 |
294 |
|
C # Z = Z -2*(2*CAPL(3)+2*CANS(3)+CAAB(3)) |
295 |
|
C # ENDDO |
296 |
|
C # * |
297 |
|
C # * I PARI |
298 |
|
C # * |
299 |
|
C # X= 0. |
300 |
|
C # Y= 0. |
301 |
|
C # Z= CALB(3) + CAPL(3) - DCASIZ/2. |
302 |
|
C # *END EM. (we have 0.15 cm from the top to the first Si) |
303 |
|
C # N= 2 |
304 |
|
C # * |
305 |
|
C # * |
306 |
|
C # DO I=2,NCAPL,2 |
307 |
|
C # * |
308 |
|
C # * X view, absorber and Y view on the other |
309 |
|
C # * |
310 |
|
C # Z= Z - 2*CAPL(3)-2*(2*CAPL(3)+2*CANS(3)+CAAB(3)) |
311 |
|
C # N= N + 1 |
312 |
|
C # * |
313 |
|
C # * Check if this plane is excluded |
314 |
|
C # X= -0.10 |
315 |
|
C # Y= -0.05 |
316 |
|
C # * |
317 |
|
C # IF(.NOT.NOCAPL(N)) |
318 |
|
C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
319 |
|
C # X = 0. |
320 |
|
C # Y = 0. |
321 |
|
C # Z = Z - CAPL(3) - CANS(3) |
322 |
|
C # * |
323 |
|
C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY') |
324 |
|
C # * |
325 |
|
C # * Check if this absorber is excluded |
326 |
|
C # * |
327 |
|
C # N = N + 1 |
328 |
|
C # Z = Z - CANS(3) - CAAB(3) |
329 |
|
C # * |
330 |
|
C # IF(.NOT.NOCAAB(I)) |
331 |
|
C # + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
332 |
|
C # * |
333 |
|
C # Z= Z - CAAB(3) - CANS(3) |
334 |
|
C # * |
335 |
|
C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY') |
336 |
|
C # Z= Z - CANS(3) - CAPL(3) |
337 |
|
C # X= 0.05 |
338 |
|
C # Y= -0.10 |
339 |
|
C # * |
340 |
|
C # * |
341 |
|
C # * Check if this detector is excluded |
342 |
|
C # * |
343 |
|
C # IF(.NOT.NOCAPL(N)) |
344 |
|
C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
345 |
|
C # N = N + 2 |
346 |
|
C # * |
347 |
|
C # ENDDO |
348 |
|
C # *END F.V.&ML. |
349 |
|
C # * F.V.&ML.: |
350 |
|
C # * again we have to comment with a 'C' per raw: |
351 |
|
C # C* |
352 |
|
C # C* Positioning volume CAPD and CAAD into the mother CALB |
353 |
|
C # C* |
354 |
|
C # C N= 0 |
355 |
|
C # C DO I=1,NCAPLD |
356 |
|
C # C IF(I.EQ.1) THEN |
357 |
|
C # C Z= Z - CAPD(3) - CAPL(3) |
358 |
|
C # C ELSE |
359 |
|
C # C Z= Z - 2*CAPD(3) |
360 |
|
C # C ENDIF |
361 |
|
C # C N= N + 1 |
362 |
|
C # C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY') |
363 |
|
C # C Z= Z - CAPD(3) - CAAD(3) |
364 |
|
C # C CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY') |
365 |
|
C # C Z= Z - CAAD(3) - CAPD(3) |
366 |
|
C # C N= N + 1 |
367 |
|
C # C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY') |
368 |
|
C # C ENDDO |
369 |
|
C # * end comments. |
370 |
|
C # *END F.V.&ML. |
371 |
|
C # end MA comments |
372 |
* |
* |
373 |
* Put the shell around it |
* Put the shell around it |
374 |
* |
* |