PyROOT plotOn() Normalization option

Dear experts,

I want to achieve the Normalization option from C++ to pyROOT

pdf->plotOn(frame,Normalization(n_sig, RooAbsReal::NumEvent));

In pyROOT, I try

pdf.plotOn(frame,ROOT.RooFit.Normalization(n_sig,ROOT.RooAbsReal(NumEvent)))

and

pdf.plotOn(frame,ROOT.RooFit.Normalization(n_sig,ROOT.RooAbsReal.NumEvent))

But they don’t work…, error from ROOT.RooAbsReal(NumEvent). What is the correct format?

Hi @Type_Error ,
sorry for the late reply!
We need @moneta or @jonas here, let’s ping them.

In the meanwhile, what’s the exact error message you get?

Cheers,
Enrico

Hi,
The correct one is the third one:

pdf.plotOn(frame,ROOT.RooFit.Normalization(n_sig,ROOT.RooAbsReal.NumEvent))

it should work, if it doesn’t for you, please post the error message and possibly the code reproducing the problem

Cheers

Lorenzo

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