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 puckett 1.8.24.6 * Revision 1.8.24.5 2009/03/31 20:33:27 puckett
11 * added some misc. FPP histos
12 *
|
13 puckett 1.8.24.5 * Revision 1.8.24.4 2008/12/15 18:46:08 puckett
14 * New and improved FPP tracking routines--(hopefully) thoroughly debugged. Documentation forthcoming (AJP)
15 *
|
16 puckett 1.8.24.4 * Revision 1.8.24.3 2007/10/30 00:28:27 cdaq
17 * added FPP geometric alignment checks
18 *
|
19 cdaq 1.8.24.3 * Revision 1.8.24.2 2007/10/22 18:39:10 cdaq
20 * adjusted HMS FPP histos
21 *
|
22 cdaq 1.8.24.2 * Revision 1.8.24.1 2007/08/22 19:09:30 frw
23 * added FPP
24 *
|
25 frw 1.8.24.1 * Revision 1.10 2006/06/22 frw
26 * added HMS FPP entries
27 *
28 * Revision 1.9 2002/12/20 21:53:33 jones
29 * Modified by Hamlet for new HMS aerogel
30 *
|
31 jones 1.8 * Revision 1.8 2002/10/05 (Hamlet)
32 * Add HMS Aerogel
33 *
34 * Revision 1.7 1999/02/23 18:38:56 csa
35 * (JRA) Add pos/neg cal stuff
36 *
|
37 csa 1.7 * Revision 1.6 1999/02/03 21:13:23 saw
38 * Code for new Shower counter tubes
39 *
|
40 saw 1.6 * Revision 1.5 1996/08/30 19:55:09 saw
41 * (JRA) Get id for misc. TDC's
42 *
|
43 saw 1.5 * Revision 1.4 1996/01/16 21:52:05 cdaq
44 * (JRA) Add hidcuttdc, hidscinalltimes, and hidscintimes
45 *
|
46 cdaq 1.4 * Revision 1.3 1995/08/31 14:53:47 cdaq
47 * (JRA) Add dpos (pos. track - pos. hit) histograms
48 *
|
49 cdaq 1.3 * Revision 1.2 1995/07/19 18:20:41 cdaq
50 * (JRA) Add per hit adc/tdc sums for hodo and calormeter
51 * (SAW) Relocate data statements for f2c compatibility
52 *
|
53 cdaq 1.2 * Revision 1.1 1995/05/22 18:33:05 cdaq
54 * Initial revision
55 *
|
56 cdaq 1.1 * Revision 1.6 1995/05/12 12:23:22 cdaq
57 * (JRA) Modify/add user histograms
58 *
59 * Revision 1.5 1995/04/06 20:33:34 cdaq
60 * (SAW) Fix SOS wc plane names. Add SOS residuals histogram id's
61 *
62 c Revision 1.4 1995/03/14 21:01:18 cdaq
63 c (SAW) Change ?scin_num_counters to ?num_scin_counters
64 c
65 c Revision 1.3 1994/08/18 03:13:51 cdaq
66 c (SAW) Use arrays of histids for residuals, new names for residuals histos
67 c
68 c Revision 1.2 1994/05/12 18:59:14 cdaq
69 c (DFG) Add hms_target and sos_target histid
70 c
71 c Revision 1.1 1994/05/12 18:56:22 cdaq
72 c Initial revision
73 c
74 * Revision 1.1 1994/04/12 21:00:57 cdaq
75 * Initial revision
76 *
77 cdaq 1.1 *-
78 *--------------------------------------------------------
79 IMPLICIT NONE
80 *
81 character*13 here
82 parameter (here= 'h_init_histid')
83 *
84 logical ABORT
85 character*(*) err
86 external thgetid
87 integer*4 thgetid
88 integer*4 plane,counter
|
89 frw 1.8.24.1 integer*4 set,chamber,layer
|
90 cdaq 1.1 *
91 include 'hms_data_structures.cmn'
92 include 'hms_tracking.cmn'
93 include 'hms_track_histid.cmn'
94 include 'hms_scin_parms.cmn'
95 include 'hms_id_histid.cmn'
96
97 character*32 histname
|
98 cdaq 1.2
|
99 cdaq 1.1 character*8 wiremap
|
100 cdaq 1.2 character*10 drifttime
101 character*9 driftdis
102 character*9 wirecent
103 character*9 residual
104 character*9 singres
105 character*6 hdcplanename(hmax_num_dc_planes)
106 character*1 hscinplanenum(HNUM_SCIN_PLANES)
107 character*10 hscinplane
108 character*7 hscinplanename(HNUM_SCIN_PLANES)
109 character*6 posadc,negadc,postdc,negtdc
110 character*7 hposadc,hnegadc,hpostdc,hnegtdc
111
|
112 cdaq 1.1 data wiremap/'_wiremap'/
113 data drifttime/'_drifttime'/
114 data driftdis /'_driftdis'/
115 data wirecent/'_wirecent'/
116 data residual/'_residual'/
117 data singres/'_sing_res'/
118 data hdcplanename/'hdc1x1','hdc1y1','hdc1u1','hdc1v1','hdc1y2'
119 $ ,'hdc1x2','hdc2x1','hdc2y1','hdc2u1','hdc2v1','hdc2y2','hdc2x2'/
120 data hscinplanenum/'1','2','3','4'/
121 data hscinplane /'hscinplane'/
122 data hscinplanename/'hscin1x','hscin1y','hscin2x','hscin2y'/
123 data posadc /'posadc'/
124 data negadc /'negadc'/
125 data postdc /'postdc'/
126 data negtdc /'negtdc'/
127 data hposadc /'hposadc'/
128 data hnegadc /'hnegadc'/
129 data hpostdc /'hpostdc'/
130 data hnegtdc /'hnegtdc'/
131
132 *
133 cdaq 1.1 SAVE
134 *--------------------------------------------------------
135 *
136 ABORT= .FALSE.
137 err= ' '
138 * Histogram block hms_target
139 *
140 hidhx_tar = thgetid('hx_tar')
141 hidhy_tar = thgetid('hy_tar')
142 hidhz_tar = thgetid('hz_tar')
143 hidhxp_tar = thgetid('hxp_tar')
144 hidhyp_tar = thgetid('hyp_tar')
145 hidhdelta_tar = thgetid('hdelta_tar')
146 hidhp_tar = thgetid('hp_tar')
147
148 * histogram block hms_focal_plane
149 *
150 hidhx_fp = thgetid('hx_fp')
151 hidhy_fp = thgetid('hy_fp')
152 hidhxp_fp = thgetid('hxp_fp')
153 hidhyp_fp = thgetid('hyp_fp')
154 cdaq 1.1 hidhlogchi2_fp = thgetid('hlogchi2_fp')
155 hidhnfree_fp = thgetid('hnfree_fp')
156 hidhchi2perdeg_fp = thgetid('hchi2perdeg_fp')
157
158 * histogram block hms_decoded_dc
159 hidrawtdc = thgetid('hdcrawtdc')
|
160 cdaq 1.4 hidcuttdc = thgetid('hdccuttdc')
|
161 cdaq 1.1 do plane = 1, hdc_num_planes
162 histname = hdcplanename(plane)//wiremap
163 hiddcwiremap(plane) = thgetid(histname)
164 histname = hdcplanename(plane)//drifttime
165 hiddcdrifttime(plane) = thgetid(histname)
166 histname = hdcplanename(plane)//driftdis
167 hiddcdriftdis(plane) = thgetid(histname)
168 histname = hdcplanename(plane)//wirecent
169 hiddcwirecent(plane) = thgetid(histname)
170 histname = hdcplanename(plane)//residual
171 hidres_fp(plane) = thgetid(histname)
172 histname = hdcplanename(plane)//singres
173 hidsingres_fp(plane) = thgetid(histname)
174 enddo ! end loop over dc planes
175
176 * histogram block hms_raw_sc
177
178 hidscinrawtothits = thgetid('hscintothits')
179 hidscinplane = thgetid('hscinplane')
|
180 cdaq 1.4 hidscinalltimes = thgetid('hscinalltimes')
181 hidscintimes = thgetid('hscintimes')
|
182 cdaq 1.1 hnum_scin_counters(1) = hscin_1x_nr
183 hnum_scin_counters(2) = hscin_1y_nr
184 hnum_scin_counters(3) = hscin_2x_nr
185 hnum_scin_counters(4) = hscin_2y_nr
186
|
187 cdaq 1.3 hiddcdposx = thgetid('hdcdposx')
188 hiddcdposy = thgetid('hdcdposy')
189 hiddcdposxp = thgetid('hdcdposxp')
190 hiddcdposyp = thgetid('hdcdposyp')
191 hidcaldpos = thgetid('hcaldpos')
192
|
193 cdaq 1.1 do plane = 1, HNUM_SCIN_PLANES
194 histname = hscinplane//hscinplanenum(plane)
195 hidscincounters(plane) = thgetid(histname)
196 histname = hpostdc//hscinplanenum(plane)
197 hidscinallpostdc(plane) = thgetid(histname)
198 histname = hnegtdc//hscinplanenum(plane)
199 hidscinallnegtdc(plane) = thgetid(histname)
200 histname = hposadc//hscinplanenum(plane)
201 hidscinallposadc(plane) = thgetid(histname)
202 histname = hnegadc//hscinplanenum(plane)
203 hidscinallnegadc(plane) = thgetid(histname)
|
204 cdaq 1.2
205 histname = "hsumpostdc"//hscinplanenum(plane)
206 hidsumpostdc(plane) = thgetid(histname)
207 histname = "hsumnegtdc"//hscinplanenum(plane)
208 hidsumnegtdc(plane) = thgetid(histname)
209 histname = "hsumposadc"//hscinplanenum(plane)
210 hidsumposadc(plane) = thgetid(histname)
211 histname = "hsumnegadc"//hscinplanenum(plane)
212 hidsumnegadc(plane) = thgetid(histname)
|
213 cdaq 1.3
214 histname = "hscindpos"//hscinplanenum(plane)
215 hidscindpos(plane) = thgetid(histname)
|
216 csa 1.7 histname = "hscindpos_pid"//hscinplanenum(plane)
217 hidscindpos_pid(plane) = thgetid(histname)
|
218 cdaq 1.3
|
219 cdaq 1.1 do counter = 1,hnum_scin_counters(plane)
220 * this is probably very awkward character manipulation
221 *
222 if(counter.lt.10) then
223 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,posadc
224 else
225 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,posadc
226 endif
227 hidscinposadc(plane,counter) = thgetid(histname)
228 if(counter.lt.10) then
229 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,negadc
230 else
231 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,negadc
232 endif
233 hidscinnegadc(plane,counter) = thgetid(histname)
234 if(counter.lt.10) then
235 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,postdc
236 else
237 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,postdc
238 endif
239 hidscinpostdc(plane,counter) = thgetid(histname)
240 cdaq 1.1 if(counter.lt.10) then
241 write(histname,'(a7,i1,a6)') hscinplanename(plane),counter,negtdc
242 else
243 write(histname,'(a7,i2,a6)') hscinplanename(plane),counter,negtdc
244 endif
245 hidscinnegtdc(plane,counter) = thgetid(histname)
246 enddo ! end loop over scintillator counters
247 enddo ! end loop over scintillator plane
248
|
249 jones 1.8 *
|
250 cdaq 1.1 hidcalplane = thgetid('hcalplane')
|
251 csa 1.7 hidcalposhits(1) = thgetid('hcalaposhits')
252 hidcalposhits(2) = thgetid('hcalbposhits')
253 hidcalposhits(3) = thgetid('hcalcposhits')
254 hidcalposhits(4) = thgetid('hcaldposhits')
255 hidcalneghits(1) = thgetid('hcalaneghits')
256 hidcalneghits(2) = thgetid('hcalbneghits')
257 hidcalneghits(3) = thgetid('hcalcneghits')
258 hidcalneghits(4) = thgetid('hcaldneghits')
|
259 cdaq 1.2 hidcalsumadc = thgetid('hcalsumadc')
|
260 saw 1.5
261 hidmisctdcs = thgetid('hmisctdcs')
|
262 jones 1.8
263 c
264 * HMS Aerogel
265
266 hidhaero_adc_pos_hits = thgetid('haeroadcposhits')
267 hidhaero_adc_neg_hits = thgetid('haeroadcneghits')
268 hidhaero_tdc_pos_hits = thgetid('haerotdcposhits')
269 hidhaero_tdc_neg_hits = thgetid('haerotdcneghits')
270 hidhaero_adc_pos_pedsubtr = thgetid('haeroadcpospedsubtr')
271 hidhaero_adc_neg_pedsubtr = thgetid('haeroadcnegpedsubtr')
272 c
|
273 frw 1.8.24.1 * HMS FPP
274
275 hidFPP_tdcROC = thgetid('hfpp_tdcroc')
276
277 do plane = 1,H_FPP_N_PLANES
278 if(plane.lt.10) then
279 write(histname,'(''hfpp_rawinclust'',i1)') plane
280 hidFPP_rawinclust(plane) = thgetid(histname)
281 write(histname,'(''hfpp_tdc'',i1)') plane
282 hidFPP_tdc(plane) = thgetid(histname)
283 write(histname,'(''hfpp_Tall'',i1)') plane
284 hidFPP_alltimes(plane) = thgetid(histname)
285 write(histname,'(''hfpp_Tone'',i1)') plane
286 hidFPP_time1(plane) = thgetid(histname)
287 write(histname,'(''hfpp_T12_'',i1)') plane
288 hidFPP_time12(plane) = thgetid(histname)
289 write(histname,'(''hfpp_rate1_'',i1)') plane
290 hidFPP_rate1(plane) = thgetid(histname)
291 write(histname,'(''hfpp_time'',i1)') plane
292 hidFPP_planetime(plane) = thgetid(histname)
293 else
294 frw 1.8.24.1 write(histname,'(''hfpp_rawinclust'',i2)') plane
295 hidFPP_rawinclust(plane) = thgetid(histname)
296 write(histname,'(''hfpp_tdc'',i2)') plane
297 hidFPP_tdc(plane) = thgetid(histname)
298 write(histname,'(''hfpp_Tall'',i2)') plane
299 hidFPP_alltimes(plane) = thgetid(histname)
300 write(histname,'(''hfpp_Tone'',i2)') plane
301 hidFPP_time1(plane) = thgetid(histname)
302 write(histname,'(''hfpp_T12_'',i2)') plane
303 hidFPP_time12(plane) = thgetid(histname)
304 write(histname,'(''hfpp_rate1_'',i2)') plane
305 hidFPP_rate1(plane) = thgetid(histname)
306 write(histname,'(''hfpp_time'',i2)') plane
307 hidFPP_planetime(plane) = thgetid(histname)
308 endif
309 enddo
310
311 do set=1,H_FPP_N_DCSETS
312 write(histname,'(''hfpp_NickEff_'',i1)') set
313 hidFPP_NickEff(set) = thgetid(histname)
314
315 frw 1.8.24.1 write(histname,'(''hfpp_'',i1,''ntrk'')') set
316 hidFPP_Ntrk(set) = thgetid(histname)
317 write(histname,'(''hfpp_'',i1,''trk_chi2'')') set
318 hidFPP_trk_chi2(set) = thgetid(histname)
319 write(histname,'(''hfpp_'',i1,''trk_mx'')') set ! focal plane coords
320 hidFPP_trk_mx(set) = thgetid(histname)
321 write(histname,'(''hfpp_'',i1,''trk_bx'')') set ! focal plane coords
322 hidFPP_trk_bx(set) = thgetid(histname)
323 write(histname,'(''hfpp_'',i1,''trk_my'')') set ! focal plane coords
324 hidFPP_trk_my(set) = thgetid(histname)
325 write(histname,'(''hfpp_'',i1,''trk_by'')') set ! focal plane coords
326 hidFPP_trk_by(set) = thgetid(histname)
327 write(histname,'(''hfpp_'',i1,''ntrkhit'')') set
328 hidFPP_Nhitontrk(set) = thgetid(histname)
329 write(histname,'(''hfpp_'',i1,''ntrkraw'')') set
330 hidFPP_Nrawontrk(set) = thgetid(histname)
331 write(histname,'(''hfpp_'',i1,''rough_mx'')') set ! chamber coords
332 hidFPP_trkrough(set,1) = thgetid(histname)
333 write(histname,'(''hfpp_'',i1,''rough_bx'')') set ! chamber coords
334 hidFPP_trkrough(set,2) = thgetid(histname)
335 write(histname,'(''hfpp_'',i1,''rough_my'')') set ! chamber coords
336 frw 1.8.24.1 hidFPP_trkrough(set,3) = thgetid(histname)
337 write(histname,'(''hfpp_'',i1,''rough_by'')') set ! chamber coords
338 hidFPP_trkrough(set,4) = thgetid(histname)
339 write(histname,'(''hfpp_'',i1,''rough_chi2'')') set
340 hidFPP_trkrough(set,5) = thgetid(histname)
341 write(histname,'(''hfpp_'',i1,''rough_nraw'')') set
342 hidFPP_trkrough(set,6) = thgetid(histname)
343 write(histname,'(''hfpp_'',i1,''fine_mx'')') set ! chamber coords
344 hidFPP_fine_mx(set) = thgetid(histname)
345 write(histname,'(''hfpp_'',i1,''fine_my'')') set ! chamber coords
346 hidFPP_fine_my(set) = thgetid(histname)
347 write(histname,'(''hfpp_'',i1,''fine_bx'')') set ! chamber coords
348 hidFPP_fine_bx(set) = thgetid(histname)
349 write(histname,'(''hfpp_'',i1,''fine_by'')') set ! chamber coords
350 hidFPP_fine_by(set) = thgetid(histname)
351
352 write(histname,'(''hfpp_'',i1,''sclose'')') set ! closest approach
353 hidFPP_sclose(set) = thgetid(histname)
354 write(histname,'(''hfpp_'',i1,''zclose'')') set ! z at closets
355 hidFPP_zclose(set) = thgetid(histname)
356 write(histname,'(''hfpp_'',i1,''theta'')') set ! polar theta
357 frw 1.8.24.1 hidFPP_thetapol(set) = thgetid(histname)
358 write(histname,'(''hfpp_'',i1,''phi'')') set ! polar phi
359 hidFPP_phipol(set) = thgetid(histname)
360
361 write(histname,'(''hfpp_'',i1,''distance'')') set ! track--wire dist
362 hidFPP_dist(set) = thgetid(histname)
363 write(histname,'(''hfpp_'',i1,''linresol'')') set ! lin track resol
364 hidFPP_resol_lin(set) = thgetid(histname)
365 write(histname,'(''hfpp_'',i1,''angresol'')') set ! angular trk res
366 hidFPP_resol_ang(set) = thgetid(histname)
367 enddo
|
368 puckett 1.8.24.4
|
369 puckett 1.8.24.6 hidFPP_Nsimp(1,1) = thgetid('hfpp_1nsimple')
370 hidFPP_Nsimp(2,1) = thgetid('hfpp_2nsimple')
371
372 hidFPP_Nsimp(1,2) = thgetid('hfpp_1ngooddrift')
373 hidFPP_Nsimp(2,2) = thgetid('hfpp_2ngooddrift')
|
374 puckett 1.8.24.4
|
375 puckett 1.8.24.5 hidFPP_nambig(1) = thgetid('hfpp_1nambig')
376 hidfpp_nambig(2) = thgetid('hfpp_2nambig')
377
|
378 puckett 1.8.24.4 hidFPP_resid(1) = thgetid('hfpp_1resid')
379 hidFPP_resid(2) = thgetid('hfpp_2resid')
|
380 puckett 1.8.24.5 hidFPP_resid6(1) = thgetid('hfpp_1resid6')
381 hidFPP_resid6(2) = thgetid('hfpp_2resid6')
382 hidFPP_resid5(1) = thgetid('hfpp_1resid5')
383 hidFPP_resid5(2) = thgetid('hfpp_2resid5')
384
385 hidFPP_roughchi2vsnhit(1) = thgetid('hfpp_1roughchi2vsnhit')
386 hidFPP_roughchi2vsnhit(2) = thgetid('hfpp_2roughchi2vsnhit')
|
387 frw 1.8.24.1
388 do set=1,H_FPP_N_DCSETS
389 do chamber=1,H_FPP_N_DCINSET
390 do layer=1,H_FPP_N_DCLAYERS
391 write(histname,'(''hfpp_driftT_'',3i1)') set, chamber, layer
392 hidFPP_driftT(set,chamber,layer) = thgetid(histname)
393 write(histname,'(''hfpp_driftX_'',3i1)') set, chamber, layer
394 hidFPP_driftX(set,chamber,layer) = thgetid(histname)
395 write(histname,'(''hfpp_shouldhit_'',3i1)') set, chamber, layer
396 hidFPP_should(set,chamber,layer) = thgetid(histname)
397 write(histname,'(''hfpp_didhit_'',3i1)') set, chamber, layer
398 hidFPP_did(set,chamber,layer) = thgetid(histname)
|
399 cdaq 1.8.24.3 write(histname,'(''hfpp_hmswire_'',3i1)') set, chamber, layer
400 hid_HMSwire(set,chamber,layer) = thgetid(histname)
|
401 frw 1.8.24.1 enddo
402 enddo
403 enddo
|
404 cdaq 1.1
|
405 cdaq 1.8.24.2 hid_rawROC(13) = thgetid('rawROC13')
406 hid_rawROC(14) = thgetid('rawROC14')
407
|
408 cdaq 1.1 RETURN
409 END
410
|