[Roofit] stacked histograms

Hello,

is there a way to create stacked histograms a la THStack using RooFit’s build-in plotting methods (like plotOn) and the RooPlot class?
Or do I have to createHistogram() my PDF’s, scale them manually and then call addTH1 on the RooPlot?

Thanks in advance,
Dennis

You can plot components of your model as an option of the plotOn function

Components(“bkg”)
Components(“bkg1,bkg2”)

See the RooFit tutorial macros that uses that as examples.

– Gregory