11 #ifndef ROOSTATS_HypoTestInverter 12 #define ROOSTATS_HypoTestInverter 16 #ifndef ROOSTATS_IntervalCalculator 21 #ifndef ROOSTATS_HypoTestInverterResult 36 class HybridCalculator;
37 class FrequentistCalculator;
38 class AsymptoticCalculator;
39 class HypoTestCalculatorGeneric;
103 void SetFixedScan(
int nBins,
double xMin = 1,
double xMax = -1,
bool scanLog =
false ) {
112 bool RunFixedScan(
int nBins,
double xMin,
double xMax,
bool scanLog =
false )
const;
114 bool RunOnePoint(
double thisX,
bool adaptive =
false,
double clTarget = -1 )
const;
118 bool RunLimit(
double &limit,
double &limitErr,
double absTol = 0,
double relTol = 0,
const double *hint=0)
const;
148 TList * clsDist = 0,
TList *clsbDist= 0,
TList * clbDist = 0,
const char * outputfile =
"HypoTestInverterRebuiltDist.root");
205 std::unique_ptr<HypoTestCalculatorGeneric>
fHC;
virtual ~HypoTestInverter()
void CreateResults() const
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (e.g. 0.95 for a 95% Confidence Interval) ...
bool RunOnePoint(double thisX, bool adaptive=false, double clTarget=-1) const
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
static double fgRelAccuracy
HypoTestInverter class for performing an hypothesis test inversion by scanning the hypothesis test re...
IntervalCalculator is an interface class for a tools which produce RooStats ConfIntervals.
HypoTestResult * Eval(HypoTestCalculatorGeneric &hc, bool adaptive, double clsTarget) const
bool RunFixedScan(int nBins, double xMin, double xMax, bool scanLog=false) const
std::unique_ptr< TGraphErrors > fLimitPlot
virtual void SetTestSize(Double_t size)
set the size of the test (rate of Type I error) (eg. 0.05 for a 95% Confidence Interval) ...
HypoTestResult is a base class for results from hypothesis tests.
SamplingDistribution * GetUpperLimitDistribution(bool rebuild=false, int nToys=100)
virtual void SetTestSize(Double_t size)
set the size of the test (rate of Type I error) ( e.g. 0.05 for a 95% Confidence Interval) ...
static void CheckInputModels(const HypoTestCalculatorGeneric &hc, const RooRealVar &scanVar)
static unsigned int fgNToys
void SetMaximumToys(int ntoys)
HypoTestInverterResult * fResults
HypoTestInverter & operator=(const HypoTestInverter &rhs)
Common base class for the Hypothesis Test Calculators.
#define ClassDef(name, id)
ECalculatorType fCalcType
HypoTestCalculatorGeneric * GetHypoTestCalculator() const
void UseCLs(bool on=true)
flag to switch between using CLsb (default) or CLs as confidence level
static void SetCloseProof(Bool_t flag)
RooRealVar represents a fundamental (non-derived) real valued object.
TestStatistic * GetTestStatistic() const
int fTotalToysRun
plot of limits
RooRealVar * fScannedVariable
pointer to the generic hypotest calculator used
HypoTestCalculatorGeneric * fCalculator0
RooAbsData is the common abstract base class for binned and unbinned datasets.
static double fgCLAccuracy
This class simply holds a sampling distribution of some test statistic.
This class implements the Hypothesis test calculation using an hybrid (frequentist/bayesian) procedur...
virtual Double_t ConfidenceLevel() const
Get the Confidence level for the test.
Namespace for the RooStats classes.
HypoTestInverterResult class: holds the array of hypothesis test results and compute a confidence int...
virtual HypoTestInverterResult * GetInterval() const
Main interface to get a ConfInterval, pure virtual.
void SetNumErr(double err)
virtual void SetModel(const ModelConfig &)
Set the Model.
bool SetTestStatistic(TestStatistic &stat)
void SetFixedScan(int nBins, double xMin=1, double xMax=-1, bool scanLog=false)
void SetVerbose(int level=1)
static double fgAbsAccuracy
std::unique_ptr< HypoTestCalculatorGeneric > fHC
Hypothesis Test Calculator using a full frequentist procedure for sampling the test statistic distrib...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
A TGraphErrors is a TGraph with error bars.
static std::string fgAlgo
static RooRealVar * GetVariableToScan(const HypoTestCalculatorGeneric &hc)
virtual Double_t Size() const
Get the size of the test (eg. rate of Type I error)
bool RunLimit(double &limit, double &limitErr, double absTol=0, double relTol=0, const double *hint=0) const
SamplingDistribution * RebuildDistributions(bool isUpper=true, int nToys=100, TList *clsDist=0, TList *clsbDist=0, TList *clbDist=0, const char *outputfile="HypoTestInverterRebuiltDist.root")
void UseCLs(bool on=true)
virtual void SetData(RooAbsData &)
Set the DataSet ( add to the the workspace if not already there ?)
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
SamplingDistribution * GetLowerLimitDistribution(bool rebuild=false, int nToys=100)
Hypothesis Test Calculator based on the asymptotic formulae for the profile likelihood ratio...
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) ...