CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SimplerLikelihoodRatioTestStat Class Reference

#include <SimplerLikelihoodRatioTestStat.h>

Inheritance diagram for SimplerLikelihoodRatioTestStat:

Public Member Functions

virtual Double_t Evaluate (RooAbsData &data, RooArgSet &nullPOI)
 
virtual const TString GetVarName () const
 
 SimplerLikelihoodRatioTestStat (RooAbsPdf &pdfNull, RooAbsPdf &pdfAlt, const RooArgSet &paramsNull=RooArgSet(), const RooArgSet &paramsAlt=RooArgSet())
 

Private Attributes

std::auto_ptr< RooArgSet > paramsAlt_
 
std::auto_ptr< RooArgSet > paramsNull_
 
RooAbsPdf * pdfAlt_
 
RooAbsPdf * pdfNull_
 
RooArgSet snapAlt_
 
RooArgSet snapNull_
 

Detailed Description

Definition at line 11 of file SimplerLikelihoodRatioTestStat.h.

Constructor & Destructor Documentation

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_.

13  :
14  pdfNull_(&pdfNull), pdfAlt_(&pdfAlt),
15  paramsNull_(pdfNull_->getVariables()),
16  paramsAlt_(pdfAlt_->getVariables())
17  {
18  snapNull_.addClone(paramsNull);
19  snapAlt_.addClone(paramsAlt);
20  }

Member Function Documentation

virtual Double_t SimplerLikelihoodRatioTestStat::Evaluate ( RooAbsData &  data,
RooArgSet &  nullPOI 
)
inlinevirtual

Definition at line 22 of file SimplerLikelihoodRatioTestStat.h.

References create_public_lumi_plots::log, paramsAlt_, paramsNull_, pdfAlt_, pdfNull_, snapAlt_, and snapNull_.

23  {
24  if (data.numEntries() != 1) throw std::invalid_argument("HybridNew::TestSimpleStatistics: dataset doesn't have exactly 1 entry.");
25  const RooArgSet *entry = data.get(0);
26  *paramsNull_ = *entry;
28  *paramsNull_ = nullPOI;
29  double nullNLL = pdfNull_->getVal();
30 
31  *paramsAlt_ = *entry;
33  double altNLL = pdfAlt_->getVal();
34 
35  return -log(nullNLL/altNLL);
36  }
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual const TString SimplerLikelihoodRatioTestStat::GetVarName ( ) const
inlinevirtual

Definition at line 38 of file SimplerLikelihoodRatioTestStat.h.

References pdfAlt_, and pdfNull_.

38  {
39  return TString::Format("-log(%s/%s)", pdfNull_->GetName(), pdfAlt_->GetName());
40  }

Member Data Documentation

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().