Using the skew normal distribution or Owen's T function

Hello,

I was looking into using either the skew normal distribution or Owen’s T function with TF1 and I found your page https://sft.its.cern.ch/jira/browse/ROOT-5106. From the page it looks like it should now be supported in ROOT’s TMath? If so, I am using ROOT v6.18/00 but I am having difficulty finding documentation on using these functions. Installing the Boost library and imitating steps found here, I was able to

root [0] #include <boost/math/special_functions/erf.hpp>
root [1] using namespace boost::math;
root [2] TF1 skewNormal("skewNormal", "pdf(skew_normal([0], [1], [2]), x)")
(TF1 &) Name: skewNormal Title: pdf(skew_normal([0], [1], [2]), x)

But is this the extent that the Boost library is used in ROOT?

Hi,

Your code will work fine if you include the right header file from Boost and you have it in your include path.
For example:

#include <boost/math/distributions/skew_normal.hpp>
using namespace boost::math;
TF1 skewNormal("skewNormal", "pdf(skew_normal([0], [1], [2]), x)",-3,3);
skewNormal.SetParameters(0,1,2); 
skewNormal.Draw();

Or in the case of the Owens T function:

#include "boost/math/special_functions/owens_t.hpp"
using namespace boost::math;
TF2 owensT("owenst","owens_t(x,y)",-5,5,-5,5);
owensT.Draw("CONTZ");

As far you include the correct files that can be parsed by Cling you can use any external functions.
In some cases if the implementation is in a library, you might need to load that library

Lorenzo