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

Diff of /gpamela/gpcal/gpcalv.F

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3.2 by pamela, Thu Dec 5 10:17:41 2002 UTC revision 3.6 by cafagna, Fri Mar 30 15:24:54 2007 UTC
# Line 1  Line 1 
1  *  *
2  * $Id: gpcalv.F,v 3.1.1.1 2002/07/11 16:02:14 cafagna Exp $  * $Id: gpcalv.F,v 3.5 2006/05/09 12:01:15 cafagna Exp $
3  *  *
4  * $Log: gpcalv.F,v $  * $Log: gpcalv.F,v $
5    * Revision 3.5  2006/05/09 12:01:15  cafagna
6    * Calo geometry updated
7    *
8    * Revision 3.4  2005/07/25 11:53:20  cafagna
9    * Several updates. See history for details
10    *
11    * Revision 3.3  2003/12/17 11:32:48  pamela
12    * CALO SIMULATION COMPLETED: geometry and special tracking parameters updated and simulation checked by a comparison with the Trieste's standalone Monte Carlo simulation
13    *
14    * Revision 3.2  2002/12/05 10:17:41  pamela
15    * Update CAS and CALO geometries and positions. Makefile updated as well
16    *
17  * Revision 3.1.1.1  2002/07/11 16:02:14  cafagna  * Revision 3.1.1.1  2002/07/11 16:02:14  cafagna
18  * First GPAMELA release on CVS  * First GPAMELA release on CVS
19  *  *
# Line 27  Line 39 
39  *  *
40        INTEGER IROT,IVOLU,N,NMED        INTEGER IROT,IVOLU,N,NMED
41        REAL X,Y,Z        REAL X,Y,Z
42    * MA
43          REAL X1, Y1
44          INTEGER m
45    * END MA
46  *  *
47  *  Define the CALB     volume  *  Define the CALB     volume
48  *  *
# Line 107  C      CALL GSDVN ('CAST','CASI',NCASTR, Line 123  C      CALL GSDVN ('CAST','CASI',NCASTR,
123        Y = 0.        Y = 0.
124  *EM:  *EM:
125  *F.V.&ML:  *F.V.&ML:
126        CALL GPVOLU(-2)  c      CALL GPVOLU(-2)
127  C      Z = -CAPL(3) + CAKA(3)  C      Z = -CAPL(3) + CAKA(3)
128  C      CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY')  C      CALL GSPOS('CAKA',N,'CAPL',X,Y,Z,0,'ONLY')
129        Z = -CANS(3) + CAKA(3)        Z = -CANS(3) + CAKA(3)
# Line 145  C      Z= Z + CAKP(3) + CASI(3) Line 161  C      Z= Z + CAKP(3) + CASI(3)
161           ENDDO           ENDDO
162        ENDDO        ENDDO
163  *END EM.  *END EM.
164  *F.V.&ML:  * MA
165  C commenting the original code with a 'C' per raw:  * 11 MODULI DI 2 W
166  C*  c     Z = CALB(3) - CAPL(3) - DCASIZ/2
167  C* Positioning volume CAPL and CAAB into the mother CALB        Z = CALB(3) - CAPL(3) - DCASIZ
168  C*        N = 0
169  C      X= 0.        DO M = 0,20,2
170  C      Y= 0.  *     Positioning CAPL CANS CAAB in CALB to form a module
171  CC      Z= CALB(3) + CAPL(3)           X = .10
172  C*EM:           y = .05
173  C      Z= CALB(3) + CAPL(3) - DCASIZ/2.           DO I = 1,2
174  C*END EM. (we have 0.15 cm from the top to the first Si)  *     Positioning CAPL
175  C      N= 0              N = N + 1
176  C      DO I=1,NCAPL  C     if(N.EQ.1) print *,'z ini = ',Z
177  C*              IF(.NOT.NOCAPL(N))
178  C* X view, absorber and Y view on the other       +           CALL GSPOS('CAPL',N,'CALB',X,(Y-0.1),Z,0,'ONLY')
179  C*  *     Positioning CANS
180  C         Z= Z - 2*CAPL(3)              Z = Z - CAPL(3) - CANS(3)
181  C         N= N + 1              CALL GSPOS('CANS',N,'CALB',0,-0.1,Z,0,'ONLY')
182  C*  *     Positioning CAAB
183  C* Check if this plane is excluded              Z = Z - CANS(3) - CAAB(3)
184  C*              IF(.NOT.NOCAAB(M+I))
185  C         IF(.NOT.NOCAPL(N))       +           CALL GSPOS('CAAB',(M+I),'CALB',0,-0.1,Z,0,'ONLY')
186  C     +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')  *     Positioning CANS (ruotato)
187  C         Z= Z - CAPL(3) - CAAB(3)              N = N + 1
188  C*              Z = Z - CAAB(3) - CANS(3)
189  C* Check if this absorber is excluded              CALL GSPOS('CANS',N,'CALB',0,-0.1,Z,3,'ONLY')
190  C*  *     Positioning CAPL (ruotato e shiftato)
191  C         IF(.NOT.NOCAAB(I))              X1 = X
192  C     +        CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')              Y1 = Y
193  C         Z= Z - CAAB(3) - CAPL(3)              X = -Y1
194  C         N= N + 1              Y = X1
195  C*              Z = Z - CANS(3) - CAPL(3)
196  C* Check if this detector is excluded  c Mod by Caf on 30th Marc 2007, the X position of the X-view planes should be swapped
197  C*  c$$$            IF(.NOT.NOCAPL(N))
198  C         IF(.NOT.NOCAPL(N))  c$$$     +           CALL GSPOS('CAPL',N,'CALB',X,(Y-0.1),Z,3,'ONLY')
199  C     +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')              IF(.NOT.NOCAPL(N))
200  C      ENDDO       +           CALL GSPOS('CAPL',N,'CALB',-X,(Y-0.1),Z,3,'ONLY')
201  C end comments.  
202  *              IF(I.EQ.1) THEN
203  * Positioning volume CANS ,CAPL and CAAB into the mother CALB  c              Z = Z - 2*CAPL(3) - DZMO ! SPESSORE TRA I SILICI CHE SI GUARDANO
204  *                 Z = Z - 2*CAPL(3) - DZM0 ! corretto
205        X= 0.                 X1 = X                   ! SHIFT PER IL CAPL PROSSIMO CICLO
206        Y= 0.                 Y1 = Y
207        Z= CALB(3) + CAPL(3) - DCASIZ/2.                 X = -Y1
208  *END EM. (we have 0.15 cm from the top to the first Si)                 Y = X1
209        N= 0              ENDIF
210  *           ENDDO
211  *       I DISPARI           Z = Z - DZST - 2*CAPL(3)
       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  
 *  
