Tmath and variables inside function

I can do:

fun1 = new TF1(“fun1”, “TMath::Exp(-0.5*TMath::Power((x-1.85)/(0.032286),2))”,1.6,2.);

to plot a function, but when I try:

Double_t m = 1.85;
fun1 = new TF1(“fun1”, “TMath::Exp(-0.5*TMath::Power((x-m)/(0.032286),2))”,1.6,2.);

It doesn’t seem to work. Is there a way to get variables into this defined function?

thanks,
James

do:

Double_t m = 1.85; fun1 = new TF1("fun1", "TMath::Exp(-0.5*TMath::Power((x-[0])/(0.032286),2))",1.6,2.); fun1->SetParameter(0,m); fun1.Draw();

Rene