(file) Return to sos_calorimeter.cmn CVS log (file) (dir) Up to [HallC] / Analyzer / INCLUDE

  1 cdaq  1.1 *
  2           *      SOS calorimeter. Parameters from sos_positions.parm
  3 cdaq  1.2 * $Log: sos_calorimeter.cmn,v $
  4 saw   1.11 * Revision 1.10  1999/02/23 19:19:23  csa
  5            * Add scal_fv_test
  6            *
  7 csa   1.10 * Revision 1.9  1999/01/29 17:34:22  saw
  8            * Add variables for second tubes on shower counter
  9            *
 10 saw   1.9  * Revision 1.8  1996/09/04 16:26:21  saw
 11            * (JRA) Add variable for normalized sum of first 3 layers on track.
 12            *
 13 saw   1.8  * Revision 1.7  1996/01/17 15:13:07  cdaq
 14            * (JRA) Add normalized event quantities
 15            *
 16 cdaq  1.7  * Revision 1.6  1995/08/11 16:27:59  cdaq
 17            * (JRA) Add accumulators for calorimeter
 18            *
 19 cdaq  1.6  * Revision 1.5  1995/05/22  19:06:46  cdaq
 20            * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts
 21            *
 22 cdaq  1.5  * Revision 1.4  1995/03/13  19:02:05  cdaq
 23            * (JRA) Move smax_cal_rows and smax_cal_columns to gen_data_structures
 24            *
 25 cdaq  1.4  * Revision 1.3  1994/11/21  17:59:01  cdaq
 26            * (SPB) Recopied from hms file and modified names for SOS
 27            *
 28 cdaq  1.3  * Revision 1.2  1994/08/05  21:03:44  cdaq
 29            * (SAW) Add makereg directive with required include files
 30            *       Add "CTPTYPE=event,parm" directive for auto generation of CTP reg calls
 31            *
 32 cdaq  1.2  * Revision 1.1  1994/04/13  19:00:49  cdaq
 33            * Initial revision
 34            *
 35            *     The following include statments must precede the inclusion of this
 36            *     file in each routine that uses it.  The *%% syntax is also a
 37            *     directive to makereg to tell it to include the code in the program
 38            *     that it generates.
 39 cdaq  1.1  *
 40 cdaq  1.5  *%%   include 'sos_data_structures.cmn'
 41 cdaq  1.2  *
 42            *     CTPTYPE=parm
 43            *
 44 cdaq  1.1        real*4 scal_1pr_zpos      ! Z positions of front of shower counter layers
 45                  real*4 scal_2ta_zpos      !
 46                  real*4 scal_3ta_zpos      !
 47                  real*4 scal_4ta_zpos      !
 48                  real*4 scal_1pr_thick     ! Thickness of shower counter blocks
 49                  real*4 scal_2ta_thick     !
 50                  real*4 scal_3ta_thick     !
 51                  real*4 scal_4ta_thick     !
 52                  integer*4 scal_1pr_nr     !Number of shower blocks per column
 53                  integer*4 scal_2ta_nr     !
 54                  integer*4 scal_3ta_nr     !
 55                  integer*4 scal_4ta_nr     !
 56                  real*4 scal_1pr_left      !Y position, column #1
 57                  real*4 scal_1pr_right     !
 58                  real*4 scal_1pr_top       ! X positions, column #1
 59                  real*4 scal_2ta_left      ! Y position, column #2
 60                  real*4 scal_2ta_right     !
 61                  real*4 scal_2ta_top       ! X positions, column#2
 62                  real*4 scal_3ta_left      ! Y position, column #3
 63                  real*4 scal_3ta_right     !
 64                  real*4 scal_3ta_top       ! X positions, column #3
 65 cdaq  1.1        real*4 scal_4ta_left      ! Y position, column #4
 66                  real*4 scal_4ta_right     !
 67                  real*4 scal_4ta_top       ! X positions, column #4
 68 cdaq  1.3        REAL*4 SCAL_SLOP          !SLOP IN DISTANCE BETWEEN TRACK AND BLOCK
 69 csa   1.10       integer*4 scal_fv_test    !Turn on SOS fiducial cut
 70            
 71 cdaq  1.1        common/sos_cal_parms/
 72                 &       scal_1pr_zpos,
 73                 &       scal_2ta_zpos,
 74                 &       scal_3ta_zpos,
 75                 &       scal_4ta_zpos,
 76                 &       scal_1pr_thick,
 77                 &       scal_2ta_thick,
 78                 &       scal_3ta_thick,
 79                 &       scal_4ta_thick,
 80                 &       scal_1pr_nr,
 81                 &       scal_2ta_nr,
 82                 &       scal_3ta_nr,
 83                 &       scal_4ta_nr,
 84                 &       scal_1pr_left,
 85                 &       scal_1pr_right,
 86 saw   1.11      &       scal_1pr_top(SMAX_CAL_ROWS),
 87 cdaq  1.1       &       scal_2ta_left,
 88                 &       scal_2ta_right,
 89 saw   1.11      &       scal_2ta_top(SMAX_CAL_ROWS),
 90 cdaq  1.1       &       scal_3ta_left,
 91                 &       scal_3ta_right,
 92 saw   1.11      &       scal_3ta_top(SMAX_CAL_ROWS),
 93 cdaq  1.1       &       scal_4ta_left,
 94                 &       scal_4ta_right,
 95 saw   1.11      &       scal_4ta_top(SMAX_CAL_ROWS),
 96 csa   1.10      &       scal_slop,
 97                 &       scal_fv_test
 98 cdaq  1.1  *
 99            *      SOS calorimeter. Geometrical constants filled by s_init_cal
