Finding a RooCurve in a RooPlot

In the following situation:

RooPlot *frame;
frame -> Print();
printf("%p", frame -> getHist("shapeSig_b1_ttbar_morph_Norm"));

the output from frame->Print() is

frame_CMS_th1x_2cacf20[CMS_th1x] = (RooCurve::shapeSig_b1_ttbar_morph_Norm[CMS_th1x])

The RooCurve is visible when frame is drawn on a canvas, matching expectations.


frame -> getHist("shapeSig_b1_ttbar_morph_Norm")

produces an error:

ERROR:InputArguments -- RooPlot::findObject(frame_CMS_th1x_2cacf20) cannot find object shapeSig_b1_ttbar_morph_Norm

or produces a nullptr

when called as

frame -> getHist("shapeSig_b1_ttbar_morph_Norm[CMS_th1x]")

How to properly address the RooCurve?

perhaps @moneta or @vcroft can help here?

Thank you,

Hi @Viesturs
when you make the plot you need to explicitly give the name

data.plotOn(frame, ROOT.RooFit.Name("data")) 

e.g. as seen here in cell 13

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.