Dear ROOTers,
We defined a RooDataHist like following. Bin errors are set by an array. But when perform the fit we find that errors is set to poisson errors automatic. That means the results will not change when we change the input bin errors. Who can tell me how to fit RooDataHist with our input errors? Thanks!
double costheta[19] = {-0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.0,
0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9};
double num[19] = {97.9303,79.9721,64.0475,47.2125,67.8041,66.9418,39.2421,15.5514,34.8678,40.4425,52.4124,68.5636,59.2562,63.1224,41.115,43.1246,61.5914,67.7323,77.1489};
double numerr[19] = {19.0372,15.4138,15.8855,13.4445,16.1578,15.5069,14.0996,12.5128,13.6687,16.7594,15.2767,16.2664,15.6253,15.44,14.6369,14.215,14.6403,14.466,17.7352};
TH1F *DaHknew = new TH1F("DaHknew", "DaHknew", Nbin, up, lo);
double nsum=0;
for (int ibin=0; ibin<19; ibin++) {
DaHknew->SetBinContent((ibin+1), num[ibin]); DaHknew->SetBinError((ibin+1), numerr[ibin]); nsum+=num[ibin];
RooDataHist* rHKnew = new RooDataHist("rHKnew", "Knew mass(GeV)", costm, DaHknew);
...
RooAddPdf model("model", "model", RooArgList(helilam2, helilam0), ratio);
model.fitTo(*rHKnew,Save());
...
-- With my best wishes, Jianming Bian Experimental Physics Center, Institute of High Energy Physics(IHEP), Chinese Academy of Sciences P.O.Box 918-1 Beijing, 100049 P.R.ChinaReceived on Wed Jan 12 2011 - 04:31:11 CET
This archive was generated by hypermail 2.2.0 : Wed Jan 12 2011 - 05:50:01 CET