Logo ROOT  
Reference Guide
RooStats::ProfileLikelihoodTestStat Class Reference

ProfileLikelihoodTestStat is an implementation of the TestStatistic interface that calculates the profile likelihood ratio at a particular parameter point given a dataset.

It does not constitute a statistical test, for that one may either use:

Definition at line 30 of file ProfileLikelihoodTestStat.h.

Public Member Functions

 ProfileLikelihoodTestStat ()
 
 ProfileLikelihoodTestStat (RooAbsPdf &pdf)
 
 ~ProfileLikelihoodTestStat () override
 
virtual void EnableDetailedOutput (bool e=true, bool withErrorsAndPulls=false)
 
double Evaluate (RooAbsData &data, RooArgSet &paramsOfInterest) override
 Main interface to evaluate the test statistic on a dataset. More...
 
virtual double EvaluateProfileLikelihood (int type, RooAbsData &data, RooArgSet &paramsOfInterest)
 evaluate the profile likelihood ratio (type = 0) or the minimum of likelihood (type=1) or the conditional LL (type = 2) More...
 
const RooArgSetGetDetailedOutput (void) const override
 Returns detailed output. More...
 
virtual RooAbsPdfGetPdf () const
 
const TString GetVarName () const override
 
TClassIsA () const override
 
bool IsOneSidedDiscovery () const
 
bool IsTwoSided () const
 
void SetConditionalObservables (const RooArgSet &set) override
 set the conditional observables which will be used when creating the NLL so the pdf's will not be normalized on the conditional observables when computing the NLL More...
 
void SetGlobalObservables (const RooArgSet &set) override
 set the global observables which will be used when creating the NLL so the constraint pdf's will be normalized correctly on the global observables when computing the NLL More...
 
void SetLOffset (bool flag=true)
 
void SetMinimizer (const char *minimizer)
 
void SetOneSided (bool flag=true)
 
void SetOneSidedDiscovery (bool flag=true)
 
void SetPrintLevel (Int_t printlevel)
 
void SetReuseNLL (bool flag)
 
void SetSigned (bool flag=true)
 
void SetStrategy (Int_t strategy)
 
void SetTolerance (double tol)
 
virtual void SetVarName (const char *name)
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from RooStats::TestStatistic
virtual ~TestStatistic ()
 
virtual double Evaluate (RooAbsData &data, RooArgSet &nullPOI)=0
 Main interface to evaluate the test statistic on a dataset given the values for the Null Parameters Of Interest. More...
 
virtual const RooArgSetGetDetailedOutput () const
 return detailed output: for fits this can be pulls, processing time, ... The returned pointer will not loose validity until another call to Evaluate. More...
 
virtual const TString GetVarName () const =0
 
virtual TClassIsA () const
 
virtual bool PValueIsRightTail (void) const
 Defines the sign convention of the test statistic. Overwrite function if necessary. More...
 
virtual void SetConditionalObservables (const RooArgSet &)
 interface to set conditional observables. If a test statistics needs them it will re-implement this function More...
 
virtual void SetGlobalObservables (const RooArgSet &)
 interface to set global observables. If a test statistics needs them it will re-implement this function More...
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static void SetAlwaysReuseNLL (bool flag)
 
- Static Public Member Functions inherited from RooStats::TestStatistic
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Private Types

enum  LimitType { twoSided , oneSided , oneSidedDiscovery }
 

Private Member Functions

RooFitResultGetMinNLL ()
 find minimum of NLL using RooMinimizer More...
 

Private Attributes

const RooArgSetfCachedBestFitParams
 
RooArgSet fConditionalObs
 conditional observables More...
 
RooArgSetfDetailedOutput
 ! More...
 
bool fDetailedOutputEnabled
 this will store a snapshot of the unconditional nuisance parameter fit. More...
 
bool fDetailedOutputWithErrorsAndPulls
 
RooArgSet fGlobalObs
 global observables More...
 
RooAbsDatafLastData
 
LimitType fLimitType
 
bool fLOffset
 
TString fMinimizer
 
RooAbsRealfNll
 
