Hi Rooters,

It’s been a while since I’ve had to fit curves and I’m new to how Root does it. My issue is how to handle boundary conditions between two fit functions. Attached is my macro and a graphic showing my results. I do a Gaussian fit inside the peak, then a Lorentzian fit outside the peak. The two fits are discontinuous at the boundary.

Intuition tells me that I should define the requirement f(a) = g(a) and f’(a) = g’(a) in the definitions of the fit functions. But, this doesn’t seem to be that simple. I’m not sure how to proceed.

Thanks!

Rob