Soeren,
When you define a function to fit, you must somewhere specify
the parameter(s) to fit. In your example above, you have 0 parameters.
You can look at the class TFormula or TF1 to see how to define an
expression whih parameters. Look also at:
http://root.cern.ch/root/html/examples/fillrandom.C.html
For example, if you want to create a function to be fitted with
two parameters involving sin(x):
TF1 *f1 = new TF1("f1","[0]*sin([1]*x)",0,3.14);
f1->SetParameter(0,1.1); //initialize first parameter to 1.1
f1->SetParameter(1,0.2);
graph->Fit("f1");
In case of predefined functions, such as gaus, exp or polynomials,
root can automatically compute the initial values of parameters,
but not in the general case.
In case of the multifit macro, We compute initial values of
parameters by fitting simple expressions, then we fit a more
complex expression.
Rene Brun