Draw y=a function

Dear experts,
I want to plot a simple y=a function on my histogram.
so I have a double fom variable and I did [1], but I does not draw anything while [2] is working.
Do you know why [1] is not working? How should I parse the fom variable?
Regards

[1]
double fom=0.5
fnc = new TF1(dir.c_str(), “fom”, xmini, xmaxi);
fnc ->Draw(“same”);

[2]
fnc = new TF1(dir.c_str(), “0.5”, xmini, xmaxi);
fnc ->Draw(“same”);

fnc = new TF1(dir.c_str(), Form("%g",form), xmini, xmaxi);

Dear Couet,
thank you it worked fine.
Regards