* * HMS calorimeter. Parameters from hms_positions.parm * * $Log: hms_calorimeter.cmn,v $ * Revision 1.12 1999/02/23 19:08:04 csa * Add hcal_fv_test * * Revision 1.11 1999/01/21 21:40:30 saw * Extra shower counter tube modifications * * Revision 1.10 1998/12/17 22:02:40 saw * Support extra set of tubes on HMS shower counter * * Revision 1.9 1998/12/01 20:28:57 saw * (SAW) Cosmetics * * Revision 1.8 1996/01/17 15:59:26 cdaq * (JRA) Add normalized event quantities * * Revision 1.7 1995/08/11 16:27:42 cdaq * (JRA) Add accumulators for calorimeter * * Revision 1.6 1995/05/22 19:06:29 cdaq * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts * * Revision 1.5 1995/03/13 19:01:46 cdaq * (JRA) Move hmax_cal_rows and hmax_cal_columns to gen_data_structures * * Revision 1.4 1995/01/04 17:09:32 cdaq * (HGM) Increase hmax_cal_rows to 13 * * Revision 1.3 1994/10/11 19:44:44 cdaq * (SAW) Add hcal_slop * * Revision 1.2 1994/08/05 15:35:42 cdaq * (SAW) Add makereg directive with required include files * Add "CTPTYPE=event" directive for auto generation of CTP reg calls * * Revision 1.1 1994/04/12 21:32:21 cdaq * Initial revision * * The following include statments must precede the inclusion of this * file in each routine that uses it. The *%% syntax is also a * directive to makereg to tell it to include the code in the program * that it generates. * *%% include 'hms_data_structures.cmn' * * CTPTYPE=parm * real*4 hcal_1pr_zpos ! Z positions of front of shower counter layers real*4 hcal_2ta_zpos ! real*4 hcal_3ta_zpos ! real*4 hcal_4ta_zpos ! real*4 hcal_1pr_thick ! Thickness of shower counter blocks real*4 hcal_2ta_thick ! real*4 hcal_3ta_thick ! real*4 hcal_4ta_thick ! integer*4 hcal_1pr_nr !Number of shower blocks per column integer*4 hcal_2ta_nr ! integer*4 hcal_3ta_nr ! integer*4 hcal_4ta_nr ! real*4 hcal_1pr_left !Y position, column #1 real*4 hcal_1pr_right ! real*4 hcal_1pr_top ! X positions, column #1 real*4 hcal_2ta_left ! Y position, column #2 real*4 hcal_2ta_right ! real*4 hcal_2ta_top ! X positions, column#2 real*4 hcal_3ta_left ! Y position, column #3 real*4 hcal_3ta_right ! real*4 hcal_3ta_top ! X positions, column #3 real*4 hcal_4ta_left ! Y position, column #4 real*4 hcal_4ta_right ! real*4 hcal_4ta_top ! X positions, column #4 REAL*4 HCAL_SLOP !SLOP IN DISTANCE BETWEEN TRACK AND BLOCK integer*4 hcal_fv_test !Turn on fiducial volume cut common/hms_cal_parms/ & hcal_1pr_zpos, & hcal_2ta_zpos, & hcal_3ta_zpos, & hcal_4ta_zpos, & hcal_1pr_thick, & hcal_2ta_thick, & hcal_3ta_thick, & hcal_4ta_thick, & hcal_1pr_nr, & hcal_2ta_nr, & hcal_3ta_nr, & hcal_4ta_nr, & hcal_1pr_left, & hcal_1pr_right, & hcal_1pr_top(HMAX_CAL_ROWS), & hcal_2ta_left, & hcal_2ta_right, & hcal_2ta_top(HMAX_CAL_ROWS), & hcal_3ta_left, & hcal_3ta_right, & hcal_3ta_top(HMAX_CAL_ROWS), & hcal_4ta_left, & hcal_4ta_right, & hcal_4ta_top(HMAX_CAL_ROWS), & hcal_slop, & hcal_fv_test * * HMS calorimeter. Geometrical constants filled by h_init_cal * real*4 hcal_block_xsize ! real*4 hcal_block_ysize !Block dimensions - 10*70*10 cm^3 real*4 hcal_block_zsize ! real*4 hcal_block_xc ! real*4 hcal_block_yc !X,Y,Z coordinates of block centers real*4 hcal_block_zc ! real*4 hcal_xmin ! real*4 hcal_xmax ! real*4 hcal_ymin !Boundaries of the HMS real*4 hcal_ymax !calorimeter stack real*4 hcal_zmin ! real*4 hcal_zmax ! real*4 hcal_fv_xmin ! real*4 hcal_fv_xmax ! real*4 hcal_fv_ymin !Boundaries of the real*4 hcal_fv_ymax !fiducial volume real*4 hcal_fv_zmin ! real*4 hcal_fv_zmax ! common/hms_geometry_cal/ & hcal_block_xsize, & hcal_block_ysize, & hcal_block_zsize, & hcal_block_xc(HMAX_CAL_BLOCKS), & hcal_block_yc(HMAX_CAL_BLOCKS), & hcal_block_zc(HMAX_CAL_BLOCKS), & hcal_xmin,hcal_xmax, & hcal_ymin,hcal_ymax, & hcal_zmin,hcal_zmax, & hcal_fv_xmin,hcal_fv_xmax, & hcal_fv_ymin,hcal_fv_ymax, & hcal_fv_zmin,hcal_fv_zmax * * HMS calorimeter. Sparsified data filled by h_sparsify_cal * * CTPTYPE=event * integer*4 hcal_rows !Row number. Copied from hms_raw_cal integer*4 hcal_cols !Column number. Copied from hms_raw_cal real*4 hcal_adcs_pos !Pulse height in channels(ADC_POS-PED). real*4 hcal_adcs_neg !Pulse height in channels(ADC_NEG-PED). integer*4 hcal_num_hits !Total number of hits above threshold common/hms_sparsified_cal/ & hcal_rows(HMAX_CAL_BLOCKS), & hcal_cols(HMAX_CAL_BLOCKS), & hcal_adcs_pos(HMAX_CAL_BLOCKS), & hcal_adcs_neg(HMAX_CAL_BLOCKS), & hcal_num_hits * * HMS calorimeter. Cluster data, filled by h_clusters_cal * integer*4 hnclusters_max !Number of clusters allowed in the calorimeter parameter (hnclusters_max=5) !Set the maximum to 5 integer*4 hnclusters_cal !Number of clusters found integer*4 hcluster_hit !Link pointer to cluster number for each hit integer*4 hcluster_size !Number of hits in a cluster real*4 hcluster_xc !X-coordinate of a cluster real*4 hcluster_e1 !Energy deposition in column #1 real*4 hcluster_e2 ! #2 real*4 hcluster_e3 ! #3 real*4 hcluster_e4 ! #4 real*4 hcluster_et !Total energy deposition real*4 hcluster_e1_pos !Energy deposition in column #POS_1 real*4 hcluster_e1_neg !Energy deposition in column #NEG_1 * real*4 hcluster_e2_pos !Energy deposition in column #POS_2 real*4 hcluster_e2_neg !Energy deposition in column #NEG_2 common/hms_clusters_cal/ & hcluster_hit(HMAX_CAL_BLOCKS), & hcluster_size(hnclusters_max), & hcluster_xc(hnclusters_max), & hcluster_e1(hnclusters_max), & hcluster_e2(hnclusters_max), & hcluster_e3(hnclusters_max), & hcluster_e4(hnclusters_max), & hcluster_e1_pos(hnclusters_max), & hcluster_e1_neg(hnclusters_max), & hcluster_e2_pos(hnclusters_max), & hcluster_e2_neg(hnclusters_max), & hcluster_et(hnclusters_max), & hnclusters_cal * * HMS calorimeter. Calorimeter track quantities,filled by h_tracks_cal * real*4 htrack_xc !X,Y position of track on real*4 htrack_yc ! calorimeter front surface integer*4 hcluster_track !Link pointer to calorimeter cluster number integer*4 hntracks_cal !Number of tracks for which a cluster was found common/hms_tracks_cal/ & htrack_xc(HNTRACKS_MAX), & htrack_yc(HNTRACKS_MAX), & hcluster_track(HNTRACKS_MAX), & hntracks_cal * * CTPTYPE=parm * * * HMS calorimeter. ADC pedestals and thresholds * real*4 hcal_pos_ped_mean !Mean pedestal value real*4 hcal_pos_ped_rms !Pedestal rms deviation real*4 hcal_pos_threshold !Threshold=3.*hcal_ped_rms real*4 hcal_neg_ped_mean !Mean pedestal value real*4 hcal_neg_ped_rms !Pedestal rms deviation real*4 hcal_neg_threshold !Threshold=3.*hcal_ped_rms common/hms_cal_pedestals/ & hcal_pos_ped_mean(HMAX_CAL_BLOCKS), & hcal_pos_ped_rms(HMAX_CAL_BLOCKS), & hcal_pos_threshold(HMAX_CAL_BLOCKS), & hcal_neg_ped_mean(HMAX_CAL_BLOCKS), & hcal_neg_ped_rms(HMAX_CAL_BLOCKS), & hcal_neg_threshold(HMAX_CAL_BLOCKS) * * HMS calorimeter. Calibration constants * real*4 hcal_pos_cal_const !Calibration constants for pos PMTs real*4 hcal_neg_cal_const !Calibration constants for neg PMTs common/hms_cal_const/ & hcal_pos_cal_const(HMAX_CAL_BLOCKS), & hcal_neg_cal_const(HMAX_CAL_BLOCKS) * * HMS calorimeter. Relative gains & correction factors * real*4 hcal_pos_gain_ini !Relative gains during the last calibration real*4 hcal_pos_gain_cur !Current relative gains real*4 hcal_pos_gain_cor !Correction factor: cor=ini/cur real*4 hcal_neg_gain_ini !Relative gains during the last calibration real*4 hcal_neg_gain_cur !Current relative gains real*4 hcal_neg_gain_cor !Correction factor: cor=ini/cur common/hms_cal_monitor/ & hcal_pos_gain_ini(HMAX_CAL_BLOCKS), & hcal_pos_gain_cur(HMAX_CAL_BLOCKS), & hcal_pos_gain_cor(HMAX_CAL_BLOCKS), & hcal_neg_gain_ini(HMAX_CAL_BLOCKS), & hcal_neg_gain_cur(HMAX_CAL_BLOCKS), & hcal_neg_gain_cor(HMAX_CAL_BLOCKS) * * HMS calorimeter. Debuging LUN and flags * integer*4 hlun_dbg_cal integer*4 hdbg_raw_cal integer*4 hdbg_sparsified_cal integer*4 hdbg_decoded_cal integer*4 hdbg_clusters_cal integer*4 hdbg_tracks_cal integer*4 hdbg_tests_cal integer*4 hcal_num_neg_columns common/hms_cal_flags/ & hlun_dbg_cal, & hdbg_raw_cal, & hdbg_sparsified_cal, & hdbg_decoded_cal, & hdbg_clusters_cal, & hdbg_tracks_cal, & hdbg_tests_cal, $ hcal_num_neg_columns * * CTPTYPE=event * integer*4 hcal_zero_sum(HMAX_CAL_BLOCKS) integer*4 hcal_zero_sum2(HMAX_CAL_BLOCKS) integer*4 hcal_zero_num(HMAX_CAL_BLOCKS) real*4 hcal_zero_ave(HMAX_CAL_BLOCKS) real*4 hcal_zero_sig(HMAX_CAL_BLOCKS) real*4 hcal_zero_thresh(HMAX_CAL_BLOCKS) common /hms_cal_zero/ & hcal_zero_ave, & hcal_zero_sig, & hcal_zero_thresh, & hcal_zero_num, & hcal_zero_sum, & hcal_zero_sum2 * * CTPTYPE=event * real*4 hscal_suma !normalized sum of layer A. real*4 hscal_sumb !normalized sum of layer B. real*4 hscal_sumc !normalized sum of layer C. real*4 hscal_sumd !normalized sum of layer D. real*4 hsprsum !normalized PR sum. real*4 hsshsum !normalized total sum. real*4 hsprtrk !normalized PR sum on track. real*4 hsshtrk !normalized total sum on track. common /hms_cal_normalized/ & hscal_suma, & hscal_sumb, & hscal_sumc, & hscal_sumd, & hsprsum, & hsshsum, & hsprtrk, & hsshtrk