]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1995/10/24 10:20:19 cernlib | |
6 | * Geant | |
7 | * | |
8 | * | |
9 | #include "geant321/pilot.h" | |
10 | *CMZ : 3.21/02 29/03/94 15.41.25 by S.Giani | |
11 | *-- Author : | |
12 | SUBROUTINE GDAHIT (X,Y,Z,ISYMB,SIZSYM) | |
13 | C. | |
14 | C. ****************************************************************** | |
15 | C. * * | |
16 | C. * Draw an HIT point at (X,Y,Z) * | |
17 | C. * * | |
18 | C. * The hit belongs to track -ITR3D (in common GCDRAW) * | |
19 | C. * if GDAHIT is called from GDHITS or GDCHIT, otherwise * | |
20 | C. * it belongs to track ITRA (in common GCKINE) * | |
21 | C. * if GDAHIT is called directly from user hit routines. * | |
22 | C. * * | |
23 | C. * The following characters may be chosen : * | |
24 | C. * ISYMB = -1 hardware character (fast), * | |
25 | C. * = 0 crosses X by TVDRAW (default), * | |
26 | C. * (size = SIZSYM in cm, default = 0.1), * | |
27 | C. * = 840 characters by HPLSOF * | |
28 | C. * . according to the table p. 25 * | |
29 | C. * . of the HPLOT manual * | |
30 | C. * 853 (size = SIZSYM in cm) * | |
31 | C. * (844,854 white, black asterisk * in addition). * | |
32 | C. * * | |
33 | C. * ==>Called by : <USER>, GDCHIT, GDHITS * | |
34 | C. * Authors : R.Brun, P.Zanarini ********** * | |
35 | C. * * | |
36 | C. ****************************************************************** | |
37 | C. | |
38 | #include "geant321/gcdraw.inc" | |
39 | #include "geant321/gckine.inc" | |
40 | CHARACTER*4 LSYMB(10),CHTEXT | |
41 | DIMENSION HITS(3),UU(2),VV(2),JSYMB(10) | |
42 | SAVE JSYMB,LSYMB,IFIRST,IOFF | |
43 | DATA JSYMB/ 840 , 841 , 842 , 843 , 844 | |
44 | +, 850 , 851 , 852 , 853 , 854 / | |
45 | DATA LSYMB/'"<0$','"<1$','"<2$','"<3$','"<4$' | |
46 | +, '">0$','">1$','">2$','">3$','">4$'/ | |
47 | DATA IFIRST/0/ | |
48 | C. | |
49 | C. ------------------------------------------------------------------ | |
50 | C. | |
51 | IF (IFIRST.EQ.0) THEN | |
52 | IFIRST=1 | |
53 | CALL UCTOH('OFF ',IOFF,4,4) | |
54 | ENDIF | |
55 | C | |
56 | C Set IOBJ to HIT | |
57 | C | |
58 | IOBJ=3 | |
59 | C | |
60 | HITS(1)= X | |
61 | HITS(2)= Y | |
62 | HITS(3)= Z | |
63 | C | |
64 | C Find mode of drawing | |
65 | C | |
66 | KSYMB = ISYMB | |
67 | IF (ISYMB.NE.-1) KSYMB=IUCOMP(ISYMB,JSYMB(1),10) | |
68 | IF (KSYMB.GT. 0) CALL UCTOH(LSYMB(KSYMB),MSYMB,4,4) | |
69 | SSYMB=SIZSYM | |
70 | IF (SSYMB.EQ.0.) SSYMB=0.1 | |
71 | C | |
72 | C If THRZ option is set on (R-Z projection) and | |
73 | C the cut is lateral (vertical or horizontal) then : | |
74 | C if ITR3D is not set by GDHITS or GDCHIT | |
75 | C then use -ITRA from common /GCKINE/ | |
76 | C else do not modify ITR3D already set | |
77 | C | |
78 | IF (ITHRZ.NE.IOFF) THEN | |
79 | IF (ICUT.EQ.1.OR.ICUT.EQ.2) THEN | |
80 | IF (ITR3D.EQ.0) ITR3D=-ITRA | |
81 | ENDIF | |
82 | ELSE | |
83 | ITR3D=0 | |
84 | ENDIF | |
85 | C | |
86 | C Draw the hit | |
87 | C | |
88 | CALL GDFR3D(HITS,1,U,V) | |
89 | C | |
90 | CM Short circuit in case of GMR | |
91 | C | |
92 | IF ( IGMR .NE. 0 ) GO TO 999 | |
93 | CM | |
94 | C | |
95 | IF (KSYMB.LT.0) THEN | |
96 | C | |
97 | C ' ' for hardware points, or 'x' for hardware crosses | |
98 | C | |
99 | CALL IPM(1,U,V) | |
100 | C | |
101 | ELSE IF (KSYMB.GT.0) THEN | |
102 | C | |
103 | C soft-characters 840...854 (see above) | |
104 | C | |
105 | V=V-SSYMB*0.5 | |
106 | CALL UHTOC(MSYMB,4,CHTEXT,4) | |
107 | CALL GDRAWT(U,V,CHTEXT,SSYMB,0.,1,0) | |
108 | C | |
109 | ELSE | |
110 | C | |
111 | C default crosses of size SSYMB cm | |
112 | C | |
113 | DP = 0.5 * SSYMB | |
114 | UU(1) = U-DP | |
115 | UU(2) = U+DP | |
116 | VV(1) = V+DP | |
117 | VV(2) = V-DP | |
118 | CALL GDRAWV(UU,VV,2) | |
119 | UU(1) = U+DP | |
120 | UU(2) = U-DP | |
121 | VV(1) = V+DP | |
122 | VV(2) = V-DP | |
123 | CALL GDRAWV(UU,VV,2) | |
124 | C | |
125 | ENDIF | |
126 | C | |
127 | 999 RETURN | |
128 | END |