# How to obtain the Actual Peak position from RooFFTConvPdf

Dear Experts:
Hi, i encountered a problem of obtaining the peak position from the convolution PDF.
For example, i am using a Landau*Gauss convolution pdf to fit the histogram.
and by lgpdf->getVariables(), i can get the peak position of the landau pdf.
But this is different from the actual peak of the convoluted pdf.

My question is how to obtain the REAL peak position, and the error of it ?
any hints will be appreciate

Hi,

Assuming you have the Gaussian mean already fixed to zero, this happens
because the ‘mean’ parameter of TMath::Landau is only an approximation
of the MPV of the Landau (see earlier ROOT Forum thread on this issue here
root.cern.ch/phpBB2/viewtopic.php?p=29116)

To numerically find the function maximum you can do this following

RooAbsReal* dldx = landau->derivative(x) ;
Double_t xpeak ;
Bool_t ok = RooBrentRootFinder(RooRealBinding(*dldx,x)).findRoot(xpeak,xmin,xmax,0.) ;

where landau is your landau function (or your convolution, but given that these should
give the same answer, the calculation on the plain landau should be faster), x is
your observable and xmin,xmax are the minimum and maximum of x (or some smaller range that you are confident brackets the true peak position). The numerically found
peak value will be stored in xpeak.

Wouter

[quote=“Wouter Verkerke”]Hi,

Assuming you have the Gaussian mean already fixed to zero, this happens
because the ‘mean’ parameter of TMath::Landau is only an approximation
of the MPV of the Landau (see earlier ROOT Forum thread on this issue here
root.cern.ch/phpBB2/viewtopic.php?p=29116)

To numerically find the function maximum you can do this following

RooAbsReal* dldx = landau->derivative(x) ;
Double_t xpeak ;
Bool_t ok = RooBrentRootFinder(RooRealBinding(*dldx,x)).findRoot(xpeak,xmin,xmax,0.) ;

where landau is your landau function (or your convolution, but given that these should
give the same answer, the calculation on the plain landau should be faster), x is
your observable and xmin,xmax are the minimum and maximum of x (or some smaller range that you are confident brackets the true peak position). The numerically found
peak value will be stored in xpeak.

Wouter[/quote]