RooAbsPdffPdf
 
Int_t fPrintLevel
 
bool fReuseNll
 
bool fSigned
 
Int_t fStrategy
 
double fTolerance
 
TString fVarName
 

Static Private Attributes

static bool fgAlwaysReuseNll = true
 

#include <RooStats/ProfileLikelihoodTestStat.h>

Inheritance diagram for RooStats::ProfileLikelihoodTestStat:
[legend]

Member Enumeration Documentation

◆ LimitType

Enumerator
twoSided 
oneSided 
oneSidedDiscovery 

Definition at line 32 of file ProfileLikelihoodTestStat.h.

Constructor & Destructor Documentation

◆ ProfileLikelihoodTestStat() [1/2]

RooStats::ProfileLikelihoodTestStat::ProfileLikelihoodTestStat ( )
inline

Definition at line 35 of file ProfileLikelihoodTestStat.h.

◆ ProfileLikelihoodTestStat() [2/2]

RooStats::ProfileLikelihoodTestStat::ProfileLikelihoodTestStat ( RooAbsPdf pdf)
inline

Definition at line 55 of file ProfileLikelihoodTestStat.h.

◆ ~ProfileLikelihoodTestStat()

RooStats::ProfileLikelihoodTestStat::~ProfileLikelihoodTestStat ( )
inlineoverride

Definition at line 75 of file ProfileLikelihoodTestStat.h.

Member Function Documentation

◆ Class()

static TClass * RooStats::ProfileLikelihoodTestStat::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooStats::ProfileLikelihoodTestStat::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t RooStats::ProfileLikelihoodTestStat::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 169 of file ProfileLikelihoodTestStat.h.

◆ DeclFileName()

static const char * RooStats::ProfileLikelihoodTestStat::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 169 of file ProfileLikelihoodTestStat.h.

◆ EnableDetailedOutput()

virtual void RooStats::ProfileLikelihoodTestStat::EnableDetailedOutput ( bool  e = true,
bool  withErrorsAndPulls = false 
)
inlinevirtual

Definition at line 106 of file ProfileLikelihoodTestStat.h.

◆ Evaluate()

double RooStats::ProfileLikelihoodTestStat::Evaluate ( RooAbsData data,
RooArgSet paramsOfInterest 
)
inlineoverridevirtual

Main interface to evaluate the test statistic on a dataset.

Implements RooStats::TestStatistic.

Definition at line 99 of file ProfileLikelihoodTestStat.h.

◆ EvaluateProfileLikelihood()

double RooStats::ProfileLikelihoodTestStat::EvaluateProfileLikelihood ( int  type,
RooAbsData data,
RooArgSet paramsOfInterest 
)
virtual

evaluate the profile likelihood ratio (type = 0) or the minimum of likelihood (type=1) or the conditional LL (type = 2)

internal function to evaluate test statistics can do depending on type:

  • type = 0 standard evaluation,
  • type = 1 find only unconditional NLL minimum,
  • type = 2 conditional MLL

Definition at line 55 of file ProfileLikelihoodTestStat.cxx.

◆ GetDetailedOutput()

const RooArgSet * RooStats::ProfileLikelihoodTestStat::GetDetailedOutput ( void  ) const
inlineoverridevirtual

Returns detailed output.

The value returned by this function is updated after each call to Evaluate(). The returned RooArgSet contains the following:

  • the minimum nll, fitstatus and convergence quality for each fit
  • for each fit and for each non-constant parameter, the value, error and pull of the parameter are stored

Reimplemented from RooStats::TestStatistic.

Definition at line 118 of file ProfileLikelihoodTestStat.h.

◆ GetMinNLL()

RooFitResult * RooStats::ProfileLikelihoodTestStat::GetMinNLL ( )
private

find minimum of NLL using RooMinimizer

Definition at line 297 of file ProfileLikelihoodTestStat.cxx.

◆ GetPdf()

virtual RooAbsPdf * RooStats::ProfileLikelihoodTestStat::GetPdf ( ) const
inlinevirtual

