1 |
* |
* |
2 |
* $Id: gpcalv.F,v 3.2 2002/12/05 10:17:41 pamela Exp $ |
* $Id: gpcalv.F,v 3.3 2003/12/17 11:32:48 pamela Exp $ |
3 |
* |
* |
4 |
* $Log: gpcalv.F,v $ |
* $Log: gpcalv.F,v $ |
5 |
|
* 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 |
* Revision 3.2 2002/12/05 10:17:41 pamela |
* Revision 3.2 2002/12/05 10:17:41 pamela |
9 |
* Update CAS and CALO geometries and positions. Makefile updated as well |
* Update CAS and CALO geometries and positions. Makefile updated as well |
10 |
* |
* |
33 |
* |
* |
34 |
INTEGER IROT,IVOLU,N,NMED |
INTEGER IROT,IVOLU,N,NMED |
35 |
REAL X,Y,Z |
REAL X,Y,Z |
36 |
|
* MA |
37 |
|
REAL X1, Y1 |
38 |
|
INTEGER m |
39 |
|
* END MA |
40 |
* |
* |
41 |
* Define the CALB volume |
* Define the CALB volume |
42 |
* |
* |
155 |
ENDDO |
ENDDO |
156 |
ENDDO |
ENDDO |
157 |
*END EM. |
*END EM. |
158 |
*F.V.&ML: |
* MA |
159 |
C commenting the original code with a 'C' per raw: |
* 11 MODULI DI 2 W |
160 |
C* |
Z = CALB(3) - CAPL(3) - DCASIZ/2 |
161 |
C* Positioning volume CAPL and CAAB into the mother CALB |
N = 0 |
162 |
C* |
DO M = 0,20,2 |
163 |
C X= 0. |
* Positioning CAPL CANS CAAB in CALB to form a module |
164 |
C Y= 0. |
X = .10 |
165 |
CC Z= CALB(3) + CAPL(3) |
y = .05 |
166 |
C*EM: |
DO I = 1,2 |
167 |
C Z= CALB(3) + CAPL(3) - DCASIZ/2. |
* Positioning CAPL |
168 |
C*END EM. (we have 0.15 cm from the top to the first Si) |
N = N + 1 |
169 |
C N= 0 |
C if(N.EQ.1) print *,'z ini = ',Z |
170 |
C DO I=1,NCAPL |
IF(.NOT.NOCAPL(N)) |
171 |
C* |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
172 |
C* X view, absorber and Y view on the other |
* Positioning CANS |
173 |
C* |
Z = Z - CAPL(3) - CANS(3) |
174 |
C Z= Z - 2*CAPL(3) |
CALL GSPOS('CANS',N,'CALB',0,0,Z,0,'ONLY') |
175 |
C N= N + 1 |
* Positioning CAAB |
176 |
C* |
Z = Z - CANS(3) - CAAB(3) |
177 |
C* Check if this plane is excluded |
IF(.NOT.NOCAAB(M+I)) |
178 |
C* |
+ CALL GSPOS('CAAB',(M+I),'CALB',0,0,Z,0,'ONLY') |
179 |
C IF(.NOT.NOCAPL(N)) |
* Positioning CANS (ruotato) |
180 |
C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
N = N + 1 |
181 |
C Z= Z - CAPL(3) - CAAB(3) |
Z = Z - CAAB(3) - CANS(3) |
182 |
C* |
CALL GSPOS('CANS',N,'CALB',0,0,Z,3,'ONLY') |
183 |
C* Check if this absorber is excluded |
* Positioning CAPL (ruotato e shiftato) |
184 |
C* |
X1 = X |
185 |
C IF(.NOT.NOCAAB(I)) |
Y1 = Y |
186 |
C + CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
X = -Y1 |
187 |
C Z= Z - CAAB(3) - CAPL(3) |
Y = X1 |
188 |
C N= N + 1 |
Z = Z - CANS(3) - CAPL(3) |
189 |
C* |
C if(N.EQ.44) print *,'z fin = ',Z |
190 |
C* Check if this detector is excluded |
IF(.NOT.NOCAPL(N)) |
191 |
C* |
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
192 |
C IF(.NOT.NOCAPL(N)) |
IF(I.EQ.1) THEN |
193 |
C + CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
Z = Z - 2*CAPL(3) - DZMO ! SPESSORE TRA I SILICI CHE SI GUARDANO |
194 |
C ENDDO |
X1 = X ! SHIFT PER IL CAPL PROSSIMO CICLO |
195 |
C end comments. |
Y1 = Y |
196 |
* |
X = -Y1 |
197 |
* Positioning volume CANS ,CAPL and CAAB into the mother CALB |
Y = X1 |
198 |
* |
ENDIF |
199 |
X= 0. |
ENDDO |
200 |
Y= 0. |
Z = Z - DZST - 2*CAPL(3) |
|
Z= CALB(3) + CAPL(3) - DCASIZ/2. |
|
|
*END EM. (we have 0.15 cm from the top to the first Si) |
|
|
N= 0 |
|
|
* |
|
|
* I DISPARI |
|
|
DO I=1,NCAPL,2 |
|
|
* |
|
|
* X view, absorber and Y view on the other |
|
|
* |
|
|
X=0.10 |
|
|
Y=0.05 |
|
|
Z= Z - 2*CAPL(3) |
|
|
N= N + 1 |
|
|
* |
|
|
* Check if this plane is excluded |
|
|
* |
|
|
* |
|
|
IF(.NOT.NOCAPL(N)) |
|
|
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
|
|
* |
|
|
X = 0. |
|
|
Y = 0. |
|
|
Z= Z - CAPL(3) - CANS(3) |
|
|
* |
|
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY') |
|
|
* |
|
|
Z= Z - CANS(3) - CAAB(3) |
|
|
* |
|
|
* Check if this absorber is excluded |
|
|
* |
|
|
* |
|
|
IF(.NOT.NOCAAB(I)) |
|
|
+ CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
|
|
* |
|
|
Z = Z - CAAB(3)- CANS(3) |
|
|
N = N + 1 |
|
|
* |
|
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY') |
|
|
Z= Z - CANS(3) - CAPL(3) |
|
|
X=-0.05 |
|
|
Y=0.10 |
|
|
* |
|
|
* Check if this detector is excluded |
|
|
* |
|
|
IF(.NOT.NOCAPL(N)) |
|
|
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
|
|
N=N+2 |
|
|
Z = Z -2*(2*CAPL(3)+2*CANS(3)+CAAB(3)) |
|
|
ENDDO |
|
|
* |
|
|
* I PARI |
|
|
* |
|
|
X= 0. |
|
|
Y= 0. |
|
|
Z= CALB(3) + CAPL(3) - DCASIZ/2. |
|
|
*END EM. (we have 0.15 cm from the top to the first Si) |
|
|
N= 2 |
|
|
* |
|
|
* |
|
|
DO I=2,NCAPL,2 |
|
|
* |
|
|
* X view, absorber and Y view on the other |
|
|
* |
|
|
Z= Z - 2*CAPL(3)-2*(2*CAPL(3)+2*CANS(3)+CAAB(3)) |
|
|
N= N + 1 |
|
|
* |
|
|
* Check if this plane is excluded |
|
|
X= -0.10 |
|
|
Y= -0.05 |
|
|
* |
|
|
IF(.NOT.NOCAPL(N)) |
|
|
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY') |
|
|
X = 0. |
|
|
Y = 0. |
|
|
Z = Z - CAPL(3) - CANS(3) |
|
|
* |
|
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY') |
|
|
* |
|
|
* Check if this absorber is excluded |
|
|
* |
|
|
N = N + 1 |
|
|
Z = Z - CANS(3) - CAAB(3) |
|
|
* |
|
|
IF(.NOT.NOCAAB(I)) |
|
|
+ CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY') |
|
|
* |
|
|
Z= Z - CAAB(3) - CANS(3) |
|
|
* |
|
|
CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY') |
|
|
Z= Z - CANS(3) - CAPL(3) |
|
|
X= 0.05 |
|
|
Y= -0.10 |
|
|
* |
|
|
* |
|
|
* Check if this detector is excluded |
|
|
* |
|
|
IF(.NOT.NOCAPL(N)) |
|
|
+ CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY') |
|
|
N = N + 2 |
|
|
* |
|
201 |
ENDDO |
ENDDO |
202 |
*END F.V.&ML. |
* END MA |
203 |
* F.V.&ML.: |
|
204 |
* again we have to comment with a 'C' per raw: |
C # *F.V.&ML: |
205 |
C* |
C # C commenting the original code with a 'C' per raw: |
206 |
C* Positioning volume CAPD and CAAD into the mother CALB |
C # C* |
207 |
C* |
C # C* Positioning volume CAPL and CAAB into the mother CALB |
208 |
C N= 0 |
C # C* |
209 |
C DO I=1,NCAPLD |
C # C X= 0. |
210 |
C IF(I.EQ.1) THEN |
C # C Y= 0. |
211 |
C Z= Z - CAPD(3) - CAPL(3) |
C # CC Z= CALB(3) + CAPL(3) |
212 |
C ELSE |
C # C*EM: |
213 |
C Z= Z - 2*CAPD(3) |
C # C Z= CALB(3) + CAPL(3) - DCASIZ/2. |
214 |
C ENDIF |
C # C*END EM. (we have 0.15 cm from the top to the first Si) |
215 |
C N= N + 1 |
C # C N= 0 |
216 |
C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY') |
C # C DO I=1,NCAPL |
217 |
C Z= Z - CAPD(3) - CAAD(3) |
C # C* |
218 |
C CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY') |
C # C* X view, absorber and Y view on the other |
219 |
C Z= Z - CAAD(3) - CAPD(3) |
C # C* |
220 |
C N= N + 1 |
C # C Z= Z - 2*CAPL(3) |
221 |
C CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY') |
C # C N= N + 1 |
222 |
C ENDDO |
C # C* |
223 |
* end comments. |
C # C* Check if this plane is excluded |
224 |
*END F.V.&ML. |
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 |
* |
* |
373 |
* Put the shell around it |
* Put the shell around it |
374 |
* |
* |