Logo ROOT   6.12/07
Reference Guide
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 namespace RooStats {
22 
23  class HybridPlot;
24 
25  class HybridResult : public HypoTestResult {
26 
27  public:
28 
29  /// Default constructor
30  explicit HybridResult(const char *name = 0);
31 
32  /// Constructor for HybridResult
33  HybridResult(const char *name,
34  const std::vector<double>& testStat_sb_vals,
35  const std::vector<double>& testStat_b_vals,
36  bool sumLargerValues=true);
37 
38 
39  /// Destructor of HybridResult
40  virtual ~HybridResult();
41 
42  void SetDataTestStatistics(double testStat_data_val);
43 
44  void Add(HybridResult* other);
45 
46  HybridPlot* GetPlot(const char* name,const char* title, int n_bins);
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
57  double GetTestStat_data(){ return fTestStat_data;}
58 
59  // Return p-value for null hypothesis
60  Double_t NullPValue() const;
61 
62  // Return p-value for alternate hypothesis
63  Double_t AlternatePValue() const;
64 
65  /// The error on the "confidence level" of the null hypothesis
66  Double_t CLbError() const;
67 
68  /// The error on the "confidence level" of the alternative hypothesis
69  Double_t CLsplusbError() const;
70 
71  /// The error on the ratio \f$CL_{s+b}/CL_{b}\f$
72  Double_t 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  ClassDef(HybridResult,1) // Class containing the results of the HybridCalculator
87  };
88 }
89 
90 #endif
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:...
Double_t CLbError() const
The error on the "confidence level" of the null hypothesis.
void Add(HybridResult *other)
add additional toy-MC experiments to the current results use the data test statistics of the added ob...
HypoTestResult is a base class for results from hypothesis tests.
Double_t CLsError() const
The error on the ratio .
virtual ~HybridResult()
Destructor of HybridResult.
void SetDataTestStatistics(double testStat_data_val)
set the value of the test statistics on data
#define ClassDef(name, id)
Definition: Rtypes.h:320
This class provides the plots for the result of a study performed with the HybridCalculatorOriginal c...
Definition: HybridPlot.h:36
HybridResult(const char *name=0)
Default constructor.
Double_t NullPValue() const
Returns : the B p-value.
Double_t CLsplusbError() const
The error on the "confidence level" of the alternative hypothesis.
Namespace for the RooStats classes.
Definition: Asimov.h:20
double Double_t
Definition: RtypesCore.h:55
double GetTestStat_data()
Get test statistics value for data.
Definition: HybridResult.h:57
std::vector< double > fTestStat_b
Definition: HybridResult.h:76
std::vector< double > GetTestStat_sb()
Get test statistics values for the sb model.
Definition: HybridResult.h:51
void PrintMore(const char *options)
Print out some information about the results.
std::vector< double > GetTestStat_b()
Get test statistics values for the b model.
Definition: HybridResult.h:54
Class encapsulating the result of the HybridCalculatorOriginal.
Definition: HybridResult.h:25
char name[80]
Definition: TGX11.cxx:109
Double_t AlternatePValue() const
Returns : the S+B p-value.
std::vector< double > fTestStat_sb
Definition: HybridResult.h:77