/[PAMELA software]/gpamela/gpcal/gpcalv.F
ViewVC logotype

Contents of /gpamela/gpcal/gpcalv.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.6 - (show annotations) (download)
Fri Mar 30 15:24:54 2007 UTC (17 years, 8 months ago) by cafagna
Branch: MAIN
CVS Tags: v4r14, v4r12, v4r13, v4r11, HEAD
Changes since 3.5: +9 -4 lines
Calo geometry modified. X-view plane shifts in X coordinates have been swapped, i.e. they do start with X=0.05 instead of X=-0.05

1 *
2 * $Id: gpcalv.F,v 3.5 2006/05/09 12:01:15 cafagna Exp $
3 *
4 * $Log: gpcalv.F,v $
5 * Revision 3.5 2006/05/09 12:01:15 cafagna
6 * Calo geometry updated
7 *
8 * Revision 3.4 2005/07/25 11:53:20 cafagna
9 * Several updates. See history for details
10 *
11 * Revision 3.3 2003/12/17 11:32:48 pamela
12 * CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation
13 *
14 * Revision 3.2 2002/12/05 10:17:41 pamela
15 * Update CAS and CALO geometries and positions. Makefile updated as well
16 *
17 * Revision 3.1.1.1 2002/07/11 16:02:14 cafagna
18 * First GPAMELA release on CVS
19 *
20 *
21 *CMZ : 3.00/00 14/11/2000 10.17.50 by Emiliano Mocchiutti
22 *CMZ : 2.02/00 12/10/2000 18.19.42 by Francesco Cafagna
23 *CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola
24 *CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna
25 *CMZ : 1.02/00 21/10/99 14.46.25 by Francesco Cafagna
26 *CMZ : 1.00/02 13/03/96 18.39.55 by Francesco Cafagna
27 *-- Author : Francesco Cafagna 09/12/95
28 SUBROUTINE GPCALV
29 ************************************************************************
30 * *
31 * Volumes definition for the silicon calorimeter *
32 * Called by: GPGEM *
33 * Author: Francesco Cafagna, 05/12/95 13.39.41 *
34 * *
35 ************************************************************************
36 #include "gpgeo.inc"
37 #include "gpmed.inc"
38 #include "gpkey.inc"
39 *
40 INTEGER IROT,IVOLU,N,NMED
41 REAL X,Y,Z
42 * MA
43 REAL X1, Y1
44 INTEGER m
45 * END MA
46 *
47 * Define the CALB volume
48 *
49 NMED= MN2
50 CALL GSVOLU('CALB','BOX ',NMED,CALB, 3,IVOLU)
51 *
52 * Define the CALS volume
53 *
54 NMED= MAL
55 CALL GSVOLU('CALS','BOX ',NMED,CALS, 3,IVOLU)
56 *
57 * Define the CAPL volume
58 *
59 NMED= MN2
60 CALL GSVOLU('CAPL','BOX ',NMED,CAPL, 3,IVOLU)
61 * F.V.&ML:
62 *
63 * Define the CANS volume
64 *
65 NMED= MN2
66 CALL GSVOLU('CANS','BOX ',NMED,CANS, 3,IVOLU)
67 * END F.V.&ML.
68 *
69 * Define the CAPD volume
70 *
71 NMED= MN2
72 CALL GSVOLU('CAPD','BOX ',NMED,CAPD, 3,IVOLU)
73 *
74 * Define the CASI volume
75 *
76 NMED= MSIC
77 CALL GSVOLU('CASI','BOX ',NMED,CASI, 3,IVOLU)
78 *
79 * Division in CASI
80 *
81 * ML:
82 C CALL GSDVN ('CAST','CASI',NCASTR,1)
83 CALL GSDVN ('CAST','CASI',NCASTR,2)
84 * END ML:
85 *
86 * Define the CG10 volume
87 *
88 NMED= MG10C
89 CALL GSVOLU('C10C','BOX ',NMED,C10C, 3,IVOLU)
90 *
91 * Define the CAAB volume
92 *
93 NMED= MW2
94 CALL GSVOLU('CAAB','BOX ',NMED,CAAB, 3,IVOLU)
95 *EM:
96 *
97 * Define the CAAD volume
98 *
99 NMED= MAL
100 CALL GSVOLU('CAAD','BOX ',NMED,CAAD, 3,IVOLU)
101 *
102 * Define the CAKA volume
103 *
104 NMED= MCER
105 CALL GSVOLU('CAKA','BOX ',NMED,CAKA, 3,IVOLU)
106 *
107 * Define the CAKP volume
108 *
109 NMED= MKAP
110 CALL GSVOLU('CAKP','BOX ',NMED,CAKP, 3,IVOLU)
111 *
112 * Define the CAGL volume (Silicon glue)
113 *
114 NMED= MSIC
115 CALL GSVOLU('CAGL','BOX ',NMED,CAGL, 3,IVOLU)
116 *END EM.
117 *
118 * Positioning volumes CAKA, C10C, CAGL, CAKP into the mother CAPL and CAPD
119 * (Kaolite and G10 only for CAPD)
120 *
121 N = 1
122 X = 0.
123 Y = 0.
124 *EM:
125 *F.V.&ML:
126 c CALL GPVOLU(-2)
127 C Z = -CAPL(3) + CAKA(3)
128 C CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY')
129 Z = -CANS(3) + CAKA(3)
130 CALL GSPOS('CAKA',N,'CANS',X,Y,Z,0,'ONLY')
131 C CALL GSPOS('CAKA',N,'CAPD',X,Y,Z,0,'ONLY')
132 Z = Z + CAKA(3) + C10C(3)
133 C CALL GSPOS('C10C',N,'CAPL',X,Y,Z,0,'ONLY')
134 CALL GSPOS('C10C',N,'CANS',X,Y,Z,0,'ONLY')
135 C CALL GSPOS('C10C',N,'CAPD',X,Y,Z,0,'ONLY')
136 Z = Z + C10C(3) + CAGL(3)
137 C CALL GSPOS('CAGL',N,'CAPL',X,Y,Z,0,'ONLY')
138 CALL GSPOS('CAGL',N,'CANS',X,Y,Z,0,'ONLY')
139 Z = Z + CAGL(3) + CAKP(3)
140 C CALL GSPOS('CAKP',N,'CAPL',X,Y,Z,0,'ONLY')
141 CALL GSPOS('CAKP',N,'CANS',X,Y,Z,0,'ONLY')
142 * END F.V.&ML
143 *
144 * Positioning volume CASI into the mother CAPL
145 *
146 N = 0
147 * F.V.&ML:
148 C Z= Z + CAKP(3) + CASI(3)
149 Z = -CAPL(3)+CASI(3)
150 * END F.V.&ML
151 DO I=-1,1
152 Y = I*(2.*CASI(2)+ DCASIY)
153 DO II=-1,1
154 N= N + 1
155 X = II*(2.*CASI(1)+ DCASIX)
156 *
157 * Check if detector is excluded
158 *
159 IF(.NOT.NOCASI(N))
160 + CALL GSPOS('CASI',N,'CAPL',X,Y,Z,0,'ONLY')
161 ENDDO
162 ENDDO
163 *END EM.
164 * MA
165 * 11 MODULI DI 2 W
166 c Z = CALB(3) - CAPL(3) - DCASIZ/2
167 Z = CALB(3) - CAPL(3) - DCASIZ
168 N = 0
169 DO M = 0,20,2
170 * Positioning CAPL CANS CAAB in CALB to form a module
171 X = .10
172 y = .05
173 DO I = 1,2
174 * Positioning CAPL
175 N = N + 1
176 C if(N.EQ.1) print *,'z ini = ',Z
177 IF(.NOT.NOCAPL(N))
178 + CALL GSPOS('CAPL',N,'CALB',X,(Y-0.1),Z,0,'ONLY')
179 * Positioning CANS
180 Z = Z - CAPL(3) - CANS(3)
181 CALL GSPOS('CANS',N,'CALB',0,-0.1,Z,0,'ONLY')
182 * Positioning CAAB
183 Z = Z - CANS(3) - CAAB(3)
184 IF(.NOT.NOCAAB(M+I))
185 + CALL GSPOS('CAAB',(M+I),'CALB',0,-0.1,Z,0,'ONLY')
186 * Positioning CANS (ruotato)
187 N = N + 1
188 Z = Z - CAAB(3) - CANS(3)
189 CALL GSPOS('CANS',N,'CALB',0,-0.1,Z,3,'ONLY')
190 * Positioning CAPL (ruotato e shiftato)
191 X1 = X
192 Y1 = Y
193 X = -Y1
194 Y = X1
195 Z = Z - CANS(3) - CAPL(3)
196 c Mod by Caf on 30th Marc 2007, the X position of the X-view planes should be swapped
197 c$$$ IF(.NOT.NOCAPL(N))
198 c$$$ + CALL GSPOS('CAPL',N,'CALB',X,(Y-0.1),Z,3,'ONLY')
199 IF(.NOT.NOCAPL(N))
200 + CALL GSPOS('CAPL',N,'CALB',-X,(Y-0.1),Z,3,'ONLY')
201
202 IF(I.EQ.1) THEN
203 c Z = Z - 2*CAPL(3) - DZMO ! SPESSORE TRA I SILICI CHE SI GUARDANO
204 Z = Z - 2*CAPL(3) - DZM0 ! corretto
205 X1 = X ! SHIFT PER IL CAPL PROSSIMO CICLO
206 Y1 = Y
207 X = -Y1
208 Y = X1
209 ENDIF
210 ENDDO
211 Z = Z - DZST - 2*CAPL(3)
212 ENDDO
213 * END MA
214
215 C # *F.V.&ML:
216 C # C commenting the original code with a 'C' per raw:
217 C # C*
218 C # C* Positioning volume CAPL and CAAB into the mother CALB
219 C # C*
220 C # C X= 0.
221 C # C Y= 0.
222 C # CC Z= CALB(3) + CAPL(3)
223 C # C*EM:
224 C # C Z= CALB(3) + CAPL(3) - DCASIZ/2.
225 C # C*END EM. (we have 0.15 cm from the top to the first Si)
226 C # C N= 0
227 C # C DO I=1,NCAPL
228 C # C*
229 C # C* X view, absorber and Y view on the other
230 C # C*
231 C # C Z= Z - 2*CAPL(3)
232 C # C N= N + 1
233 C # C*
234 C # C* Check if this plane is excluded
235 C # C*
236 C # C IF(.NOT.NOCAPL(N))
237 C # C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')
238 C # C Z= Z - CAPL(3) - CAAB(3)
239 C # C*
240 C # C* Check if this absorber is excluded
241 C # C*
242 C # C IF(.NOT.NOCAAB(I))
243 C # C + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')
244 C # C Z= Z - CAAB(3) - CAPL(3)
245 C # C N= N + 1
246 C # C*
247 C # C* Check if this detector is excluded
248 C # C*
249 C # C IF(.NOT.NOCAPL(N))
250 C # C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')
251 C # C ENDDO
252 C # C end comments.
253 C # *
254 C # * Positioning volume CANS ,CAPL and CAAB into the mother CALB
255 C # *
256 C # X= 0.
257 C # Y= 0.
258 C # Z= CALB(3) + CAPL(3) - DCASIZ/2.
259 C # *END EM. (we have 0.15 cm from the top to the first Si)
260 C # N= 0
261 C # *
262 C # * I DISPARI
263 C # DO I=1,NCAPL,2
264 C # *
265 C # * X view, absorber and Y view on the other
266 C # *
267 C # X=0.10
268 C # Y=0.05
269 C # Z= Z - 2*CAPL(3)
270 C # N= N + 1
271 C # *
272 C # * Check if this plane is excluded
273 C # *
274 C # *
275 C # IF(.NOT.NOCAPL(N))
276 C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')
277 C # *
278 C # X = 0.
279 C # Y = 0.
280 C # Z= Z - CAPL(3) - CANS(3)
281 C # *
282 C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY')
283 C # *
284 C # Z= Z - CANS(3) - CAAB(3)
285 C # *
286 C # * Check if this absorber is excluded
287 C # *
288 C # *
289 C # IF(.NOT.NOCAAB(I))
290 C # + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')
291 C # *
292 C # Z = Z - CAAB(3)- CANS(3)
293 C # N = N + 1
294 C # *
295 C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY')
296 C # Z= Z - CANS(3) - CAPL(3)
297 C # X=-0.05
298 C # Y=0.10
299 C # *
300 C # * Check if this detector is excluded
301 C # *
302 C # IF(.NOT.NOCAPL(N))
303 C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')
304 C # N=N+2
305 C # Z = Z -2*(2*CAPL(3)+2*CANS(3)+CAAB(3))
306 C # ENDDO
307 C # *
308 C # * I PARI
309 C # *
310 C # X= 0.
311 C # Y= 0.
312 C # Z= CALB(3) + CAPL(3) - DCASIZ/2.
313 C # *END EM. (we have 0.15 cm from the top to the first Si)
314 C # N= 2
315 C # *
316 C # *
317 C # DO I=2,NCAPL,2
318 C # *
319 C # * X view, absorber and Y view on the other
320 C # *
321 C # Z= Z - 2*CAPL(3)-2*(2*CAPL(3)+2*CANS(3)+CAAB(3))
322 C # N= N + 1
323 C # *
324 C # * Check if this plane is excluded
325 C # X= -0.10
326 C # Y= -0.05
327 C # *
328 C # IF(.NOT.NOCAPL(N))
329 C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')
330 C # X = 0.
331 C # Y = 0.
332 C # Z = Z - CAPL(3) - CANS(3)
333 C # *
334 C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY')
335 C # *
336 C # * Check if this absorber is excluded
337 C # *
338 C # N = N + 1
339 C # Z = Z - CANS(3) - CAAB(3)
340 C # *
341 C # IF(.NOT.NOCAAB(I))
342 C # + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')
343 C # *
344 C # Z= Z - CAAB(3) - CANS(3)
345 C # *
346 C # CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY')
347 C # Z= Z - CANS(3) - CAPL(3)
348 C # X= 0.05
349 C # Y= -0.10
350 C # *
351 C # *
352 C # * Check if this detector is excluded
353 C # *
354 C # IF(.NOT.NOCAPL(N))
355 C # + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')
356 C # N = N + 2
357 C # *
358 C # ENDDO
359 C # *END F.V.&ML.
360 C # * F.V.&ML.:
361 C # * again we have to comment with a 'C' per raw:
362 C # C*
363 C # C* Positioning volume CAPD and CAAD into the mother CALB
364 C # C*
365 C # C N= 0
366 C # C DO I=1,NCAPLD
367 C # C IF(I.EQ.1) THEN
368 C # C Z= Z - CAPD(3) - CAPL(3)
369 C # C ELSE
370 C # C Z= Z - 2*CAPD(3)
371 C # C ENDIF
372 C # C N= N + 1
373 C # C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY')
374 C # C Z= Z - CAPD(3) - CAAD(3)
375 C # C CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY')
376 C # C Z= Z - CAAD(3) - CAPD(3)
377 C # C N= N + 1
378 C # C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY')
379 C # C ENDDO
380 C # * end comments.
381 C # *END F.V.&ML.
382 C # end MA comments
383 *
384 * Put the shell around it
385 *
386 X= 0.
387 Y= 0.
388 Z= CALS(3)-CALB(3)
389 N= 1
390 CALL GSPOS('CALB',N,'CALS',X,Y,Z,0,'ONLY')
391 *
392 RETURN
393 END

  ViewVC Help
Powered by ViewVC 1.1.23