Trying to use the line3Dfit.C tutorial file gives me some inconsistent results

Hi everyone (but @moneta in particular),
I’ve adapted the line3Dfit.C tutorial to obtain an estimation of the minimum resolution of a tracker (Mimosa or Adenium) at a certain coordinate. My code works, but a significant part (>~10%) of the fitted lines has weird equations and does not fit the points I generate. I tried to change the fit starting parameters and the steps of the fitter, with very poor results.
Any help is very appreciated! You can find a copy of the code I’m using and an image of the Graph2D with the lines attached.

Cheers,
Luca

fitted_lines.pdf (363.9 KB)
tracker_minimum_resolution.C (4.3 KB)

Let’s ping @moneta

Hi Luca,

The code is fine. You have a bug in drawing your fit lines.

l[i]->SetPoint(i,x,y,z);

should be

l[i]->SetPoint(j,x,y,z);

-Eddy

ps. you do realize that you are fitting 4 parameters to 6 data points …

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.