FORGOT: Stack projections

I’m using roofit and I’d like to plot the projection as in a stack histogram: one over the previous one. To do that in ::plotOn() I have used the command AddTo(“base”) but it seems to not work. The shell doen’t show any error message or warning.

I have attached a smal piece of code with a dummy test: it produces to canvases, the 1st without trying ti pile up the curves, the 2nd with the AddTo() command.

stack_test.C (1.84 KB)

Looking in source code of RooAbsPdf:

it seems like the AddTo() command is documented but not implemented. Another related RooCmdArg, Invisible(), it is also bad documented: there is a typo and an error:

Invisble(Bool_t flag) --> Invisible()

There were a typo in the code, AddTo works fine.

I’m sorry.