ROOT logo
ROOT » ROOFIT » ROOSTATS » RooStats::HypoTestCalculatorGeneric

class RooStats::HypoTestCalculatorGeneric: public RooStats::HypoTestCalculator

Function Members (Methods)

protected:
virtual intCheckHook() const
virtual intPreAltHook(RooArgSet*, double) const
virtual intPreNullHook(RooArgSet*, double) const
private:
RooStats::SamplingDistribution*GenerateSamplingDistribution(RooStats::ModelConfig* thisModel, double obsTestStat, RooAbsPdf* impDens = NULL, const RooArgSet* impSnapshot = NULL) const
voidSetAdaptiveLimits(Double_t obsTestStat, Bool_t forNull) const
voidSetupSampler(const RooStats::ModelConfig& model) const

Data Members

protected:
const RooStats::ModelConfig*fAltModel
const RooAbsData*fData
RooStats::TestStatSampler*fDefaultSampler
RooStats::TestStatistic*fDefaultTestStat
const RooStats::ModelConfig*fNullModel
RooStats::TestStatSampler*fTestStatSampler

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HypoTestCalculatorGeneric(const RooAbsData& data, const RooStats::ModelConfig& altModel, const RooStats::ModelConfig& nullModel, RooStats::TestStatSampler* sampler = 0)
 Constructor. When test stat sampler is not provided
 uses ToyMCSampler and RatioOfProfiledLikelihoodsTestStat
 and nToys = 1000.
 User can : GetTestStatSampler()->SetNToys( # )
void SetupSampler(const RooStats::ModelConfig& model) const
 common setup for both models
~HypoTestCalculatorGeneric()
HypoTestResult* GetHypoTest() const
HypoTestCalculatorGeneric(const RooAbsData& data, const RooStats::ModelConfig& altModel, const RooStats::ModelConfig& nullModel, RooStats::TestStatSampler* sampler = 0)
void SetNullModel(const RooStats::ModelConfig& nullModel)
 set the model for the null hypothesis (only B)
{ fNullModel = &nullModel; }
const ModelConfig* GetNullModel(void)
 set the model for the alternate hypothesis  (S+B)
{ return fNullModel; }
void SetAlternateModel(const RooStats::ModelConfig& altModel)
{ fAltModel = &altModel; }
const ModelConfig* GetAlternateModel(void)
 Set the DataSet
{ return fAltModel; }
void SetData(RooAbsData& data)
{ fData = &data; }
TestStatSampler* GetTestStatSampler(void)
 Returns instance of TestStatSampler. Use to change properties of
 TestStatSampler, e.g. GetTestStatSampler.SetTestSize(Double_t size);
{ return fTestStatSampler; }
int CheckHook(void)
 should return zero (to be used later for conditional flow)
{ return 0; }
int PreNullHook(RooArgSet* , double ) const
{ return 0; }
int PreAltHook(RooArgSet* , double ) const
{ return 0; }
void SetAdaptiveLimits(Double_t obsTestStat, Bool_t forNull) const
SamplingDistribution* GenerateSamplingDistribution(RooStats::ModelConfig* thisModel, double obsTestStat, RooAbsPdf* impDens = NULL, const RooArgSet* impSnapshot = NULL) const