You should have noticed by now that RooStats::Heaviside is a class, not a mathematical function: [url]Are Heaviside and DiracDelta functions defined in ROOT?
You might try something like this (but I don’t guarantee that it works): TF1 *efit = new TF1("errorFit", "[1]*(x-[0])*(TMath::Erf((x-[0])/[2]))*(x>[0] ? 1.0 : 0.0)+[3]", start, (start+a+b));