/[PAMELA software]/gpamela/gpcat/gpucat.F
ViewVC logotype

Annotation of /gpamela/gpcat/gpucat.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.1.1.1 - (hide annotations) (download) (vendor branch)
Thu Jul 11 16:02:14 2002 UTC (22 years, 4 months ago) by cafagna
Branch: v3r0, MAIN
CVS Tags: v4r4, v4r5, v4r6, v4r7, v4r0, v4r1, v4r2, v4r3, v4r8, v4r9, firstrelease, v4r14, v4r12, v4r13, v4r10, v4r11, v3r3, v3r1, v3r2, HEAD
Changes since 3.1: +0 -0 lines
First GPAMELA release on CVS

1 cafagna 3.1 *
2     * $Id$
3     *
4     * $Log$
5     *
6     *CMZ : 3.00/00 09/11/2000 16.22.13 by Emiliano Mocchiutti
7     *CMZ : 2.01/00 05/04/2000 14.35.18 by Marialuigia Ambriola
8     *CMZ : 2.00/00 03/03/2000 15.39.06 by Francesco Cafagna
9     *CMZ : 1.02/00 15/03/97 11.02.08 by Francesco Cafagna
10     *CMZ : 1.00/02 04/04/96 16.47.16 by Francesco Cafagna
11     *-- Author : Francesco Cafagna 21/02/96
12     SUBROUTINE GPUCAT(IACT,IS,ID,IPA,IT,DELOSS,TIME,PATH,
13     + TRAPAR,NUMVOL,IMEC)
14     ************************************************************************
15     * *
16     * To collect and store the hit structure for CAT *
17     * *
18     * Variables definition: *
19     * IN: *
20     * IACT, integer specifing the action to be taken. It is the INWVOL *
21     * variable in GCTRAK common *
22     * IS , set number *
23     * ID , detector number *
24     * IPA , particle number *
25     * IT , track number *
26     * DELOSS, energy loss in the step *
27     * TIME , current time of flight *
28     * PATH , current track lenght *
29     * TRAPAR, track parameter, is the VECT vector in GCTRAK common *
30     * NUMVOL, integr array of numbers identifying the DETECTOR *
31     * IMEC , integer indicating the LOSS mecanism position inside NMEC *
32     * vector, zero if not present *
33     * *
34     * *
35     * Called by: GUSTEP *
36     * Author: Francesco Cafagna, 21/02/96 16.13.51 *
37     * *
38     ************************************************************************
39     #include "gphit.inc"
40     #include "gcunit.inc"
41     *
42     INTEGER IACT,IS,ID,IPA,IT,NUMVOL(20),IMEC,IDHIT
43     REAL DELOSS,TIME,PATH,TRAPAR(7),VHIT(NHCAT)
44     LOGICAL SAVE
45     *
46     * Track is inside a volume
47     *
48     IF(IACT.EQ.0) THEN
49     IF(IMEC.GT.0) THEN
50     SAVE = .TRUE.
51     VHIT(7) = DELOSS + VHIT(7)
52     ENDIF
53     ENDIF
54     *
55     * Entering a new volume or is a new track
56     *
57     IF(IACT.EQ.1) THEN
58     SAVE = .FALSE.
59     CALL VZERO(VHIT,NHCAT)
60     DO I=1,3
61     VHIT(I) = TRAPAR(I)
62     ENDDO
63     IF(IMEC.GT.0) THEN
64     SAVE = .TRUE.
65     VHIT(7) = DELOSS
66     ENDIF
67     VHIT(8) = TIME
68     VHIT(9) = PATH
69     VHIT(10)= IPA
70     VHIT(11)= TRAPAR(7)
71     IDHIT = -1
72     ENDIF
73     *
74     * Track is exiting current volume
75     *
76     IF(IACT.EQ.2) THEN
77     DO I=1,3
78     VHIT(I+3) = TRAPAR(I)
79     #if defined(GPAMELA_INTER)
80     * interactive case, we need the average position
81     VHIT(I) = (VHIT(I) + VHIT(I+3) )/2.
82     #endif
83     ENDDO
84     IF(IMEC.GT.0) THEN
85     SAVE = .TRUE.
86     VHIT(7) = DELOSS + VHIT(7)
87     ENDIF
88     VHIT(8) = (TIME + VHIT(8))/2.
89     VHIT(9) = PATH - VHIT(9)
90     VHIT(11)= (TRAPAR(7) + VHIT(11))/2.
91     *
92     * Store the hit
93     *
94     IF(IDHIT.EQ.-1) THEN
95     IF(SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT)
96     IF (IDHIT.EQ.0) THEN
97     WRITE(CHMAIL,10000) IS,ID,IT
98     CALL GMAIL(1,0)
99     ENDIF
100     ELSE
101     WRITE(CHMAIL,10100) IS,ID,IT
102     CALL GMAIL(1,0)
103     ENDIF
104     ENDIF
105     *
106     * Track is exiting the set up
107     *
108     IF(IACT.EQ.3) THEN
109     *
110     * Check if the hit have been previously stored or not
111     *
112     IF(IDHIT.LT.0) THEN
113     DO I=1,3
114     VHIT(I+3) = TRAPAR(I)
115     #if defined(GPAMELA_INTER)
116     * interactive case, we need the average position
117     VHIT(I) = (VHIT(I) + VHIT(I+3) )/2.
118     #endif
119     ENDDO
120     IF(IMEC.GT.0) THEN
121     SAVE = .TRUE.
122     VHIT(7) = DELOSS + VHIT(7)
123     ENDIF
124     VHIT(8) = (TIME + VHIT(8))/2.
125     VHIT(9) = PATH - VHIT(9)
126     VHIT(11)= (TRAPAR(7) + VHIT(11))/2.
127     *
128     * Store the hit
129     *
130     IF(IDHIT.EQ.-1) THEN
131     IF(SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT)
132     IF (IDHIT.EQ.0) THEN
133     WRITE(CHMAIL,10200) IS,ID,IT
134     CALL GMAIL(1,0)
135     ENDIF
136     ELSE
137     WRITE(CHMAIL,10300) IS,ID,IT
138     CALL GMAIL(1,0)
139     ENDIF
140     ENDIF
141     ENDIF
142     10000 FORMAT(' GPUCAT error: HIT have not be stored for SET='
143     + ,I4,', DET=',I4,', TRACK=',I6)
144     10100 FORMAT(' GPUCAT error: HIT have not be initialized for SET='
145     + ,I4,', DET=',I4,', TRACK=',I6)
146     10200 FORMAT(' GPUCAT error: HIT have not be stored for SET='
147     + ,I4,', DET=',I4,', TRACK=',I6)
148     10300 FORMAT(' GPUCAT error: HIT have not be initialized for SET='
149     + ,I4,', DET=',I4,', TRACK=',I6)
150     RETURN
151     END
152    

  ViewVC Help
Powered by ViewVC 1.1.23