32 if (fFirstEval && ParamsAreEqual()) {
34 <<
"Same RooArgSet used for null and alternate, so you must explicitly SetNullParameters and SetAlternateParameters or the likelihood ratio will always be 1."
49 bool reuse = (fReuseNll || fgAlwaysReuseNll) ;
51 bool created = false ;
58 if (reuse && !created) {
59 fNllNull->setData(
data,
false) ;
63 RooArgSet* attachedSet = fNllNull->getVariables();
64 attachedSet->
assign(*fNullParameters);
65 attachedSet->
assign(nullPOI);
66 double nullNLL = fNllNull->getVal();
73 delete fNllNull ; fNllNull = nullptr ;
84 if (reuse && !created) {
85 fNllAlt->setData(
data,
false) ;
88 attachedSet = fNllAlt->getVariables();
89 attachedSet->
assign(*fAltParameters);
90 double altNLL = fNllAlt->getVal();
100 delete fNllAlt ; fNllAlt = nullptr ;
107 if( fDetailedOutputEnabled ) {
108 if( !fDetailedOutput ) {
109 fDetailedOutput =
new RooArgSet( *(
new RooRealVar(
"nullNLL",
"null NLL",0)),
"detailedOut_SLRTS" );
110 fDetailedOutput->add( *(
new RooRealVar(
"altNLL",
"alternate NLL",0)) );
112 fDetailedOutput->setRealValue(
"nullNLL", nullNLL );
113 fDetailedOutput->setRealValue(
"altNLL", altNLL );
122 return nullNLL - altNLL;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
RooAbsData is the common 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
RooRealVar represents a 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...
static bool fgAlwaysReuseNll
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.
RooAbsPdf * MakeUnconstrainedPdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name=nullptr)
remove constraints from pdf and return the unconstrained pdf