Re: [ROOT] fitting 2 datasets simultaneously

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Sep 25 2002 - 23:02:59 MEST


Hi Michel,

You can do this by using Minuit directly as illustrated in the
test program at $ROOTSYS/test/minexam.cxx.
Define a function FCN computing the sum of the two chisquares
with the funcions f_A and f_B defined as you indicate.

If you need more help, please send me a short script
creating your two sets of points and also with the definitions
of f_A and f_B + the initial values for the parameters.

Rene Brun

On Wed, 25 Sep 2002, [iso-8859-1] Michel Perrin wrote:

> 
> 
>        Hi Rooters,
> 
>   I need to simultaneously fit two independent data
> sets :
> 
>       A:(xa_i,ya_i), i=0...N_A 
> 
>       B:(xb_j,yb_j), j=0...N_B
> 
>   with two similar functions :
> 
>   f_A(p_A, par0, par1,...,parn) to describe data set A
> 
>   f_B(p_B, par0, par1,...,parn) to describe data set B
> 
> The two functions have the same expression, and share
> the same parameters : they differ by only one 
> parameter (the first one). Of course I can fit
> independently A with f_A and B with f_B. But what I
> need is the common parameters values (par0,... parn)
> and values of (par_A, par_B) that fit simultaneously 
> the two datasets, i.e. that minimize the combined 
> chisquare (sum of the 2 chisquares).
> 
> I have tried different methods (and sometimes
> awful tricks) with Root but failed to write
> a working program.
> 
> Is there an easy way to do this with Root ?
> 
> Michel
> 
> 
> 
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
> 



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