Re: [ROOT] Fitting histograms to experimental data

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 08 2002 - 10:55:33 MET


Hi Emily,

In your fit function that you specify to TH1::Fit, you can use
an histogram and return the bin content corresponding to a given x.
  If you have a TH1 *h, do
  Int_t bin = h->GetXaxis()->FindBin(x);
  return h->GetBinContent(bin); //function return value

Rene Brun

Emily Nurse wrote:
> 
> Hello,
> I was just wandering if it possible to use the fit class to fit a
> histogram to some experimental data points or does it have to be a
> continuous function? Would I have to work chi-squared out point by point
> in a programme?
> Thanks for your time,
> Emily.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET