/[PAMELA software]/gpamela/gptrd/gptrdv.F
ViewVC logotype

Annotation of /gpamela/gptrd/gptrdv.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.1 - (hide annotations) (download)
Thu Jul 11 16:02:01 2002 UTC (22 years, 4 months ago) by cafagna
Branch: MAIN
Branch point for: v3r0
Initial revision

1 cafagna 3.1 *
2     * $Id$
3     *
4     * $Log$
5     *
6     *CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola
7     *CMZ : 2.00/00 03/03/2000 15.39.05 by Francesco Cafagna
8     *CMZ : 1.02/00 09/02/2000 13.11.57 by Francesco Cafagna
9     *CMZ : 1.00/02 15/03/96 16.04.21 by Francesco Cafagna
10     *-- Author : Francesco Cafagna 05/12/95
11     SUBROUTINE GPTRDV
12     ************************************************************************
13     * *
14     * Volume definition for TRD *
15     * Called by: GPGEO *
16     * Author: Francesco Cafagna, 05/12/95 17.25.32 *
17     * *
18     ************************************************************************
19     #include "gpgeo.inc"
20     #include "gpmed.inc"
21     *
22     INTEGER IROT,IVOLU,N,NMED,NUM,NAN
23     REAL X,Y,Z
24     *
25     * Define the TRDB volume
26     *
27     NMED=MN2
28     CALL GSVOLU('TRDB','BOX ',NMED,TRDB, 3,IVOLU)
29     *
30     * Define the TRAN volume
31     *
32     NMED=MAL
33     CALL GSVOLU('TRAN','BOX ',NMED,TRAN, 3,IVOLU)
34     *
35     * Define the TRAI volume
36     *
37     NMED=MN2
38     CALL GSVOLU('TRAI','BOX ',NMED,TRAI, 3,IVOLU)
39     *
40     * Define the TRBS volumes
41     *
42     NMED=MN2
43     CALL GSVOLU('TRBS','BOX ',NMED,TRBS, 3,IVOLU)
44     *
45     * Define the TRSO volumes
46     *
47     NMED=MKAP
48     CALL GSVOLU('TRSO','TUBE',NMED,TRSO, 3,IVOLU)
49     *
50     * Define the TRSI volumes
51     *
52     NMED=MXE
53     CALL GSVOLU('TRSI','TUBE',NMED,TRSI, 3,IVOLU)
54     *
55     * Define the TRRA volumes
56     *
57     NMED=MTRAD
58     CALL GSVOLU('TRRA','BOX ',NMED,TRRA, 3,IVOLU)
59     *
60     * Define the TRFR volumes
61     *
62     NMED=MCF
63     CALL GSVOLU('TRFR','BOX ',NMED,TRFR, 3,IVOLU)
64     *
65     * Define the TRFI volumes
66     *
67     NMED=MN2
68     CALL GSVOLU('TRFI','BOX ',NMED,TRFI, 3,IVOLU)
69     *
70     * Define the TRDT volumes
71     *
72     NMED=MAL
73     CALL GSVOLU('TRDT','BOX ',NMED,TRDT, 3,IVOLU)
74     *
75     * Positioning volumes TRSI into mothers TRSO
76     *
77     N= 1
78     X= 0.
79     Y= 0.
80     Z= 0.
81     * CALL GSPOS('TRSI',N,'TRSO',X,Y,Z,0,'ONLY')
82     *Positioning volumes TRSO into mothers TRSI, because now TRSO is included in
83     *TRSI and TRSI is included in TRBS
84     CALL GSPOS('TRSO',N,'TRSI',X,Y,Z,0,'ONLY')
85     *
86     *
87     * Positioning volumes TRSO into mothers TRBS. Remember we have to put
88     * tubes one over each other
89     *
90     Y=0.
91     NUM = 0
92     DO II=1,2
93     #if defined(GPAMELA_UNIX)
94     Z= TRSO(2) * COS(30./180.*ACOS(-1.)) * (-1)**II
95     #endif
96     #if !defined(GPAMELA_UNIX)
97     Z= TRSO(2) * COSD(30.) * (-1)**II
98     #endif
99     DO I=1, 16
100     NUM = NUM + 1
101     X= -TRBS(1) + II*TRSO(2) + (I-1)*2.*TRSO(2)
102     * CALL GSPOS('TRSO',NUM,'TRBS',X,Y,Z,2,'ONLY')
103     *now TRSI is into TRBS (I don't change TRSO(2) in TRSI(2) because they
104     *are equal and the velue of X does not change:
105     CALL GSPOS('TRSI',NUM,'TRBS',X,Y,Z,2,'ONLY')
106     ENDDO
107     ENDDO
108     *
109     * Positioning volumes TRFI into mothers TRFR
110     *
111     N= 1
112     X= 0.
113     Y= 0.
114     Z= 0.
115     CALL GSPOS('TRFI',N,'TRFR',X,Y,Z,0,'ONLY')
116     *
117     * Positioning volumes TRAI into mothers TRAN
118     *
119     N= 1
120     X= 0.
121     Y= TRAN(2)-TRAI(2)
122     Z= 0.
123     CALL GSPOS('TRAI',N,'TRAN',X,Y,Z,0,'ONLY')
124     *
125     * Positioning volumes TRAI, TRFR, TRBS&TRRA into the mother TRDB
126     *
127     NAN = 0
128     Z= -TRDB(3) + TRAN(3)
129     DO I = 1,2
130     X = (-1)**(I-1)*TRAN(1)+ (-1)**I*TRDB(1)
131     Y = -TRAN(2)+ TRDB(2)
132     NAN = NAN + 1
133     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,0,'ONLY')
134     Y = +TRAN(2)- TRDB(2)
135     NAN = NAN + 1
136     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,4,'ONLY')
137     ENDDO
138     Y= 0.
139     * Z= -TRDB(3) + TRRA(3) + GAPTRD
140     NUM = 0
141     M=3
142     Z = Z + TRAN(3)
143     DO I=1,4
144     X= 0.
145     Z= Z + TRFR(3)
146     CALL GSPOS('TRFR',I,'TRDB',X,Y,Z,0,'ONLY')
147     Z= Z + TRFR(3) + TRBS(3)
148     DO II=1, M
149     NUM = NUM + 1
150     *shift of modules to have the right overlap:
151     X= (II-1)*2.*TRBS(1) - ( M*TRBS(1) - TRBS(1) ) -
152     + (II-2)*TRSI(2)
153     *now there two different volumes interested at same time:
154     * CALL GSPOS('TRBS',NUM,'TRDB',X,Y,Z,0,'ONLY')
155     CALL GSPOS('TRBS',NUM,'TRDB',X,Y,Z,0,'MANY')
156     ENDDO
157     DO III = 1,2
158     X = (-1)**(III-1)*TRAN(1)+ (-1)**III*TRDB(1)
159     Y = -TRAN(2)+ TRDB(2)
160     NAN = NAN + 1
161     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,0,'ONLY')
162     Y = TRAN(2) - TRDB(2)
163     NAN = NAN + 1
164     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,4,'ONLY')
165     ENDDO
166     X = 0.
167     Y = 0.
168     Z = Z + TRSO(2)*( 1 + COS(30./180.*ACOS(-1.))) + TRRA(3)
169     C # Z= Z + 2*TRSO(2) + TRRA(3)
170     CALL GSPOS('TRRA',I,'TRDB',X,Y,Z,0,'ONLY')
171     C # Z= Z - (2*TRSO(2) + TRRA(3)) + TRBS(3)
172     Z = Z - ( TRSO(2)*( 1 + COS(30./180.*ACOS(-1.))) + TRRA(3))
173     + + TRBS(3)
174     ENDDO
175     M=4
176     DO I=1,5
177     X= 0.
178     Z= Z + TRFR(3)
179     CALL GSPOS('TRFR',(I+4),'TRDB',X,Y,Z,0,'ONLY')
180     Z= Z + TRFR(3) + TRBS(3)
181     DO II=1, M
182     NUM = NUM + 1
183     *shift of modules to have the right overlap:
184     X= (II-1)*2.*TRBS(1) - ( M*TRBS(1) - TRBS(1) )
185     + + (3/2 -(II-1))*TRSI(2)
186     *now there two different volumes interested at same time:
187     * CALL GSPOS('TRBS',NUM,'TRDB',X,Y,Z,0,'ONLY')
188     CALL GSPOS('TRBS',NUM,'TRDB',X,Y,Z,0,'MANY')
189     ENDDO
190     DO III = 1,2
191     X = (-1)**(III-1)*TRAN(1)+ (-1)**III*TRDB(1)
192     Y = -TRAN(2)+ TRDB(2)
193     NAN = NAN + 1
194     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,0,'ONLY')
195     Y = TRAN(2) - TRDB(2)
196     NAN = NAN + 1
197     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,4,'ONLY')
198     ENDDO
199     X= 0.
200     Y= 0.
201     Z = Z + TRSO(2)*( 1 + COS(30./180.*ACOS(-1.))) + TRRA(3)
202     C # Z= Z + 2*TRSO(2) + TRRA(3)
203     CALL GSPOS('TRRA',(I+4),'TRDB',X,Y,Z,0,'ONLY')
204     C # Z= Z - (2*TRSO(2) + TRRA(3)) +TRBS(3)
205     Z = Z - (TRSO(2)*( 1 + COS(30./180.*ACOS(-1.))) + TRRA(3) )
206     + + TRBS(3)
207     ENDDO
208     *
209     * Positioning an extra radiator plane on top
210     *
211     Z = Z - TRBS(3) + TRSO(2)*( 1 + COS(30./180.*ACOS(-1.)))
212     + + 3*TRRA(3)
213     CALL GSPOS('TRRA',NUM,'TRDB',X,Y,Z,0,'ONLY')
214     Z = Z + TRBS(3) -( TRSO(2)*( 1 + COS(30./180.*ACOS(-1.)))
215     + + 3*TRRA(3) )
216     *
217     * Positioning the TOP frame
218     *
219     X = 0.
220     Y = 0.
221     Z = Z + TRFR(3)
222     CALL GSPOS('TRFR',10,'TRDB',X,Y,Z,0,'ONLY')
223     *
224     * Positioning the angular pieces to hold the TOF. TRAN & TRDT
225     *
226     Z = Z + TRFR(3) + TRAN(3)
227     DO I = 1,2
228     X = (-1)**(I-1)*TRAN(1)+ (-1)**I*TRDB(1)
229     Y = -TRAN(2)+ TRDB(2)
230     NAN = NAN + 1
231     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,0,'ONLY')
232     Y = +TRAN(2)- TRDB(2)
233     NAN = NAN + 1
234     CALL GSPOS('TRAN',NAN,'TRDB',X,Y,Z,4,'ONLY')
235     ENDDO
236     Z = Z + TRAN(3) + TRDT(3)
237     NDT = 0
238     DO I = 1,2
239     X = (-1)**(I-1)*(2*TRAN(1)-TRDT(1))+ (-1)**I*TRDB(1)
240     Y = -(2*TRAN(2)-TRDT(2)) + TRDB(2)
241     NDT = NDT + 1
242     CALL GSPOS('TRDT',NDT,'TRDB',X,Y,Z,0,'ONLY')
243     Y = +(2*TRAN(2)-TRDT(2)) - TRDB(2)
244     NDT = NDT + 1
245     CALL GSPOS('TRDT',NDT,'TRDB',X,Y,Z,0,'ONLY')
246     ENDDO
247     RETURN
248     END

  ViewVC Help
Powered by ViewVC 1.1.23