Logo ROOT  
Reference Guide
RooStats::HypoTestCalculatorGeneric Class Reference

Common base class for the Hypothesis Test Calculators.

It is not designed to use directly but via its derived classes

Same purpose as HybridCalculatorOriginal, but different implementation.

This is the "generic" version that works with any TestStatSampler. The HybridCalculator derives from this class but explicitly uses the ToyMCSampler as its TestStatSampler.

Definition at line 34 of file HypoTestCalculatorGeneric.h.

Public Member Functions

 HypoTestCalculatorGeneric (const RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, TestStatSampler *sampler=nullptr)
 Constructor. More...
 
 ~HypoTestCalculatorGeneric () override
 
const ModelConfigGetAlternateModel (void) const
 
const RooAbsDataGetData (void) const
 
virtual const RooArgSetGetFitInfo () const
 
HypoTestResultGetHypoTest () const override
 inherited methods from HypoTestCalculator interface More...
 
const ModelConfigGetNullModel (void) const
 
TestStatSamplerGetTestStatSampler (void) const
 Returns instance of TestStatSampler. More...
 
TClassIsA () const override
 
void SetAlternateModel (const ModelConfig &altModel) override
 Set the model for the alternate hypothesis (S+B) More...
 
void SetData (RooAbsData &data) override
 Set the DataSet. More...
 
void SetNullModel (const ModelConfig &nullModel) override
 set the model for the null hypothesis (only B) More...
 
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. More...
 
- Public Member Functions inherited from RooStats::HypoTestCalculator
virtual ~HypoTestCalculator ()
 
virtual HypoTestResultGetHypoTest () const =0
 main interface to get a HypoTestResult, pure virtual More...
 
virtual TClassIsA () const
 
virtual void SetAlternateModel (const ModelConfig &model)=0
 Set the model for the alternate hypothesis. More...
 
virtual void SetCommonModel (const ModelConfig &model)
 Set a common model for both the null and alternate, add to the workspace if not already there. More...
 
virtual void SetData (RooAbsData &data)=0
 Set the DataSet. More...
 
virtual void SetNullModel (const ModelConfig &model)=0
 Set the model for the null hypothesis. More...
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from RooStats::HypoTestCalculator
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Member Functions

virtual int CheckHook (void) const
 
virtual void PostHook () const
 
virtual int PreAltHook (RooArgSet *, double) const
 
virtual void PreHook () const
 
virtual int PreNullHook (RooArgSet *, double) const
 

Protected Attributes

const ModelConfigfAltModel
 
unsigned int fAltToysSeed
 
const RooAbsDatafData
 
TestStatSamplerfDefaultSampler
 
TestStatisticfDefaultTestStat
 
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 More...
 

#include <RooStats/HypoTestCalculatorGeneric.h>

Inheritance diagram for RooStats::HypoTestCalculatorGeneric:
[legend]

Constructor & Destructor Documentation

◆ HypoTestCalculatorGeneric()

HypoTestCalculatorGeneric::HypoTestCalculatorGeneric ( const RooAbsData data,
const ModelConfig altModel,
const ModelConfig nullModel,
TestStatSampler sampler = nullptr 
)

Constructor.