212        ENDDO        ENDDO
213  *END F.V.&ML.  *     END MA
214  * F.V.&ML.:  
215  * again we have to comment with a 'C' per raw:  C # *F.V.&ML:
216  C*  C # C commenting the original code with a 'C' per raw:
217  C* Positioning volume CAPD and CAAD into the mother CALB  C # C*
218  C*  C # C* Positioning volume CAPL and CAAB into the mother CALB
219  C      N= 0  C # C*
220  C      DO I=1,NCAPLD  C # C      X= 0.
221  C         IF(I.EQ.1) THEN  C # C      Y= 0.
222  C            Z= Z - CAPD(3) - CAPL(3)  C # CC      Z= CALB(3) + CAPL(3)
223  C         ELSE  C # C*EM:
224  C            Z= Z - 2*CAPD(3)  C # C      Z= CALB(3) + CAPL(3) - DCASIZ/2.
225  C         ENDIF  C # C*END EM. (we have 0.15 cm from the top to the first Si)
226  C         N= N + 1  C # C      N= 0
227  C         CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY')  C # C      DO I=1,NCAPL
228  C         Z= Z - CAPD(3) - CAAD(3)  C # C*
229  C         CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY')  C # C* X view, absorber and Y view on the other
230  C         Z= Z - CAAD(3) - CAPD(3)  C # C*
231  C         N= N + 1  C # C         Z= Z - 2*CAPL(3)
232  C         CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY')  C # C         N= N + 1
233  C      ENDDO  C # C*
234  * end comments.  C # C* Check if this plane is excluded
235  *END F.V.&ML.  C # C*
236    C # C         IF(.NOT.NOCAPL(N))
237    C # C     +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')
238    C # C         Z= Z - CAPL(3) - CAAB(3)
239    C # C*
240    C # C* Check if this absorber is excluded
241    C # C*
242    C # C         IF(.NOT.NOCAAB(I))
243    C # C     +        CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')
244    C # C         Z= Z - CAAB(3) - CAPL(3)
245    C # C         N= N + 1
246    C # C*
247    C # C* Check if this detector is excluded
248    C # C*
249    C # C         IF(.NOT.NOCAPL(N))
250    C # C     +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')
251    C # C      ENDDO
252    C # C end comments.
253    C # *
254    C # * Positioning volume CANS ,CAPL and CAAB into the mother CALB
255    C # *
256    C #       X= 0.
257    C #       Y= 0.
258    C #       Z= CALB(3) + CAPL(3) - DCASIZ/2.
259    C # *END EM. (we have 0.15 cm from the top to the first Si)
260    C #       N= 0
261    C # *
262    C # *   I DISPARI
263    C #       DO I=1,NCAPL,2
264    C # *
265    C # * X view, absorber and Y view on the other
266    C # *
267    C #      X=0.10
268    C #      Y=0.05
269    C #          Z= Z - 2*CAPL(3)
270    C #          N= N + 1
271    C # *
272    C # * Check if this plane is excluded
273    C # *
274    C # *
275    C #          IF(.NOT.NOCAPL(N))
276    C #      +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')
277    C # *
278    C #          X = 0.
279    C #          Y = 0.
280    C #          Z= Z - CAPL(3) - CANS(3)
281    C # *
282    C #          CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY')
283    C # *
284    C #          Z= Z - CANS(3) - CAAB(3)
285    C # *
286    C # * Check if this absorber is excluded
287    C # *
288    C # *
289    C #          IF(.NOT.NOCAAB(I))
290    C #      +        CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')
291    C # *
292    C #          Z = Z - CAAB(3)- CANS(3)
293    C #          N = N + 1
294    C # *    
295    C #          CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY')
296    C #          Z= Z - CANS(3) - CAPL(3)
297    C #          X=-0.05
298    C #          Y=0.10
299    C # *
300    C # * Check if this detector is excluded
301    C # *
302    C #          IF(.NOT.NOCAPL(N))
303    C #      +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')
304    C #      N=N+2
305    C #      Z = Z -2*(2*CAPL(3)+2*CANS(3)+CAAB(3))
306    C #       ENDDO
307    C # *
308    C # *   I PARI
309    C # *
310    C #       X= 0.
311    C #       Y= 0.
312    C #       Z= CALB(3) + CAPL(3) - DCASIZ/2.
313    C # *END EM. (we have 0.15 cm from the top to the first Si)
314    C #       N= 2
315    C # *
316    C # *
317    C #       DO I=2,NCAPL,2
318    C # *
319    C # * X view, absorber and Y view on the other
320    C # *
321    C #          Z= Z - 2*CAPL(3)-2*(2*CAPL(3)+2*CANS(3)+CAAB(3))
322    C #          N= N + 1
323    C # *
324    C # * Check if this plane is excluded
325    C #          X= -0.10
326    C #          Y= -0.05
327    C # *
328    C #          IF(.NOT.NOCAPL(N))
329    C #      +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,0,'ONLY')
330    C #      X = 0.
331    C #      Y = 0.
332    C #          Z = Z - CAPL(3) - CANS(3)
333    C # *
334    C #              CALL GSPOS('CANS',N,'CALB',X,Y,Z,0,'ONLY')
335    C # *
336    C # * Check if this absorber is excluded
337    C # *
338    C #          N = N + 1
339    C #          Z = Z - CANS(3) - CAAB(3)
340    C # *    
341    C #          IF(.NOT.NOCAAB(I))
342    C #      +        CALL GSPOS('CAAB',(I-1),'CALB',X,Y,Z,0,'ONLY')
343    C # *
344    C #      Z= Z - CAAB(3) - CANS(3)
345    C # *
346    C #          CALL GSPOS('CANS',N,'CALB',X,Y,Z,3,'ONLY')
347    C #          Z= Z - CANS(3) - CAPL(3)
348    C #          X= 0.05
349    C #          Y= -0.10
350    C # *
351    C # *
352    C # * Check if this detector is excluded
353    C # *
354    C #          IF(.NOT.NOCAPL(N))
355    C #      +        CALL GSPOS('CAPL',N,'CALB',X,Y,Z,3,'ONLY')
356    C #          N = N + 2
357    C # *
358    C #       ENDDO
359    C # *END F.V.&ML.
360    C # * F.V.&ML.:
361    C # * again we have to comment with a 'C' per raw:
362    C # C*
363    C # C* Positioning volume CAPD and CAAD into the mother CALB
364    C # C*
365    C # C      N= 0
366    C # C      DO I=1,NCAPLD
367    C # C         IF(I.EQ.1) THEN
368    C # C            Z= Z - CAPD(3) - CAPL(3)
369    C # C         ELSE
370    C # C            Z= Z - 2*CAPD(3)
371    C # C         ENDIF
372    C # C         N= N + 1
373    C # C         CALL GSPOS('CAPD',N,'CALB',X,Y,Z,0,'ONLY')
374    C # C         Z= Z - CAPD(3) - CAAD(3)
375    C # C         CALL GSPOS('CAAD',(I-1),'CALB',X,Y,Z,0,'ONLY')
376    C # C         Z= Z - CAAD(3) - CAPD(3)
377    C # C         N= N + 1
378    C # C         CALL GSPOS('CAPD',N,'CALB',X,Y,Z,3,'ONLY')
379    C # C      ENDDO
380    C # * end comments.
381    C # *END F.V.&ML.
382    C # end MA comments
383  *  *
384  * Put the shell around it  * Put the shell around it
385  *  *

Legend:
Removed from v.3.2  
changed lines
  Added in v.3.6

  ViewVC Help
Powered by ViewVC 1.1.23