ROOT Version: 6.15.01
Platform: Windows 10
Compiler: Not Provided
Hello,
I am trying to fit a histogram with Roofit with the following PDF:
RooRealVar x("x","mass",20.,500.);
x.setRange("Range1",80.,110.) ;
x.setRange("Range2",0.,79.);
x.setRange("Range3",110.,500.);
RooRealVar a1("a1","a1",-50,100);
RooRealVar a2("a2","a2",-50,400);
RooRealVar a3("a3","a3",-50,400);
RooRealVar a4("a4","a4",-500,100);
RooRealVar a5("a5","a5",-50,100);
RooRealVar a6("a6","a6",-50,1000);
RooRealVar a7("a7","a7",-50,1000);
RooRealVar a8("a8","a8",-50,100);
RooRealVar a9("a9","a9",-50,100);
RooRealVar aa("aa","aa",-50,100);
RooRealVar cmean("cmean","Central value of CB",0.,-3,25);
RooRealVar csigma("csigma","Width of CB",20,0,50.);
RooRealVar calpha("calpha","Alpha",7.,0,10);
RooRealVar cn("cn","Order",6,-10.,20.);
RooCBShape c_crystalball("c_crystalball", "convolution signal Region: CB", x,cmean,csigma,calpha,cn);
RooRealVar cmass("cmass","Mass value for BW", 91.1876);
RooRealVar cwidth("cwidth","Spread of the BW", 0.0848368,0,10);
RooBreitWigner c_BW("c_BW","convolution signal Region:BW",x,cmass, cwidth );
RooFFTConvPdf CxB("CxB","CB (X) BW",x,c_crystalball,c_BW) ;
RooRealVar b("b", "Number of background events", 0, 4200);
RooRealVar s("s", "Number of signal events", 0, 600);
RooBernstein bg_bern("bg_bern","background",x, RooArgList(a1,a2,a3,a4,a5,a6,a7,a8,a9));
RooAddPdf fullModel("fullModel", "CxB + bg_bern", RooArgList(CxB, bg_bern), RooArgList(s, b));
RooFitResult* r = fullModel.fitTo(dh,Save()) ;
However, the background (bg_bern) turns out to be greater than the full model pdf value for some observables. I believe this is because the full model assumes -ve values and is forced to be zero there?
At any rate, any ideas about this one? Since there are a lot of parameters, can someone please help me figure this out?