Fitting using linear combination of two histogram

Hi,

I’m trying to fit a histogram using a combination of two basis histograms. I know how to fit a histogram using two functions (for example, a background polynomial and a gaussian spike), but I’m having a hard time figuring out how to do this with two histograms (which can’t be parameterized).

Would TFit work with this, or do I need something else?

Thanks,
Ning

see tutorial fithist.C

Rene

excellent, thanks!

Ning