1 cdaq 1.1 *
2 * HMS calorimeter. Parameters from hms_positions.parm
3 *
|
4 cdaq 1.2 * $Log: hms_calorimeter.cmn,v $
|
5 saw 1.11 * Revision 1.10 1998/12/17 22:02:40 saw
6 * Support extra set of tubes on HMS shower counter
7 *
|
8 saw 1.10 * Revision 1.9 1998/12/01 20:28:57 saw
9 * (SAW) Cosmetics
10 *
|
11 saw 1.9 * Revision 1.8 1996/01/17 15:59:26 cdaq
12 * (JRA) Add normalized event quantities
13 *
|
14 cdaq 1.8 * Revision 1.7 1995/08/11 16:27:42 cdaq
15 * (JRA) Add accumulators for calorimeter
16 *
|
17 cdaq 1.7 * Revision 1.6 1995/05/22 19:06:29 cdaq
18 * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts
19 *
|
20 cdaq 1.6 * Revision 1.5 1995/03/13 19:01:46 cdaq
21 * (JRA) Move hmax_cal_rows and hmax_cal_columns to gen_data_structures
22 *
|
23 cdaq 1.5 * Revision 1.4 1995/01/04 17:09:32 cdaq
24 * (HGM) Increase hmax_cal_rows to 13
25 *
|
26 cdaq 1.4 * Revision 1.3 1994/10/11 19:44:44 cdaq
27 * (SAW) Add hcal_slop
28 *
|
29 cdaq 1.3 * Revision 1.2 1994/08/05 15:35:42 cdaq
30 * (SAW) Add makereg directive with required include files
31 * Add "CTPTYPE=event" directive for auto generation of CTP reg calls
32 *
|
33 cdaq 1.2 * Revision 1.1 1994/04/12 21:32:21 cdaq
34 * Initial revision
35 *
36 * The following include statments must precede the inclusion of this
37 * file in each routine that uses it. The *%% syntax is also a
38 * directive to makereg to tell it to include the code in the program
39 * that it generates.
|
40 cdaq 1.1 *
|
41 cdaq 1.6 *%% include 'hms_data_structures.cmn'
|
42 cdaq 1.2 *
43 * CTPTYPE=parm
44 *
|
45 cdaq 1.1 real*4 hcal_1pr_zpos ! Z positions of front of shower counter layers
46 real*4 hcal_2ta_zpos !
47 real*4 hcal_3ta_zpos !
48 real*4 hcal_4ta_zpos !
49 real*4 hcal_1pr_thick ! Thickness of shower counter blocks
50 real*4 hcal_2ta_thick !
51 real*4 hcal_3ta_thick !
52 real*4 hcal_4ta_thick !
53 integer*4 hcal_1pr_nr !Number of shower blocks per column
54 integer*4 hcal_2ta_nr !
55 integer*4 hcal_3ta_nr !
56 integer*4 hcal_4ta_nr !
57 real*4 hcal_1pr_left !Y position, column #1
58 real*4 hcal_1pr_right !
59 real*4 hcal_1pr_top ! X positions, column #1
60 real*4 hcal_2ta_left ! Y position, column #2
61 real*4 hcal_2ta_right !
62 real*4 hcal_2ta_top ! X positions, column#2
63 real*4 hcal_3ta_left ! Y position, column #3
64 real*4 hcal_3ta_right !
65 real*4 hcal_3ta_top ! X positions, column #3
66 cdaq 1.1 real*4 hcal_4ta_left ! Y position, column #4
67 real*4 hcal_4ta_right !
68 real*4 hcal_4ta_top ! X positions, column #4
|
69 cdaq 1.3 REAL*4 HCAL_SLOP !SLOP IN DISTANCE BETWEEN TRACK AND BLOCK
|
70 cdaq 1.1 common/hms_cal_parms/
71 & hcal_1pr_zpos,
72 & hcal_2ta_zpos,
73 & hcal_3ta_zpos,
74 & hcal_4ta_zpos,
75 & hcal_1pr_thick,
76 & hcal_2ta_thick,
77 & hcal_3ta_thick,
78 & hcal_4ta_thick,
79 & hcal_1pr_nr,
80 & hcal_2ta_nr,
81 & hcal_3ta_nr,
82 & hcal_4ta_nr,
83 & hcal_1pr_left,
84 & hcal_1pr_right,
|
85 saw 1.9 & hcal_1pr_top(HMAX_CAL_ROWS),
|
86 cdaq 1.1 & hcal_2ta_left,
87 & hcal_2ta_right,
|
88 saw 1.9 & hcal_2ta_top(HMAX_CAL_ROWS),
|
89 cdaq 1.1 & hcal_3ta_left,
90 & hcal_3ta_right,
|
91 saw 1.9 & hcal_3ta_top(HMAX_CAL_ROWS),
|
92 cdaq 1.1 & hcal_4ta_left,
93 & hcal_4ta_right,
|
94 saw 1.9 & hcal_4ta_top(HMAX_CAL_ROWS),
|
95 cdaq 1.3 & hcal_slop
|
96 cdaq 1.1 *
97 * HMS calorimeter. Geometrical constants filled by h_init_cal
98 *
99 real*4 hcal_block_xsize !
100 real*4 hcal_block_ysize !Block dimensions - 10*70*10 cm^3
101 real*4 hcal_block_zsize !
102 real*4 hcal_block_xc !
103 real*4 hcal_block_yc !X,Y,Z coordinates of block centers
104 real*4 hcal_block_zc !
105 real*4 hcal_xmin !
106 real*4 hcal_xmax !
107 real*4 hcal_ymin !Boundaries of the HMS
108 real*4 hcal_ymax !calorimeter stack
109 real*4 hcal_zmin !
110 real*4 hcal_zmax !
111 real*4 hcal_fv_xmin !
112 real*4 hcal_fv_xmax !
113 real*4 hcal_fv_ymin !Boundaries of the
114 real*4 hcal_fv_ymax !fiducial volume
115 real*4 hcal_fv_zmin !
116 real*4 hcal_fv_zmax !
117 cdaq 1.1 common/hms_geometry_cal/
118 & hcal_block_xsize,
119 & hcal_block_ysize,
120 & hcal_block_zsize,
|
121 saw 1.9 & hcal_block_xc(HMAX_CAL_BLOCKS),
122 & hcal_block_yc(HMAX_CAL_BLOCKS),
123 & hcal_block_zc(HMAX_CAL_BLOCKS),
|
124 cdaq 1.1 & hcal_xmin,hcal_xmax,
125 & hcal_ymin,hcal_ymax,
126 & hcal_zmin,hcal_zmax,
127 & hcal_fv_xmin,hcal_fv_xmax,
128 & hcal_fv_ymin,hcal_fv_ymax,
129 & hcal_fv_zmin,hcal_fv_zmax
130 *
131 * HMS calorimeter. Sparsified data filled by h_sparsify_cal
132 *
|
133 cdaq 1.2 * CTPTYPE=event
134 *
|
135 cdaq 1.1 integer*4 hcal_rows !Row number. Copied from hms_raw_cal
136 integer*4 hcal_cols !Column number. Copied from hms_raw_cal
|
137 saw 1.10 real*4 hcal_adcs_pos !Pulse height in channels(ADC_POS-PED).
138 real*4 hcal_adcs_neg !Pulse height in channels(ADC_NEG-PED).
|
139 cdaq 1.1 integer*4 hcal_num_hits !Total number of hits above threshold
140 common/hms_sparsified_cal/
|
141 saw 1.9 & hcal_rows(HMAX_CAL_BLOCKS),
142 & hcal_cols(HMAX_CAL_BLOCKS),
|
143 saw 1.10 & hcal_adcs_pos(HMAX_CAL_BLOCKS),
144 & hcal_adcs_neg(HMAX_CAL_BLOCKS),
|
145 cdaq 1.1 & hcal_num_hits
146 *
147 * HMS calorimeter. Cluster data, filled by h_clusters_cal
148 *
149 integer*4 hnclusters_max !Number of clusters allowed in the calorimeter
150 parameter (hnclusters_max=5) !Set the maximum to 5
151 integer*4 hnclusters_cal !Number of clusters found
152 integer*4 hcluster_hit !Link pointer to cluster number for each hit
153 integer*4 hcluster_size !Number of hits in a cluster
154 real*4 hcluster_xc !X-coordinate of a cluster
155 real*4 hcluster_e1 !Energy deposition in column #1
156 real*4 hcluster_e2 ! #2
157 real*4 hcluster_e3 ! #3
158 real*4 hcluster_e4 ! #4
159 real*4 hcluster_et !Total energy deposition
|
160 saw 1.11
161 real*4 hcluster_e1_pos !Energy deposition in column #POS_1
162 real*4 hcluster_e1_neg !Energy deposition in column #NEG_1
163 *
164 real*4 hcluster_e2_pos !Energy deposition in column #POS_2
165 real*4 hcluster_e2_neg !Energy deposition in column #NEG_2
|
166 cdaq 1.1 common/hms_clusters_cal/
|
167 saw 1.9 & hcluster_hit(HMAX_CAL_BLOCKS),
|
168 cdaq 1.1 & hcluster_size(hnclusters_max),
169 & hcluster_xc(hnclusters_max),
170 & hcluster_e1(hnclusters_max),
171 & hcluster_e2(hnclusters_max),
172 & hcluster_e3(hnclusters_max),
173 & hcluster_e4(hnclusters_max),
|
174 saw 1.11 & hcluster_e1_pos(hnclusters_max),
175 & hcluster_e1_neg(hnclusters_max),
176 & hcluster_e2_pos(hnclusters_max),
177 & hcluster_e2_neg(hnclusters_max),
|
178 cdaq 1.1 & hcluster_et(hnclusters_max),
179 & hnclusters_cal
180 *
181 * HMS calorimeter. Calorimeter track quantities,filled by h_tracks_cal
182 *
183 real*4 htrack_xc !X,Y position of track on
184 real*4 htrack_yc ! calorimeter front surface
185 integer*4 hcluster_track !Link pointer to calorimeter cluster number
186 integer*4 hntracks_cal !Number of tracks for which a cluster was found
187 common/hms_tracks_cal/
|
188 saw 1.9 & htrack_xc(HNTRACKS_MAX),
189 & htrack_yc(HNTRACKS_MAX),
190 & hcluster_track(HNTRACKS_MAX),
|
191 cdaq 1.1 & hntracks_cal
|
192 cdaq 1.2 *
193 * CTPTYPE=parm
194 *
|
195 cdaq 1.1 *
196 * HMS calorimeter. ADC pedestals and thresholds
197 *
|
198 saw 1.10 real*4 hcal_pos_ped_mean !Mean pedestal value
199 real*4 hcal_pos_ped_rms !Pedestal rms deviation
200 real*4 hcal_pos_threshold !Threshold=3.*hcal_ped_rms
201 real*4 hcal_neg_ped_mean !Mean pedestal value
202 real*4 hcal_neg_ped_rms !Pedestal rms deviation
203 real*4 hcal_neg_threshold !Threshold=3.*hcal_ped_rms
|
204 cdaq 1.1 common/hms_cal_pedestals/
|
205 saw 1.10 & hcal_pos_ped_mean(HMAX_CAL_BLOCKS),
206 & hcal_pos_ped_rms(HMAX_CAL_BLOCKS),
207 & hcal_pos_threshold(HMAX_CAL_BLOCKS),
208 & hcal_neg_ped_mean(HMAX_CAL_BLOCKS),
209 & hcal_neg_ped_rms(HMAX_CAL_BLOCKS),
210 & hcal_neg_threshold(HMAX_CAL_BLOCKS)
|
211 cdaq 1.1 *
212 * HMS calorimeter. Calibration constants
213 *
|
214 saw 1.10 real*4 hcal_pos_cal_const !Calibration constants for pos PMTs
215 real*4 hcal_neg_cal_const !Calibration constants for neg PMTs
|
216 cdaq 1.1 common/hms_cal_const/
|
217 saw 1.10 & hcal_pos_cal_const(HMAX_CAL_BLOCKS),
218 & hcal_neg_cal_const(HMAX_CAL_BLOCKS)
|
219 cdaq 1.1 *
220 * HMS calorimeter. Relative gains & correction factors
221 *
|
222 saw 1.10 real*4 hcal_pos_gain_ini !Relative gains during the last calibration
223 real*4 hcal_pos_gain_cur !Current relative gains
224 real*4 hcal_pos_gain_cor !Correction factor: cor=ini/cur
225 real*4 hcal_neg_gain_ini !Relative gains during the last calibration
226 real*4 hcal_neg_gain_cur !Current relative gains
227 real*4 hcal_neg_gain_cor !Correction factor: cor=ini/cur
|
228 cdaq 1.1 common/hms_cal_monitor/
|
229 saw 1.10 & hcal_pos_gain_ini(HMAX_CAL_BLOCKS),
230 & hcal_pos_gain_cur(HMAX_CAL_BLOCKS),
231 & hcal_pos_gain_cor(HMAX_CAL_BLOCKS),
232 & hcal_neg_gain_ini(HMAX_CAL_BLOCKS),
233 & hcal_neg_gain_cur(HMAX_CAL_BLOCKS),
234 & hcal_neg_gain_cor(HMAX_CAL_BLOCKS)
|
235 cdaq 1.1 *
236 * HMS calorimeter. Debuging LUN and flags
237 *
238 integer*4 hlun_dbg_cal
239 integer*4 hdbg_raw_cal
240 integer*4 hdbg_sparsified_cal
241 integer*4 hdbg_decoded_cal
242 integer*4 hdbg_clusters_cal
243 integer*4 hdbg_tracks_cal
244 integer*4 hdbg_tests_cal
|
245 saw 1.10 integer*4 hcal_num_neg_columns
|
246 cdaq 1.1 common/hms_cal_flags/
247 & hlun_dbg_cal,
248 & hdbg_raw_cal,
249 & hdbg_sparsified_cal,
250 & hdbg_decoded_cal,
251 & hdbg_clusters_cal,
252 & hdbg_tracks_cal,
|
253 saw 1.10 & hdbg_tests_cal,
254 $ hcal_num_neg_columns
|
255 cdaq 1.7
256 *
257 * CTPTYPE=event
258 *
|
259 saw 1.9 integer*4 hcal_zero_sum(HMAX_CAL_BLOCKS)
260 integer*4 hcal_zero_sum2(HMAX_CAL_BLOCKS)
261 integer*4 hcal_zero_num(HMAX_CAL_BLOCKS)
262 real*4 hcal_zero_ave(HMAX_CAL_BLOCKS)
263 real*4 hcal_zero_sig(HMAX_CAL_BLOCKS)
264 real*4 hcal_zero_thresh(HMAX_CAL_BLOCKS)
|
265 cdaq 1.7
266 common /hms_cal_zero/
267 & hcal_zero_ave,
268 & hcal_zero_sig,
269 & hcal_zero_thresh,
270 & hcal_zero_num,
271 & hcal_zero_sum,
272 & hcal_zero_sum2
|
273 cdaq 1.8
274 *
275 * CTPTYPE=event
276 *
277 real*4 hscal_suma !normalized sum of layer A.
278 real*4 hscal_sumb !normalized sum of layer B.
279 real*4 hscal_sumc !normalized sum of layer C.
280 real*4 hscal_sumd !normalized sum of layer D.
281 real*4 hsprsum !normalized PR sum.
282 real*4 hsshsum !normalized total sum.
283 real*4 hsprtrk !normalized PR sum on track.
284 real*4 hsshtrk !normalized total sum on track.
285
286 common /hms_cal_normalized/
287 & hscal_suma,
288 & hscal_sumb,
289 & hscal_sumc,
290 & hscal_sumd,
291 & hsprsum,
292 & hsshsum,
293 & hsprtrk,
294 cdaq 1.8 & hsshtrk
|