RooFit plots a bizzar loking line

god day …

i am excuting this code, and when it finishied it is supposed to plot a PDF of some variable(cos_theta) with its components
but i always have a wired looking line in the Canvas at the biginnig of the range(wich is not a part of my distribution)
i think it is the RooAddPdf who causes this problem??
thank you for your help!.

using namespace RooFit;

int angle(){

RooRealVar *cos_theta = new RooRealVar(“cos_theta”,“cos_theta”,-1.,1.);
RooRealVar *Rt = new RooRealVar(“Rt”,“Rt”,0.2,0.,1.);
RooRealVar *a = new RooRealVar(“a”,“a”,0,-2.,2.);

RooAbsPdf* Pdftheta_odd = new RooGenericPdf(“Pdftheta_odd”,“Pdftheta_odd”," 1 - cos_theta2 " ,cos_theta);
RooAbsPdf
Pdftheta_even = new RooGenericPdf(“Pdftheta_even”,“Pdftheta_even”," ( 1 + cos_theta
2 )/2",cos_theta);
RooAbsPdf
bkg_ang = new RooGenericPdf(“bkg_ang”,“bkg_ang”,“1 + a*cos_theta**2”,RooArgList(*a,*cos_theta));

RooAbsReal *B_S_fitt = new RooRealVar(“B_S_fitt”,“B_S_fitt”,0.26,0.,10.);
RooAbsPdf *pdf_sig_mix_ang = new RooAddPdf(“pdf_sig_mix_ang”,“pdf_sig_mix_ang”,*Pdftheta_odd,*Pdftheta_even,*Rt);
RooAbsPdf *pdf_sig_mix_ang_bkg = new RooAddPdf(“pdf_sig_mix_ang_bkg”,“pdf_sig_mix_ang_bkg”,*bkg_ang,*pdf_sig_mix_ang,*B_S_fitt);
RooDataSet *data = pdf_sig_mix_ang_bkg->generate(*cos_theta,78363);
RooPlot *cadre1 = cos_theta->frame();

pdf_sig_mix_ang_bkg->plotOn(cadre1);
pdf_sig_mix_ang_bkg->plotOn(cadre1,Components(“Pdftheta_odd”),LineColor(kBlack));
pdf_sig_mix_ang_bkg->plotOn(cadre1,Components(“Pdftheta_even”),LineStyle(kDotted),LineColor(kBlack));
pdf_sig_mix_ang_bkg->plotOn(cadre1,Components(“bkg_ang”),LineStyle(kDashed),LineColor(kBlack));

cadre1->Draw();

return 0 ;
}

I have mailed your problem to Wouter Verkerke. I hope that he will
give an answer soon.

Rene

Hi,

I just ran your macro and I see the correct result.

Are you running a recent version of ROOT/RooFit?

Wouter

hi wouter
thank for answering me

i am using the RooFit v2.10 and root Version 5.14/00d

i s this ok…

Hi,

Thats pretty much the latest version. So I wonder whats different
between what you and I do then. Can you send me (or post)
a gif file of your canvas?

Wouter

thank you woter
this the gif file
you can notice the line at the bigning of the plot

thanks in advance
Cheers