Dear RooFit and pyroot experts,
I’m trying to rewrite this tutorial :
root.cern.ch/root/html/tutorials … rod.C.html
with pyroot.
However I get the following error when trying to run :
[#0] ERROR:Plotting – RooProdPdf::model:plotOn: WARNING: variable is not an explicit dependent: x
[#0] ERROR:Plotting – RooProdPdf::model:plotOn: WARNING: variable is not an explicit dependent: x
[#1] INFO:Plotting – RooAbsReal::plotOn(model) plot on x integrates over variables (y)
[#0] ERROR:Plotting – RooProdPdf::model:createPlotProjection: “x” is not a dependent and will be ignored.
[#0] ERROR:InputArguments – RooProdPdf::model:fillHistogram: WARNING: variable is not an explicit dependent: x
[#0] ERROR:Plotting – RooProdPdf::model:createPlotProjection: “x” is not a dependent and will be ignored.
Below is code snipet :
x = ROOT.RooRealVar(“x”,“x”,-5,5)
y = ROOT.RooRealVar(“y”,“y”,-5,5)
a0 = ROOT.RooRealVar(“a0”,“a0”,-0.5,-5,5)
a1 = ROOT.RooRealVar(“a1”,“a1”,-0.5,-1,1)
fy = ROOT.RooPolyVar(“fy”,“fy”,y,ROOT.RooArgList(a0,a1))
sigmax = ROOT.RooRealVar(“sigma”,“width of gaussian”,0.5)
gaussx = ROOT.RooGaussian(“gaussx”,“Gaussian in x with shifting mean in y”,x,fy,sigmax)
gaussy = ROOT.RooGaussian(“gaussy”,“Gaussian in y”,y,ROOT.RooFit.RooConst(0),ROOT.RooFit.RooConst(3))
model = ROOT.RooProdPdf(“model”,“gaussx(x|y)*gaussy(y)”,ROOT.RooArgSet(gaussy),ROOT.RooFit.Conditional(ROOT.RooArgSet(gaussx),ROOT.RooArgSet(x)))
xframe = x.frame()
model.plotOn(xframe)
I’m using ROOT 5.22/00b and the cint macro work perfectly well with this version.
Cheers,
Renaud.