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