Not getting right mean and sigma from the distribution

Yes I read it. When I change 0 to 1 and change function gaus(0)+pol2(3) or gaus(0)+pol3(3) but it seems that it does not get right mean. Do not I expect mean at top point of the function?

I made this changes in the same code that you send me

TF1 *f = new TF1(Form(“template_function_PP_MB_pt_%02d”, ipt),
// “gaus(0)+pol2(3)”, 1., 2.7); // 1.059 1.90 is good
"gaus(0)+pol3(3)", 1.058, 2.20); // 1.059 1.90 is good
f->SetLineColor(kRed);
f->SetLineWidth(2);

// “reasonable” initial values for ALL parameters are really important
f->SetParameter(0, 3000.);
f->SetParLimits(0, 10., 10000.);
f->SetParameter(1, 1.4);
f->SetParLimits(1, 1., 2.);
f->SetParameter(2, 0.2);
f->SetParLimits(2, 0.01, 1.);

#if 1 /* 0 or 1 /
f->FixParameter(3, 0);
#else /
0 or 1 /
f->SetParameter(3, 0);
// f->SetParLimits(3, -10000., 10000.);
#endif /
0 or 1 */
f->SetParameter(4, 0.);
// f->SetParLimits(4, -10000., 10000.);
And when I checked me an and sigmas it did not show the right ones? Did I missunderstand you? What is my mistake?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.