Calculate the derivative with respect to each parameter

Define a TF1 object with your function and have a look at this ROOT Forum question.