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_t reuse = (fReuseNll || fgAlwaysReuseNll) ;
53 RooArgSet* allParams = fNullPdf->getParameters(data);
58 if (reuse && !created) {
59 fNllNull->setData(data,
kFALSE) ;
63 RooArgSet* attachedSet = fNllNull->getVariables();
64 *attachedSet = *fNullParameters;
65 *attachedSet = nullPOI;
66 double nullNLL = fNllNull->getVal();
73 delete fNllNull ; fNllNull = NULL ;
79 RooArgSet* allParams = fAltPdf->getParameters(data);
84 if (reuse && !created) {
85 fNllAlt->setData(data,
kFALSE) ;
88 attachedSet = fNllAlt->getVariables();
89 *attachedSet = *fAltParameters;
90 double altNLL = fNllAlt->getVal();
100 delete fNllAlt ; fNllAlt = NULL ;
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;
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 Bool_t fgAlwaysReuseNll
transient copy of the alt NLL
static void SetAlwaysReuseNLL(Bool_t flag)
virtual Double_t Evaluate(RooAbsData &data, RooArgSet &nullPOI)
Main interface to evaluate the test statistic on a dataset given the values for the Null Parameters O...
RooCmdArg Constrain(const RooArgSet ¶ms)
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
RooCmdArg GlobalObservables(const RooArgSet &globs)
RooCmdArg CloneData(Bool_t flag)
RooCmdArg ConditionalObservables(const RooArgSet &set)
RooAbsPdf * MakeUnconstrainedPdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name=NULL)