I am trying to fit two peaks and close to each others (channels 23 and 26),
with the help I could write the fitting function as gaussian and polynomials.
but still the fitting does not work perfectly.
I have wrote this fitting function. and the fitting result is attached. I tried to change the fitting edges but it is getting worse.
any assistance please.
TF1 *doublegaus= new TF1("doublegaus", "gaus(0) + gaus(3) + pol1(6)", 21., 27.);
doublegaus->Print();
doublegaus->SetParameter(0, 1000); //constant1
doublegaus->SetParameter(1, 23); //main1
doublegaus->SetParameter(2, 0.5); //sigma1
doublegaus->SetParameter(3, 700); //constant2
doublegaus->SetParameter(4, 26); //main2
doublegaus->SetParameter(5, 0.5); //sigma2
doublegaus->SetParameter(6, 0); //BG
doublegaus->SetParameter(7, 1000); //BG
h2_calibrated->Fit(doublegaus,"R0");
doublegaus->SetLineColor(kRed);
doublegaus->Draw("same");
fitting_cd.pdf (14.2 KB)
_
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided