5 * Revision 1.1.1.1 1995/10/24 10:20:23 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 29/03/94 15.41.26 by S.Giani
12 SUBROUTINE GDHITS (IUSET,IUDET,ITRS,ISYMB,SSYMB)
14 C. ******************************************************************
16 C. * Draw HITS points of track ITRS in detector IUDET *
17 C. * of set IUSET, in case that the spatial coordinates *
18 C. * of the HITS had been stored as the first three words *
19 C. * in the argument vector of GSAHIT. *
21 C. * The following characters may be chosen : *
22 C. * ISYMB = -1 hardware character (fast), *
23 C. * = 0 crosses X by TVDRAW (default), *
24 C. * (size = SSYMB in cm, default = 0.1), *
25 C. * = 840 characters by HPLSOF *
26 C. * . according to the table p. 25 *
27 C. * . of the HPLOT manual *
28 C. * 853 (size = SSYMB in cm) *
29 C. * (844,854 white, black asterisk * in addition). *
31 C. * JH =LQ(JHITS-ISET) *
32 C. * JHD=LQ(JH-IDET) *
33 C. * IQ(JH+IDET)=pointer to the LAST USED word in JHD *
34 C. * Each hit was packed into JHD in the following format: *
35 C. * --Track number ITRA not packed; *
36 C. * --Volume numbers packed; *
37 C. * --Hits transformed and packed. *
39 C. * ==>Called by : <USER>, <GXINT> *
40 C. * Authors : R.Brun, W.Gebel, P.Zanarini, S.Giani *** *
42 C. ******************************************************************
44 #include "geant321/gcbank.inc"
45 #include "geant321/gcdraw.inc"
46 CHARACTER*4 IUSET,IUDET
50 C. ------------------------------------------------------------------
52 CALL UCTOH('OFF ',IOFF,4,4)
58 IF (JHITS.LE.0) GOTO 160
62 IF (IUSET(1:1).EQ.'*') GOTO 10
63 CALL GLOOK(IUSET,IQ(JSET+1),NSET,ISET)
64 IF (ISET .LE.0) GOTO 160
70 C loop on all selected sets
80 IF (IUDET(1:1).EQ.'*') GOTO 20
81 CALL GLOOK(IUDET,IQ(JS+1),NDET,IDET)
82 IF (IDET .EQ.0) GOTO 140
87 C loop on selected detectors for this set
92 IF (JHD .LE.0) GOTO 120
95 IF (ILAST.EQ.0) GOTO 120
98 NW = IQ(JD+1) + IQ(JD+3) + 1
100 C Now loop on all hits to get their space coordinates
108 C Is this the right track ?
110 IF (ITRS.NE.0 .AND. ITRS.NE.ITRA) GOTO 110
112 C Is THRZ option set on (R-Z projection)
113 C and the cut lateral (vertical or horizontal) ?
115 IF (ITHRZ.NE.IOFF) THEN
116 IF (ICUT.EQ.1.OR.ICUT.EQ.2) ITR3D=-ITRA
121 C Skip words with volume numbers
136 C Get unpacked (first three !) HITS.
137 C Hits origin is shifted. Division by scale factor.
140 IF (NH.LE.2) GOTO 110
153 50 IF (K+NB.LE.33) GOTO 60
156 60 KHIT = IBITS(IQ(JHD+I+NK),K-1,NB)
159 HITS(IH,MH)= FLOAT(KHIT)/Q(JDH+4*IH) - Q(JDH+4*IH-1)
162 C Draw the hits (usually 10 at a time);
163 C flush HITS vector if
164 C --loop on this detector volume is to finish,
165 C --loop on current track is to finish,
166 C --HITS vector is full.
168 IF ((ILAST-I).LT.NW) GOTO 90
170 IF (ITRA.NE.ITRN) GOTO 90
171 IF (MH .NE. 10) GOTO 110
175 CALL IGPID(1,'Hitset',IQ(JSET+ISET),' ')
176 CALL IGPID(2,'Hitdet',IQ(JS+IDET),' ')
179 CALL IGPID(3,'Hitnum',IHITNR,' ')
180 CALL GDAHIT(HITS(1,II),HITS(2,II),HITS(3,II),ISYMB,
195 C Reset ITR3D to 'standard projection'