1 cdaq 1.1 subroutine h_init_histid(Abort,err)
2 *
3 * routine to get HBOOK histogram ID numbers for all hard coded
4 * histograms.
5 *
6 * Author: D. F. Geesaman
7 * Date: 9 April 1994
8 *
9 * $Log: h_init_histid.f,v $
|
10 jones 1.8 * Revision 1.8 2002/10/05 (Hamlet)
11 * Add HMS Aerogel
12 *
13 * Revision 1.7 1999/02/23 18:38:56 csa
14 * (JRA) Add pos/neg cal stuff
15 *
|
16 csa 1.7 * Revision 1.6 1999/02/03 21:13:23 saw
17 * Code for new Shower counter tubes
18 *
|
19 saw 1.6 * Revision 1.5 1996/08/30 19:55:09 saw
20 * (JRA) Get id for misc. TDC's
21 *
|
22 saw 1.5 * Revision 1.4 1996/01/16 21:52:05 cdaq
23 * (JRA) Add hidcuttdc, hidscinalltimes, and hidscintimes
24 *
|
25 cdaq 1.4 * Revision 1.3 1995/08/31 14:53:47 cdaq
26 * (JRA) Add dpos (pos. track - pos. hit) histograms
27 *
|
28 cdaq 1.3 * Revision 1.2 1995/07/19 18:20:41 cdaq
29 * (JRA) Add per hit adc/tdc sums for hodo and calormeter
30 * (SAW) Relocate data statements for f2c compatibility
31 *
|
32 cdaq 1.2 * Revision 1.1 1995/05/22 18:33:05 cdaq
33 * Initial revision
34 *
|
35 cdaq 1.1 * Revision 1.6 1995/05/12 12:23:22 cdaq
36 * (JRA) Modify/add user histograms
37 *
38 * Revision 1.5 1995/04/06 20:33:34 cdaq
39 * (SAW) Fix SOS wc plane names. Add SOS residuals histogram id's
40 *
41 c Revision 1.4 1995/03/14 21:01:18 cdaq
42 c (SAW) Change ?scin_num_counters to ?num_scin_counters
43 c
44 c Revision 1.3 1994/08/18 03:13:51 cdaq
45 c (SAW) Use arrays of histids for residuals, new names for residuals histos
46 c
47 c Revision 1.2 1994/05/12 18:59:14 cdaq
48 c (DFG) Add hms_target and sos_target histid
49 c
50 c Revision 1.1 1994/05/12 18:56:22 cdaq
51 c Initial revision
52 c
53 * Revision 1.1 1994/04/12 21:00:57 cdaq
54 * Initial revision
55 *
56 cdaq 1.1 *-
57 *--------------------------------------------------------
58 IMPLICIT NONE
59 *
60 character*13 here
61 parameter (here= 'h_init_histid')
62 *
63 logical ABORT
64 character*(*) err
65 external thgetid
66 integer*4 thgetid
67 integer*4 plane,counter
68 *
69 include 'hms_data_structures.cmn'
70 include 'hms_tracking.cmn'
71 include 'hms_track_histid.cmn'
72 include 'hms_scin_parms.cmn'
73 include 'hms_id_histid.cmn'
74
75 character*32 histname
|
76 cdaq 1.2
|
77 cdaq 1.1 character*8 wiremap
|
78 cdaq 1.2 character*10 drifttime
79 character*9 driftdis
80 character*9 wirecent
81 character*9 residual
82 character*9 singres
83 character*6 hdcplanename(hmax_num_dc_planes)
84 character*1 hscinplanenum(HNUM_SCIN_PLANES)
85 character*10 hscinplane
86 character*7 hscinplanename(HNUM_SCIN_PLANES)
87 character*6 posadc,negadc,postdc,negtdc
88 character*7 hposadc,hnegadc,hpostdc,hnegtdc
89
|
90 cdaq 1.1 data wiremap/'_wiremap'/
91 data drifttime/'_drifttime'/
92 data driftdis /'_driftdis'/
93 data wirecent/'_wirecent'/
94 data residual/'_residual'/
95 data singres/'_sing_res'/
96 data hdcplanename/'hdc1x1','hdc1y1','hdc1u1','hdc1v1','hdc1y2'
97 $ ,'hdc1x2','hdc2x1','hdc2y1','hdc2u1','hdc2v1','hdc2y2','hdc2x2'/
98 data hscinplanenum/'1','2','3','4'/
99 data hscinplane /'hscinplane'/
100 data hscinplanename/'hscin1x','hscin1y','hscin2x','hscin2y'/
101 data posadc /'posadc'/
102 data negadc /'negadc'/
103 data postdc /'postdc'/
104 data negtdc /'negtdc'/
105 data hposadc /'hposadc'/
106 data hnegadc /'hnegadc'/
107 data hpostdc /'hpostdc'/
108 data hnegtdc /'hnegtdc'/
109
110 *
111 cdaq 1.1 SAVE
112 *--------------------------------------------------------
113 *
114 ABORT= .FALSE.
115 err= ' '
116 * Histogram block hms_target
117 *
118 hidhx_tar = thgetid('hx_tar')
119 hidhy_tar = thgetid('hy_tar')
120 hidhz_tar = thgetid('hz_tar')
121 hidhxp_tar = thgetid('hxp_tar')
122 hidhyp_tar = thgetid('hyp_tar')
123 hidhdelta_tar = thgetid('hdelta_tar')
124 hidhp_tar = thgetid('hp_tar')
125
126 * histogram block hms_focal_plane
127 *
128 hidhx_fp = thgetid('hx_fp')
129 hidhy_fp = thgetid('hy_fp')
130 hidhxp_fp = thgetid('hxp_fp')
131 hidhyp_fp = thgetid('hyp_fp')
132 cdaq 1.1 hidhlogchi2_fp = thgetid('hlogchi2_fp')
133 hidhnfree_fp = thgetid('hnfree_fp')
134 hidhchi2perdeg_fp = thgetid('hchi2perdeg_fp')
135
136 * histogram block hms_decoded_dc
137 hidrawtdc = thgetid('hdcrawtdc')
|
138 cdaq 1.4 hidcuttdc = thgetid('hdccuttdc')
|
139 cdaq 1.1 do plane = 1, hdc_num_planes
140 histname = hdcplanename(plane)//wiremap
141 hiddcwiremap(plane) = thgetid(histname)
142 histname = hdcplanename(plane)//drifttime
143 hiddcdrifttime(plane) = thgetid(histname)
144 histname = hdcplanename(plane)//driftdis
145 hiddcdriftdis(plane) = thgetid(histname)
146 histname = hdcplanename(plane)//wirecent
147 hiddcwirecent(plane) = thgetid(histname)
148 histname = hdcplanename(plane)//residual
149 hidres_fp(plane) = thgetid(histname)
150 histname = hdcplanename(plane)//singres
151 hidsingres_fp(plane) = thgetid(histname)
152 enddo ! end loop over dc planes
153
154 * histogram block hms_raw_sc
155
156 hidscinrawtothits = thgetid('hscintothits')
157 hidscinplane = thgetid('hscinplane')
|
158 cdaq 1.4 hidscinalltimes = thgetid('hscinalltimes')
159 hidscintimes = thgetid('hscintimes')
|
160 cdaq 1.1 hnum_scin_counters(1) = hscin_1x_nr
161 hnum_scin_counters(2) = hscin_1y_nr
162 hnum_scin_counters(3) = hscin_2x_nr
163 hnum_scin_counters(4) = hscin_2y_nr
164
|
165 cdaq 1.3 hiddcdposx = thgetid('hdcdposx')
166 hiddcdposy = thgetid('hdcdposy')
167 hiddcdposxp = thgetid('hdcdposxp')
168 hiddcdposyp = thgetid('hdcdposyp')
169 hidcaldpos = thgetid('hcaldpos')
170
|
171 cdaq 1.1 do plane = 1, HNUM_SCIN_PLANES
172 histname = hscinplane//hscinplanenum(plane)
173 hidscincounters(plane) = thgetid(histname)
174 histname = hpostdc//hscinplanenum(plane)
175 hidscinallpostdc(plane) = thgetid(histname)
176 histname = hnegtdc//hscinplanenum(plane)
177 hidscinallnegtdc(plane) = thgetid(histname)
178 histname = hposadc//hscinplanenum(plane)
179 hidscinallposadc(plane) = thgetid(histname)
180 histname = hnegadc//hscinplanenum(plane)
181 hidscinallnegadc(plane) = thgetid(histname)
|
182 cdaq 1.2
183 histname = "hsumpostdc"//hscinplanenum(plane)
184 hidsumpostdc(plane) = thgetid(histname)
185 histname = "hsumnegtdc"//hscinplanenum(plane)
186 hidsumnegtdc(plane) = thgetid(histname)
187 histname = "hsumposadc"//hscinplanenum(plane)
188 hidsumposadc(plane) = thgetid(histname)
189 histname = "hsumnegadc"//hscinplanenum(plane)
190 hidsumnegadc(plane) = thgetid(histname)
|
191 cdaq 1.3
192 histname = "hscindpos"//hscinplanenum(plane)
193 hidscindpos(plane) = thgetid(histname)
|
194 csa 1.7 histname = "hscindpos_pid"//hscinplanenum(plane)
195 hidscindpos_pid(plane) = thgetid(histname)
|
196 cdaq 1.3
|
197 cdaq 1.1 do counter = 1,hnum_scin_counters(plane)
198 * this is probably very awkward character manipulation
199 *
200 if(counter.lt.10) then
201 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,posadc
202 else
203 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,posadc
204 endif
205 hidscinposadc(plane,counter) = thgetid(histname)
206 if(counter.lt.10) then
207 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,negadc
208 else
209 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,negadc
210 endif
211 hidscinnegadc(plane,counter) = thgetid(histname)
212 if(counter.lt.10) then
213 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,postdc
214 else
215 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,postdc
216 endif
217 hidscinpostdc(plane,counter) = thgetid(histname)
218 cdaq 1.1 if(counter.lt.10) then
219 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,negtdc
220 else
221 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,negtdc
222 endif
223 hidscinnegtdc(plane,counter) = thgetid(histname)
224 enddo ! end loop over scintillator counters
225 enddo ! end loop over scintillator plane
226
|
227 jones 1.8 *
|
228 cdaq 1.1 hidcalplane = thgetid('hcalplane')
|
229 csa 1.7 hidcalposhits(1) = thgetid('hcalaposhits')
230 hidcalposhits(2) = thgetid('hcalbposhits')
231 hidcalposhits(3) = thgetid('hcalcposhits')
232 hidcalposhits(4) = thgetid('hcaldposhits')
233 hidcalneghits(1) = thgetid('hcalaneghits')
234 hidcalneghits(2) = thgetid('hcalbneghits')
235 hidcalneghits(3) = thgetid('hcalcneghits')
236 hidcalneghits(4) = thgetid('hcaldneghits')
|
237 cdaq 1.2 hidcalsumadc = thgetid('hcalsumadc')
|
238 saw 1.5
239 hidmisctdcs = thgetid('hmisctdcs')
|
240 jones 1.8
241 c
242 * HMS Aerogel
243
244 hidhaero_adc_pos_hits = thgetid('haeroadcposhits')
245 hidhaero_adc_neg_hits = thgetid('haeroadcneghits')
246 hidhaero_tdc_pos_hits = thgetid('haerotdcposhits')
247 hidhaero_tdc_neg_hits = thgetid('haerotdcneghits')
248 hidhaero_adc_pos_pedsubtr = thgetid('haeroadcpospedsubtr')
249 hidhaero_adc_neg_pedsubtr = thgetid('haeroadcnegpedsubtr')
250 c
|
251 cdaq 1.1
252 RETURN
253 END
254
|