Hello,
I am trying to figure out how to print out specific central values from bins in RooFit. As in I have
TH1F* h1001; //data
TH1F* h2001; //background estimation 1
TH1F* h2002; //background estimation 1
RooRealVar x("x","x",-8,2);
RooDataHist data("data","data",x,h1001);
RooDataHist bg1("bg1","bg1",x,h2001);
RooDataHist bg2("bg2","bg2",x,h2002);
RooHistPdf bg1Pdf("bg1Pdf","bg1Pdf",x,bg1);
RooHistPdf bg2Pdf("bg2Pdf","bg2Pdf",x,bg2);
RooRealVar Nbg1("Nbg1","Nbg1",1000000,0,10000000);
RooRealVar Nbg2("Nbg2","Nbg2",650000,0,5000000);
RooAddPdf sum("sum","sum", RooArgSet(bg1Pdf,bg2Pdf), RooArgSet(Nbg1,Nbg2));
RooFitResult fit = sum.fitTo(data,Extended());
is there anyway to retrieve the value of a specific bin with it’s error after the fit similarly to something like
TH1F*h1001;
Int_t bin;
cout<<h1001->GetBinContent(bin)<<endl;
cout<<h1001->GetBinError(bin)<<endl;
Thanks for any help,
George Bassett