How to get PDF after fit

Dear all,

in a search context i’m doing a constrained likelihood minimisation to get the nuisance parameter
pulls using the observed data and constraining mu to the values of the observed limit.

I get some constraints on some nuisance parameters, they move within about 1 sigma but the uncertainty
is largely reduced.

I understand this as the fit trying to improve the data vs background+signal model agreement, however
i would like to visualise this effect plotting the pdf after fit? How can i access it ?

I’ve attached the macro i’m using.

getDetails.cxx (7.7 KB)


I am not sure I understand completely your problem. You should have somehow a pointer to your pdf, for example from the ModelConfig, ModelConfig::GetPdf().
Normally the pdf after a fit should have the parameters set to the best fit result. If this is not the case you can
set the parameters of the pdf to the ones obtained by the fit. For example you can do something as following:

RooAbsPdf * pdf = model.GetPdf(); 
RooFitResult * result = .....  // result from the fit

RooAbsArg * params = pdf->getParameters(*data);
*params = result.floatParsFinal(); 

Best Regards