When test stat sampler is not provided uses ToyMCSampler and RatioOfProfiledLikelihoodsTestStat and nToys = 1000. User can : GetTestStatSampler()->SetNToys( # )

Definition at line 47 of file HypoTestCalculatorGeneric.cxx.

◆ ~HypoTestCalculatorGeneric()

HypoTestCalculatorGeneric::~HypoTestCalculatorGeneric ( )
override

Definition at line 93 of file HypoTestCalculatorGeneric.cxx.

Member Function Documentation

◆ CheckHook()

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

Reimplemented in RooStats::HybridCalculator.

Definition at line 76 of file HypoTestCalculatorGeneric.h.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

static Version_t RooStats::HypoTestCalculatorGeneric::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 104 of file HypoTestCalculatorGeneric.h.

◆ DeclFileName()

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

Definition at line 104 of file HypoTestCalculatorGeneric.h.

◆ GenerateSamplingDistribution()

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

◆ GetAlternateModel()

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

Definition at line 60 of file HypoTestCalculatorGeneric.h.

◆ GetData()

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

Definition at line 55 of file HypoTestCalculatorGeneric.h.

◆ GetFitInfo()

virtual const RooArgSet * RooStats::HypoTestCalculatorGeneric::GetFitInfo ( ) const
inlinevirtual

Reimplemented in RooStats::FrequentistCalculator.

Definition at line 57 of file HypoTestCalculatorGeneric.h.

◆ GetHypoTest()

HypoTestResult * HypoTestCalculatorGeneric::GetHypoTest ( ) const
overridevirtual

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 106 of file HypoTestCalculatorGeneric.cxx.

◆ GetNullModel()

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

Definition at line 56 of file HypoTestCalculatorGeneric.h.

◆ GetTestStatSampler()

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

Returns instance of TestStatSampler.

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

Definition at line 66 of file HypoTestCalculatorGeneric.h.

◆ IsA()

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

Reimplemented from RooStats::HypoTestCalculator.

Definition at line 104 of file HypoTestCalculatorGeneric.h.

◆ PostHook()

virtual void RooStats::HypoTestCalculatorGeneric::PostHook ( ) const
inlineprotectedvirtual

Reimplemented in RooStats::FrequentistCalculator.

Definition at line 80 of file HypoTestCalculatorGeneric.h.

◆ PreAltHook()

virtual int RooStats::HypoTestCalculatorGeneric::PreAltHook ( RooArgSet ,
double   
) const
inlineprotectedvirtual

◆ PreHook()

virtual void RooStats::HypoTestCalculatorGeneric::PreHook ( ) const
inlineprotectedvirtual

Reimplemented in RooStats::FrequentistCalculator.

Definition at line 79 of file HypoTestCalculatorGeneric.h.

◆ PreNullHook()

virtual int RooStats::HypoTestCalculatorGeneric::PreNullHook ( RooArgSet ,
double   
) const
inlineprotectedvirtual

◆ SetAdaptiveLimits()

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

◆ SetAlternateModel()

void RooStats::HypoTestCalculatorGeneric::SetAlternateModel ( const ModelConfig altModel)
inlineoverridevirtual

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

Implements RooStats::HypoTestCalculator.

Definition at line 59 of file HypoTestCalculatorGeneric.h.

◆ SetData()

void RooStats::HypoTestCalculatorGeneric::SetData ( RooAbsData data)
inlineoverridevirtual

Set the DataSet.

Implements RooStats::HypoTestCalculator.

Definition at line 62 of file HypoTestCalculatorGeneric.h.

◆ SetNullModel()

void RooStats::HypoTestCalculatorGeneric::SetNullModel ( const ModelConfig nullModel)
inlineoverridevirtual

set the model for the null hypothesis (only B)

Implements RooStats::HypoTestCalculator.

Definition at line 54 of file HypoTestCalculatorGeneric.h.

◆ SetupSampler()

void HypoTestCalculatorGeneric::SetupSampler ( const ModelConfig model) const
private

common setup for both models

Definition at line 77 of file HypoTestCalculatorGeneric.cxx.

◆ Streamer()

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

Reimplemented from RooStats::HypoTestCalculator.

◆ StreamerNVirtual()

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

Definition at line 104 of file HypoTestCalculatorGeneric.h.

◆ UseSameAltToys()

void HypoTestCalculatorGeneric::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.

to re-use same toys for alternate hypothesis

Definition at line 259 of file HypoTestCalculatorGeneric.cxx.

Member Data Documentation

◆ fAltModel

const ModelConfig* RooStats::HypoTestCalculatorGeneric::fAltModel
protected

Definition at line 83 of file HypoTestCalculatorGeneric.h.

◆ fAltToysSeed

unsigned int RooStats::HypoTestCalculatorGeneric::fAltToysSeed
protected

Definition at line 90 of file HypoTestCalculatorGeneric.h.

◆ fData

const RooAbsData* RooStats::HypoTestCalculatorGeneric::fData
protected

Definition at line 85 of file HypoTestCalculatorGeneric.h.

◆ fDefaultSampler

TestStatSampler* RooStats::HypoTestCalculatorGeneric::fDefaultSampler
protected

Definition at line 87 of file HypoTestCalculatorGeneric.h.

◆ fDefaultTestStat

TestStatistic* RooStats::HypoTestCalculatorGeneric::fDefaultTestStat
protected

Definition at line 88 of file HypoTestCalculatorGeneric.h.

◆ fNullModel

const ModelConfig* RooStats::HypoTestCalculatorGeneric::fNullModel
protected

Definition at line 84 of file HypoTestCalculatorGeneric.h.

◆ fTestStatSampler

TestStatSampler* RooStats::HypoTestCalculatorGeneric::fTestStatSampler
protected

Definition at line 86 of file HypoTestCalculatorGeneric.h.

Libraries for RooStats::HypoTestCalculatorGeneric:
[legend]

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