Definition at line 133 of file ProfileLikelihoodTestStat.h.

◆ GetVarName()

const TString RooStats::ProfileLikelihoodTestStat::GetVarName ( ) const
inlineoverridevirtual

Implements RooStats::TestStatistic.

Definition at line 131 of file ProfileLikelihoodTestStat.h.

◆ IsA()

TClass * RooStats::ProfileLikelihoodTestStat::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from RooStats::TestStatistic.

Definition at line 169 of file ProfileLikelihoodTestStat.h.

◆ IsOneSidedDiscovery()

bool RooStats::ProfileLikelihoodTestStat::IsOneSidedDiscovery ( ) const
inline

Definition at line 86 of file ProfileLikelihoodTestStat.h.

◆ IsTwoSided()

bool RooStats::ProfileLikelihoodTestStat::IsTwoSided ( ) const
inline

Definition at line 85 of file ProfileLikelihoodTestStat.h.

◆ SetAlwaysReuseNLL()

void RooStats::ProfileLikelihoodTestStat::SetAlwaysReuseNLL ( bool  flag)
static

Definition at line 46 of file ProfileLikelihoodTestStat.cxx.

◆ SetConditionalObservables()

void RooStats::ProfileLikelihoodTestStat::SetConditionalObservables ( const RooArgSet set)
inlineoverridevirtual

set the conditional observables which will be used when creating the NLL so the pdf's will not be normalized on the conditional observables when computing the NLL

Reimplemented from RooStats::TestStatistic.

Definition at line 124 of file ProfileLikelihoodTestStat.h.

◆ SetGlobalObservables()

void RooStats::ProfileLikelihoodTestStat::SetGlobalObservables ( const RooArgSet set)
inlineoverridevirtual

set the global observables which will be used when creating the NLL so the constraint pdf's will be normalized correctly on the global observables when computing the NLL

Reimplemented from RooStats::TestStatistic.

Definition at line 128 of file ProfileLikelihoodTestStat.h.

◆ SetLOffset()

void RooStats::ProfileLikelihoodTestStat::SetLOffset ( bool  flag = true)
inline

Definition at line 91 of file ProfileLikelihoodTestStat.h.

◆ SetMinimizer()

void RooStats::ProfileLikelihoodTestStat::SetMinimizer ( const char *  minimizer)
inline

Definition at line 93 of file ProfileLikelihoodTestStat.h.

◆ SetOneSided()

void RooStats::ProfileLikelihoodTestStat::SetOneSided ( bool  flag = true)
inline

Definition at line 81 of file ProfileLikelihoodTestStat.h.

◆ SetOneSidedDiscovery()

void RooStats::ProfileLikelihoodTestStat::SetOneSidedDiscovery ( bool  flag = true)
inline

Definition at line 82 of file ProfileLikelihoodTestStat.h.

◆ SetPrintLevel()

void RooStats::ProfileLikelihoodTestStat::SetPrintLevel ( Int_t  printlevel)
inline

Definition at line 96 of file ProfileLikelihoodTestStat.h.

◆ SetReuseNLL()

void RooStats::ProfileLikelihoodTestStat::SetReuseNLL ( bool  flag)
inline

Definition at line 90 of file ProfileLikelihoodTestStat.h.

◆ SetSigned()

void RooStats::ProfileLikelihoodTestStat::SetSigned ( bool  flag = true)
inline

Definition at line 83 of file ProfileLikelihoodTestStat.h.

◆ SetStrategy()

void RooStats::ProfileLikelihoodTestStat::SetStrategy ( Int_t  strategy)
inline

Definition at line 94 of file ProfileLikelihoodTestStat.h.

◆ SetTolerance()

void RooStats::ProfileLikelihoodTestStat::SetTolerance ( double  tol)
inline

Definition at line 95 of file ProfileLikelihoodTestStat.h.

◆ SetVarName()

virtual void RooStats::ProfileLikelihoodTestStat::SetVarName ( const char *  name)
inlinevirtual

Definition at line 130 of file ProfileLikelihoodTestStat.h.

◆ Streamer()

