Re: fitting,..

Rene Brun (Rene.Brun@cern.ch)
Fri, 13 Mar 1998 17:15:59 +0100


Selim Issever wrote:
>
> Dear all,
>
> I measured lots of pairs of values (a rate versus time) and ploted them
> against each other in a 2d histogram. Everything was fine, but now I want to
> fit the time behaviour of the rate and dont exactly know how,..
>
> the problem is, that I have a 2d histgram but want to fit a 1d function,.. do
> I now have to refill (and double) all my data into arrays and then follow up
> the example 'Example of a program to fit non-equidistant data points' or is
> there another,.. easier,.. more elegant way to do this job?
>
> ThanX in advance for any help!
> Best Wishes
> Selim

What you describe is the job of profile histograms (see TProfile)
Replace TH2 by TProfile and use TProfile::Fit.

Rene Brun