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

Annotation of /gpamela/gpcal/gpcalv.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.4 - (hide annotations) (download)
Mon Jul 25 11:53:20 2005 UTC (19 years, 4 months ago) by cafagna
Branch: MAIN
CVS Tags: v4r4, v4r5, v4r6, v4r3
Changes since 3.3: +221 -167 lines
Several updates. See history for details

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

  ViewVC Help
Powered by ViewVC 1.1.23