I am trying to perform a fit to a histogram which is a convolution of a gaussian and a triangle fit and I dont know how to do this. The fit must have a sharp edge on the right side of the maxima similar to that of a sawtooth shape. I have fitted the gaussian but now dont know how to sharpen and straighten its far edge… any ideas?? min8.ps (11.7 KB)

You should try to fit a function resulting from the convolution of your triangular function and the gaussian.You can build your fit function using for example the numerical integration capabilities in ROOT.

Is this the expected shape (or underlined function) generating your histograms ?
Looks to me that in the right side the tail is like the result of a convolution of the gaussian with an exponential.

hello
The resulting shape on the right side should look like this histo attached, where i fitted the line by hand (drew it on).

The reason for the fit is to obtain the value (the mass) where the straight line crosses the x-axis (here around 760). So I need some function that has a parameter which will return that value.

Do you still think it should be a convolution of the gaussian with an exponential, if so I will try that instead, as I dont really know what a trianglar function would look like anyway…