Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HybridResult.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2
3/*************************************************************************
4 * Project: RooStats *
5 * Package: RooFit/RooStats *
6 * Authors: *
7 * Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke *
8 *************************************************************************
9 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef ROOSTATS_HybridResult
17#define ROOSTATS_HybridResult
18
20
21#include <vector>
22
23namespace RooStats {
24
25 class HybridPlot;
26
28
29 public:
30
31 /// Default constructor
32 explicit HybridResult(const char *name = nullptr);
33
34 /// Constructor for HybridResult
35 HybridResult(const char *name,
36 const std::vector<double>& testStat_sb_vals,
37 const std::vector<double>& testStat_b_vals,
38 bool sumLargerValues=true);
39
40
41 /// Destructor of HybridResult
42 ~HybridResult() override;
43
44 void SetDataTestStatistics(double testStat_data_val);
45
46 void Add(HybridResult* other);
47
48 HybridPlot* GetPlot(const char* name,const char* title, int n_bins);
49
50 void PrintMore(const char* options);
51
52 /// Get test statistics values for the sb model
53 std::vector<double> GetTestStat_sb(){return fTestStat_sb;}
54
55 /// Get test statistics values for the b model
56 std::vector<double> GetTestStat_b(){return fTestStat_b;}
57
58 /// Get test statistics value for data
60
61 // Return p-value for null hypothesis
62 double NullPValue() const override;
63
64 // Return p-value for alternate hypothesis
65 double AlternatePValue() const override;
66
67 /// The error on the "confidence level" of the null hypothesis
68 double CLbError() const;
69
70 /// The error on the "confidence level" of the alternative hypothesis
71 double CLsplusbError() const;
72
73 /// The error on the ratio \f$CL_{s+b}/CL_{b}\f$
74 double CLsError() const;
75
76 private:
77
78 std::vector<double> fTestStat_b; // vector of results for B-only toy-MC
79 std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC
80 double fTestStat_data; // results (test statistics) evaluated for data
81
82 mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue computation have been already done or not (ie need to be refreshed)
83 mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValue computation have been already done or not (ie need to be refreshed)
84 bool fSumLargerValues; // p-value for velues of testStat >= testStat_data (or testStat <= testStat_data)
85
86 protected:
87
88 ClassDefOverride(HybridResult,1) // Class containing the results of the HybridCalculator
89 };
90}
91
92#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
This class provides the plots for the result of a study performed with the HybridCalculatorOriginal c...
Definition HybridPlot.h:36
Class encapsulating the result of the HybridCalculatorOriginal.
std::vector< double > GetTestStat_sb()
Get test statistics values for the sb model.
std::vector< double > fTestStat_b
~HybridResult() override
Destructor of HybridResult.
double AlternatePValue() const override
Returns : the S+B p-value.
double GetTestStat_data()
Get test statistics value for data.
std::vector< double > GetTestStat_b()
Get test statistics values for the b model.
void PrintMore(const char *options)
Print out some information about the results.
HybridPlot * GetPlot(const char *name, const char *title, int n_bins)
prepare a plot showing a result and return a pointer to a HybridPlot object the needed arguments are:...
void Add(HybridResult *other)
add additional toy-MC experiments to the current results use the data test statistics of the added ob...
std::vector< double > fTestStat_sb
double CLsplusbError() const
The error on the "confidence level" of the alternative hypothesis.
double CLbError() const
The error on the "confidence level" of the null hypothesis.
void SetDataTestStatistics(double testStat_data_val)
set the value of the test statistics on data
double CLsError() const
The error on the ratio .
double NullPValue() const override
Returns : the B p-value.
HypoTestResult is a base class for results from hypothesis tests.
Namespace for the RooStats classes.
Definition Asimov.h:19