57   fNll->clearEvalErrorLog();
 
   58   std::unique_ptr<RooFitResult> 
result{GetMinNLL()};
 
   61      throw std::runtime_error(
"ProfileLikelihoodTestStat: minimization unexpectedly failed!");
 
   63   double minNll = 
result->minNll();
 
   64   double status = 
result->status();
 
   67   if (fDetailedOutputEnabled) {
 
   73   return {minNll, status};
 
 
   85       if (fDetailedOutputEnabled) {
 
   86          fDetailedOutput = std::make_unique<RooArgSet>();
 
   98       if (fPrintLevel > 1) {
 
   99            std::cout << 
"POIs: " << std::endl;
 
  107       bool reuse=(fReuseNll || fgAlwaysReuseNll) ;
 
  110       if (!
reuse || fNll==
nullptr) {
 
  111          std::unique_ptr<RooArgSet> 
allParams{fPdf->getParameters(
data)};
 
  118          if (fPrintLevel > 0) {
 
  119             std::cout << 
"ProfileLikelihoodTestStat::Evaluate - Use Offset mode \"" 
  120                 << fLOffset << 
"\" in creating NLL" << std::endl;
 
  124          if (fPrintLevel > 1) std::cout << 
"creating NLL " << &*fNll << 
" with data = " << &
data << std::endl ;
 
  127         if (fPrintLevel > 1) std::cout << 
"reusing NLL " << &*fNll << 
" new data = " << &
data << std::endl ;
 
  128         fNll->setData(
data,
false) ;
 
  131       if (fPrintLevel > 1 && 
data.numEntries() == 1) {
 
  132          std::cout << 
"Data set used is:  ";
 
  138       std::unique_ptr<RooArgSet> 
attachedSet{fNll->getVariables()};
 
  164             if (fPrintLevel>1) std::cout << 
"Do unconditional fit" << std::endl;
 
  183       if (!fSigned && 
type==0 &&
 
  192          if (fPrintLevel>1) std::cout << 
"Do conditional fit " << std::endl;
 
  227          if (fLOffset == 
"initial") {
 
  229             pll = fNll->getVal();
 
  234             } 
else if (
type == 2) {
 
  245               if (fPrintLevel > 0) std::cout << 
"pll is negative - setting it to zero " << std::endl;
 
  254       if (fPrintLevel > 0) {
 
  255          std::cout << 
"EvaluateProfileLikelihood - ";
 
  259             std::cout << 
", cond ML = " << 
condML;
 
  261             std::cout << 
" pll = " << pll;
 
 
  294   minim.setStrategy(fStrategy);
 
  295   minim.setEvalErrorWall(config.useEvalErrorWall);
 
  297   int level = (fPrintLevel == 0) ? -1 : fPrintLevel -2;
 
  298   minim.setPrintLevel(level);
 
  299   minim.setEps(fTolerance);
 
  301   minim.optimizeConst(2);
 
  302   TString minimizer = fMinimizer;
 
  308      if (status%1000 == 0) {  
 
  311         std::cout << 
"    ----> Doing a re-scan first" << std::endl;
 
  312         minim.minimize(minimizer,
"Scan");
 
  314            if (fStrategy == 0 ) {
 
  315               std::cout << 
"    ----> trying with strategy = 1" << std::endl;
 
  316               minim.setStrategy(1);
 
  322            std::cout << 
"    ----> trying with improve" << std::endl;
 
  323            minimizer = 
"Minuit";
 
  330   return std::unique_ptr<RooFitResult>{
minim.save()};
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
static const std::string & DefaultMinimizerAlgo()
 
Abstract base class for binned and unbinned datasets.
 
static void setHideOffset(bool flag)
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
 
static RooMsgService & instance()
Return reference to singleton instance.
 
Variable that can be changed from the outside.
 
static RooArgSet * GetAsArgSet(RooFitResult *result, TString prefix="", bool withErrorsAndPulls=false)
Translate the given fit result to a RooArgSet in a generic way.
 
std::pair< double, int > minimizeNLL(std::string const &prefix)
 
static void SetAlwaysReuseNLL(bool flag)
 
static bool fgAlwaysReuseNll
 
virtual double EvaluateProfileLikelihood(int type, RooAbsData &data, RooArgSet ¶msOfInterest)
evaluate the profile likelihood ratio (type = 0) or the minimum of likelihood (type=1) or the conditi...
 
bool minimizationNeeded(RooArgSet allParams) const
Check if there are non-const parameters so it is worth to do the minimization.
 
std::unique_ptr< RooFitResult > GetMinNLL()
find minimum of NLL using RooMinimizer
 
RooCmdArg Offset(std::string const &mode)
 
RooCmdArg Constrain(const RooArgSet ¶ms)
 
RooCmdArg GlobalObservables(Args_t &&... argsOrArgSet)
 
RooCmdArg CloneData(bool flag)
 
RooCmdArg ConditionalObservables(Args_t &&... argsOrArgSet)
Create a RooCmdArg to declare conditional observables.
 
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
 
void RemoveConstantParameters(RooArgSet *set)
 
RooStatsConfig & GetGlobalRooStatsConfig()
Retrieve the config object which can be used to set flags for things like offsetting the likelihood o...
 
void PrintListContent(const RooArgList &l, std::ostream &os=std::cout)
useful function to print in one line the content of a set with their values