How to plot generalized hypergeometric function in ROOT?

Click For Summary

Discussion Overview

The discussion revolves around plotting the generalized hypergeometric function 0F3(;4/3,5/3,2;x) using the ROOT framework. Participants explore challenges related to defining and visualizing this function, as well as the applicability of ROOT for such tasks.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant seeks assistance in plotting the generalized hypergeometric function using the TF1 class in ROOT.
  • Another participant suggests checking ROOT's official website and forums for tutorials and community support regarding hypergeometric functions.
  • Several participants inquire about the specific difficulties faced, particularly whether the challenge lies in generating the function or in drawing it.
  • There are suggestions to either find a closed form of the function or to use approximations by limiting the number of terms in the infinite series.
  • One participant expresses the necessity of using ROOT for fitting parameters with experimental data, indicating prior experience with ROOT for fitting tasks.
  • A later reply proposes using a custom PDF in RooFit, noting that a closed form is not required as long as the function can be evaluated for any argument.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach to plot the hypergeometric function in ROOT, and multiple viewpoints regarding the challenges and potential solutions remain present.

Contextual Notes

Participants mention the difficulty in finding a closed form for the hypergeometric function and the limitations of approximating infinite sums, highlighting the complexity of the mathematical representation involved.

Sandeep Hundal
Messages
9
Reaction score
0
Hello everyone
I am trying to write code in ROOT.I want to plot generalized hypergeometric function pFq with p=0 and q=3 i.e I want to plot 0F3(;4/3,5/3,2;x) as a function of x using TF1 class.I am not getting how to plot this function in ROOT.Kindly help me out.
Thanks in Advance
 
Technology news on Phys.org
Can you be more specific on which part you find difficult?
Is it generating the function? (how you define the TF1 and its parameters)
or is it drawing a TF1?
 
  • Like
Likes   Reactions: jedishrfu
if it's the second, have a look at TF1::Draw()...
If it is the first, then either find a closed form that your function corresponds to (to be honest I wasn't able to find a clear answer to what that function is equal to) or make approximations (you can never have infinite sums), keeping eg the first 3 terms or 4 terms and so on (depending on what you want to do with it)...
Why would you want to use ROOT for that?
 
ChrisVer said:
Can you be more specific on which part you find difficult?
Is it generating the function? (how you define the TF1 and its parameters)
or is it drawing a TF1?
I am not able to generate the hypergeometric function of form 0F3(;4/3,5/3,2;x).The value of function contains limit from n=0 to n=infinity.I am not able to find this function in already defined function in root.
 
ChrisVer said:
if it's the second, have a look at TF1::Draw()...
If it is the first, then either find a closed form that your function corresponds to (to be honest I wasn't able to find a clear answer to what that function is equal to) or make approximations (you can never have infinite sums), keeping eg the first 3 terms or 4 terms and so on (depending on what you want to do with it)...
Why would you want to use ROOT for that?
I need to use root because the function I need to plot contains hypergeometric function and I need to do fitting of the parameters with experimental data.Previously ,I have used ROOT only for fitting in my analysis.So ,I was trying if I can find some way to plot this function in ROOT only.
 
A custom PDF in RooFit could work. You don't need a sum-free closed form for the function that way, you just need a function that can be evaluated for every argument. If you fit data to it, it will take quite some time.
 

Similar threads

Replies
22
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K