using TFractionFitter class

From: nasim <>
Date: Sun, 19 Feb 2006 13:28:35 +0000 (GMT)


I would like to use TFractionFitter class to find the fraction of background events and signal events in the data.

Therefore I fited the data with background mc and signal mc.  

 I used GetPlot() function to fit data with MCs and ploted the fitted histogram. But I do not know how to find the actual fraction value of background and signal. ( for example I would like to have output in this from: 0.9 signal and 0.1 background).

I think I should use GetResult function. But I don' t know how?

Thanks for any help,


 finalsum1->Add(energy_dis[0],addingsum_wbi207,1,-1);  TObjArray *mc=new TObjArray(2);

 TFractionFitter* fit=new TFractionFitter(finalsum1,mc);  Int_t status=fit->Fit();
 cout<<"fit status: " <<status<<endl;

 if (status == 0) {                       // check on fit status
   TH1F* result= (TH1F*) fit->GetPlot();    finalsum1->Draw("E");
  //fit->GetResult(1, 1.68363e-01,5.18030e-02);

} Received on Sun Feb 19 2006 - 14:29:25 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET