RooFit and Crystal Ball

Hello, I am looking for some help with applying a Crystal Ball fit to a Histogram.
I have imported the histogram to RooFit no problem, but when I try to create the CB to fit, using

w.factory("RooCBShape CBall("Cball", "Crystal Ball shape", x, mean[110000,13000], sigma[5000,200000], alpha[0,10000],n[0,100000])");

I get Three errors:
[ul]Error: String literal syntax error (tmpfile):1:
Error: String literal syntax error (tmpfile):1:
Error: String literal syntax error (tmpfile):1:
Error: String literal syntax error (tmpfile):1:
[/ul]
What am I doing wrong?
Thank you for your help.
By the way, the histogram I am trying to fit to is attached.


Hi,

I see some things which are not correct. For example the syntax of the factory, the treatment of the string in C++ and the limits of the mean parameter.
What you could do is:

root [0] RooWorkspace w
root [1] w.factory("RooCBShape::CBall(x[0,10], mean[11000,13000], sigma[5000,200000], alpha[0,10000],n[0,100000])");
root [2] w.Print()

which would print

[code]RooWorkspace() contents

variables

(alpha,mean,n,sigma,x)

p.d.f.s

RooCBShape::CBall[ m=x m0=mean sigma=sigma alpha=alpha n=n ] = 0.993176[/code]

Cheers,
Danilo