void RooStats::ProfileLikelihoodTestStat::Streamer ( TBuffer )
overridevirtual

Reimplemented from RooStats::TestStatistic.

◆ StreamerNVirtual()

void RooStats::ProfileLikelihoodTestStat::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 169 of file ProfileLikelihoodTestStat.h.

Member Data Documentation

◆ fCachedBestFitParams

const RooArgSet* RooStats::ProfileLikelihoodTestStat::fCachedBestFitParams
private

Definition at line 143 of file ProfileLikelihoodTestStat.h.

◆ fConditionalObs

RooArgSet RooStats::ProfileLikelihoodTestStat::fConditionalObs
private

conditional observables

Definition at line 154 of file ProfileLikelihoodTestStat.h.

◆ fDetailedOutput

RooArgSet* RooStats::ProfileLikelihoodTestStat::fDetailedOutput
private

!

Definition at line 153 of file ProfileLikelihoodTestStat.h.

◆ fDetailedOutputEnabled

bool RooStats::ProfileLikelihoodTestStat::fDetailedOutputEnabled
private

this will store a snapshot of the unconditional nuisance parameter fit.

Definition at line 151 of file ProfileLikelihoodTestStat.h.

◆ fDetailedOutputWithErrorsAndPulls

bool RooStats::ProfileLikelihoodTestStat::fDetailedOutputWithErrorsAndPulls
private

Definition at line 152 of file ProfileLikelihoodTestStat.h.

◆ fgAlwaysReuseNll

bool RooStats::ProfileLikelihoodTestStat::fgAlwaysReuseNll = true
staticprivate

Definition at line 159 of file ProfileLikelihoodTestStat.h.

◆ fGlobalObs

RooArgSet RooStats::ProfileLikelihoodTestStat::fGlobalObs
private

global observables

Definition at line 155 of file ProfileLikelihoodTestStat.h.

◆ fLastData

RooAbsData* RooStats::ProfileLikelihoodTestStat::fLastData
private

Definition at line 144 of file ProfileLikelihoodTestStat.h.

◆ fLimitType

LimitType RooStats::ProfileLikelihoodTestStat::fLimitType
private

Definition at line 146 of file ProfileLikelihoodTestStat.h.

◆ fLOffset

bool RooStats::ProfileLikelihoodTestStat::fLOffset
private

Definition at line 165 of file ProfileLikelihoodTestStat.h.

◆ fMinimizer

TString RooStats::ProfileLikelihoodTestStat::fMinimizer
private

Definition at line 161 of file ProfileLikelihoodTestStat.h.

◆ fNll

RooAbsReal* RooStats::ProfileLikelihoodTestStat::fNll
private

Definition at line 142 of file ProfileLikelihoodTestStat.h.

◆ fPdf

RooAbsPdf* RooStats::ProfileLikelihoodTestStat::fPdf
private

Definition at line 141 of file ProfileLikelihoodTestStat.h.

◆ fPrintLevel

Int_t RooStats::ProfileLikelihoodTestStat::fPrintLevel
private

Definition at line 164 of file ProfileLikelihoodTestStat.h.

◆ fReuseNll

bool RooStats::ProfileLikelihoodTestStat::fReuseNll
private

Definition at line 160 of file ProfileLikelihoodTestStat.h.

◆ fSigned

bool RooStats::ProfileLikelihoodTestStat::fSigned
private

Definition at line 147 of file ProfileLikelihoodTestStat.h.

◆ fStrategy

Int_t RooStats::ProfileLikelihoodTestStat::fStrategy
private

Definition at line 162 of file ProfileLikelihoodTestStat.h.

◆ fTolerance

double RooStats::ProfileLikelihoodTestStat::fTolerance
private

Definition at line 163 of file ProfileLikelihoodTestStat.h.

◆ fVarName

TString RooStats::ProfileLikelihoodTestStat::fVarName
private

Definition at line 157 of file ProfileLikelihoodTestStat.h.

Libraries for RooStats::ProfileLikelihoodTestStat:
[legend]

The documentation for this class was generated from the following files: