Gaussian and 2 exponential fit


I’m trying to perform a fit with a gaussian core and two exponential parts: one for the beginning and the other for tail.

I know there is already the crystal ball function which use a gaussian core with an exponential part. So how to add the the second exponential ?

Any ideas ?


the Crystal Ball pdf is part of RooFit. If you are using RooFit you can add easly pdf’s using the RooAddition class. (see the RooFit manual).

If you are using simple RooFit you can also easily write your combined function. You can use the TF1 class and combine gaussians with exponential using the “+” operator, like

TF1 * f = new TF1("f","gaus(0)+expo(3)+expo(5)",xmin,xmax); 

You can then also use the fit panel GUI to help in fitting ans set initial values of the parameters.

Best Regards