About RooKetsPdf problems

Dear experts,
I’d like to use a RooKeysPdf to get a MonteCarlo shape pdf,as below:

and use it fit data in the Range of [0.985,1.15], but it will print many messages as below:

got point below lower bound:0.97675 < 0.985 -- performing linear extrapolation... got point above upper bound:1.15825 > 1.15 -- performing linear extrapolation... got point below lower bound:0.982422 < 0.985 -- performing linear extrapolation... got point above upper bound:1.15258 > 1.15 -- performing linear extrapolation... got point below lower bound:0.979586 < 0.985 -- performing linear extrapolation... got point above upper bound:1.15541 > 1.15 -- performing linear extrapolation... got point below lower bound:0.978168 < 0.985 -- performing linear extrapolation... ..........
Although it can fit data successfully,I want to know how to correct my script ?
Besides, what’s mean of the option ‘RooKeysPdf::MirrorBoth’? if I use ‘RooKeysPdf::MirrorLeft’ or ‘RooKeysPdf::MirrorRight’ ,it can’t fit data successfully!

Thanks a lot!

Hi, I have met this problem recently. Have you solven it?

Hi never2338,

This problem is related to the convolution operation, see as below:

RooDataSet sigset(“sigset”, "sigset ", t_sig, x,“phim_re>0.985&&phim_re<1.135”);
RooKeysPdf MCshape(“MCshape”, “MCshape”, x, sigset, RooKeysPdf::MirrorBoth, 1);
RooRealVar mean("mean ",“Mean of Gaussian”, 0.000851, -0.005, 0.005) ;
RooRealVar sigma(“sigma”,“sigma of Gaussian”,-0.00055 , -0.1, 0.1) ;
RooGaussian gauss(“gauss”,“gauss”, x, mean, sigma);
x.setBins(10000,“cache”);
RooFFTConvPdf sig(“sig”, "signal pdf ", x, MCshape, gauss);
sig.setBufferFraction(0.2);
sig.setBufferStrategy(2);

because the convolution operation will make the conveoluted pdf exceed the initial range.

Best regards,

Ok, thanks a lot.:smile: