RooAddPdf variable is not an explicit dependent

Hi at everyone

I am trying to fit an histogram, using three different distributions that obtained with RooHistPdf from other three histograms.

RooHistPdf pdfUw("uw_pdf","uw_pdf", uw, uw_h,0);
RooHistPdf pdfMixing("mix_pdf", "mix_pdf", mix, dh,0);
RooHistPdf pdfCosmic("cosm_pdf","cosm_pdf", cosm, cosm_h,0);

At this point, I define the model and try to fit the histogram f4_h

RooRealVar x("x", "x",0., 4.);
RooDataHist f4_h("f4_h", "f4_h", x, Import(*hist_f4_rcut1));

RooAddPdf model("sign", "AntiHydrogen", RooArgList(pdfMixing,pdfUw,pdfCosmic), RooArgList(Nmix,Nuw,Nbk));
model.fitTo(f4_h,PrintLevel(-1));

However I receive the following errors, that are not easy for me to understand:

[#0] ERROR:Plotting -- RooAddPdf::sign:plotOn: WARNING: variable is not an explicit dependent: x
[#0] ERROR:Plotting -- RooAddPdf::sign:plotOn: WARNING: variable is not an explicit dependent: x
[#0] ERROR:Plotting -- RooAddPdf::sign:createPlotProjection: "x" is not a dependent and will be ignored.
[#0] WARNING:InputArguments -- RooRealBinding: The function sign_Norm[x] does not depend on the parameter x. Note that passing copies of the parameters is not supported.
[#0] WARNING:Eval -- Evaluating RooAddPdf without a defined normalization set. This can lead to ambiguos coefficients definition and incorrect results. Use RooAddPdf::fixCoefNormalization(nset) to provide a normalization set for defining uniquely RooAddPdf coefficients!

Thank you in advance!

Issue found, I used different variables name to define the different pdf. One should use only one variable for every distribution!!!

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