HybridResult.h

Go to the documentation of this file.
00001 // @(#)root/roostats:$Id: HybridResult.h 34109 2010-06-24 15:00:16Z moneta $
00002 
00003 /*************************************************************************
00004  * Project: RooStats                                                     *
00005  * Package: RooFit/RooStats                                              *
00006  * Authors:                                                              *
00007  *   Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke       *
00008  *************************************************************************
00009  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
00010  * All rights reserved.                                                  *
00011  *                                                                       *
00012  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00013  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00014  *************************************************************************/
00015 
00016 #ifndef ROOSTATS_HybridResult
00017 #define ROOSTATS_HybridResult
00018 
00019 #ifndef ROOSTATS_HypoTestResult
00020 #include "RooStats/HypoTestResult.h"
00021 #endif
00022 
00023 namespace RooStats {
00024 
00025    class HybridPlot;
00026 
00027    class HybridResult : public HypoTestResult {
00028 
00029    public:
00030 
00031       /// Default constructor 
00032       explicit HybridResult(const char *name = 0);
00033 
00034       /// Constructor for HybridResult
00035       HybridResult(const char *name,
00036                    const std::vector<double>& testStat_sb_vals,
00037                    const std::vector<double>& testStat_b_vals, 
00038                    bool sumLargerValues=true);
00039 
00040 
00041       /// Destructor of HybridResult
00042       virtual ~HybridResult();
00043 
00044       void SetDataTestStatistics(double testStat_data_val);
00045 
00046       void Add(HybridResult* other);
00047 
00048       HybridPlot* GetPlot(const char* name,const char* title, int n_bins);
00049 
00050       void PrintMore(const char* options);
00051 
00052       /// Get test statistics values for the sb model
00053       std::vector<double> GetTestStat_sb(){return fTestStat_sb;}
00054 
00055       /// Get test statistics values for the b model
00056       std::vector<double> GetTestStat_b(){return fTestStat_b;}
00057 
00058       /// Get test statistics value for data
00059       double GetTestStat_data(){ return fTestStat_data;}
00060 
00061       // Return p-value for null hypothesis
00062       Double_t NullPValue() const;
00063 
00064       // Return p-value for alternate hypothesis
00065       Double_t AlternatePValue() const;
00066 
00067       /// The error on the "confidence level" of the null hypothesis
00068       Double_t CLbError() const;
00069       
00070       /// The error on the "confidence level" of the alternative hypothesis
00071       Double_t CLsplusbError() const;
00072       
00073       /// The error on the ratio CLs+b/CLb
00074       Double_t CLsError() const;
00075 
00076    private:
00077 
00078       std::vector<double> fTestStat_b; // vector of results for B-only toy-MC
00079       std::vector<double> fTestStat_sb; // vector of results for S+B toy-MC
00080       double fTestStat_data; // results (test statistics) evaluated for data
00081 
00082       mutable bool fComputationsNulDoneFlag; // flag if the fNullPValue computation have been already done or not (ie need to be refreshed)
00083       mutable bool fComputationsAltDoneFlag; // flag if the fAlternatePValue computation have been already done or not (ie need to be refreshed)
00084       bool fSumLargerValues; // p-value for velues of testStat >= testStat_data (or testStat <= testStat_data)
00085  
00086    protected:
00087 
00088       ClassDef(HybridResult,1)  // Class containing the results of the HybridCalculator
00089    };
00090 }
00091 
00092 #endif

Generated on Tue Jul 5 14:26:23 2011 for ROOT_528-00b_version by  doxygen 1.5.1