Mathematical Framework for Fast and Rigorous Track Fit for the ZEUS Detector