Convolution of two pdf with variable bin

hey,
I want to convoluted two pdfs that have variable Bins ,(dont have equally space ),and the pdfs are producted by RooHistPdf.
but it have error: ERROR:Caching – The internal binning of variable phi is not uniform. The numerical FFT will likely yield wrong results.
so what can I do for this prpblem ;FFT cound not convoluted with variable bin?

 TFile * J =TFile::Open("deltaJ_new.root");
TFile * res =TFile::Open("Angres_newcut.root");
TH1F * hres =(TH1F*)res->Get("h1");
TH1F * Jd =(TH1F*)J->Get("Jd_2");

RooRealVar phi("phi","phi",0.01,2.60);

RooDataHist resDH("resDH","",phi,hres);
RooHistPdf  respdf("respdf","respdf",phi,resDH);

RooDataHist JdDH("JdDH","",phi,Jd);
RooHistPdf  Jdpdf("Jdpdf","Jdpdf",phi,JdDH);
RooFFTConvPdf conv_pdf("conv_pdf","",phi,Jdpdf,respdf);

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi @Kane_Jay ,
sorry for the high latency, I believe @moneta will be able to help.

Cheers,
Enrico

Hi,

Certainly the internal binning needs to be uniform.
Can you try adding this line :

phi.setBins(10000, "cache");

I could try it, but I would need your input data files

Lorenzo

Hi,
I will try it ,thank you!
Kane

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