* * SOS calorimeter. Parameters from sos_positions.parm * $Log: sos_calorimeter.cmn,v $ * Revision 1.11 1999/10/11 13:42:41 saw * Cosmetic * * Revision 1.10 1999/02/23 19:19:23 csa * Add scal_fv_test * * Revision 1.9 1999/01/29 17:34:22 saw * Add variables for second tubes on shower counter * * Revision 1.8 1996/09/04 16:26:21 saw * (JRA) Add variable for normalized sum of first 3 layers on track. * * Revision 1.7 1996/01/17 15:13:07 cdaq * (JRA) Add normalized event quantities * * Revision 1.6 1995/08/11 16:27:59 cdaq * (JRA) Add accumulators for calorimeter * * Revision 1.5 1995/05/22 19:06:46 cdaq * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts * * Revision 1.4 1995/03/13 19:02:05 cdaq * (JRA) Move smax_cal_rows and smax_cal_columns to gen_data_structures * * Revision 1.3 1994/11/21 17:59:01 cdaq * (SPB) Recopied from hms file and modified names for SOS * * Revision 1.2 1994/08/05 21:03:44 cdaq * (SAW) Add makereg directive with required include files * Add "CTPTYPE=event,parm" directive for auto generation of CTP reg calls * * Revision 1.1 1994/04/13 19:00:49 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 'sos_data_structures.cmn' * * CTPTYPE=parm * real*4 scal_1pr_zpos ! Z positions of front of shower counter layers real*4 scal_2ta_zpos ! real*4 scal_3ta_zpos ! real*4 scal_4ta_zpos ! real*4 scal_1pr_thick ! Thickness of shower counter blocks real*4 scal_2ta_thick ! real*4 scal_3ta_thick ! real*4 scal_4ta_thick ! integer*4 scal_1pr_nr !Number of shower blocks per column integer*4 scal_2ta_nr ! integer*4 scal_3ta_nr ! integer*4 scal_4ta_nr ! real*4 scal_1pr_left !Y position, column #1 real*4 scal_1pr_right ! real*4 scal_1pr_top ! X positions, column #1 real*4 scal_2ta_left ! Y position, column #2 real*4 scal_2ta_right ! real*4 scal_2ta_top ! X positions, column#2 real*4 scal_3ta_left ! Y position, column #3 real*4 scal_3ta_right ! real*4 scal_3ta_top ! X positions, column #3 real*4 scal_4ta_left ! Y position, column #4 real*4 scal_4ta_right ! real*4 scal_4ta_top ! X positions, column #4 REAL*4 SCAL_SLOP !SLOP IN DISTANCE BETWEEN TRACK AND BLOCK integer*4 scal_fv_test !Turn on SOS fiducial cut common/sos_cal_parms/ & scal_1pr_zpos, & scal_2ta_zpos, & scal_3ta_zpos, & scal_4ta_zpos, & scal_1pr_thick, & scal_2ta_thick, & scal_3ta_thick, & scal_4ta_thick, & scal_1pr_nr, & scal_2ta_nr, & scal_3ta_nr, & scal_4ta_nr, & scal_1pr_left, & scal_1pr_right, & scal_1pr_top(SMAX_CAL_ROWS), & scal_2ta_left, & scal_2ta_right, & scal_2ta_top(SMAX_CAL_ROWS), & scal_3ta_left, & scal_3ta_right, & scal_3ta_top(SMAX_CAL_ROWS), & scal_4ta_left, & scal_4ta_right, & scal_4ta_top(SMAX_CAL_ROWS), & scal_slop, & scal_fv_test * * SOS calorimeter. Geometrical constants filled by s_init_cal * real*4 scal_block_xsize ! real*4 scal_block_ysize !Block dimensions - 10*70*10 cm^3 real*4 scal_block_zsize ! real*4 scal_block_xc ! real*4 scal_block_yc !X,Y,Z coordinates of block centers real*4 scal_block_zc ! real*4 scal_xmin ! real*4 scal_xmax ! real*4 scal_ymin !Boundaries of the SOS real*4 scal_ymax !calorimeter stack real*4 scal_zmin ! real*4 scal_zmax ! real*4 scal_fv_xmin ! real*4 scal_fv_xmax ! real*4 scal_fv_ymin !Boundaries of the real*4 scal_fv_ymax !fiducial volume real*4 scal_fv_zmin ! real*4 scal_fv_zmax ! common/sos_geometry_cal/ & scal_block_xsize, & scal_block_ysize, & scal_block_zsize, & scal_block_xc(SMAX_CAL_BLOCKS), & scal_block_yc(SMAX_CAL_BLOCKS), & scal_block_zc(SMAX_CAL_BLOCKS), & scal_xmin,scal_xmax, & scal_ymin,scal_ymax, & scal_zmin,scal_zmax, & scal_fv_xmin,scal_fv_xmax, & scal_fv_ymin,scal_fv_ymax, & scal_fv_zmin,scal_fv_zmax * * SOS calorimeter. Sparsified data filled by s_sparsify_cal * * CTPTYPE=event * integer*4 scal_rows !Row number. Copied from sos_raw_cal integer*4 scal_cols !Column number. Copied from sos_raw_cal real*4 scal_adcs_pos !Pulse height in channels(ADC-PED). real*4 scal_adcs_neg !Pulse height in channels(ADC-PED). integer*4 scal_num_hits !Total number of hits above threshold common/sos_sparsified_cal/ & scal_rows(SMAX_CAL_BLOCKS), & scal_cols(SMAX_CAL_BLOCKS), & scal_adcs_neg(SMAX_CAL_BLOCKS), & scal_adcs_pos(SMAX_CAL_BLOCKS), & scal_num_hits * * SOS calorimeter. Cluster data, filled by s_clusters_cal * integer*4 snclusters_max !Number of clusters allowed in the calorimeter parameter (snclusters_max=5) !Set the maximum to 5 integer*4 snclusters_cal !Number of clusters found integer*4 scluster_hit !Link pointer to cluster number for each hit integer*4 scluster_size !Number of hits in a cluster real*4 scluster_xc !X-coordinate of a cluster real*4 scluster_e1 !Energy deposition in column #1 real*4 scluster_e2 ! #2 real*4 scluster_e3 ! #3 real*4 scluster_e4 ! #4 real*4 scluster_et !Total energy deposition real*4 scluster_e1_pos !Energy deposition in column #POS_1 real*4 scluster_e1_neg !Energy deposition in column #NEG_1 * real*4 scluster_e2_pos !Energy deposition in column #POS_2 real*4 scluster_e2_neg !Energy deposition in column #NEG_2 common/sos_clusters_cal/ & scluster_hit(SMAX_CAL_BLOCKS), & scluster_size(snclusters_max), & scluster_xc(snclusters_max), & scluster_e1(snclusters_max), & scluster_e2(snclusters_max), & scluster_e3(snclusters_max), & scluster_e4(snclusters_max), & scluster_e1_pos(snclusters_max), & scluster_e1_neg(snclusters_max), & scluster_e2_pos(snclusters_max), & scluster_e2_neg(snclusters_max), & scluster_et(snclusters_max), & snclusters_cal * * SOS calorimeter. Calorimeter track quantities,filled by s_tracks_cal * real*4 strack_xc !X,Y position of track on real*4 strack_yc ! calorimeter front surface integer*4 scluster_track !Link pointer to calorimeter cluster number integer*4 sntracks_cal !Number of tracks for which a cluster was found common/sos_tracks_cal/ & strack_xc(sntracks_max), & strack_yc(sntracks_max), & scluster_track(sntracks_max), & sntracks_cal * * CTPTYPE=parm * * SOS calorimeter. ADC pedestals and thresholds * real*4 scal_pos_ped_mean !Mean pedestal value real*4 scal_pos_ped_rms !Pedestal rms deviation real*4 scal_pos_threshold !Threshold=3.*scal_ped_rms real*4 scal_neg_ped_mean !Mean pedestal value real*4 scal_neg_ped_rms !Pedestal rms deviation real*4 scal_neg_threshold !Threshold=3.*scal_ped_rms common/sos_cal_pedestals/ & scal_pos_ped_mean(SMAX_CAL_BLOCKS), & scal_pos_ped_rms(SMAX_CAL_BLOCKS), & scal_pos_threshold(SMAX_CAL_BLOCKS), & scal_neg_ped_mean(SMAX_CAL_BLOCKS), & scal_neg_ped_rms(SMAX_CAL_BLOCKS), & scal_neg_threshold(SMAX_CAL_BLOCKS) * * SOS calorimeter. Calibration constants * real*4 scal_pos_cal_const !Calibration constants real*4 scal_neg_cal_const !Calibration constants common/sos_cal_const/ & scal_pos_cal_const(SMAX_CAL_BLOCKS), & scal_neg_cal_const(SMAX_CAL_BLOCKS) * * SOS calorimeter. Relative gains & correction factors * real*4 scal_pos_gain_ini !Relative gains during the last calibration real*4 scal_pos_gain_cur !Current relative gains real*4 scal_pos_gain_cor !Correction factor: cor=ini/cur real*4 scal_neg_gain_ini !Relative gains during the last calibration real*4 scal_neg_gain_cur !Current relative gains real*4 scal_neg_gain_cor !Correction factor: cor=ini/cur common/sos_cal_monitor/ & scal_pos_gain_ini(SMAX_CAL_BLOCKS), & scal_pos_gain_cur(SMAX_CAL_BLOCKS), & scal_pos_gain_cor(SMAX_CAL_BLOCKS), & scal_neg_gain_ini(SMAX_CAL_BLOCKS), & scal_neg_gain_cur(SMAX_CAL_BLOCKS), & scal_neg_gain_cor(SMAX_CAL_BLOCKS) * * SOS calorimeter. Debuging LUN and flags * integer*4 slun_dbg_cal integer*4 sdbg_raw_cal integer*4 sdbg_sparsified_cal integer*4 sdbg_decoded_cal integer*4 sdbg_clusters_cal integer*4 sdbg_tracks_cal integer*4 sdbg_tests_cal integer*4 scal_num_neg_columns common/sos_cal_flags/ & slun_dbg_cal, & sdbg_raw_cal, & sdbg_sparsified_cal, & sdbg_decoded_cal, & sdbg_clusters_cal, & sdbg_tracks_cal, & sdbg_tests_cal, $ scal_num_neg_columns * * CTPTYPE=event * integer*4 scal_zero_sum(SMAX_CAL_BLOCKS) integer*4 scal_zero_sum2(SMAX_CAL_BLOCKS) integer*4 scal_zero_num(SMAX_CAL_BLOCKS) real*4 scal_zero_ave(SMAX_CAL_BLOCKS) real*4 scal_zero_sig(SMAX_CAL_BLOCKS) real*4 scal_zero_thresh(SMAX_CAL_BLOCKS) common /sos_cal_zero/ & scal_zero_ave, & scal_zero_sig, & scal_zero_thresh, & scal_zero_num, & scal_zero_sum, & scal_zero_sum2 * * CTPTYPE=event * real*4 sscal_suma !normalized sum of layer A. real*4 sscal_sumb !normalized sum of layer B. real*4 sscal_sumc !normalized sum of layer C. real*4 sscal_sumd !normalized sum of layer D. real*4 ssprsum !normalized PR sum. real*4 ssshsum !normalized total sum. real*4 ssprtrk !normalized PR sum on track. real*4 ssshtrk !normalized total sum on track. real*4 ssshtrk3 !normalized sum of first 3 layers on track. common /sos_cal_normalized/ & sscal_suma, & sscal_sumb, & sscal_sumc, & sscal_sumd, & ssprsum, & ssshsum, & ssprtrk, & ssshtrk, & ssshtrk3