Hi,
You access the result of the fit via
TF1 *func = htemp->GetFunction("pol1");
double p0 = func->GetParameter(0);
double p1 = func->GetParameter(1);
Rene Brun
Gunasingha Rathnayaka wrote:
>
> Hi,
> I am drawing a profile and do a linear fitting using "pol1". I can
> read the value of p0 and p1 from the graph when I do the fitting.
> this is what I am doing.
>
> ntuple->Draw("yvalue:xvalue","cond1==7&&cond2==3","profs")
> htemp->Fit("pol1")
> htemp->GetEntries()
>
> How can I get values of p0 and p1 ( constant and slope) in
> The same way I get htemp->GetEntries() { without looking at plot}
>
> When I hit tab it gives me all the option for htemp->Get , but I could
> not find anything for p0 and p1.
>
> I am using ROOT Version 3.10/01 in REDHAT8 machine ( gcc3.2) machine.
>
> Thank you,
>
> Gunasingha
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET