subroutine hec_evt c c process event c c 1- fill adc values for the different coordinate systems c 2- produce useful trigger words c 3- produce useful tdc value c 4- produce pedestals for the event c 5- fill preferred pedestals and rms c 6- find max adc and time using cubic fit c 7- find max adc and time using digital filtering c 8- fill preferred max adc and time c 9- reconstruct beam particle trajectory c 10- produce calibrated channel values (in nA) c 11- prepare the search package c implicit none c include'hec_par.inc' !shared parameters include'hec_datacard.inc' !datacard values c c adc values in the adc channel system (ic) are directly read c from testbeam data. c fill the adc values arrays for c - the database system (db) c - the physics system (ph) c call hec_adc_fill c c process trigger bits from pattern units and produce useful c trigger words to be found in hec_trig.inc c call hec_trig_evt c c produce useful tdc value c call hec_tdc_evt c c produce pedestals for the event (if requested) c and fill preferred pedestals and rms c if (mk_ped .eq. 1 .or. mk_ped .ge. 3) call hec_ped_evt call hec_ped_fill c c find max adc and time using simple cubic fit c if (mk_cub .gt. 0) call hec_cub_evt c c find max adc and time using digital filtering c if (mk_dig .gt. 0) call hec_dig_evt c c fill preferred max adc and time c call hec_max_fill c c reconstruct beam particle trajectory, if required c if (mk_beam .gt. 0) call hec_beam_fit(1) c c fill energies using signal maxima and calibration file c fill the arrays for c - the channel system (ic) c - the database system (db) c - the physics system (ph) c if (io_cal(1) .ge. 1) call hec_cal_evt c c prepare searching array c if (hec_s_dk .ge. 0) call hec_search_evt c end