How can I fit the skew-gaussian on the histogram plot. As one can notice in the attached plot, I tried to fit the gaussian curve but lots of counts are not covered by the gaussian.
I referred to the wikipedia page of skew-gaussia (Skew normal distribution - Wikipedia) but as the formula involves the integration, I don’t know how to implement it in ROOT.
No big deal with the integral, as you can also read on Wikipedia in the “Definition” section. You can formulate the PDF in terms of the error function, which is also available in ROOT or standard C++ (std::erf). With this script I can reproduce the figure from Wikipedia, for example:
Just want to mentioned that these curves are normalized. Hence, I added one more parameter, amplitude. Here is the function I used for fitting the histogram I mentioned in the question,