Dear All,
after posting too many inquires here, I could with your help to obtain a good fitting for the alpha peak I am analyzing.
herein the final script
TF1 *gausBi1= new TF1("gausBi1","gaus",80,220);
gausBi1->SetLineColor(kGreen);
coin_timeBi->Fit(gausBi1, "R0");
TF1 *gausBi2= new TF1("gausBi2","gaus",220,1100);
gausBi2->SetLineColor(kBlue);
coin_timeBi->Fit(gausBi2, "R0+");
TF1 *gausBi1_gausBi2 = new TF1("gausBi1_gausBi2", "(x < 220) * gausBi1 + (x >= 220) * gausBi2", 80., 1100.);
coin_timeBi->Fit("gausBi1_gausBi2","R");
Double_t xmin = gausBi1_gausBi2->GetXmin();
Double_t xmax = gausBi1_gausBi2->GetXmax();
Double_t IntegralBi=(gausBi1_gausBi2->Integral(xmin,xmax))/Bin_widthBi;
Double_t IntegralErrorBi=(gausBi1_gausBi2->IntegralError(xmin,xmax,0,0,1E-2))/Bin_widthBi;
Double_t MeanBi = gausBi1_gausBi2->Mean(xmin, xmax);
Double_t SigmaBi = TMath::Sqrt(gausBi1_gausBi2->Variance(xmin, xmax));
cout << "MeanBi = " << MeanBi << endl;
cout << "SigmaBi = " << SigmaBi << endl;
cout << "IntegralBi = " << IntegralBi<<"+-"<<IntegralErrorBi<< endl;
fit1.pdf (17.6 KB)
I wonder now how can I find the error propagation the mean and sigma values, is there a direct method using root?
your help is always appreciated.