[RF] RooHypatia2 Analytical integral integration
- [ ] Checked for duplicates
The PDF RooHypatia2 implemented in master has wrong commented code for the analytical integral.
The version copied and adapted of the function is somehow linked to an old version.
The Version i am using in my analysis has different evaluate() and analyticalIntegral implementation.
In attachment the class i am using for my analysis.
The function here seems to well behave for the analytical integral only when z=0,beta=0, lambda <-1 strictly
In the current master implementation some of the logics on the parameter and sigma,lambda interplay seems to be not implemented
The function here seems to well behave for the analytical integral only when
z=0,beta=0, lambda <-1 strictlyIn the current master implementation some of the logics on the parameter and sigma,lambda interplay seems to be not implemented
Hi, I'm also trying to use the analytical integral and I think the problem is that currently the RMS is used as the sigma parameter, but for z=0, beta=0, 0>lambda >-1 the RMS is infinity. In Ipatia2, the definition of sigma changes when lambda moves from (-oo,-1] to (-1,0). This actually could cause problems in the fit as the shape does not change smoothly. Similar behavior happens in the current version due to the definition change of sigma for zeta->0 and zeta=0.
The definition of sigma in the current version is inconsistent in the evaluate() function and analyticalIntegral function (though commented out). When beta=0, zeta=0, the analytical integral could work for -1<lambda<0, but the sigma is not the RMS. This need to be fixed either in the code, or in the documentation.
I suggest to update the analyticalIntegral code to be consistent with evaluate(). So the RMS will be:
beta=0, zeta=0, lambda<-1: non-standard student t pdf, RMS = sigma/sqrt(-2(lambda+1))beta=0, zeta=0, 0>lambda>-1: non-standard student t pdf, RMS is infinitybeta=0, zeta>0: RMS = sigma- other: RMS is complicated, as given in https://en.wikipedia.org/wiki/Generalised_hyperbolic_distribution
The user should use the pdf in two modes as the definition of sigma is different: 1) zeta=0, lambda<0; and 2) zeta>0. The analytical integral is provided for mode 1) when beta=0.
Hi @guitargeek , this is Dongliang. I tried to modify the RooHypatia2 code to make the analytical integral work. In the attached code, local_pdf/RooHypatia2.cxx and local_pdf/RooHypatia2.h are the modified code. And, local_pdf/RooHypatia2b.cxx and local_pdf/RooHypatia2b.h are the modified code with the class name also changed to enable a comparison with the default version. The script comparePdf.py is used to make the comparison and you should find the two curves (blue for the default one, and red dash for the modified) agree. I guess this means the analytical integral works?
Hypatia2_test.zip