I am trying to write a user defined fitting function like Double_t Func(doublex, doublep), here for one of the parameter p[0], I need to fix the parameter from a histogram for given time (x) with histogram bin content. Is there is any way to include bincontent to the fitting parameter depending upon x? Thank you so much.
I am not sure I have well understood the problem. A parameter p[] should be a free parameter of your function and you should not set or fix to something else within the user provided function.
You can pass other parameters to the function, for example , histogram bin contents, using several tricks, for example using a global defined histogram or use a lambda function which captures a reference to the histogram
Sorry, I mean, to pass other parameters to the function as you mention. I wrote some vague lines in my earlier post. Especially, I need to send histogram bin content. Can I find any example related to this in the root? It will be more helpful for me.