* sos_pedestals.cmn - counters used for calculating pedestals from the set * of pedestal events at the beginning of each run. * * $Log: sos_pedestals.cmn,v $ * Revision 1.9 1999/02/23 19:21:23 csa * (JRA) Add vars for improved pedestal calcs * * Revision 1.8 1999/01/29 17:34:23 saw * Add variables for second tubes on shower counter * * Revision 1.7 1996/11/19 18:49:39 saw * (WH) Add data structures for Lucite counter * * Revision 1.6 1996/09/04 16:30:06 saw * (JRA) Add thresholds for aerogel * * Revision 1.5 1996/04/30 14:02:09 saw * (JRA) Make aerogel parameters PARM type * * Revision 1.4 1996/01/17 15:09:10 cdaq * (JRA) Add "_new_" pedestal variables * * Revision 1.3 1995/07/28 14:38:58 cdaq * (JRA) Add shodo_all_sig_pos/neg, pedestall stuff * * Revision 1.2 1995/05/22 19:09:30 cdaq * (SAW) Split gen_data_data_structures into gen, hms, sos, and coin parts * Fix conflicting common block names. Add Cerenkov and Aerogel pedestals * * Revision 1.1 1995/04/06 20:18:01 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=event * * * HODOSCOPE PEDESTALS * replace sscin_all_ped_pos with float(shodo_pos_ped_sum/shodo_pos_ped_num) * if shodo_pos_ped_num > shodo_min_peds. * integer*4 shodo_pos_ped_sum2(snum_scin_planes,snum_scin_elements) integer*4 shodo_neg_ped_sum2(snum_scin_planes,snum_scin_elements) integer*4 shodo_pos_ped_sum(snum_scin_planes,snum_scin_elements) integer*4 shodo_neg_ped_sum(snum_scin_planes,snum_scin_elements) integer*4 shodo_pos_ped_num(snum_scin_planes,snum_scin_elements) integer*4 shodo_neg_ped_num(snum_scin_planes,snum_scin_elements) integer*4 shodo_num_ped_changes integer*4 shodo_changed_plane(2*smax_all_scin_hits) integer*4 shodo_changed_element(2*smax_all_scin_hits) integer*4 shodo_changed_sign(2*smax_all_scin_hits) real*4 shodo_ped_change(2*smax_all_scin_hits) real*4 shodo_new_sig_pos(snum_scin_planes,snum_scin_elements) real*4 shodo_new_sig_neg(snum_scin_planes,snum_scin_elements) real*4 shodo_new_ped_pos(snum_scin_planes,snum_scin_elements) real*4 shodo_new_ped_neg(snum_scin_planes,snum_scin_elements) * * CTPTYPE=parm * integer*4 shodo_min_peds integer*4 shodo_pos_ped_limit(snum_scin_planes,snum_scin_elements) integer*4 shodo_neg_ped_limit(snum_scin_planes,snum_scin_elements) * common/sos_scin_pedestals/ & shodo_pos_ped_sum2, !sum of squares & shodo_neg_ped_sum2, !sum of squares & shodo_pos_ped_sum, !sum of peds & shodo_neg_ped_sum, !sum of peds & shodo_pos_ped_num, !number of peds & shodo_neg_ped_num, !number of peds & shodo_pos_ped_limit, !max. allowed ped (reject hits during ped trig) & shodo_neg_ped_limit, !max. allowed ped & shodo_min_peds, !# of peds required to override default pedestals & shodo_new_sig_pos, & shodo_new_sig_neg, & shodo_new_ped_pos, & shodo_new_ped_neg, & shodo_num_ped_changes,!# of peds with 2 sigma change from param file. & shodo_changed_plane, & shodo_changed_element, & shodo_changed_sign, !1=pos,2=neg & shodo_ped_change * * * CALORIMETER PEDESTALS * replace scal_ped_mean with float(scal_ped_sum/scal_ped_num), * scal_ped_rms with (appropriate formula), * and scal_threshold with (something like) min(10.,3.*scal_ped_rms) * if scal_num > scal_min_peds. * * * CTPTYPE=event * integer*4 scal_pos_ped_sum2(smax_cal_blocks) integer*4 scal_neg_ped_sum2(smax_cal_blocks) integer*4 scal_pos_ped_sum(smax_cal_blocks) integer*4 scal_neg_ped_sum(smax_cal_blocks) integer*4 scal_pos_ped_num(smax_cal_blocks) integer*4 scal_neg_ped_num(smax_cal_blocks) integer*4 scal_num_ped_changes integer*4 scal_changed_block(2*smax_cal_blocks) integer*4 scal_changed_sign(2*smax_cal_blocks) ! 1=pos, 2=neg real*4 scal_ped_change(2*smax_cal_blocks) real*4 scal_new_ped_pos(2*smax_cal_blocks) real*4 scal_new_ped_neg(2*smax_cal_blocks) real*4 scal_new_rms_pos(2*smax_cal_blocks) real*4 scal_new_rms_neg(2*smax_cal_blocks) * * CTPTYPE=parm * integer*4 scal_min_peds integer*4 scal_pos_ped_limit(smax_cal_blocks) integer*4 scal_neg_ped_limit(smax_cal_blocks) * common/sos_cal_ped_stats/ & scal_pos_ped_sum2, !sum of squares & scal_neg_ped_sum2, !sum of squares & scal_pos_ped_sum, !sum of peds & scal_neg_ped_sum, !sum of peds & scal_pos_ped_num, !number of peds & scal_neg_ped_num, !number of peds & scal_pos_ped_limit, !max. allowed ped (reject hits during ped trig) & scal_neg_ped_limit, !max. allowed ped & scal_min_peds, !# of peds required to override default pedestals & scal_new_ped_pos, !(new) calculated pedestals. & scal_new_ped_neg, !(new) calculated pedestals. & scal_new_rms_pos, !(new) calculated rms. & scal_new_rms_neg, !(new) calculated rms. & scal_num_ped_changes,!# of peds with 2 sigma changes from param file & scal_changed_block, & scal_changed_sign, ! 1=pos, 2=neg & scal_ped_change * * GAS CERENKOV PEDESTALS * replace scer_ped with float(scer_ped_sum/scer_ped_num), * scer_ped_rms with (appropriate formula), * and scer_width with (something like) min(10.,3.*scer_ped_rms) * scer_ped_rms with (appropriate formula),if scer_num > scer_min_peds. * * CTPTYPE=event * integer*4 scer_ped_sum2(smax_cer_hits) integer*4 scer_ped_sum(smax_cer_hits) integer*4 scer_ped_num(smax_cer_hits) integer*4 scer_num_ped_changes integer*4 scer_changed_tube(smax_cer_hits) real*4 scer_ped_change(smax_cer_hits) real*4 scer_new_ped(smax_cer_hits) real*4 scer_new_rms(smax_cer_hits) * * CTPTYPE=parm * integer*4 scer_min_peds integer*4 scer_ped_limit(smax_cer_hits) * common/sos_cer_pedestals/ & scer_ped_sum2, !sum of squares & scer_ped_sum, !sum of peds & scer_ped_num, !number of peds & scer_ped_limit, !max. allowed ped (reject hits during ped trig) & scer_min_peds, !# of peds required to override default pedestals & scer_new_ped, & scer_new_rms, & scer_num_ped_changes,!# of peds with 2 sigma changes from param file & scer_changed_tube, !list of changed tubes & scer_ped_change !change in pedestal * * * AEROGEL CERENKOV PEDESTALS * replace saer_ped_mean with float(saer_ped_sum/saer_ped_num), * saer_ped_rms with (appropriate formula), * and saer_threshold with (something like) min(10.,3.*saer_ped_rms) * saer_ped_rms with (appropriate formula),if saer_num > saer_min_peds. * * * CTPTYPE=event * integer*4 saer_pos_ped_sum2(smax_aer_hits) integer*4 saer_neg_ped_sum2(smax_aer_hits) integer*4 saer_pos_ped_sum(smax_aer_hits) integer*4 saer_neg_ped_sum(smax_aer_hits) integer*4 saer_pos_ped_num(smax_aer_hits) integer*4 saer_neg_ped_num(smax_aer_hits) * * CTPTYPE=parm * integer*4 saer_min_peds real*4 saer_pos_ped_mean(smax_aer_hits) real*4 saer_neg_ped_mean(smax_aer_hits) real*4 saer_pos_ped_rms(smax_aer_hits) real*4 saer_neg_ped_rms(smax_aer_hits) real*4 saer_pos_threshold(smax_aer_hits) real*4 saer_neg_threshold(smax_aer_hits) integer*4 saer_pos_adc_threshold(smax_aer_hits) integer*4 saer_neg_adc_threshold(smax_aer_hits) integer*4 saer_pos_ped_limit(smax_aer_hits) integer*4 saer_neg_ped_limit(smax_aer_hits) * common/sos_aero_pedestals/ & saer_pos_ped_sum2, !sum of squares & saer_neg_ped_sum2, !sum of squares & saer_pos_ped_sum, !sum of peds & saer_neg_ped_sum, !sum of peds & saer_pos_ped_num, !number of peds & saer_neg_ped_num, !number of peds & saer_pos_ped_limit, !max. allowed ped (reject hits during ped trig) & saer_neg_ped_limit, !max. allowed ped & saer_min_peds, !# of peds required to override default pedestals & saer_pos_ped_mean, !calculated pedestal value & saer_neg_ped_mean, & saer_pos_ped_rms, !calculated pedestal width & saer_neg_ped_rms, & saer_pos_threshold, & saer_neg_threshold, & saer_pos_adc_threshold, & saer_neg_adc_threshold * * * LUCITE CERENKOV PEDESTALS * * * CTPTYPE=event * integer*4 sluc_pos_ped_sum2(smax_luc_hits) integer*4 sluc_neg_ped_sum2(smax_luc_hits) integer*4 sluc_pos_ped_sum(smax_luc_hits) integer*4 sluc_neg_ped_sum(smax_luc_hits) integer*4 sluc_pos_ped_num(smax_luc_hits) integer*4 sluc_neg_ped_num(smax_luc_hits) * * CTPTYPE=parm * integer*4 sluc_min_peds real*4 sluc_pos_ped_mean(smax_luc_hits) real*4 sluc_neg_ped_mean(smax_luc_hits) real*4 sluc_pos_ped_rms(smax_luc_hits) real*4 sluc_neg_ped_rms(smax_luc_hits) * real*4 sluc_pos_threshold(smax_luc_hits) * real*4 sluc_neg_threshold(smax_luc_hits) integer*4 sluc_pos_adc_threshold(smax_luc_hits) integer*4 sluc_neg_adc_threshold(smax_luc_hits) integer*4 sluc_pos_ped_limit(smax_luc_hits) integer*4 sluc_neg_ped_limit(smax_luc_hits) * common/sos_luci_pedestals/ & sluc_pos_ped_sum2, !sum of squares & sluc_neg_ped_sum2, !sum of squares & sluc_pos_ped_sum, !sum of peds & sluc_neg_ped_sum, !sum of peds & sluc_pos_ped_num, !number of peds & sluc_neg_ped_num, !number of peds & sluc_pos_ped_limit, !max. allowed ped (reject hits during ped trig) & sluc_neg_ped_limit, !max. allowed ped & sluc_min_peds, !# of peds required to override default pedestals & sluc_pos_ped_mean, !calculated pedestal value & sluc_neg_ped_mean, & sluc_pos_ped_rms, !calculated pedestal width & sluc_neg_ped_rms, * & sluc_pos_threshold, * & sluc_neg_threshold, & sluc_pos_adc_threshold, & sluc_neg_adc_threshold * * CTPTYPE=event * real*4 shodo_new_threshold_pos(snum_scin_planes,snum_scin_elements) real*4 shodo_new_threshold_neg(snum_scin_planes,snum_scin_elements) real*4 scal_new_adc_threshold_pos(smax_cal_blocks) real*4 scal_new_adc_threshold_neg(smax_cal_blocks) real*4 scer_new_adc_threshold(smax_cer_hits) * common/sos_adc_thresholds/ & shodo_new_threshold_pos, & shodo_new_threshold_neg, & scal_new_adc_threshold_pos, & scal_new_adc_threshold_neg, & scer_new_adc_threshold