Fit Statistics

From: Alexey Toptygin (alexeyt@mind.umd.edu)
Date: Fri Jan 14 2000 - 00:45:14 MET


Hi,
If you create a histogram with 2 or more functions, how do you get the fit
statistics to correspond to a particular function?
For Example, I do:

TFile file("Science.root");
gStyle->SetOptStat(1110);
gStyle->SetOptFit(73);
TCanvas *can;
TH1F *hist;
TF1 *fn,*lim;
Double_t parm[3];
Float_t width = 1.5;

can = new TCanvas("canvas","Canvas",700,500);
bgoir.Draw("val01","val01>10&&val01<99&&lay==0&&cry==15");
hist = (TH1F*)can->GetPrimitive("htemp");
hist->Fit("gaus");
fn = hist->GetFunction("gaus");
fn->GetParameters(parm);
lim = new TF1("limited","gaus",parm[1]-width*parm[2],parm[1]+width*parm[2]);
hist->Fit("limited","R0+");

I get the stats for gaus, and I want to see the fit parameters for
limited, not gaus?
				Thanks
				Alexey



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET