Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RooStats::FrequentistCalculator Class Reference

Does a frequentist hypothesis test.

Hypothesis Test Calculator using a full frequentist procedure for sampling the test statistic distribution. The nuisance parameters are fixed to their MLEs. The use of ToyMCSampler as the TestStatSampler is assumed.

Definition at line 25 of file FrequentistCalculator.h.

Public Member Functions

 FrequentistCalculator (const RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, TestStatSampler *sampler=nullptr)
 ~FrequentistCalculator () override
const ModelConfigGetAlternateModel (void) const
const RooAbsDataGetData (void) const
const RooArgSetGetFitInfo () const override
HypoTestResultGetHypoTest () const override
 inherited methods from HypoTestCalculator interface
const ModelConfigGetNullModel (void) const
TestStatSamplerGetTestStatSampler (void) const
 Returns instance of TestStatSampler.
TClassIsA () const override
void SetAlternateModel (const ModelConfig &altModel) override
 Set the model for the alternate hypothesis (S+B).
virtual void SetCommonModel (const ModelConfig &model)
 Set a common model for both the null and alternate, add to the workspace if not already there.
void SetConditionalMLEsAlt (const RooArgSet *c)
 set given nuisance parameters to a specific value that will be used instead of their profiled value for Alternate toys
void SetConditionalMLEsNull (const RooArgSet *c)
 set given nuisance parameters to a specific value that will be used instead of their profiled value for Null toys
void SetData (RooAbsData &data) override
 Set the DataSet.
void SetNToysInTails (int toysNull, int toysAlt)
 set least number of toys in tails
void SetNullModel (const ModelConfig &nullModel) override
 set the model for the null hypothesis (only B)
void SetToys (int toysNull, int toysAlt)
 set number of toys
void StoreFitInfo (bool val=true)
void Streamer (TBuffer &) override
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
void UseSameAltToys ()
 Set this for re-using always the same toys for alternate hypothesis in case of calls at different null parameter points This is useful to get more stable bands when running the HypoTest inversion.

Static Public Member Functions

static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()

Protected Member Functions

virtual int CheckHook (void) const
void PostHook () const override
int PreAltHook (RooArgSet *parameterPoint, double obsTestStat) const override
 configure TestStatSampler for the Alt run
void PreHook () const override
int PreNullHook (RooArgSet *parameterPoint, double obsTestStat) const override
 configure TestStatSampler for the Null run

Protected Attributes

const ModelConfigfAltModel
unsigned int fAltToysSeed
const RooArgSetfConditionalMLEsAlt = nullptr
const RooArgSetfConditionalMLEsNull = nullptr
const RooAbsDatafData
TestStatSamplerfDefaultSampler
TestStatisticfDefaultTestStat
int fNToysAlt
int fNToysAltTail
int fNToysNull
int fNToysNullTail
const ModelConfigfNullModel
TestStatSamplerfTestStatSampler

Private Member Functions

SamplingDistributionGenerateSamplingDistribution (ModelConfig *thisModel, double obsTestStat, RooAbsPdf *impDens=nullptr, const RooArgSet *impSnapshot=nullptr) const
void SetAdaptiveLimits (double obsTestStat, bool forNull) const
void SetupSampler (const ModelConfig &model) const
 common setup for both models

Private Attributes

RooArgSetfFitInfo
bool fStoreFitInfo

#include <RooStats/FrequentistCalculator.h>

Inheritance diagram for RooStats::FrequentistCalculator:
RooStats::HypoTestCalculatorGeneric RooStats::HypoTestCalculator

Constructor & Destructor Documentation

◆ FrequentistCalculator()

RooStats::FrequentistCalculator::FrequentistCalculator ( const RooAbsData & data,
const ModelConfig & altModel,
const ModelConfig & nullModel,
TestStatSampler * sampler = nullptr )
inline

Definition at line 28 of file FrequentistCalculator.h.

◆ ~FrequentistCalculator()

RooStats::FrequentistCalculator::~FrequentistCalculator ( )
inlineoverride

Definition at line 44 of file FrequentistCalculator.h.

Member Function Documentation

◆ CheckHook()

virtual int RooStats::HypoTestCalculatorGeneric::CheckHook ( void ) const
inlineprotectedvirtualinherited

Reimplemented in RooStats::HybridCalculator.

Definition at line 73 of file HypoTestCalculatorGeneric.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 111 of file FrequentistCalculator.h.

◆ DeclFileName()

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

Definition at line 111 of file FrequentistCalculator.h.

◆ GenerateSamplingDistribution()

SamplingDistribution * RooStats::HypoTestCalculatorGeneric::GenerateSamplingDistribution ( ModelConfig * thisModel,
double obsTestStat,
RooAbsPdf * impDens = nullptr,
const RooArgSet * impSnapshot = nullptr ) const
privateinherited

◆ GetAlternateModel()

const ModelConfig * RooStats::HypoTestCalculatorGeneric::GetAlternateModel ( void ) const
inlineinherited

Definition at line 57 of file HypoTestCalculatorGeneric.h.

◆ GetData()

const RooAbsData * RooStats::HypoTestCalculatorGeneric::GetData ( void ) const
inlineinherited

Definition at line 52 of file HypoTestCalculatorGeneric.h.

◆ GetFitInfo()

const RooArgSet * RooStats::FrequentistCalculator::GetFitInfo ( ) const
inlineoverridevirtual

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 79 of file FrequentistCalculator.h.

◆ GetHypoTest()

HypoTestResult * HypoTestCalculatorGeneric::GetHypoTest ( ) const
overridevirtualinherited

inherited methods from HypoTestCalculator interface

several possibilities: no prior nuisance given and no nuisance parameters: ok no prior nuisance given but nuisance parameters: error prior nuisance given for some nuisance parameters:

  • nuisance parameters are constant, so they don't float in test statistic
  • nuisance parameters are floating, so they do float in test statistic

Implements RooStats::HypoTestCalculator.

Definition at line 117 of file HypoTestCalculatorGeneric.cxx.

◆ GetNullModel()

const ModelConfig * RooStats::HypoTestCalculatorGeneric::GetNullModel ( void ) const
inlineinherited

Definition at line 53 of file HypoTestCalculatorGeneric.h.

◆ GetTestStatSampler()

TestStatSampler * RooStats::HypoTestCalculatorGeneric::GetTestStatSampler ( void ) const
inlineinherited

Returns instance of TestStatSampler.

Use to change properties of TestStatSampler, e.g. GetTestStatSampler.SetTestSize(double size);

Definition at line 63 of file HypoTestCalculatorGeneric.h.

◆ IsA()

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

Reimplemented from RooStats::HypoTestCalculator.

Definition at line 111 of file FrequentistCalculator.h.

◆ PostHook()

void FrequentistCalculator::PostHook ( ) const
overrideprotectedvirtual

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 48 of file FrequentistCalculator.cxx.

◆ PreAltHook()

int FrequentistCalculator::PreAltHook ( RooArgSet * parameterPoint,
double obsTestStat ) const
overrideprotectedvirtual

configure TestStatSampler for the Alt run

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 165 of file FrequentistCalculator.cxx.

◆ PreHook()

void FrequentistCalculator::PreHook ( ) const
overrideprotectedvirtual

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 36 of file FrequentistCalculator.cxx.

◆ PreNullHook()

int FrequentistCalculator::PreNullHook ( RooArgSet * parameterPoint,
double obsTestStat ) const
overrideprotectedvirtual

configure TestStatSampler for the Null run

Reimplemented from RooStats::HypoTestCalculatorGeneric.

Definition at line 53 of file FrequentistCalculator.cxx.

◆ SetAdaptiveLimits()

void RooStats::HypoTestCalculatorGeneric::SetAdaptiveLimits ( double obsTestStat,
bool forNull ) const
privateinherited

◆ SetAlternateModel()

void RooStats::HypoTestCalculatorGeneric::SetAlternateModel ( const ModelConfig & altModel)
inlineoverridevirtualinherited

Set the model for the alternate hypothesis (S+B).

Implements RooStats::HypoTestCalculator.

Definition at line 56 of file HypoTestCalculatorGeneric.h.

◆ SetCommonModel()

virtual void RooStats::HypoTestCalculator::SetCommonModel ( const ModelConfig & model)
inlinevirtualinherited

Set a common model for both the null and alternate, add to the workspace if not already there.

Definition at line 70 of file HypoTestCalculator.h.

◆ SetConditionalMLEsAlt()

void RooStats::FrequentistCalculator::SetConditionalMLEsAlt ( const RooArgSet * c)
inline

set given nuisance parameters to a specific value that will be used instead of their profiled value for Alternate toys

Definition at line 68 of file FrequentistCalculator.h.

◆ SetConditionalMLEsNull()

void RooStats::FrequentistCalculator::SetConditionalMLEsNull ( const RooArgSet * c)
inline

set given nuisance parameters to a specific value that will be used instead of their profiled value for Null toys

Definition at line 59 of file FrequentistCalculator.h.

◆ SetData()

void RooStats::HypoTestCalculatorGeneric::SetData ( RooAbsData & data)
inlineoverridevirtualinherited

Set the DataSet.

Implements RooStats::HypoTestCalculator.

Definition at line 59 of file HypoTestCalculatorGeneric.h.

◆ SetNToysInTails()

void RooStats::FrequentistCalculator::SetNToysInTails ( int toysNull,
int toysAlt )
inline

set least number of toys in tails

Definition at line 55 of file FrequentistCalculator.h.

◆ SetNullModel()

void RooStats::HypoTestCalculatorGeneric::SetNullModel ( const ModelConfig & nullModel)
inlineoverridevirtualinherited

set the model for the null hypothesis (only B)

Implements RooStats::HypoTestCalculator.

Definition at line 51 of file HypoTestCalculatorGeneric.h.

◆ SetToys()

void RooStats::FrequentistCalculator::SetToys ( int toysNull,
int toysAlt )
inline

set number of toys

Definition at line 52 of file FrequentistCalculator.h.

◆ SetupSampler()

void HypoTestCalculatorGeneric::SetupSampler ( const ModelConfig & model) const
privateinherited

common setup for both models

Definition at line 88 of file HypoTestCalculatorGeneric.cxx.

◆ StoreFitInfo()

void RooStats::FrequentistCalculator::StoreFitInfo ( bool val = true)
inline

Definition at line 75 of file FrequentistCalculator.h.

◆ Streamer()

void RooStats::FrequentistCalculator::Streamer ( TBuffer & )
overridevirtual

Reimplemented from RooStats::HypoTestCalculator.

◆ StreamerNVirtual()

void RooStats::FrequentistCalculator::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 111 of file FrequentistCalculator.h.

◆ UseSameAltToys()

void HypoTestCalculatorGeneric::UseSameAltToys ( )
inherited

Set this for re-using always the same toys for alternate hypothesis in case of calls at different null parameter points This is useful to get more stable bands when running the HypoTest inversion.

to re-use same toys for alternate hypothesis

Definition at line 276 of file HypoTestCalculatorGeneric.cxx.

Member Data Documentation

◆ fAltModel

const ModelConfig* RooStats::HypoTestCalculatorGeneric::fAltModel
protectedinherited

Definition at line 80 of file HypoTestCalculatorGeneric.h.

◆ fAltToysSeed

unsigned int RooStats::HypoTestCalculatorGeneric::fAltToysSeed
protectedinherited

Definition at line 87 of file HypoTestCalculatorGeneric.h.

◆ fConditionalMLEsAlt

const RooArgSet* RooStats::FrequentistCalculator::fConditionalMLEsAlt = nullptr
protected

Definition at line 96 of file FrequentistCalculator.h.

◆ fConditionalMLEsNull

const RooArgSet* RooStats::FrequentistCalculator::fConditionalMLEsNull = nullptr
protected

Definition at line 95 of file FrequentistCalculator.h.

◆ fData

const RooAbsData* RooStats::HypoTestCalculatorGeneric::fData
protectedinherited

Definition at line 82 of file HypoTestCalculatorGeneric.h.

◆ fDefaultSampler

TestStatSampler* RooStats::HypoTestCalculatorGeneric::fDefaultSampler
protectedinherited

Definition at line 84 of file HypoTestCalculatorGeneric.h.

◆ fDefaultTestStat

TestStatistic* RooStats::HypoTestCalculatorGeneric::fDefaultTestStat
protectedinherited

Definition at line 85 of file HypoTestCalculatorGeneric.h.

◆ fFitInfo

RooArgSet* RooStats::FrequentistCalculator::fFitInfo
mutableprivate

Definition at line 107 of file FrequentistCalculator.h.

◆ fNToysAlt

int RooStats::FrequentistCalculator::fNToysAlt
protected

Definition at line 100 of file FrequentistCalculator.h.

◆ fNToysAltTail

int RooStats::FrequentistCalculator::fNToysAltTail
protected

Definition at line 104 of file FrequentistCalculator.h.

◆ fNToysNull

int RooStats::FrequentistCalculator::fNToysNull
protected

Definition at line 99 of file FrequentistCalculator.h.

◆ fNToysNullTail

int RooStats::FrequentistCalculator::fNToysNullTail
protected

Definition at line 103 of file FrequentistCalculator.h.

◆ fNullModel

const ModelConfig* RooStats::HypoTestCalculatorGeneric::fNullModel
protectedinherited

Definition at line 81 of file HypoTestCalculatorGeneric.h.

◆ fStoreFitInfo

bool RooStats::FrequentistCalculator::fStoreFitInfo
private

Definition at line 108 of file FrequentistCalculator.h.

◆ fTestStatSampler

TestStatSampler* RooStats::HypoTestCalculatorGeneric::fTestStatSampler
protectedinherited

Definition at line 83 of file HypoTestCalculatorGeneric.h.


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