Hi,
I am quite new to roofit and Root in general. I am trying to fit some energy depostion and compare the best case between models. I require to test the best fit between the convolution of a landau & Gaussian or a Vavilov & Gaussian and the data.
I managed to do the fitting with the Landau (X) Gaussian but I am stuck at the Vavilov (X) Gaussian.
I tried to follow Vavilov - Gaus Convolution with RooFit topic which allowed me to get VavilovGaussian.pdf (54.2 KB)
However, the Math::Vavilov is not adapted i think to my case due to it lacking the ability to be shifted and working on non normalized data.
I had this other Vavilov implementation which allows me to not normalize my data:
struct Vavilov_Func {
Vavilov_Func() {}
double operator() (const double *x, const double *p) {
double kappa = p[0];
double beta2 = p[1];
return p[4]*( pdf.Pdf( (x[0]-p[2])/p[3], kappa,beta2) );
}
ROOT::Math::VavilovAccurate pdf;
};
While I knew how to use it to get a TF1 I have no idea how to use this in Roofit to get a RooAbsPdf to then proceed with convolution.
Here is my codeTest.C (6.2 KB)
I would appreciate any help on this task!
Thanks in advance,
Florian