Deconvolution of multiple peak structure

When using convolutions with FFTs, you have to fulfil some conditions, especially that the function should fall to zero at the boundary. Otherwise, the discrete nature of the FFTs will create problems.

Here’s an introduction:
https://root.cern.ch/doc/master/classRooFFTConvPdf.html

Thanks.
I used RooNumConvPdf before the FFT.
And tried to constrain by using setConvolutionWindow. But there also, the fit was not good.

Is there some function I need to define to meet the boundary conditions.

Mansi

Not really. You can either make the fit range larger, or you increase the buffer zone that’s described in the documentation I linked. Also make sure to use enough bins as explained there.

The problem e.g. is that in the original spectrum, there begins another peak after 2550 keV so it is not possible to make the window wider nor it is possible to go to zero at the boundary.
Also below 1750 keV, the average bin contents is around 5 to 10, so not really zero.

Well, one could try to add a “constant background” term to the fit function. Though I’m afraid that the most right peak’s function term will still not go to zero at the right boundary.

Hi,

I tried to include the background + convolution model-

  RooRealVar t("t", "t", 1800, 2400); //1800 2500
   t.setBins(10000, "cache");
  RooDataHist* data = new RooDataHist("data", "data", t, Import(*decayEnergy));
  //landau function
  RooRealVar ml("ml", "mean landau", 2100, 1900, 2300); // 2100 1800 2400
  RooRealVar sl("sl", "sigma landau", 10, 10, 150);
  RooLandau landau("lx", "lx", t, ml, sl);
 //gaussian function
  RooRealVar mg("mg","mg",2100, 1800, 2500); //1800 2400,decayEnergy->GetMean()
  RooRealVar sg("sg", "sg",70 , 40, 150);//decayEnergy->GetRMS()
  RooGaussian gauss("gauss", "gauss", t, mg, sg);

//Background Model - 
  RooRealVar c("c", "c", 0,-1,2);
  RooRealVar c2("c2","c2",0 ,-1,2);
  RooPolynomial Pol("Pol", "Pol", t, RooArgSet(c,c2));

 RooFFTConvPdf lxgfft("lxg","landau (X) gauss",t,landau,gauss);
 RooAddPdf model("model",  "lxcg + background", RooArgList(Pol,lxgfft),coeff);

But, will not improve the fit. !
Screenshot 2020-06-15 at 10.55.52 AM|690x415

And what’s the question?

I assume it’s something like “How can I debug/create an FFT model that fits?”

  • Any warnings / diagnostics?
  • Do you have correlated parameters? If the correlation is very high, it’s impossible to find a good minimum.
  • Plot convolution and background model separately. See Components in https://root.cern.ch/doc/master/rf201__composite_8C.html
  • If the problem is the polyonmial, be aware that the polynomials can easily go negative, and the PDF would be undefined. The coefficients have to be chosen very carefully.
  • If it’s the FFT,
    • Plot its components. Check if there’s something weird.
    • Increase the buffer zone if one of its components doesn’t fall to zero at the edges of the convolution range.

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