Dear Expert:
I am trying to declare TF1 inside a class member and want to fit the signal by calling memebr function
void RsnAnalysisPostProcessing::fitFunction(TH1D *fMassHisto,Double_t lfit,Double_t hfit){
fitFcnSgBg = new TF1("voigtianppoly2",this,&RsnAnalysisPostProcessing::voignpoly2,lfit,hfit,7,"RsnAnalysisPostProcessing","voignpoly2");//,"RsnAnalysisPostProcessing","voignpoly2");
fitFcnSgBg->SetParameter(0,1000);//norm factor
fitFcnSgBg->SetParameter(1,1.520)
fitFcnSgBg->SetParameter(2,0.3);
fitFcnSgBg->SetParameter(3,0.0157)
fitFcnSgBg->SetParameter(4,1000);
fitFcnSgBg->SetParameter(5,1000);
fitFcnSgBg->SetParameter(6,1000);
fMassHisto->Fit(fitFcnSgBg,"REBMS+");
}
Double_t RsnAnalysisPostProcessing::voignpoly2(Double_t *x ,Double_t *par)
{
Double_t voig_poly2 =(par[0]*TMath::Voigt(x[0]-par[1],par[2],par[3],4))+(par[4]+par[5]*x[0]+par[6]*x[0]*x[0]);
return voig_poly2;
}
I am attached here the results of the fit:-
unnamed.pdf (65.2 KB)
It seem the fitting doesnot able to work properly. I am not able to find out what I am missing here. Any Suggestion?
ROOT Version: 6.26/10
Platform: Not Provided
Compiler: Not Provided