Minos and ProfileLikelihoodCalculator

dear experts,
am experiencing one issue with the ProfileLikelihoodCalculator.
When i instanciate it, before getting the Interval, I get the error message:
FUNCTION MUST BE MINIMIZED BEFORE CALLING MINOs
i am wondering whether someone could point me to how i can interact with the different Minimiser steps for the ProfileLikelihoodCalculator constructor, or point me to some example I could look at.
thanks.
Below the macro am running:

RooMsgService::instance().setGlobalKillBelow((RooFit::MsgLevel)5) ;
TFile file = TFile::Open(“model.root”);
RooWorkspace
w = (RooWorkspace*) file->Get(“combined”);
ModelConfig* mc = (ModelConfig*) w->obj(“ModelConfig”);
RooAbsData* data = w->data(“obsData”);
RooRealVar * POI = dynamic_cast<RooRealVar*>(mc->GetParametersOfInterest()->first());
// works
mc->GetPdf()->fitTo(data,Minimizer(“Minuit”), Strategy(1), PrintLevel(3), Save(true) );
// fails
ProfileLikelihoodCalculator
PL = new ProfileLikelihoodCalculator(*data,mc);
//
//PL->DoGlobalFit();
PL->SetConfidenceLevel(0.68);
LikelihoodInterval
interval = PL->GetInterval();
double intervalC = POI->getVal();
double intervalL = interval->LowerLimit(*POI);
double intervalH = interval->UpperLimit(*POI);
model.root (59.8 KB)

Hi,

I think the fitting of your model does not work correctly, there are some convergence problems. You can see the problem if you increase the minimizer print level, by doing for example ROOT::Math::MinimizerOptions::SetDefaultPrintLevel(1).

Lorenzo

Hi Lorenzo,
sure but assuming i get around the fit convergence (i found a small bug in the input histograms for building the input template histograms for the Histfactory machinery), could you point me to some link which explains how i can fix the minimisation sequence. It seems this is done in the constructor of the ProfileLikelihoodCalculator, but i don’t see how i can interact with it. On the other hand, I understand the fitTo and how i can switch off the different steps of minimisation and Minuit control sequences.
thanks for your valuable help. nabil

HI,
I expected by posting my second question to get a reply and it does not seem to be the case. From that, i conclude that this forum is a low trafic one.
see you.

HI,

You can control the minimization options using the global settings defined in the MinimizerOptions class.
See root.cern.ch/root/html/ROOT__Mat … tions.html

Since in RooFit there parameters of the models are shared, you can also control the initial paramter values, by setting them to reasonable values, as close as possible to the global minimum, before calling
LikelihoodInterval* interval = PL->GetInterval(); which will performs a global fit to the model.

Sorry for the late reply,

Lorenzo

thanks Lorenzo for the clarification.
nabil