11 #ifndef ROOSTATS_HypoTestInverterResult
12 #define ROOSTATS_HypoTestInverterResult
24 class SamplingDistribution;
68 double CLb(
int index)
const;
71 double CLs(
int index)
const;
178 double GetExpectedLimit(
double nsig,
bool lower,
const char * opt =
"" )
const ;
183 return GetGraphX(g,y0,lowSearch,xmin,xmax);
SamplingDistribution * GetLimitDistribution(bool lower) const
get the limit distribution (lower/upper depending on the flag) by interpolating the expected p values...
HypoTestInverter class for performing an hypothesis test inversion by scanning the hypothesis test re...
double GetGraphX(const TGraph &g, double y0, bool lowSearch=true) const
double CLbError(int index) const
return the observed CLb value for the i-th entry
InterpolOption_t GetInterpolationOption() const
int ArraySize() const
number of entries in the results array
int FindClosestPointIndex(double target, int mode=0, double xtarget=0)
void SetCLsCleanupThreshold(Double_t th)
set CLs threshold for exclusion cleanup function
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) ...
bool IsTwoSided() const
query if two sided result
HypoTestInverterResult(const char *name=0)
default constructor
HypoTestResult is a base class for results from hypothesis tests.
SamplingDistribution * GetSignalAndBackgroundTestStatDist(int index) const
get the signal and background test statistic distribution
double GetYError(int index) const
function to return the estimated error on the value of the confidence level for the i^th entry in the...
void SetInterpolationOption(InterpolOption_t opt)
set the interpolation option, linear (kLinear ) or spline (kSpline)
SamplingDistribution * GetUpperLimitDistribution() const
get expected upper limit distributions implemented using interpolation
SamplingDistribution * GetBackgroundTestStatDist(int index) const
get the background test statistic distribution
#define ClassDef(name, id)
HypoTestResult * GetLastResult() const
double FindInterpolatedLimit(double target, bool lowSearch=false, double xmin=1, double xmax=0)
interpolate to find a limit value Use a linear or a spline interpolation depending on the interpolati...
double CLsError(int index) const
return the observed CLb value for the i-th entry
Double_t fConfidenceLevel
virtual ~HypoTestInverterResult()
destructor
void UseCLs(bool on=true)
flag to switch between using CLsb (default) or CLs as confidence level
Double_t LowerLimit()
lower and upper bound of the confidence interval (to get upper/lower limits, multiply the size( = 1-c...
bool fInterpolateLowerLimit
two sided scan (look for lower/upper limit)
int ExclusionCleanup()
remove points that appear to have failed.
HypoTestResult * GetResult(int index) const
return a pointer to the i^th result object
RooRealVar represents a fundamental (non-derived) real valued object.
double CLsplusb(int index) const
return the observed CLsplusb value for the i-th entry
SamplingDistribution * GetExpectedPValueDist(int index) const
return expected distribution of p-values (Cls or Clsplusb)
double GetExpectedLowerLimit(double nsig=0, const char *opt="") const
get Limit value corresponding at the desired nsigma level (0) is median -1 sigma is 1 sigma ...
double fCLsCleanupThreshold
TList fExpPValues
list of HypoTestResult for each point
static int fgAsymptoticNumPoints
max sigma value used to scan asymptotic expected p values
double GetLastYValue() const
SamplingDistribution * GetAltTestStatDist(int index) const
This class simply holds a sampling distribution of some test statistic.
double GetLastYError() const
static double fgAsymptoticMaxSigma
double GetXValue(int index) const
function to return the value of the parameter of interest for the i^th entry in the results ...
This class is now deprecated and to be replaced by the HypoTestInverter.
double CLs(int index) const
return the observed CLb value for the i-th entry
HypoTestInverterResult class holds the array of hypothesis test results and compute a confidence inte...
bool IsOneSided() const
query if one sided result
Class to plot an HypoTestInverterResult, result of the HypoTestInverter calculator.
Double_t LowerLimitEstimatedError()
rough estimation of the error on the computed bound of the confidence interval Estimate of lower limi...
double GetYValue(int index) const
function to return the value of the confidence level for the i^th entry in the results ...
InterpolOption_t fInterpolOption
double CLsplusbError(int index) const
return the observed CLsplusb value for the i-th entry
Double_t UpperLimitEstimatedError()
Estimate of lower limit error function evaluates only a rough error on the lower limit.
double GetGraphX(const TGraph &g, double y0, bool lowSearch, double &xmin, double &xmax) const
return the X value of the given graph for the target value y0 the graph is evaluated using linear int...
SimpleInterval is a concrete implementation of the ConfInterval interface.
double GetExpectedUpperLimit(double nsig=0, const char *opt="") const
get Limit value corresponding at the desired nsigma level (0) is median -1 sigma is 1 sigma ...
HypoTestInverterResult & operator=(const HypoTestInverterResult &other)
operator =
double fLowerLimitError
interpolation option (linear or spline)
A Graph is a graphics object made of two arrays X and Y with npoints each.
double GetLastXValue() const
double GetExpectedLimit(double nsig, bool lower, const char *opt="") const
get expected limit (lower/upper) depending on the flag for asymptotic is a special case (the distribu...
SamplingDistribution * GetLowerLimitDistribution() const
get expected lower limit distributions implemented using interpolation The size for the sampling dist...
bool Add(const HypoTestInverterResult &otherResult)
merge with the content of another HypoTestInverterResult object
int FindIndex(double xvalue) const
find the index corresponding at the poi value xvalue If no points is found return -1 Note that a tole...
double CalculateEstimatedError(double target, bool lower=true, double xmin=1, double xmax=0)
Return an error estimate on the upper(lower) limit.
double CLb(int index) const
return the observed CLb value for the i-th entry
bool fInterpolateUpperLimit
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) ...
SamplingDistribution * GetNullTestStatDist(int index) const
same in terms of alt and null
std::vector< double > fXValues
number of points used to build expected p-values