Finding weights with TFractionFitter

Hi,

I’m running ROOT 4.00/08 under a Linux RH9 and gcc 3.4.2.
I’m using TFractionFitter to fit a TH1 experimental data histogram as the sum of three Monte Carlo sources. I’m using the follow example, that works very well. But I know that the histogram corresponding to the total Monte Carlo prediction is not the same as a simple weighted sum of the input Monte Carlo distributions. My problem is how to find the weights, in such way I can multiply each MC histogram and than, sum all three in order obtain the exp. data histogram?

{
TH1F *data;
TH1F *mc0;
TH1F *mc1;
TH1F *mc2;

TObjArray mc = new TObjArray(3);
mc->Add(mc0);
mc->Add(mc1);
mc->Add(mc2);
TFractionFitter
fit = new TFractionFitter(data, mc);
fit->Constrain(1,0.0,0.0);
fit->SetRangeX(1,34);
Int_t status = fit->Fit();
cout << "fit status: " << status << endl;
if (status == 0) {
TH1F* prediction = (TH1F*) fit->GetPlot();
data->Draw(“Ep”);
prediction->Draw(“same”);
}
}

Thanks for any help,

Sergio

Dear Sergio,

strictly speaking, it’s incorrect to speak about weights per MC source: it is the individual bins in the MC templates that are fluctuated according to (Poisson) statistics.

You can use the

method to obtain the “fluctuated” histograms.

                                         Regards
                                           Frank

Dear Frank,

Thanks for your answer. Yes, you are right. But what was trying to say is that what I need are some parameters (w) in order to have “data = w1MC1 + w2MC2 + w3*MC3”, like the Minuit. I don’t know if I’m using the best option (TFractionFitter). Besides I’ve tried what you told me, but I can’t access the value, only something like 0x9049158.

Thanks,

Sergio

Dear Sergio,

the method that I pointed you to does not return a weight, but rather the fluctuated histogram.

Now, the weights you’re after can be obtained from these fluctuated histograms combined with the fit results (the template fractions), as

[i]weight[i] = fraction[i] * integral[data] / integral

where the integral[] terms are simply the integrated bin contents for either your (fluctuated) template histogram or the data histogram. Note that this assumes you’re
not using a priori weights; otherwise, you have to account for these explicitly.

Regards,
Frank