Hi
To plot a TLine in the same canvas as a histogram, I would like to convert a RooHist to a TH1F. I requested a pull from an RooPlot frame that returned a RooHist. This RooHist has a function GetHistogram() that returns a TH1F. Unfortunately, this histogram has zero entries, even if the RooHist itself is nonzero.
- Is there another way to plot a TLine over a RooHist?
- What is the purpose of GetHistogram() if there are no data points inside?
- Also I couldn’t find out how to plot error bars with RooHist. The Drawing option “E” does produce a blank canvas.
- Why does the residHist() even return a RooHist? This class is not as easily accessable as RooDataHist or TH1.
This is the basic code:
RooHist* res_hist = xframe->residHist();
RooPlot* res_frame = x.frame(Title(""));
TH1F* temp = res_hist->GetHistogram();
Thanks for your help.
Dario