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.
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
![]() | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr 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 ModelConfig * | fAltModel |
unsigned int | fAltToysSeed |
const RooAbsData * | fData |
TestStatSampler * | fDefaultSampler |
TestStatistic * | fDefaultTestStat |
const ModelConfig * | fNullModel |
TestStatSampler * | fTestStatSampler |
Private Member Functions | |
SamplingDistribution * | GenerateSamplingDistribution (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 | |
#include <RooStats/HypoTestCalculatorGeneric.h>
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 46 of file HypoTestCalculatorGeneric.cxx.
|
override |
Definition at line 92 of file HypoTestCalculatorGeneric.cxx.
Reimplemented in RooStats::HybridCalculator.
Definition at line 73 of file HypoTestCalculatorGeneric.h.
|
inlinestaticconstexpr |
Definition at line 101 of file HypoTestCalculatorGeneric.h.
Definition at line 101 of file HypoTestCalculatorGeneric.h.
|
private |
|
inline |
Definition at line 57 of file HypoTestCalculatorGeneric.h.
|
inline |
Definition at line 52 of file HypoTestCalculatorGeneric.h.
Reimplemented in RooStats::FrequentistCalculator.
Definition at line 54 of file HypoTestCalculatorGeneric.h.
|
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:
Implements RooStats::HypoTestCalculator.
Definition at line 105 of file HypoTestCalculatorGeneric.cxx.
|
inline |
Definition at line 53 of file HypoTestCalculatorGeneric.h.
|
inline |
Returns instance of TestStatSampler.
Use to change properties of TestStatSampler, e.g. GetTestStatSampler.SetTestSize(double size);
Definition at line 63 of file HypoTestCalculatorGeneric.h.
|
inlineoverridevirtual |
Reimplemented from RooStats::HypoTestCalculator.
Definition at line 101 of file HypoTestCalculatorGeneric.h.
|
inlineprotectedvirtual |
Reimplemented in RooStats::FrequentistCalculator.
Definition at line 77 of file HypoTestCalculatorGeneric.h.
|
inlineprotectedvirtual |
Reimplemented in RooStats::HybridCalculator, and RooStats::FrequentistCalculator.
Definition at line 75 of file HypoTestCalculatorGeneric.h.
|
inlineprotectedvirtual |
Reimplemented in RooStats::FrequentistCalculator.
Definition at line 76 of file HypoTestCalculatorGeneric.h.
|
inlineprotectedvirtual |
Reimplemented in RooStats::HybridCalculator, and RooStats::FrequentistCalculator.
Definition at line 74 of file HypoTestCalculatorGeneric.h.
|
private |
|
inlineoverridevirtual |
Set the model for the alternate hypothesis (S+B)
Implements RooStats::HypoTestCalculator.
Definition at line 56 of file HypoTestCalculatorGeneric.h.
|
inlineoverridevirtual |
Set the DataSet.
Implements RooStats::HypoTestCalculator.
Definition at line 59 of file HypoTestCalculatorGeneric.h.
|
inlineoverridevirtual |
set the model for the null hypothesis (only B)
Implements RooStats::HypoTestCalculator.
Definition at line 51 of file HypoTestCalculatorGeneric.h.
|
private |
common setup for both models
Definition at line 76 of file HypoTestCalculatorGeneric.cxx.
|
overridevirtual |
Reimplemented from RooStats::HypoTestCalculator.
|
inline |
Definition at line 101 of file HypoTestCalculatorGeneric.h.
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 250 of file HypoTestCalculatorGeneric.cxx.
|
protected |
Definition at line 80 of file HypoTestCalculatorGeneric.h.
|
protected |
Definition at line 87 of file HypoTestCalculatorGeneric.h.
|
protected |
Definition at line 82 of file HypoTestCalculatorGeneric.h.
|
protected |
Definition at line 84 of file HypoTestCalculatorGeneric.h.
|
protected |
Definition at line 85 of file HypoTestCalculatorGeneric.h.
|
protected |
Definition at line 81 of file HypoTestCalculatorGeneric.h.
|
protected |
Definition at line 83 of file HypoTestCalculatorGeneric.h.