56 fTestStat_data(-999.),
57 fComputationsNulDoneFlag(false),
58 fComputationsAltDoneFlag(false),
59 fSumLargerValues(false)
68 const std::vector<double>& testStat_sb_vals,
69 const std::vector<double>& testStat_b_vals,
70 bool sumLargerValues ) :
72 fTestStat_data(-999.),
73 fComputationsNulDoneFlag(false),
74 fComputationsAltDoneFlag(false),
75 fSumLargerValues(sumLargerValues)
79 int vector_size_sb = testStat_sb_vals.size();
80 assert(vector_size_sb>0);
82 int vector_size_b = testStat_b_vals.size();
83 assert(vector_size_b>0);
86 for (
int i=0;i<vector_size_sb;++i)
90 for (
int i=0;i<vector_size_b;++i)
124 std::cout <<
"Error: no toy data present. Returning -1.\n";
128 double larger_than_measured=0;
130 for (
int iToy=0;iToy<nToys;++iToy)
133 for (
int iToy=0;iToy<nToys;++iToy)
137 if (larger_than_measured==0) std::cout <<
"Warning: CLb = 0 ... maybe more toys are needed!\n";
154 std::cout <<
"Error: no toy data present. Returning -1.\n";
158 double larger_than_measured=0;
160 for (
int iToy=0;iToy<nToys;++iToy)
163 for (
int iToy=0;iToy<nToys;++iToy)
167 if (larger_than_measured==0) std::cout <<
"Warning: CLsb = 0 ... maybe more toys are needed!\n";
217 double cl_b_err = (1. -
CLb()) / (n_b *
CLb());
232 for (
int i=0;i<other_size_sb;++i)
236 for (
int i=0;i<other_size_b;++i)
259 plot_name +=
"_plot";
260 }
else plot_name =
name;
266 plot_title +=
"_plot (";
268 plot_title +=
" toys)";
269 }
else plot_title = title;
286 std::cout <<
"\nResults " <<
GetName() <<
":\n"
287 <<
" - Number of S+B toys: " <<
fTestStat_b.size() << std::endl
288 <<
" - Number of B toys: " <<
fTestStat_sb.size() << std::endl
289 <<
" - test statistics evaluated on data: " <<
fTestStat_data << std::endl
290 <<
" - CL_b " <<
CLb() << std::endl
291 <<
" - CL_s+b " <<
CLsplusb() << std::endl
292 <<
" - CL_s " <<
CLs() << std::endl;
This class provides the plots for the result of a study performed with the HybridCalculatorOriginal c...
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
Double_t CLsError() const
The error on the ratio .
double GetTestStat_data()
Get test statistics value for data.
Double_t NullPValue() const
Returns : the B p-value.
Double_t CLsplusbError() const
The error on the "confidence level" of the alternative hypothesis.
std::vector< double > GetTestStat_b()
Get test statistics values for the b model.
virtual ~HybridResult()
Destructor of HybridResult.
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...
Double_t CLbError() const
The error on the "confidence level" of the null hypothesis.
HybridResult(const char *name=0)
Default constructor.
Double_t AlternatePValue() const
Returns : the S+B p-value.
std::vector< double > fTestStat_sb
bool fComputationsAltDoneFlag
void SetDataTestStatistics(double testStat_data_val)
set the value of the test statistics on data
bool fComputationsNulDoneFlag
HypoTestResult is a base class for results from hypothesis tests.
virtual Double_t CLb() const
Convert NullPValue into a "confidence level".
virtual Double_t CLsplusb() const
Convert AlternatePValue into a "confidence level".
virtual Double_t CLs() const
is simply (not a method, but a quantity)
Double_t fAlternatePValue
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
const char * Data() const
Namespace for the RooStats classes.
Double_t Sqrt(Double_t x)