This is mostly a plotting issue: I have a fitted curve to come data.
The corresponding up and down uncertainties on the fit are two more RooCurve objects.
Is there a way to draw a fill area using the up/ down curves such that it shows up as an uncertainty band around the central fit?
You can create a TGraphErrors from the two RooCurve with the graph lower/upper error corresponds to the down/up values of the RooCurve objects.
Then you can draw the TGraphErrors as an error band using option E3 or E4, see https://root.cern.ch/doc/master/classTGraphPainter.html#GP03a
I was expecting to use the RooCurve::makeErrorBand methods. But I could not figure out the passing of vector<RooCurve*> as arguments.
Seemed to me that the makeErrorBand does exactly the same as the TGraphErrors under the hood.
BTW, why does this method need a vector of pointers? It does not modify the original curve at all, right?
The makeErrorBand computes the upper/down uncertainty in the curve. It needs a vector of curves representing a random sample of variations of the parameters. The parameter variations are obtained by sampling from the fit covariance matrix result.
Otherwise you can provide as input the upper and lower variations of the curve versus the parameters (so two vectors which have as size the number of parameters) and in addition the fit covariance matrix.
You can see how the methods are used internally in RooAbsReal::plotOnwithErrorBand