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);
78 oocoutE(
nullptr,InputArguments) <<
"RatioOfProfiledLikelihoods::ProfileLikelihood - invalid pdf used for computing the profiled likelihood - return NaN"
90 int type = (fSubtractMLE) ? 0 : 2;
93 double nullNLL = fNullProfile.EvaluateProfileLikelihood(
type,
data, nullParamsOfInterest);
94 const RooArgSet *nullset = fNullProfile.GetDetailedOutput();
97 double altNLL = fAltProfile.EvaluateProfileLikelihood(
type,
data, *fAltPOI);
98 const RooArgSet *altset = fAltProfile.GetDetailedOutput();
100 if (fDetailedOutput !=
nullptr) {
101 delete fDetailedOutput;
102 fDetailedOutput =
nullptr;
104 if (fDetailedOutputEnabled) {
106 for (
auto const *var : static_range_cast<RooRealVar *>(*nullset)) {
107 auto cloneVar = std::make_unique<RooRealVar>(
TString::Format(
"nullprof_%s", var->GetName()),
109 fDetailedOutput->addOwned(std::move(cloneVar));
111 for (
auto const *var : static_range_cast<RooRealVar *>(*altset)) {
112 auto cloneVar = std::make_unique<RooRealVar>(
TString::Format(
"altprof_%s", var->GetName()),
114 fDetailedOutput->addOwned(std::move(cloneVar));
126 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.