1 cdaq 1.1 SUBROUTINE H_DUMP_TOF(ABORT,errmsg)
2 *--------------------------------------------------------
3 *-
4 *- Purpose and Methods : Analyze scintillator information for each track
5 *-
6 *- Required Input BANKS HMS_SCIN_TOF
7 *- GEN_DATA_STRUCTURES
8 *-
9 *- Output: ABORT - success or failure
10 *- : err - reason for failure, if any
11 *-
12 * author: John Arrington
13 * created: 1/30/95
14 *
15 * h_dump_tof writes out the raw timing information for the final chosen tracks.
16 * This data is analyzed by independent routines to fit the corrections for
17 * pulse height walk, time lag from the hit to the pmt signal, and time offsets
18 * for each signal.
19 *
|
20 cdaq 1.2 * $Log: h_dump_tof.f,v $
|
21 saw 1.7 * Revision 1.6 1999/06/10 16:49:09 csa
22 * (JRA) Added test on hcer_npe_sum, changed output formats
23 *
|
24 csa 1.6 * Revision 1.5 1999/02/10 18:20:08 csa
25 * Fixed format problem with ph > 10,000
26 *
|
27 csa 1.5 * Revision 1.4 1995/10/09 20:20:00 cdaq
28 * (JRA) Subtract hstart_time from tdc output
29 *
|
30 cdaq 1.4 * Revision 1.3 1995/05/22 19:39:09 cdaq
31 * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts"
32 *
|
33 cdaq 1.3 * Revision 1.2 1995/05/11 19:03:50 cdaq
34 * (JRA) Formatting changes
35 *
|
36 cdaq 1.2 * Revision 1.1 1995/01/31 21:34:03 cdaq
37 * Initial revision
38 *
|
39 cdaq 1.1 *--------------------------------------------------------
40 IMPLICIT NONE
41 *
42 character*50 here
43 parameter (here= 'H_DUMP_TOF')
44 *
45 logical ABORT
46 character*(*) errmsg
47 *
|
48 cdaq 1.3 INCLUDE 'hms_data_structures.cmn'
|
49 cdaq 1.1 INCLUDE 'gen_constants.par'
50 INCLUDE 'gen_units.par'
51 include 'hms_scin_parms.cmn'
52 include 'hms_scin_tof.cmn'
53 integer*4 hit, ind
54 integer*4 pmt,cnt,lay,dir
55 real*4 ph,tim,betap
56 save
57 *
58 * Write out TOF fitting data.
59 *
|
60 csa 1.5
61 * In some circumstances you might also cut on
62 * hcer_npe_sum and/or hsshtrk:
|
63 csa 1.6 if (hsnum_pmt_hit.ge.4 .and. hsnum_pmt_hit.le.12 .and. hcer_npe_sum.gt.2) then
|
64 cdaq 1.1 betap=1.
65 write(37,111) hsnum_pmt_hit,hsx_fp,hsxp_fp,
66 $ hsy_fp,hsyp_fp,betap
|
67 saw 1.7 111 format(i3,1x,f10.5,1x,f9.5,1x,f10.5,1x,f9.5,1x,f7.3)
|
68 cdaq 1.1 do ind = 1, hsnum_scin_hit
69 hit = hscin_hit(hsnum_fptrack,ind)
70 if (hscin_tdc_pos(hit) .ge. hscin_tdc_min .and.
71 1 hscin_tdc_pos(hit) .le. hscin_tdc_max) then
72 cnt=hscin_counter_num(hit)
73 lay=int((hscin_plane_num(hit)+1)/2)
74 dir=mod(hscin_plane_num(hit)+1,2)+1
75 pmt=1
|
76 cdaq 1.4 tim=hscin_tdc_pos(hit)*hscin_tdc_to_time-hstart_time
|
77 cdaq 1.1 ph=hscin_adc_pos(hit)
78 write(37,112) pmt,cnt,lay,dir,ph,tim
79 endif
80 if (hscin_tdc_neg(hit) .ge. hscin_tdc_min .and.
81 1 hscin_tdc_neg(hit) .le. hscin_tdc_max) then
82 cnt=hscin_counter_num(hit)
83 lay=int((hscin_plane_num(hit)+1)/2)
84 dir=mod(hscin_plane_num(hit)+1,2)+1
85 pmt=2
|
86 cdaq 1.4 tim=hscin_tdc_neg(hit)*hscin_tdc_to_time-hstart_time
|
87 cdaq 1.1 ph=hscin_adc_neg(hit)
88 write(37,112) pmt,cnt,lay,dir,ph,tim
89 endif
90 enddo
|
91 saw 1.7 112 format(i2,1x,i3,2(1x,i2),1x,f7.1,1x,f8.3)
|
92 cdaq 1.1 endif
93 RETURN
94 END
|