Hi Martin, Could you send me a file with your TProfile2D and also clarify which version of Root? Rene Brun On Wed, 9 Apr 2003, Martin Schroedter wrote: > Hello, > > I am reasonably sure that the fitting of 2-d function in TProfile2D > does not work correctly. The fit is wrong and the combined plot that is > automatically produced is a black-white 2-d scatter plot. All further > calls to hprof2d->Draw("cont") produce black and white 2-d scatter > plots. > > In general, how does one go about doing multidimensional fitting in > ROOT? > > Thank you, > Martin > > hprof2d = new TProfile2D("hprof2d","Width ",40,2,6,40,0,1,-1,2); > tree->Draw("energy:width:size>>hprof2d"); > TF2 *func2 = new TF2("func2",fitf2d,2,6,0,1,3); > func2->SetParameters(-2,.7,.1); > hprof2d->Fit("func2","r"); > > Double_t fitf2d(Double_t *x, Double_t *par) > { return par[0]+par[1]*x[0] + par[2]*x[1]; } >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET