34 <<
"Same RooArgSet used for null and alternate, so you must explicitly SetNullParameters and SetAlternateParameters or the likelihood ratio will always be 1."
51 bool created = false ;
53 std::unique_ptr<RooArgSet> allParams{
fNullPdf->getParameters(data)};
58 if (reuse && !created) {
63 std::unique_ptr<RooArgSet> attachedSet{
fNllNull->getVariables()};
65 attachedSet->assign(nullPOI);
78 std::unique_ptr<RooArgSet> allParams{
fAltPdf->getParameters(data)};
83 if (reuse && !created) {
87 attachedSet = std::unique_ptr<RooArgSet>{
fNllAlt->getVariables()};
89 double altNLL =
fNllAlt->getVal();
116 return nullNLL - altNLL;
Abstract base class for binned and unbinned datasets.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
static RooMsgService & instance()
Return reference to singleton instance.
void setGlobalKillBelow(RooFit::MsgLevel level)
RooFit::MsgLevel globalKillBelow() const
Variable that can be changed from the outside.
static void SetAlwaysReuseNLL(bool flag)
double Evaluate(RooAbsData &data, RooArgSet &nullPOI) override
Main interface to evaluate the test statistic on a dataset given the values for the Null Parameters O...
std::unique_ptr< RooArgSet > fDetailedOutput
!
RooArgSet fConditionalObs
std::unique_ptr< RooAbsReal > fNllAlt
! transient copy of the alt NLL
std::unique_ptr< RooAbsReal > fNllNull
! transient copy of the null NLL
RooArgSet * fAltParameters
static bool fgAlwaysReuseNll
bool fDetailedOutputEnabled
bool ParamsAreEqual()
this should be possible with RooAbsCollection
RooArgSet * fNullParameters
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.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
RooAbsPdf * MakeUnconstrainedPdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name=nullptr)
remove constraints from pdf and return the unconstrained pdf