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;