Hi Rooters,

I need help with a parametric function definition.

Is it possible to use a parameter also for the range definition of the function?

Here is my precise problem:

I have to fit a beta-gamma spectrum and I tried to fit it with the following function:

```
TF1 *betaPbGamma = new TF1("betaPbGamma","[0]*TMath::Sqrt((x-[1])*(x-[1])+2*511*(x-[1]))*([2]-(x-[1]))*([2]-(x-[1]))*((x-[1])+511)+[3]*TMath::Gaus(x,[1],[4])",45,70)
betaPbGamma->SetParameters(7e-6,45,17,50,1)
```

but the fit is always failing.

I guess the problem is that the [1] parameter is not really free to move because it have to be equal to the xmin of the range definition.

In fact if it is not, the obtained function explodes…

Is there any solution/trick for this issue?

Many thanks in advance!!

*Please read tips for efficient and successful posting and posting code*

*ROOT Version:* 6.08.06

*Platform:* Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux

*Compiler:* gcc version 4.9.2