100            *
101                  real*4 scal_block_xsize   !
102                  real*4 scal_block_ysize   !Block dimensions - 10*70*10 cm^3
103                  real*4 scal_block_zsize   !
104                  real*4 scal_block_xc   !
105                  real*4 scal_block_yc   !X,Y,Z coordinates of block centers
106                  real*4 scal_block_zc   !
107                  real*4 scal_xmin          !
108                  real*4 scal_xmax          !
109                  real*4 scal_ymin          !Boundaries of the SOS
110                  real*4 scal_ymax          !calorimeter stack
111                  real*4 scal_zmin          !
112                  real*4 scal_zmax          !
113                  real*4 scal_fv_xmin   !
114                  real*4 scal_fv_xmax   !
115                  real*4 scal_fv_ymin   !Boundaries of the
116                  real*4 scal_fv_ymax   !fiducial volume
117                  real*4 scal_fv_zmin   !
118                  real*4 scal_fv_zmax   !
119 cdaq  1.1        common/sos_geometry_cal/
120                 &       scal_block_xsize,
121                 &       scal_block_ysize,
122                 &       scal_block_zsize,
123 saw   1.11      &       scal_block_xc(SMAX_CAL_BLOCKS),
124                 &       scal_block_yc(SMAX_CAL_BLOCKS),
125                 &       scal_block_zc(SMAX_CAL_BLOCKS),
126 cdaq  1.1       &       scal_xmin,scal_xmax,
127                 &       scal_ymin,scal_ymax,
128                 &       scal_zmin,scal_zmax,
129                 &       scal_fv_xmin,scal_fv_xmax,
130                 &       scal_fv_ymin,scal_fv_ymax,
131                 &       scal_fv_zmin,scal_fv_zmax
132            *
133            *      SOS calorimeter. Sparsified data filled by s_sparsify_cal
134            *
135 cdaq  1.3  *     CTPTYPE=event
136            *
137 cdaq  1.1        integer*4 scal_rows          !Row number. Copied from sos_raw_cal
138                  integer*4 scal_cols          !Column number. Copied from sos_raw_cal
139 saw   1.9        real*4    scal_adcs_pos      !Pulse height in channels(ADC-PED).
140                  real*4    scal_adcs_neg      !Pulse height in channels(ADC-PED).
141 cdaq  1.1        integer*4 scal_num_hits      !Total number of hits above threshold
142                  common/sos_sparsified_cal/ 
143 saw   1.11      &       scal_rows(SMAX_CAL_BLOCKS),
144                 &       scal_cols(SMAX_CAL_BLOCKS),
145                 &       scal_adcs_neg(SMAX_CAL_BLOCKS),
146                 &       scal_adcs_pos(SMAX_CAL_BLOCKS),
147 cdaq  1.1       &       scal_num_hits
148            *
149            *      SOS calorimeter. Cluster data, filled by s_clusters_cal
150            *
151                  integer*4 snclusters_max    !Number of clusters allowed in the calorimeter
152                  parameter (snclusters_max=5) !Set the maximum to 5
153                  integer*4 snclusters_cal     !Number of clusters found
154                  integer*4 scluster_hit       !Link pointer to cluster number for each hit
155                  integer*4 scluster_size      !Number of hits in a cluster
156                  real*4 scluster_xc      !X-coordinate of a cluster
157                  real*4 scluster_e1      !Energy deposition in column #1
158                  real*4 scluster_e2      !                            #2
159                  real*4 scluster_e3      !                            #3
160                  real*4 scluster_e4      !                            #4
161                  real*4 scluster_et      !Total energy deposition
162 saw   1.9  
163                  real*4 scluster_e1_pos      !Energy deposition in column #POS_1
164                  real*4 scluster_e1_neg      !Energy deposition in column #NEG_1
165            *
166                  real*4 scluster_e2_pos      !Energy deposition in column #POS_2
167                  real*4 scluster_e2_neg      !Energy deposition in column #NEG_2
168            
169 cdaq  1.1        common/sos_clusters_cal/
170 saw   1.11      &       scluster_hit(SMAX_CAL_BLOCKS),
171 cdaq  1.1       &       scluster_size(snclusters_max),
172                 &       scluster_xc(snclusters_max),
173                 &       scluster_e1(snclusters_max),
174                 &       scluster_e2(snclusters_max),
175                 &       scluster_e3(snclusters_max),
176                 &       scluster_e4(snclusters_max),
177 saw   1.9       &       scluster_e1_pos(snclusters_max),
178                 &       scluster_e1_neg(snclusters_max),
179                 &       scluster_e2_pos(snclusters_max),
180                 &       scluster_e2_neg(snclusters_max),
181 cdaq  1.1       &       scluster_et(snclusters_max),
182                 &       snclusters_cal
183            *
184            *      SOS calorimeter. Calorimeter track quantities,filled by s_tracks_cal
185            *
186                  real*4 strack_xc           !X,Y position of track on 
187                  real*4 strack_yc           ! calorimeter front surface
188                  integer*4 scluster_track   !Link pointer to calorimeter cluster number
189                  integer*4 sntracks_cal  !Number of tracks for which a cluster was found
190                  common/sos_tracks_cal/
191                 &       strack_xc(sntracks_max),
192                 &       strack_yc(sntracks_max),
193                 &       scluster_track(sntracks_max),
194                 &       sntracks_cal
195 cdaq  1.2  *
196            *     CTPTYPE=parm
197 cdaq  1.1  *
198            *      SOS calorimeter. ADC pedestals and thresholds
199            *
200 saw   1.9        real*4 scal_pos_ped_mean      !Mean pedestal value
201                  real*4 scal_pos_ped_rms       !Pedestal rms deviation
202                  real*4 scal_pos_threshold     !Threshold=3.*scal_ped_rms
203                  real*4 scal_neg_ped_mean      !Mean pedestal value
204                  real*4 scal_neg_ped_rms       !Pedestal rms deviation
205                  real*4 scal_neg_threshold     !Threshold=3.*scal_ped_rms
206 cdaq  1.1        common/sos_cal_pedestals/
207 saw   1.11      &       scal_pos_ped_mean(SMAX_CAL_BLOCKS),
208                 &       scal_pos_ped_rms(SMAX_CAL_BLOCKS),
209                 &       scal_pos_threshold(SMAX_CAL_BLOCKS),
210                 &       scal_neg_ped_mean(SMAX_CAL_BLOCKS),
211                 &       scal_neg_ped_rms(SMAX_CAL_BLOCKS),
212                 &       scal_neg_threshold(SMAX_CAL_BLOCKS)
213 cdaq  1.1  *
214            *      SOS calorimeter. Calibration constants
215            *
216 saw   1.9        real*4 scal_pos_cal_const      !Calibration constants
217                  real*4 scal_neg_cal_const      !Calibration constants
218 cdaq  1.1        common/sos_cal_const/
219 saw   1.11      &       scal_pos_cal_const(SMAX_CAL_BLOCKS),
220                 &       scal_neg_cal_const(SMAX_CAL_BLOCKS)
221 cdaq  1.1  *
222            *      SOS calorimeter. Relative gains & correction factors
223            *
224 saw   1.9        real*4 scal_pos_gain_ini   !Relative gains during the last calibration
225                  real*4 scal_pos_gain_cur   !Current relative gains
226                  real*4 scal_pos_gain_cor   !Correction factor: cor=ini/cur
227                  real*4 scal_neg_gain_ini   !Relative gains during the last calibration
228                  real*4 scal_neg_gain_cur   !Current relative gains
229                  real*4 scal_neg_gain_cor   !Correction factor: cor=ini/cur
230 cdaq  1.1        common/sos_cal_monitor/
231 saw   1.11      &       scal_pos_gain_ini(SMAX_CAL_BLOCKS),
232                 &       scal_pos_gain_cur(SMAX_CAL_BLOCKS),
233                 &       scal_pos_gain_cor(SMAX_CAL_BLOCKS),
234                 &       scal_neg_gain_ini(SMAX_CAL_BLOCKS),
235                 &       scal_neg_gain_cur(SMAX_CAL_BLOCKS),
236                 &       scal_neg_gain_cor(SMAX_CAL_BLOCKS)
237 cdaq  1.1  *
238            *      SOS calorimeter. Debuging LUN and flags
239            *
240                  integer*4 slun_dbg_cal
241                  integer*4 sdbg_raw_cal
242                  integer*4 sdbg_sparsified_cal
243                  integer*4 sdbg_decoded_cal
244                  integer*4 sdbg_clusters_cal
245                  integer*4 sdbg_tracks_cal
246                  integer*4 sdbg_tests_cal
247 saw   1.9        integer*4 scal_num_neg_columns
248 cdaq  1.1        common/sos_cal_flags/
249                 &       slun_dbg_cal,
250                 &       sdbg_raw_cal,
251                 &       sdbg_sparsified_cal,
252                 &       sdbg_decoded_cal,
253                 &       sdbg_clusters_cal,
254                 &       sdbg_tracks_cal,
255 saw   1.9       &       sdbg_tests_cal,
256                 $     scal_num_neg_columns
257 cdaq  1.6  
258            
259            *
260            *     CTPTYPE=event
261            *
262 saw   1.11       integer*4 scal_zero_sum(SMAX_CAL_BLOCKS)
263                  integer*4 scal_zero_sum2(SMAX_CAL_BLOCKS)
264                  integer*4 scal_zero_num(SMAX_CAL_BLOCKS)
265                  real*4 scal_zero_ave(SMAX_CAL_BLOCKS)
266                  real*4 scal_zero_sig(SMAX_CAL_BLOCKS)
267                  real*4 scal_zero_thresh(SMAX_CAL_BLOCKS)
268 cdaq  1.6  
269                  common /sos_cal_zero/
270                 &    scal_zero_ave,
271                 &    scal_zero_sig,
272                 &    scal_zero_thresh,
273                 &    scal_zero_num,
274                 &    scal_zero_sum,
275                 &    scal_zero_sum2 
276 cdaq  1.7  
277            *
278            *     CTPTYPE=event
279            *
280                  real*4 sscal_suma     !normalized sum of layer A.
281                  real*4 sscal_sumb     !normalized sum of layer B.
282                  real*4 sscal_sumc     !normalized sum of layer C.
283                  real*4 sscal_sumd     !normalized sum of layer D.
284                  real*4 ssprsum        !normalized PR sum.
285                  real*4 ssshsum        !normalized total sum.
286                  real*4 ssprtrk        !normalized PR sum on track.
287                  real*4 ssshtrk        !normalized total sum on track.
288 saw   1.8        real*4 ssshtrk3       !normalized sum of first 3 layers on track.
289 cdaq  1.7  
290                  common /sos_cal_normalized/
291                 &    sscal_suma,
292                 &    sscal_sumb,
293                 &    sscal_sumc,
294                 &    sscal_sumd,
295                 &    ssprsum,
296                 &    ssshsum,
297                 &    ssprtrk,
298 saw   1.8       &    ssshtrk,
299                 &    ssshtrk3

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0