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

Annotation of /gpamela/gpcal/gpcalv.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.5 - (hide annotations) (download)
Tue May 9 12:01:15 2006 UTC (18 years, 6 months ago) by cafagna
Branch: MAIN
CVS Tags: v4r7, v4r8, v4r9, v4r10
Changes since 3.4: +16 -10 lines
Calo geometry updated

1 cafagna 3.1 *
2 cafagna 3.5 * $Id: gpcalv.F,v 3.4 2005/07/25 11:53:20 cafagna Exp $
3 pamela 3.2 *
4     * $Log: gpcalv.F,v $
5 cafagna 3.5 * Revision 3.4 2005/07/25 11:53:20 cafagna
6     * Several updates. See history for details
7     *
8 cafagna 3.4 * 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 pamela 3.3 * Revision 3.2 2002/12/05 10:17:41 pamela
12     * Update CAS and CALO geometries and positions. Makefile updated as well
13     *
14 pamela 3.2 * Revision 3.1.1.1 2002/07/11 16:02:14 cafagna
15     * First GPAMELA release on CVS
16 cafagna 3.1 *
17     *
18     *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
20     *CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola
21     *CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna
22     *CMZ : 1.02/00 21/10/99 14.46.25 by Francesco Cafagna
23     *CMZ : 1.00/02 13/03/96 18.39.55 by Francesco Cafagna
24     *-- Author : Francesco Cafagna 09/12/95
25     SUBROUTINE GPCALV
26     ************************************************************************
27     * *
28     * Volumes definition for the silicon calorimeter *
29     * Called by: GPGEM *
30     * Author: Francesco Cafagna, 05/12/95 13.39.41 *
31     * *
32     ************************************************************************
33     #include "gpgeo.inc"
34     #include "gpmed.inc"
35     #include "gpkey.inc"
36     *
37     INTEGER IROT,IVOLU,N,NMED
38     REAL X,Y,Z
39 cafagna 3.4 * MA
40     REAL X1, Y1
41     INTEGER m
42     * END MA
43 cafagna 3.1 *
44     * Define the CALB volume
45     *
46     NMED= MN2
47     CALL GSVOLU('CALB','BOX ',NMED,CALB, 3,IVOLU)
48     *
49     * Define the CALS volume
50     *
51     NMED= MAL
52     CALL GSVOLU('CALS','BOX ',NMED,CALS, 3,IVOLU)
53     *
54     * Define the CAPL volume
55     *
56     NMED= MN2
57     CALL GSVOLU('CAPL','BOX ',NMED,CAPL, 3,IVOLU)
58 pamela 3.2 * 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 cafagna 3.1 *
66     * Define the CAPD volume
67     *
68     NMED= MN2
69     CALL GSVOLU('CAPD','BOX ',NMED,CAPD, 3,IVOLU)
70     *
71     * Define the CASI volume
72     *
73     NMED= MSIC
74     CALL GSVOLU('CASI','BOX ',NMED,CASI, 3,IVOLU)
75     *
76     * Division in CASI
77     *
78 pamela 3.2 * ML:
79     C CALL GSDVN ('CAST','CASI',NCASTR,1)
80     CALL GSDVN ('CAST','CASI',NCASTR,2)
81     * END ML:
82 cafagna 3.1 *
83     * Define the CG10 volume
84     *
85     NMED= MG10C
86     CALL GSVOLU('C10C','BOX ',NMED,C10C, 3,IVOLU)
87     *
88     * Define the CAAB volume
89     *
90     NMED= MW2
91     CALL GSVOLU('CAAB','BOX ',NMED,CAAB, 3,IVOLU)
92     *EM:
93     *
94     * Define the CAAD volume
95     *
96     NMED= MAL
97     CALL GSVOLU('CAAD','BOX ',NMED,CAAD, 3,IVOLU)
98     *
99     * Define the CAKA volume
100     *
101     NMED= MCER
102     CALL GSVOLU('CAKA','BOX ',NMED,CAKA, 3,IVOLU)
103     *
104     * Define the CAKP volume
105     *
106     NMED= MKAP
107     CALL GSVOLU('CAKP','BOX ',NMED,CAKP, 3,IVOLU)
108     *
109     * Define the CAGL volume (Silicon glue)
110     *
111     NMED= MSIC
112     CALL GSVOLU('CAGL','BOX ',NMED,CAGL, 3,IVOLU)
113     *END EM.
114     *
115     * Positioning volumes CAKA, C10C, CAGL, CAKP into the mother CAPL and CAPD
116     * (Kaolite and G10 only for CAPD)
117     *
118     N = 1
119     X = 0.
120     Y = 0.
121     *EM:
122 pamela 3.2 *F.V.&ML:
123 pamela 3.3 c CALL GPVOLU(-2)
124 pamela 3.2 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 cafagna 3.1 Z = Z + CAKA(3) + C10C(3)
130 pamela 3.2 C CALL GSPOS('C10C',N,'CAPL',X,Y,Z,0,'ONLY')
131     CALL GSPOS('C10C',N,'CANS',X,Y,Z,0,'ONLY')
132     C CALL GSPOS('C10C',N,'CAPD',X,Y,Z,0,'ONLY')
133 cafagna 3.1 Z = Z + C10C(3) + CAGL(3)
134 pamela 3.2 C CALL GSPOS('CAGL',N,'CAPL',X,Y,Z,0,'ONLY')
135     CALL GSPOS('CAGL',N,'CANS',X,Y,Z,0,'ONLY')
136 cafagna 3.1 Z = Z + CAGL(3) + CAKP(3)
137 pamela 3.2 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 cafagna 3.1 *
141     * Positioning volume CASI into the mother CAPL
142     *
143     N = 0
144 pamela 3.2 * F.V.&ML:
145     C Z= Z + CAKP(3) + CASI(3)
146     Z = -CAPL(3)+CASI(3)
147     * END F.V.&ML
148 cafagna 3.1 DO I=-1,1
149     Y = I*(2.*CASI(2)+ DCASIY)
150     DO II=-1,1
151     N= N + 1
152     X = II*(2.*CASI(1)+ DCASIX)
153     *
154     * Check if detector is excluded
155     *
156     IF(.NOT.NOCASI(N))
157     + CALL GSPOS('CASI',N,'CAPL',X,Y,Z,0,'ONLY')
158     ENDDO
159     ENDDO
160     *END EM.
161 cafagna 3.4 * MA
162     * 11 MODULI DI 2 W
163 cafagna 3.5 c Z = CALB(3) - CAPL(3) - DCASIZ/2
164     Z = CALB(3) - CAPL(3) - DCASIZ
165 cafagna 3.4 N = 0
166     DO M = 0,20,2
167     * Positioning CAPL CANS CAAB in CALB to form a module
168     X = .10
169     y = .05
170     DO I = 1,2
171     * Positioning CAPL
172     N = N + 1
173     C if(N.EQ.1) print *,'z ini = ',Z
174     IF(.NOT.NOCAPL(N))
175 cafagna 3.5 + CALL GSPOS('CAPL',N,'CALB',X,(Y-0.1),Z,0,'ONLY')
176 cafagna 3.4 * Positioning CANS
177     Z = Z - CAPL(3) - CANS(3)
178 cafagna 3.5 CALL GSPOS('CANS',N,'CALB',0,-0.1,Z,0,'ONLY')
179 cafagna 3.4 * Positioning CAAB
180     Z = Z - CANS(3) - CAAB(3)
181     IF(.NOT.NOCAAB(M+I))
182 cafagna 3.5 + CALL GSPOS('CAAB',(M+I),'CALB',0,-0.1,Z,0,'ONLY')
183 cafagna 3.4 * Positioning CANS (ruotato)
184     N = N + 1
185     Z = Z - CAAB(3) - CANS(3)
186 cafagna 3.5 CALL GSPOS('CANS',N,'CALB',0,-0.1,Z,3,'ONLY')
187 cafagna 3.4 * Positioning CAPL (ruotato e shiftato)
188     X1 = X
189     Y1 = Y
190     X = -Y1
191     Y = X1
192     Z = Z - CANS(3) - CAPL(3)
193     C if(N.EQ.44) print *,'z fin = ',Z
194     IF(.NOT.NOCAPL(N))
195 cafagna 3.5 + CALL GSPOS('CAPL',N,'CALB',X,(Y-0.1),Z,3,'ONLY')
196    
197 cafagna 3.4 IF(I.EQ.1) THEN
198 cafagna 3.5 c Z = Z - 2*CAPL(3) - DZMO ! SPESSORE TRA I SILICI CHE SI GUARDANO
199     Z = Z - 2*CAPL(3) - DZM0 ! corretto
200     X1 = X ! SHIFT PER IL CAPL PROSSIMO CICLO
201 cafagna 3.4 Y1 = Y
202     X = -Y1
203     Y = X1
204     ENDIF
205     ENDDO
206     Z = Z - DZST - 2*CAPL(3)
207 cafagna 3.1 ENDDO
208 cafagna 3.4 * 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 cafagna 3.1 *
379     * Put the shell around it
380     *
381     X= 0.
382     Y= 0.
383     Z= CALS(3)-CALB(3)
384     N= 1
385     CALL GSPOS('CALB',N,'CALS',X,Y,Z,0,'ONLY')
386     *
387     RETURN
388 cafagna 3.5 END

  ViewVC Help
Powered by ViewVC 1.1.23