1 |
* |
* |
2 |
* $Id$ |
* $Id: gpcalv.F,v 3.2 2002/12/05 10:17:41 pamela Exp $ |
3 |
|
* |
4 |
|
* $Log: gpcalv.F,v $ |
5 |
|
* Revision 3.2 2002/12/05 10:17:41 pamela |
6 |
|
* Update CAS and CALO geometries and positions. Makefile updated as well |
7 |
|
* |
8 |
|
* Revision 3.1.1.1 2002/07/11 16:02:14 cafagna |
9 |
|
* First GPAMELA release on CVS |
10 |
* |
* |
|
* $Log$ |
|
11 |
* |
* |
12 |
*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 |
13 |
*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 |
45 |
* |
* |
46 |
NMED= MN2 |
NMED= MN2 |
47 |
CALL GSVOLU('CAPL','BOX ',NMED,CAPL, 3,IVOLU) |
CALL GSVOLU('CAPL','BOX ',NMED,CAPL, 3,IVOLU) |
48 |
|
* F.V.&ML: |
49 |
|
* |
50 |
|
* Define the CANS volume |
51 |
|
* |
52 |
|
NMED= MN2 |
53 |
|
CALL GSVOLU('CANS','BOX ',NMED,CANS, 3,IVOLU) |
54 |
|
* END F.V.&ML. |
55 |
* |
* |
56 |
* Define the CAPD volume |
* Define the CAPD volume |
57 |
* |
* |
65 |
* |
* |
66 |
* Division in CASI |
* Division in CASI |
67 |
* |
* |
68 |
CALL GSDVN ('CAST','CASI',NCASTR,1) |
* ML: |
69 |
|
C CALL GSDVN ('CAST','CASI',NCASTR,1) |
70 |
|
CALL GSDVN ('CAST','CASI',NCASTR,2) |
71 |
|
* END ML: |
72 |
* |
* |
73 |
* Define the CG10 volume |
* Define the CG10 volume |
74 |
* |
* |
109 |
X = 0. |
X = 0. |
110 |
Y = 0. |
Y = 0. |
111 |
*EM: |
*EM: |
112 |
Z = -CAPL(3) + CAKA(3) |
*F.V.&ML: |
113 |
CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY') |
c CALL GPVOLU(-2) |
114 |
CALL GSPOS('CAKA',N,'CAPD',X,Y,Z,0,'ONLY') |
C Z = -CAPL(3) + CAKA(3) |
115 |
|
C CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY') |
116 |
|
Z = -CANS(3) + CAKA(3) |
117 |
|
CALL GSPOS('CAKA',N,'CANS',X,Y,Z,0,'ONLY') |
118 |
|
C CALL GSPOS('CAKA',N,'CAPD',X,Y,Z,0,'ONLY') |
119 |
Z = Z + CAKA(3) + C10C(3) |
Z = Z + CAKA(3) + C10C(3) |
120 |
CALL GSPOS('C10C',N,'CAPL',X,Y,Z,0,'ONLY') |
C CALL GSPOS('C10C',N,'CAPL',X,Y,Z,0,'ONLY') |
121 |
CALL GSPOS('C10C',N,'CAPD',X,Y,Z,0,'ONLY') |
CALL GSPOS('C10C',N,'CANS',X,Y,Z,0,'ONLY') |
122 |
|
C CALL GSPOS('C10C',N,'CAPD',X,Y,Z,0,'ONLY') |
123 |
Z = Z + C10C(3) + CAGL(3) |
Z = Z + C10C(3) + CAGL(3) |
124 |
CALL GSPOS('CAGL',N,'CAPL',X,Y,Z,0,'ONLY') |
C CALL GSPOS('CAGL',N,'CAPL',X,Y,Z,0,'ONLY') |
125 |
|
CALL GSPOS('CAGL',N,'CANS',X,Y,Z,0,'ONLY') |
126 |
Z = Z + CAGL(3) + CAKP(3) |
Z = Z + CAGL(3) + CAKP(3) |
127 |
CALL GSPOS('CAKP',N,'CAPL',X,Y,Z,0,'ONLY') |
C CALL GSPOS('CAKP',N,'CAPL',X,Y,Z,0,'ONLY') |
128 |
|
CALL GSPOS('CAKP',N,'CANS',X,Y,Z,0,'ONLY') |
129 |
|
* END F.V.&ML |
130 |
* |
* |
131 |
* Positioning volume CASI into the mother CAPL |
* Positioning volume CASI into the mother CAPL |
132 |
* |
* |
133 |
N = 0 |
N = 0 |
134 |
Z = Z + CAKP(3) + CASI(3) |
* F.V.&ML: |
135 |
|
C Z= Z + CAKP(3) + CASI(3) |
136 |
|
Z = -CAPL(3)+CASI(3) |
137 |
|
* END F.V.&ML |
138 |
DO I=-1,1 |
DO I=-1,1 |
139 |
Y = I*(2.*CASI(2)+ DCASIY) |
Y = I*(2.*CASI(2)+ DCASIY) |
140 |
DO II=-1,1 |
DO II=-1,1 |
148 |
ENDDO |
ENDDO |
149 |
ENDDO |
ENDDO |
150 |
*END EM. |
*END EM. |
151 |
|
*F.V.&ML: |
152 |
|
C commenting the original code with a 'C' per raw: |
153 |
|
C* |
154 |
|
C* Positioning volume CAPL and CAAB into the mother CALB |
155 |
|
C* |
156 |
|
C X= 0. |
157 |
|
C Y= 0. |
158 |
|
CC Z= CALB(3) + CAPL(3) |
159 |
|
C*EM: |
160 |
|
C Z= CALB(3) + CAPL(3) - DCASIZ/2. |
161 |
|
C*END EM. (we have 0.15 cm from the top to the first Si) |
162 |
|
C N= 0 |
163 |
|
C DO I=1,NCAPL |
164 |
|
C* |
165 |
|
C* X view, absorber and Y view on the other |
166 |
|
C* |
167 |
|
C Z= Z - 2*CAPL(3) |
168 |
|
C N= N + 1 |
169 |
|
C* |
170 |
|
C* Check if this plane is excluded |
171 |
|
C* |
172 |
|
C IF(.NOT.NOCAPL(N)) |
173 |
|
C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
174 |
|
C Z= Z - CAPL(3) - CAAB(3) |
175 |
|
C* |
176 |
|
C* Check if this absorber is excluded |
177 |
|
C* |
178 |
|
C IF(.NOT.NOCAAB(I)) |
179 |
|
C + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
180 |
|
C Z= Z - CAAB(3) - CAPL(3) |
181 |
|
C N= N + 1 |
182 |
|
C* |
183 |
|
C* Check if this detector is excluded |
184 |
|
C* |
185 |
|
C IF(.NOT.NOCAPL(N)) |
186 |
|
C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
187 |
|
C ENDDO |
188 |
|
C end comments. |
189 |
* |
* |
190 |
* Positioning volume CAPL and CAAB into the mother CALB |
* Positioning volume CANS ,CAPL and CAAB into the mother CALB |
191 |
* |
* |
192 |
X= 0. |
X= 0. |
193 |
Y= 0. |
Y= 0. |
|
C Z= CALB(3) + CAPL(3) |
|
|
*EM: |
|
194 |
Z= CALB(3) + CAPL(3) - DCASIZ/2. |
Z= CALB(3) + CAPL(3) - DCASIZ/2. |
195 |
*END EM. (we have 0.15 cm from the top to the first Si) |
*END EM. (we have 0.15 cm from the top to the first Si) |
196 |
N= 0 |
N= 0 |
197 |
DO I=1,NCAPL |
* |
198 |
|
* I DISPARI |
199 |
|
DO I=1,NCAPL,2 |
200 |
* |
* |
201 |
* X view, absorber and Y view on the other |
* X view, absorber and Y view on the other |
202 |
* |
* |
203 |
|
X=0.10 |
204 |
|
Y=0.05 |
205 |
Z= Z - 2*CAPL(3) |
Z= Z - 2*CAPL(3) |
206 |
N= N + 1 |
N= N + 1 |
207 |
* |
* |
208 |
* Check if this plane is excluded |
* Check if this plane is excluded |
209 |
* |
* |
210 |
|
* |
211 |
IF(.NOT.NOCAPL(N)) |
IF(.NOT.NOCAPL(N)) |
212 |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
213 |
Z= Z - CAPL(3) - CAAB(3) |
* |
214 |
|
X = 0. |
215 |
|
Y = 0. |
216 |
|
Z= Z - CAPL(3) - CANS(3) |
217 |
|
* |
218 |
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY') |
219 |
|
* |
220 |
|
Z= Z - CANS(3) - CAAB(3) |
221 |
* |
* |
222 |
* Check if this absorber is excluded |
* Check if this absorber is excluded |
223 |
* |
* |
224 |
|
* |
225 |
IF(.NOT.NOCAAB(I)) |
IF(.NOT.NOCAAB(I)) |
226 |
+ CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
+ CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
227 |
Z= Z - CAAB(3) - CAPL(3) |
* |
228 |
N= N + 1 |
Z = Z - CAAB(3)- CANS(3) |
229 |
|
N = N + 1 |
230 |
|
* |
231 |
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY') |
232 |
|
Z= Z - CANS(3) - CAPL(3) |
233 |
|
X=-0.05 |
234 |
|
Y=0.10 |
235 |
* |
* |
236 |
* Check if this detector is excluded |
* Check if this detector is excluded |
237 |
* |
* |
238 |
IF(.NOT.NOCAPL(N)) |
IF(.NOT.NOCAPL(N)) |
239 |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
240 |
|
N=N+2 |
241 |
|
Z = Z -2*(2*CAPL(3)+2*CANS(3)+CAAB(3)) |
242 |
ENDDO |
ENDDO |
243 |
* |
* |
244 |
* Positioning volume CAPD and CAAD into the mother CALB |
* I PARI |
245 |
* |
* |
246 |
N= 0 |
X= 0. |
247 |
DO I=1,NCAPLD |
Y= 0. |
248 |
IF(I.EQ.1) THEN |
Z= CALB(3) + CAPL(3) - DCASIZ/2. |
249 |
Z= Z - CAPD(3) - CAPL(3) |
*END EM. (we have 0.15 cm from the top to the first Si) |
250 |
ELSE |
N= 2 |
251 |
Z= Z - 2*CAPD(3) |
* |
252 |
ENDIF |
* |
253 |
N= N + 1 |
DO I=2,NCAPL,2 |
254 |
CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY') |
* |
255 |
Z= Z - CAPD(3) - CAAD(3) |
* X view, absorber and Y view on the other |
256 |
CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY') |
* |
257 |
Z= Z - CAAD(3) - CAPD(3) |
Z= Z - 2*CAPL(3)-2*(2*CAPL(3)+2*CANS(3)+CAAB(3)) |
258 |
N= N + 1 |
N= N + 1 |
259 |
CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY') |
* |
260 |
|
* Check if this plane is excluded |
261 |
|
X= -0.10 |
262 |
|
Y= -0.05 |
263 |
|
* |
264 |
|
IF(.NOT.NOCAPL(N)) |
265 |
|
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
266 |
|
X = 0. |
267 |
|
Y = 0. |
268 |
|
Z = Z - CAPL(3) - CANS(3) |
269 |
|
* |
270 |
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY') |
271 |
|
* |
272 |
|
* Check if this absorber is excluded |
273 |
|
* |
274 |
|
N = N + 1 |
275 |
|
Z = Z - CANS(3) - CAAB(3) |
276 |
|
* |
277 |
|
IF(.NOT.NOCAAB(I)) |
278 |
|
+ CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
279 |
|
* |
280 |
|
Z= Z - CAAB(3) - CANS(3) |
281 |
|
* |
282 |
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY') |
283 |
|
Z= Z - CANS(3) - CAPL(3) |
284 |
|
X= 0.05 |
285 |
|
Y= -0.10 |
286 |
|
* |
287 |
|
* |
288 |
|
* Check if this detector is excluded |
289 |
|
* |
290 |
|
IF(.NOT.NOCAPL(N)) |
291 |
|
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
292 |
|
N = N + 2 |
293 |
|
* |
294 |
ENDDO |
ENDDO |
295 |
|
*END F.V.&ML. |
296 |
|
* F.V.&ML.: |
297 |
|
* again we have to comment with a 'C' per raw: |
298 |
|
C* |
299 |
|
C* Positioning volume CAPD and CAAD into the mother CALB |
300 |
|
C* |
301 |
|
C N= 0 |
302 |
|
C DO I=1,NCAPLD |
303 |
|
C IF(I.EQ.1) THEN |
304 |
|
C Z= Z - CAPD(3) - CAPL(3) |
305 |
|
C ELSE |
306 |
|
C Z= Z - 2*CAPD(3) |
307 |
|
C ENDIF |
308 |
|
C N= N + 1 |
309 |
|
C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY') |
310 |
|
C Z= Z - CAPD(3) - CAAD(3) |
311 |
|
C CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY') |
312 |
|
C Z= Z - CAAD(3) - CAPD(3) |
313 |
|
C N= N + 1 |
314 |
|
C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY') |
315 |
|
C ENDDO |
316 |
|
* end comments. |
317 |
|
*END F.V.&ML. |
318 |
* |
* |
319 |
* Put the shell around it |
* Put the shell around it |
320 |
* |
* |