Starting point for RooMinuit


How can I perform a chi2 fit, starting from a specific point?

// pdf - my PDF function with a variables set to a starting point of the fit
RooChi2Var *chi2 = new RooChi2Var("chi2","chi2",pdf,data);
RooMinuit m(*chi2);
m.migrad();   // the starting point is ignored here!!!

I had a look to different constructors, and I did not find ANYTHING. It seems I cannot event perform a direct calls to RooMinuit::setPdfParamVar()!

So, how can I do a fit from my own starting point?

Thanks in advance,


The initial value of the RooRealVar’s is used as the starting point to fits (if you only specify a range, the middle of this range defines the initial value). I also think that the range is used to estimate the inital error/step for the fit algorithm.

– Gregory


Gregorys point on the starting values is correct. If variables have associated errors set with them (either from a previous minimization or through setError()) then those will be used as initial step size. In the absence of that a step size of 1/10 of the defined range will be used.