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
45
46 void Add(HybridResult* other);
47
48 void PrintMore(const char* options);
49
50 /// Get test statistics values for the sb model
51 std::vector<double> GetTestStat_sb(){return fTestStat_sb;}
52
53 /// Get test statistics values for the b model
54 std::vector<double> GetTestStat_b(){return fTestStat_b;}
55
56 /// Get test statistics value for data
58
59 // Return p-value for null hypothesis
60 double NullPValue() const override;
61
62 // Return p-value for alternate hypothesis
63 double AlternatePValue() const override;
64
65 /// The error on the "confidence level" of the null hypothesis
66 double CLbError() const;
67
68 /// The error on the "confidence level" of the alternative hypothesis
69 double CLsplusbError() const;
70
71 /// The error on the ratio \f$CL_{s+b}/CL_{b}\f$
72 double CLsError() const;
73
74 private:
75
76 std::vector<double> fTestStat_b; // vector of results for B-only toy-MC
77 std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC
78 double fTestStat_data; // results (test statistics) evaluated for data
79
80 mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue computation have been already done or not (ie need to be refreshed)
81 mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValue computation have been already done or not (ie need to be refreshed)
82 bool fSumLargerValues; // p-value for velues of testStat >= testStat_data (or testStat <= testStat_data)
83
84 protected:
85
86 ClassDefOverride(HybridResult,1) // Class containing the results of the HybridCalculator
87 };
88}
89
90#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
char name[80]
Definition TGX11.cxx:148
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.
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
HybridResult(const char *name=nullptr)
Default constructor.
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 CodegenImpl.h:66