Fitting Question: Is it possible to simultaneously fit a step function?
What I mean by this is that I want to simultaneously fit something like:
f = f1 + f2 0<x<90
f = f1 90<x<180
It must be simultaneous so that f1 (the background) is the same function for the whole histogram. If f2 is allowed to be in the other region then the fit is messed up.
I was looking to do something like:
TF1 *fSpectrum = new TF1(“fSpectrum”,“gaus+pol2(3)”,0.,180.);
but I don’t want the gaussian to be in the region 90<x<180, for example. The actual functions are more complicated - This is just a simple example.
Any help would be GREATLY appreciated! I’m afraid that I’m new to root, so simple explanations would be best.