69 int type = (fSubtractMLE) ? 0 : 2;
72 if ( &pdf == fNullProfile.GetPdf() )
73 return fNullProfile.EvaluateProfileLikelihood(
type,
data, poi);
74 else if (&pdf == fAltProfile.GetPdf() )
75 return fAltProfile.EvaluateProfileLikelihood(
type,
data, poi);
77 oocoutE(
nullptr,InputArguments) <<
"RatioOfProfiledLikelihoods::ProfileLikelihood - invalid pdf used for computing the profiled likelihood - return NaN"
89 int type = (fSubtractMLE) ? 0 : 2;
92 double nullNLL = fNullProfile.EvaluateProfileLikelihood(
type,
data, nullParamsOfInterest);
93 const RooArgSet *nullset = fNullProfile.GetDetailedOutput();
96 double altNLL = fAltProfile.EvaluateProfileLikelihood(
type,
data, *fAltPOI);
97 const RooArgSet *altset = fAltProfile.GetDetailedOutput();
99 if (fDetailedOutput !=
nullptr) {
100 delete fDetailedOutput;
101 fDetailedOutput =
nullptr;
103 if (fDetailedOutputEnabled) {
105 for (
auto const *var : static_range_cast<RooRealVar *>(*nullset)) {
106 auto cloneVar = std::make_unique<RooRealVar>(
TString::Format(
"nullprof_%s", var->GetName()),
108 fDetailedOutput->addOwned(std::move(cloneVar));
110 for (
auto const *var : static_range_cast<RooRealVar *>(*altset)) {
111 auto cloneVar = std::make_unique<RooRealVar>(
TString::Format(
"altprof_%s", var->GetName()),
113 fDetailedOutput->addOwned(std::move(cloneVar));
125 return nullNLL -altNLL;
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 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
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
static void SetAlwaysReuseNLL(bool flag)
double Evaluate(RooAbsData &data, RooArgSet &nullParamsOfInterest) override
evaluate the ratio of profile likelihood
static bool fgAlwaysReuseNll
double ProfiledLikelihood(RooAbsData &data, RooArgSet &poi, RooAbsPdf &pdf)
returns -logL(poi, conditional MLE of nuisance params) it does not subtract off the global MLE becaus...
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754.