#include "TGraphErrors.h" #include "TCanvas.h" #include "TH1D.h" #include #include void Fit_Conf() { const Int_t n = 10; Double_t x[n] ={0}; Double_t y[n]={0.0}; Double_t ex[n]={0.0}; Double_t ey[n]={0.0}; ifstream in("Both344and244.txt"); if(!in) { cout << "Cannot open input file!!!" << endl; } if(in){ for(int i = 0; i> x[i] >> y[i] >> ey[i]; } in.close(); } for(int i = 0; iSetLineColor(kRed); fit->SetParameters(0.5, 1.0, 7.0, 7.0); p->Fit(fit, ""); p->SetName("Stopbranch"); p->SetTitle("Startbranch"); p->Draw(); //Confidence Onterval const double xx[n] = {1., 2., 3., 4., 5., 6., 7., 8., 9, 10.,}; double ci[n] = {0., 0., 0., 0.,0., 0., 0., 0.,}; (TVirtualFitter::GetFitter())->GetConfidenceIntervals(n, 1,&xx[0], &ci[0], 0.68); } }