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 HybridPlot* GetPlot(const char* name,const char* title, int n_bins)
49 R__DEPRECATED(6, 42, "Please write your own ROOT-based plotting code, possibly based on the source code of the deprecated HybridPlot class.");
50
51 void PrintMore(const char* options);
52
53 /// Get test statistics values for the sb model
54 std::vector<double> GetTestStat_sb(){return fTestStat_sb;}
55
56 /// Get test statistics values for the b model
57 std::vector<double> GetTestStat_b(){return fTestStat_b;}
58
59 /// Get test statistics value for data
61
62 // Return p-value for null hypothesis
63 double NullPValue() const override;
64
65 // Return p-value for alternate hypothesis
66 double AlternatePValue() const override;
67
68 /// The error on the "confidence level" of the null hypothesis
69 double CLbError() const;
70
71 /// The error on the "confidence level" of the alternative hypothesis
72 double CLsplusbError() const;
73
74 /// The error on the ratio \f$CL_{s+b}/CL_{b}\f$
75 double CLsError() const;
76
77 private:
78
79 std::vector<double> fTestStat_b; // vector of results for B-only toy-MC
80 std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC
81 double fTestStat_data; // results (test statistics) evaluated for data
82
83 mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue computation have been already done or not (ie need to be refreshed)
84 mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValue computation have been already done or not (ie need to be refreshed)
85 bool fSumLargerValues; // p-value for velues of testStat >= testStat_data (or testStat <= testStat_data)
86
87 protected:
88
89 ClassDefOverride(HybridResult,1) // Class containing the results of the HybridCalculator
90 };
91}
92
93#endif
HybridPlot(const char *name, const char *title, const std::vector< double > &sb_values, const std::vector< double > &b_values, double testStat_data, int n_bins, bool verbosity=true)
Constructor.
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
char name[80]
Definition TGX11.cxx:146
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.
void Add(HybridResult *other)
add additional toy-MC experiments to the current results use the data test statistics of the added ob...
HybridPlot Please write your own ROOT based plotting possibly based on the source code of the deprecated HybridPlot class
HybridPlot * GetPlot(const char *name, const char *title, int n_bins) R__DEPRECATED(6
prepare a plot showing a result and return a pointer to a HybridPlot object the needed arguments are:...
std::vector< double > fTestStat_sb
HybridPlot Please write your own ROOT based plotting code
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:65