recently time ,i fitted a datasample with the convolution of Breit-wigner and Gauss , then added exponential distribution.
after the fitting ,how can i get the final parameters.ie,sigmma,fwhm…
cheers!
this is my code (please check it ,any idea is welcome):
{
TFile *f = new TFile(“results.root”);
TH1F t12_m = (TH1F)f->Get(“t12_m”);
TF1 bw1 = new TF1(“bw1”,"[0][2]/((x-[1])(x-[1])+([2][2]/4))",60,130);
bw1->SetParameters(1500,91.138,2.3);
bw1->SetParNames(“Constant”,“Mean_value”,“Sigma”);
//t12_m->Fit(“bw1”,“R”);
TF1 gaus1 = new TF1(“gaus1”,"[3]exp( (-0.5(x - [0])(x - [0])) / ([1]*[1]) )",60,130);
gaus1->SetParameters(91.138,2.3,1500);
gaus1->SetParNames(“Constant”,“w”);
gaus1->SetLineColor(4);
//t12_m->Fit(“gaus1”,“R+”);
TF1 *exp1 = new TF1(“exp1”,“expo”,60,130);
exp1->SetParameters(0,3.5);
exp1->SetParNames(“Constant1”,“w1”);
exp1->SetLineColor(3);
//t12_m->Fit(“exp1”,“R+”);
TF1 bw =new TF1(“bw”,"bw1gaus1+expo",70,110);
bw->SetParameters(1500,91.138,2.3,91.138,2.3,1500);
bw->SetParNames(“Constant”,“Mean_value”,“Sigma”,“gaus1_massz”,“gaus1_error”,“gaus1_constant”,“Exp_constant1”,“Exp_constant2”);bw->SetLineColor(2);
t12_m->Fit(“bw”,“R+”);
t12_m->Draw();
}