19 |
* IT , track number * |
* IT , track number * |
20 |
* DELOSS, energy loss in the step * |
* DELOSS, energy loss in the step * |
21 |
* TIME , current time of flight in seconds * |
* TIME , current time of flight in seconds * |
|
* PATH , current track lenght * |
|
22 |
* TRAPAR, track parameter, is the VECT vector in GCTRAK common * |
* TRAPAR, track parameter, is the VECT vector in GCTRAK common * |
23 |
* NUMVOL, integr array of numbers identifying the DETECTOR * |
* NUMVOL, integr array of numbers identifying the DETECTOR * |
24 |
* IMEC , integer indicating the LOSS mecanism position inside NMEC * |
* IMEC , integer indicating the LOSS mecanism position inside NMEC * |
33 |
#include "gpsed.inc" |
#include "gpsed.inc" |
34 |
* |
* |
35 |
INTEGER IACT,IS,ID,IPA,IT,NUMVOL(20),IMEC,IDHIT |
INTEGER IACT,IS,ID,IPA,IT,NUMVOL(20),IMEC,IDHIT |
36 |
REAL DELOSS,TIME,PATH,TRAPAR(7),VHIT(NHTOF) |
REAL DELOSS,TIME,PATH,TRAPAR(7),VHIT(NHND) |
37 |
LOGICAL SAVE |
LOGICAL SAVE |
38 |
* |
* |
39 |
* Track is inside a volume |
* Track is inside a volume |
41 |
IF(IACT.EQ.0) THEN |
IF(IACT.EQ.0) THEN |
42 |
IF(IMEC.GT.0) THEN |
IF(IMEC.GT.0) THEN |
43 |
SAVE = .TRUE. |
SAVE = .TRUE. |
44 |
*ML: |
VHIT(7) = DELOSS + VHIT(7) |
|
* VHIT(7) = DELOSS + VHIT(7) |
|
|
VHIT(11) = DELOSS + VHIT(11) |
|
|
*END ML. |
|
45 |
ENDIF |
ENDIF |
46 |
ENDIF |
ENDIF |
47 |
* |
* |
49 |
* |
* |
50 |
IF(IACT.EQ.1) THEN |
IF(IACT.EQ.1) THEN |
51 |
SAVE = .FALSE. |
SAVE = .FALSE. |
52 |
CALL VZERO(VHIT,NHTOF) |
CALL VZERO(VHIT,NHND) |
53 |
DO I=1,3 |
DO I=1,3 |
54 |
VHIT(I) = TRAPAR(I) |
VHIT(I) = TRAPAR(I) |
55 |
ENDDO |
ENDDO |
56 |
IF(IMEC.GT.0) THEN |
IF(IMEC.GT.0) THEN |
57 |
SAVE = .TRUE. |
SAVE = .TRUE. |
58 |
*ML: |
VHIT(7) = DELOSS |
|
VHIT(11) = DELOSS |
|
|
* VHIT(7) = DELOSS |
|
|
*END ML. |
|
59 |
ENDIF |
ENDIF |
60 |
VHIT(8) = TIME |
VHIT(8) = TIME |
61 |
VHIT(9) = PATH |
VHIT(9) = PATH |
62 |
VHIT(10) = IPA |
VHIT(10) = IPA |
63 |
*ML: |
VHIT(11) = TRAPAR(7) |
|
* VHIT(11) = TRAPAR(7) |
|
|
VHIT(7) = TRAPAR(7) |
|
|
*END ML. |
|
64 |
IDHIT = -1 |
IDHIT = -1 |
65 |
ENDIF |
ENDIF |
66 |
* |
* |
76 |
ENDDO |
ENDDO |
77 |
IF(IMEC.GT.0) THEN |
IF(IMEC.GT.0) THEN |
78 |
SAVE = .TRUE. |
SAVE = .TRUE. |
79 |
*ML: |
VHIT(7) = DELOSS + VHIT(7) |
|
* VHIT(7) = DELOSS + VHIT(7) |
|
|
VHIT(11) = DELOSS +VHIT(11) |
|
|
*END ML. |
|
80 |
ENDIF |
ENDIF |
81 |
VHIT(8) = (TIME + VHIT(8))/2. |
VHIT(8) = (TIME + VHIT(8))/2. |
82 |
VHIT(9) = PATH - VHIT(9) |
VHIT(10) = (TRAPAR(7) + VHIT(10))/2. |
|
*ML: |
|
|
* VHIT(11) = (TRAPAR(7) + VHIT(11))/2. |
|
|
VHIT(7) = (TRAPAR(7) + VHIT(7))/2. |
|
|
*END ML. |
|
83 |
* |
* |
84 |
* Store the hit |
* Store the hit |
85 |
* |
* |
86 |
IF(IDHIT.EQ.-1) THEN |
IF(IDHIT.EQ.-1) THEN |
87 |
*ML: |
IF (SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
* IF (SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
|
* IF (IDHIT.EQ.0) THEN |
|
|
* WRITE(CHMAIL,10000) IS,ID,IT |
|
|
* CALL GMAIL(1,0) |
|
|
* ENDIF |
|
|
* ELSE |
|
|
* WRITE(CHMAIL,10100) IS,ID,IT |
|
|
* CALL GMAIL(1,0) |
|
|
* ENDIF |
|
|
IF (SAVE) THEN |
|
|
IF(IS.EQ.ISS4) THEN |
|
|
CALL GSCHIT(IS,ID,1,NUMVOL,VHIT,1,IDHIT) |
|
|
ELSE |
|
|
CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
|
ENDIF |
|
|
ENDIF |
|
88 |
IF (IDHIT.EQ.0) THEN |
IF (IDHIT.EQ.0) THEN |
89 |
WRITE(CHMAIL,10000) IS,ID,IT |
WRITE(CHMAIL,10000) IS,ID,IT |
90 |
CALL GMAIL(1,0) |
CALL GMAIL(1,0) |
93 |
WRITE(CHMAIL,10100) IS,ID,IT |
WRITE(CHMAIL,10100) IS,ID,IT |
94 |
CALL GMAIL(1,0) |
CALL GMAIL(1,0) |
95 |
ENDIF |
ENDIF |
|
* END ML. |
|
96 |
ENDIF |
ENDIF |
97 |
* |
* |
98 |
* Track is exiting the set up |
* Track is exiting the set up |
111 |
ENDDO |
ENDDO |
112 |
IF(IMEC.GT.0) THEN |
IF(IMEC.GT.0) THEN |
113 |
SAVE = .TRUE. |
SAVE = .TRUE. |
114 |
*ML: |
VHIT(7) = DELOSS + VHIT(7) |
|
* VHIT(7) = DELOSS + VHIT(7) |
|
|
VHIT(11) = DELOSS + VHIT(11) |
|
|
*END ML. |
|
115 |
ENDIF |
ENDIF |
116 |
VHIT(8) = (TIME + VHIT(8))/2. |
VHIT(8) = (TIME + VHIT(8))/2. |
117 |
VHIT(9) = PATH - VHIT(9) |
VHIT(10) = (TRAPAR(7) + VHIT(10))/2. |
|
*ML: |
|
|
* VHIT(11) = (TRAPAR(7) + VHIT(11))/2. |
|
|
VHIT(7) = (TRAPAR(7) + VHIT(7))/2. |
|
|
*END ML. |
|
118 |
* |
* |
119 |
* Store the hit |
* Store the hit |
120 |
* |
* |
121 |
IF(IDHIT.EQ.-1) THEN |
IF(IDHIT.EQ.-1) THEN |
122 |
*ML: |
IF (SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
* IF (SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
|
* IF (IDHIT.EQ.0) THEN |
|
|
* WRITE(CHMAIL,10200) IS,ID,IT |
|
|
* CALL GMAIL(1,0) |
|
|
* ENDIF |
|
|
* ELSE |
|
|
* WRITE(CHMAIL,10300) IS,ID,IT |
|
|
* CALL GMAIL(1,0) |
|
|
* ENDIF |
|
|
IF (SAVE) THEN |
|
|
IF(IS.EQ.ISS4) THEN |
|
|
CALL GSCHIT(IS,ID,1,NUMVOL,VHIT,1,IDHIT) |
|
|
ELSE |
|
|
CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
|
ENDIF |
|
|
ENDIF |
|
123 |
IF (IDHIT.EQ.0) THEN |
IF (IDHIT.EQ.0) THEN |
124 |
WRITE(CHMAIL,10200) IS,ID,IT |
WRITE(CHMAIL,10200) IS,ID,IT |
125 |
CALL GMAIL(1,0) |
CALL GMAIL(1,0) |
128 |
WRITE(CHMAIL,10300) IS,ID,IT |
WRITE(CHMAIL,10300) IS,ID,IT |
129 |
CALL GMAIL(1,0) |
CALL GMAIL(1,0) |
130 |
ENDIF |
ENDIF |
|
*END ML. |
|
|
* IF (SAVE) CALL GSAHIT (IS,ID,IT,NUMVOL,VHIT,IDHIT) |
|
|
* IF (IDHIT.EQ.0) THEN |
|
|
* WRITE(CHMAIL,10200) IS,ID,IT |
|
|
* CALL GMAIL(1,0) |
|
|
* ENDIF |
|
|
* ELSE |
|
|
* WRITE(CHMAIL,10300) IS,ID,IT |
|
|
* CALL GMAIL(1,0) |
|
|
* ENDIF |
|
131 |
ENDIF |
ENDIF |
132 |
ENDIF |
ENDIF |
133 |
10000 FORMAT(' GPUTOF error: HIT have not be stored for SET=' |
10000 FORMAT(' GPUND error: HIT have not be stored for SET=' |
134 |
+ ,I4,', DET=',I4,', TRACK=',I6) |
+ ,I4,', DET=',I4,', TRACK=',I6) |
135 |
10100 FORMAT(' GPUTOF error: HIT have not be initialized for SET=' |
10100 FORMAT(' GPUND error: HIT have not be initialized for SET=' |
136 |
+ ,I4,', DET=',I4,', TRACK=',I6) |
+ ,I4,', DET=',I4,', TRACK=',I6) |
137 |
10200 FORMAT(' GPUTOF error: HIT have not be stored for SET=' |
10200 FORMAT(' GPUND error: HIT have not be stored for SET=' |
138 |
+ ,I4,', DET=',I4,', TRACK=',I6) |
+ ,I4,', DET=',I4,', TRACK=',I6) |
139 |
10300 FORMAT(' GPUTOF error: HIT have not be initialized for SET=' |
10300 FORMAT(' GPUND error: HIT have not be initialized for SET=' |
140 |
+ ,I4,', DET=',I4,', TRACK=',I6) |
+ ,I4,', DET=',I4,', TRACK=',I6) |
141 |
RETURN |
RETURN |
142 |
END |
END |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|