Convolution between Gaus and power function

Dear All
I have an alpha peak need to apply a proper fitting function, and because alpha peak is not well Gaussian peak. but rather a Gaussian + tail on the left.
I have created two fitting functions
Power for the tail range and Gaussian for the peak as follows

TF1 *fPower = new TF1("fPower","[0]*TMath::Power(x,(1/[1]))", 80,250); 
fPower->SetParameters(10000, 68); 
f->Fit("fPower", "R"); 

TF1 *gausBi= new TF1("gausBi","gaus",200,1300);
f->Fit(gausBi, "R+");

Next step I am trying to formulate this in one function for the full range, or what refer to convolution.
so I build this new function and called the initial parameters as follows

TF1 *fPower_gausBi = new TF1("fPower_gausB", "fPower+gausBi", 80, 1200);
 Double_t par[5];

f->Fit(fPoisson_gausBi, "R+");

But this not make fitting in two ranges that’s why I get the wrong fitting curve (Red line).

any suggestion for the convolution process ??
fit.pdf (17.2 KB)


Why not using the cristal ball function

that is available in ROOT as

TF1 f1("f1","crystalball")

or as ROOT::Math::crystal_ball

an example is available at

Thank you for this suggestion, I tried crystalball function, but it did not work and because it is difficult to control the parameters I choose to do it manually by convolution between two functions.

thank you


  TF1 *fPower_gausBi = new TF1("fPower_gausB", "(x < 222.) * fPower + (x >= 222.) * gausBi", 80., 1300.);


  TF1 *fPower_gausBi = new TF1("fPower_gausB", "TMath::Min(fPower, gausBi)", 80., 1300.);

BTW. A sum of two functions is NOT their “convolution”.

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