Hi experts,
I am trying to perform a 2D likelihood profile vs 2 fitting variables.
The fit is minimizing let’s say var1, and var2, which are used and expected to correlate in some extent via Multi-Dimensional constraints applied to other variables in the fit dependent from var1,var2.
Our fitter, is creating from say N datasets, N likelihoods and then they are all summed up and External - or Multi-D gauss constraints are added to the likelihood.
The code we have looks like this :
//make a list of likelihoods to sum
RooArgSet _nLL;
//Create and fill ArgSet
CreateNLL(_nLL);
//Sum up the Likelihoods
RooAddition _nllSimultaneous("nllCombined", "-log(likelihood)", _nLL);
//Invoke the minimizer
RooMinimizer _minimizer(_nllSimultaneous);
//Configure the Minimizer
ConfigureMinimizer(_minimizer, m_name + "_PlotContour.log");
//Run migrad and HESSE
FittingProcedure(_minimizer, &_nllSimultaneous);
Let’s say i have now 2 observables ( var1,var2) ;
And i want to make a 2D likelihood profile.
Is this code executed afterwards correct?
if( _nllSimultaneous.dependsOn( _var1) && _nllSimultaneous.dependsOn( _var2) ){
_var1.setRange(_var1.getVal() - _var1.getError() * 3.5, _var1.getVal() + _var1.getError() * 3.5);
_var2.setRange(_var2.getVal() - _var2.getError() * 3.5, _var2.getVal() + _var2.getError() * 3.5);
_minimizer.minos(RooArgSet(_var1, _var2));
RooPlot * _frame = _minimizer.contour(_var1, _var2, 1, 2, 3);
}
I.e to make the 2D 1,2,3 sigma level contour, do i need to run Minos on both observables ?
Am i missing something basic here?
To be clear, i saw that there is now a ProfileLikelihood
root class available, however we are not using RooStats and i am not sure if I can easily/fastly port our fitter to use RooWorkSpaces and if in the fact we keep list<1model, 1dataset> summation in our fitter, can be problematic to use that class.
Any suggestion/help is more than welcome.
Cheers
Renato