Problem with RooMomentMorph and Likelihood scan

Hi all,

I’m trying to use a RooMomentMorph based on 6 RooKeysPdf to fit a datahist generated with another RooKeysPdf.
I fit a variable (mtl) which depends on a parameter rAlpha, the observable i want to extract from data.
I generate a mtl distribution dataset for a value of rAlpha=173.
I create a RooMomentMorph using 6 RooKeysPdf around 173 (from 158 to 188, not including the specific RooKeys for 173).
I use the RooMomentMorph to fit the generated dataset and see if i find back 173.
Then i retrieve the Nll function.
When I plot the likelihood as a function of rAlpha, I get a strange distribution with several minima and local peaks corresponding to the values of the RooKeysPdf used to build the RooMomentMorph.
I am surprised by the shape of the DeltaNll, moreover the fit returns 172.9, which does not correspond to the absolute minimum. Am I doing something wrong?
Thanks in advance for your help!

Elvire

I attach the plots for :

  • the likelihood projection over the fitted mtl distribution
  • the DeltaNllikelihood scan with the several minima structure

I paste below the code.

//retrieve the RooKeys for each rAlpha value
TFile *rookey = new TFile(rookeyname);
RooWorkspace *wkspace = (RooWorkspace*)rookey->Get("wkspace");
RooAbsPdf *rookey_158 = wkspace->pdf("rookey_158");
RooAbsPdf *rookey_167 = wkspace->pdf("rookey_167");
RooAbsPdf *rookey_170 = wkspace->pdf("rookey_170");
RooAbsPdf *rookey_173 = wkspace->pdf("rookey_173");
RooAbsPdf *rookey_176 = wkspace->pdf("rookey_176");
RooAbsPdf *rookey_179 = wkspace->pdf("rookey_179");
RooAbsPdf *rookey_188 = wkspace->pdf("rookey_188");
rookey->Close();

//generate datasets
RooMCStudy* mcs = new RooMCStudy(*rookey_173,mtl,Silence(),Binned());
mcs->generate(nsample,nevt,kTRUE);

//Building the RooMomentMorph
TVectorD hypoMass(6);
hypoMass(0) = 158; 
hypoMass(1) = 167;
hypoMass(2) = 170;
hypoMass(3) = 176;
hypoMass(4) = 179;
hypoMass(5) = 188;

RooRealVar  ("alpha", "M_{t}", 173, 158, 188, "GeV/c^{2}");
RooArgList tempo = RooArgList(*rookey_158,*rookey_167,*rookey_170,*rookey_176,*rookey_179,*rookey_188);

RooMomentMorph interpolation("interpolated_signal", "signal", rAlpha, RooArgList(mtl), tempo, hypoMass, RooMomentMorph::Linear);

//Getting the first dataset generated
RooAbsData* datahist = mcs->genData(0);

//create the nll variable and plot the likelihood scan
  RooAbsReal* nll = interpolation.createNLL(*datahist,NumCPU(8));
  TCanvas *cn_l = new TCanvas("cn_l","cn_l",700,500);
  cn_l->cd();
  RooPlot* likeframe = rAlpha.frame(Title("LL and profileLL"));
  nll->plotOn(likeframe,ShiftToZero());
  likeframe->Draw();

0VerifFitMuons.pdf (16.3 KB)
0VerifNLLMuons.pdf (14.5 KB)