#include <SimplerLikelihoodRatioTestStat.h>
Public Member Functions | |
virtual Double_t | Evaluate (RooAbsData &data, RooArgSet &nullPOI) |
virtual const TString | GetVarName () const |
SimplerLikelihoodRatioTestStat (RooAbsPdf &pdfNull, RooAbsPdf &pdfAlt, const RooArgSet ¶msNull=RooArgSet(), const RooArgSet ¶msAlt=RooArgSet()) | |
Private Attributes | |
std::auto_ptr< RooArgSet > | paramsAlt_ |
std::auto_ptr< RooArgSet > | paramsNull_ |
RooAbsPdf * | pdfAlt_ |
RooAbsPdf * | pdfNull_ |
RooArgSet | snapAlt_ |
RooArgSet | snapNull_ |
Definition at line 11 of file SimplerLikelihoodRatioTestStat.h.
SimplerLikelihoodRatioTestStat::SimplerLikelihoodRatioTestStat | ( | RooAbsPdf & | pdfNull, |
RooAbsPdf & | pdfAlt, | ||
const RooArgSet & | paramsNull = RooArgSet() , |
||
const RooArgSet & | paramsAlt = RooArgSet() |
||
) | [inline] |
Definition at line 13 of file SimplerLikelihoodRatioTestStat.h.
References snapAlt_, and snapNull_.
: pdfNull_(&pdfNull), pdfAlt_(&pdfAlt), paramsNull_(pdfNull_->getVariables()), paramsAlt_(pdfAlt_->getVariables()) { snapNull_.addClone(paramsNull); snapAlt_.addClone(paramsAlt); }
virtual Double_t SimplerLikelihoodRatioTestStat::Evaluate | ( | RooAbsData & | data, |
RooArgSet & | nullPOI | ||
) | [inline, virtual] |
Definition at line 22 of file SimplerLikelihoodRatioTestStat.h.
References funct::log(), paramsAlt_, paramsNull_, pdfAlt_, pdfNull_, snapAlt_, and snapNull_.
{ if (data.numEntries() != 1) throw std::invalid_argument("HybridNew::TestSimpleStatistics: dataset doesn't have exactly 1 entry."); const RooArgSet *entry = data.get(0); *paramsNull_ = *entry; *paramsNull_ = snapNull_; *paramsNull_ = nullPOI; double nullNLL = pdfNull_->getVal(); *paramsAlt_ = *entry; *paramsAlt_ = snapAlt_; double altNLL = pdfAlt_->getVal(); return -log(nullNLL/altNLL); }
virtual const TString SimplerLikelihoodRatioTestStat::GetVarName | ( | ) | const [inline, virtual] |
std::auto_ptr<RooArgSet> SimplerLikelihoodRatioTestStat::paramsAlt_ [private] |
Definition at line 45 of file SimplerLikelihoodRatioTestStat.h.
Referenced by Evaluate().
std::auto_ptr<RooArgSet> SimplerLikelihoodRatioTestStat::paramsNull_ [private] |
Definition at line 45 of file SimplerLikelihoodRatioTestStat.h.
Referenced by Evaluate().
RooAbsPdf * SimplerLikelihoodRatioTestStat::pdfAlt_ [private] |
Definition at line 43 of file SimplerLikelihoodRatioTestStat.h.
Referenced by Evaluate(), and GetVarName().
RooAbsPdf* SimplerLikelihoodRatioTestStat::pdfNull_ [private] |
Definition at line 43 of file SimplerLikelihoodRatioTestStat.h.
Referenced by Evaluate(), and GetVarName().
RooArgSet SimplerLikelihoodRatioTestStat::snapAlt_ [private] |
Definition at line 44 of file SimplerLikelihoodRatioTestStat.h.
Referenced by Evaluate(), and SimplerLikelihoodRatioTestStat().
RooArgSet SimplerLikelihoodRatioTestStat::snapNull_ [private] |
Definition at line 44 of file SimplerLikelihoodRatioTestStat.h.
Referenced by Evaluate(), and SimplerLikelihoodRatioTestStat().