1 saw 1.1 subroutine T_MISC(ABORT,err)
2 *
3 * $Log:$
4 *--------------------------------------------------------
5 IMPLICIT NONE
6 SAVE
7 *
8 character*12 here
9 parameter (here= '')
10 *
11 logical ABORT
12 character*(*) err
13 *
14 include 't20_data_structures.cmn'
15 include 't20_tracking.cmn'
16 include 't20_geometry.cmn'
17 include 't20_track_histid.cmn'
18 include 't20_bypass_switches.cmn'
19 include 't20_misc.cmn'
20 C include 't20_reg_polder_structures.cmn'
21 C==============================================================================
22 saw 1.1 C THIS ROUTINE TAKES CARE OF THE POLDER "MISCELANEOUS" DETECTOR PACKAGE:
23 C THE PARTS OF THE E-POLDER EVENTS READ OUTUPSTAIRS INTO THE
24 C ADCs and TDCs OF ROC (WHAT STEVE SAYS IT IS)
25
26
27 integer*4 ihit,iaddr1,iaddr2
28
29 traw_adc_s11 = 0.
30 traw_adc_s12 = 0.
31 traw_adc_s21 = 0.
32 traw_adc_s22 = 0.
33 traw_adc_veto1 = 0.
34 traw_adc_veto2 = 0.
35 traw_adc_tts1l = 0.
36 traw_adc_tts1r = 0.
37 traw_adc_tts2l = 0.
38 traw_adc_tts2r = 0.
39 c
40 tfl_mhtdc_dc = 0.
41 tfl_mhtdc_hms = 0.
42 tfl_mhtdc_hms_dc = 0.
43 saw 1.1 tfl_mhtdc_big1 = 0.
44 tfl_mhtdc_ce = 0.
45 tfl_mhtdc_polder = 0.
46 tfl_mhtdc_h1m3 = 0.
47 tfl_mhtdc_h2m3 = 0.
48 traw_mhtdc_s11 = 0.
49 traw_mhtdc_s12 = 0.
50 traw_mhtdc_s21 = 0.
51 traw_mhtdc_s22 = 0.
52 traw_mhtdc_s1 = 0.
53 traw_mhtdc_s2 = 0.
54 traw_mhtdc_veto = 0.
55 c
56 traw_hrtdc_hms = 0.
57 traw_hrtdc_dc = 0.
58 traw_hrtdc_hms_dc = 0.
59 traw_hrtdc_polder = 0.
60 traw_hrtdc_hms_nb = 0.
61 traw_hrtdc_pldr_nb = 0.
62 traw_hrtdc_ce = 0.
63
64 saw 1.1 do ihit=1,tmisc_tot_hits
65 iaddr1=tmisc_raw_addr1(ihit) ! iaddr1=1 for ADC, =2 for MHTDCs, and =3 for HRTDC
66 iaddr2=tmisc_raw_addr2(ihit)
67 c
68 if((iaddr1.ne.1).and.(iaddr1.ne.2).and.(iaddr1.ne.3))then
69 write(6,*)'There is a problem in t_misc: iaddr1 = ',iaddr1
70 goto 100
71 endif
72 C-------------------------------------------------------------------------------------
73 C***** THE ADC (LECROY 1881M - UPSTAIRS)
74 if (iaddr1.eq.1) then
75 if ((iaddr2.lt.1).or.(iaddr2.gt.32)) then
76 write(6,*)'There is a problem in t_misc: for iaddr1=1, iaddr2=',iaddr2
77 goto 25
78 else
79 C THE START AND VETO DETECTORS
80 if (iaddr2.eq.1) traw_adc_s11=tmisc_raw_data(ihit)
81 if (iaddr2.eq.2) traw_adc_s12=tmisc_raw_data(ihit)
82 if (iaddr2.eq.3) traw_adc_s21=tmisc_raw_data(ihit)
83 if (iaddr2.eq.4) traw_adc_s22=tmisc_raw_data(ihit)
84 if (iaddr2.eq.5) traw_adc_veto1=tmisc_raw_data(ihit)
85 saw 1.1 if (iaddr2.eq.6) traw_adc_veto2=tmisc_raw_data(ihit)
86 if (iaddr2.eq.7) traw_adc_tts1l=tmisc_raw_data(ihit)
87 if (iaddr2.eq.8) traw_adc_tts1r=tmisc_raw_data(ihit)
88 if (iaddr2.eq.9) traw_adc_tts2l=tmisc_raw_data(ihit)
89 if (iaddr2.eq.10) traw_adc_tts2r=tmisc_raw_data(ihit)
90 C THERE ARE 6 "SPARE" CHANNELS AVAILABLE IN THE ADC (LECROY 1881M),
91 if ((iaddr2.gt.10).and.(iaddr2.le.32)) then
92 traw_adc(iaddr2)=tmisc_raw_data(ihit)
93 endif
94 endif
95 endif
96 C--------------------------------------------------------------------------------------
97 C***** THE MULTIHIT TDCs (LECROY 1877S - UPSTAIRS AND DOWNSTAIRS)
98 25 continue
99 if (iaddr1.eq.2) then
100 if ((iaddr2.lt.1).or.(iaddr2.gt.32))then
101 write(6,*)'There is a problem in t_misc: for iaddr1=2, iaddr2=',iaddr2
102 goto 50
103 else
104 if (iaddr2.eq.1) tfl_mhtdc_dc = tmisc_raw_data(ihit)
105 if (iaddr2.eq.2) tfl_mhtdc_hms = tmisc_raw_data(ihit)
106 saw 1.1 if (iaddr2.eq.3) tfl_mhtdc_hms_dc = tmisc_raw_data(ihit)
107 if (iaddr2.eq.4) tfl_mhtdc_big1 = tmisc_raw_data(ihit)
108 if (iaddr2.eq.5) tfl_mhtdc_ce = tmisc_raw_data(ihit)
109 if (iaddr2.eq.6) tfl_mhtdc_polder = tmisc_raw_data(ihit)
110 if (iaddr2.eq.7) tfl_mhtdc_h1m3 = tmisc_raw_data(ihit)
111 if (iaddr2.eq.8) tfl_mhtdc_h2m3 = tmisc_raw_data(ihit)
112 if (iaddr2.eq.9) traw_mhtdc_s11 = tmisc_raw_data(ihit)
113 if (iaddr2.eq.10) traw_mhtdc_s12 = tmisc_raw_data(ihit)
114 if (iaddr2.eq.11) traw_mhtdc_s21 = tmisc_raw_data(ihit)
115 if (iaddr2.eq.12) traw_mhtdc_s22 = tmisc_raw_data(ihit)
116 if (iaddr2.eq.13) traw_mhtdc_s1 = tmisc_raw_data(ihit)
117 if (iaddr2.eq.14) traw_mhtdc_s2 = tmisc_raw_data(ihit)
118 if (iaddr2.eq.15) traw_mhtdc_veto = tmisc_raw_data(ihit)
119 endif
120 endif
121 C--------------------------------------------------------------------------------------
122 C***** THE HIGH RESOLUTION TDC (I CHOSE 16 CHANNEL FOR NOW) UPSTAIRS
123 50 if (iaddr1.eq.3) then
124 if ((iaddr2.lt.1).or.(iaddr2.gt.8)) then
125 c write(6,*)'There is a problem in t_misc: for iaddr1=3, iaddr2=',iaddr2
126 goto 100
127 saw 1.1 endif
128 if((iaddr2.ne.2).and.(iaddr2.ne.4).and.(iaddr2.ne.6)) then
129 c write(6,*)'t_misc: in the mhtdc part. iaddr2 = ',iaddr2,ihit ,tmisc_raw_data(ihit)
130 endif
131 if(iaddr2.eq.1)traw_hrtdc_hms = tmisc_raw_data(ihit)
132 if(iaddr2.eq.2)traw_hrtdc_dc = tmisc_raw_data(ihit)
133 if(iaddr2.eq.3)traw_hrtdc_hms_dc = tmisc_raw_data(ihit)
134 if(iaddr2.eq.4)traw_hrtdc_polder = tmisc_raw_data(ihit)
135 if(iaddr2.eq.5)traw_hrtdc_hms_nb = tmisc_raw_data(ihit)
136 if(iaddr2.eq.6)traw_hrtdc_pldr_nb = tmisc_raw_data(ihit)
137 if(iaddr2.eq.7)traw_hrtdc_ce = tmisc_raw_data(ihit)
138 endif
139 C-------------------------------------------------------------------------------------
140 100 continue
141 enddo
142 c
143 C***** now do a few combinations of ADCs and TDCs
144 traw_adc_s1sum = traw_adc_s11 + traw_adc_s12
145 traw_adc_s2sum = traw_adc_s21 + traw_adc_s22
146 traw_adc_s1s2sum = traw_adc_s2sum + traw_adc_s1sum
147 traw_adc_vetosum = traw_adc_veto1 + traw_adc_veto2
148 saw 1.1 c
149 RETURN
150 END
151 *********
152 * Local Variables:
153 * mode: fortran
154 * fortran-if-indent: 2
155 * fortran-do-indent: 2
156 * End:
157
|