Fitting 2 histograms at once

Does anyone know if it is possible to fit 2 histograms at once and force both of the fits to arrive at the same value for one particular fit parameter without fixing that parameter (so as to have an error on that parameter that is non-zero)?

thanks

Are you performing a chi2 fit?
chi2 is a sum and therefore one can combine two chi2s simply by adding them and then minimise the total chi2.

Cheers,
Oliver

If I understand correctly, you want to do a combined fit of two histograms? Maybe there is an easier way, but in the past I’ve used TMinuit::SetObjectFit() to pass in the histograms inside a TObjArray. Then you have to define your own chi2 function and call TMinuit::SetFCN(). Inside the function you do something like this:

nphvtof* data = dynamic_cast<nphvtof*>(gMinuit->GetObjectFit());

This passes back your data. I thought one of the fitting tutorials discussed the latter point, but maybe I’m wrong.

Hope this helps

Mike Kordosky