Adding a new fitter to SNOMAN is a relatively simple operation and the dummy fitter FT1 should be used as a template for this purpose. Below is a step by step guide to altering FT1.
As outlined in the User Manual each fitter comprises five routines and draws on two fitter specific include files and a fitter specific titles bank. All seven file names contain the FT* mnemonic e.g. all quad fitter routine names contain FTQ and all time fitter names have FTT. For FT1 these routines are:
FT1_COM.INC |
BANK_FT1.INC |
FT1_FITTER_INI.FOR |
FT1_FITTER.FOR |
FT1_FIT_EVENT.FOR |
FT1_FITTER_DEL.FOR |
FT1_FITTER_TRM.FOR |
The output of a fitter is stored in the data structure in two or three banks depending upon the nature of the fitter. The top level fitter bank is named FT* and holds 8 words of general information about the fit (may contain no. of PMTs used, fit probability, no. of iterations etc.). Hanging from this is the FT*V bank which holds the fitted vertex and time (if any) and their errors. If the fitter produces track information then this goes in the optional FT*T bank. If a fitter requires further data to be stored beyond that predefined for all fitters then this should go in one of the 3 banks above and the mnemonics set up in BANK_FT1.INC as described below. Additional banks may also be added, but this will not be dealt with here.
To add a fitter then follow these 8 steps:
Each of these steps is explained in a separate section below starting with a brief summary of the purpose of the routine then going on to list the code, what the code does and the modifications needed. Steps 5, 6, and 7 are not strictly required but are included to enable the user to made changes beyond the minimum needed to add a fitter.