next up previous contents
Next: Quad Fitter Up: The Fitters Previous: FTx_FITTER_TRM   Contents

Time Fitter

The routine FTT_FIT_EVENT.FOR contains the time fitter. This fitter currently makes use of software distributed along with the textbook Numerical Recipes[11]. This is of course copyrighted software and we have no authority to distribute it, so in the interest of justice to the authors and obeying the law, all members of SNO who have not already done so should purchase a copy of this book (if you don't have one you should anyway, it is a wonderful reference) or else write your own fitter. The current version of the fitter is very primitive, it assumes that photons move from a point within the detector to the PMTs without any refraction, reflection, or scattering. An attempt is made to exclude obviously out of time hits (due to scattering or noise) from the fit. If this feature is enabled (by setting the second entry in the TFTT titles bank to 1), the fitter will cut the farthest out of time hit and then re-fit. It will continue until either all hits are within the independently adjustable early and late windows, or until the maximum number of hits have been cut (all these parameters can be set in the TFTT bank). Although less than perfect, the fitter will suffice for the moment.

One of the tasks FTT_FITTER_INI has to do is to read in the titles bank TFTT, which contains a software threshold. When called to process, FTT_FITTER loops over all events and passes each to FTT_FIT_EVENT which starts by checking that the number of hit PMT's exceeds this threshold. If so, the times and numbers of these PMT's are loaded into local arrays (no use is currently made of the amplitude of the PMT pulse). A software threshold (which may be different from the hardware threshold) is supplied, events which hit fewer than this number of PMT's are assigned a chi2 of -1 and no fit is attempted. These arrays are then handed to the Numerical Recipes routine FTT_MRQMIN, which uses Numerical Recipes routines FTT_MRQCOF, GAUSSJ, and COVSRT along with a SNOMAN subroutine FTT_FIT01. The four fit parameters are the X,Y,Z and time coordinates of the event. FTT_FIT01 calculates the expected hit time for a given PMT given the current values of the fit parameters and the derivative of the hit time with respect to these parameters. The Numerical Recipes routines then apply the Levenberg-Marquart nonlinear least-squares algorithm (for a description see Numerical Recipes) to find the best fit vertex position and time. Events which fail the fit produce pathological error matrices, such events are assigned a chi2 of -2, and the fit is abandoned. The fitter also finds the direction of the event by finding the vector from the fitted position which gives the least squared deviation from the sum of the vectors to the fit PMT's.


next up previous contents
Next: Quad Fitter Up: The Fitters Previous: FTx_FITTER_TRM   Contents
sno Guest Acct 2009-09-09