Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to plot generalized hypergeometric function in ROOT?

  1. May 4, 2017 #1
    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
     
  2. jcsd
  3. May 5, 2017 #2

    jedishrfu

    Staff: Mentor

  4. May 6, 2017 #3

    ChrisVer

    User Avatar
    Gold Member

    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?
     
  5. May 6, 2017 #4

    ChrisVer

    User Avatar
    Gold Member

    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?
     
  6. May 9, 2017 #5
    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.
     
  7. May 9, 2017 #6
    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.
     
  8. May 10, 2017 #7

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How to plot generalized hypergeometric function in ROOT?
  1. How to learn ROOT ? (Replies: 3)

Loading...