# Voigt function at zero

Dear rooters,

I have a question about the voigt function.

I tried to do a simple example for a voight function (proportional to the square root of positive energy only). The example is in the attached file Voigtfun.C and the result is the figure Voigtfun.png. Why the function look like that around zero ?

Yours,

Tarek Al Kalanee

Voigtfun.C (1.12 KB)

VIVE L’AMOUR!
in your “myFuncBWG” function, the “a” variable is always 1 if “x[0]<=0” and is set to “sqrt(x[0]/par[1])” if “x[0]>0”.
So, around “x[0]==0”, the “a” value jumps from 1 to 0, which produces your cusp.
Maybe you wanted to say “if(xx>par[1])” instead of “if(xx>0)”
I am stupid. No?
Pepe Le Pew.

Thank you Pepe Le Pew,
But what solution you propose ?
Yours,
Tarek

I propose nothing. I explained the “strange” behavior. It’s your turn now to fix it. Have (Voigt)fun

If I take a=0 when x[0]<=0, then can we consider that the Voigt function becomes a simple Gaussian function?
Thanks,
Tarek

See http://root.cern.ch/root/html/TMath.html#TMath:Voigt for details. <img src="/uploads/default/original/2X/8/84c2fe9464a4066c00e1bd5978e913e7869cbb07.gif" width=“22” height=“16” alt=":-"" title=“Whistle”/>