Simultaneous Fits

Hi,

So I have 2 data sets from 2 detectors say. The signal in both of these detectors is the same, sr, but the background varies, br1 and br2. The signal and the background are both in the form of TGraphs. The datasets are in TGaphAssymmErrors.

How do I simultaneously fit both these detectors’ data?

If I had just one detector I would have done something like:

TGraphAsymmErrors result = (TGraphAsymmErrors)f2->Get((“Det1”));
result->Fit(“ftot”,“emrvll+”);

where ftot is defined as :
TF1 *ftot = new TF1(“ftot”,ftotal,25,40,2);

and ftotal is defined as:
Double_t ftotal(Double_t *x, Double_t *par) {
sr= Signaltgraph->Eval(x);
br1= BackGrndtgraph->Eval(x);

return sr+br1;

}

I could do this for each detector and add numbers in quadrature; but I want to simultaneously fit both detectors.

Any ideas?

Thanks!

  • Sujeewa

Do you need something like Fitting multiple hist/graph joined by a common parameter ?
See /viewtopic.php?t=8582&highlight= as well