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