00001 // @(#)root/hist:$Id: TConfidenceLevel.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Christophe.Delaere@cern.ch 21/08/2002 00003 00004 #ifndef ROOT_TConfidenceLevel 00005 #define ROOT_TConfidenceLevel 00006 00007 #ifndef ROOT_TObject 00008 #include "TObject.h" 00009 #endif 00010 00011 //____________________________________________________________________ 00012 // 00013 // TConfidenceLevel 00014 // 00015 // This class serves as output for the TLimit::ComputeLimit method. 00016 // It is created just after the time-consuming part and can be stored 00017 // in a TFile for further processing. It contains 00018 // light methods to return CLs, CLb and other interesting quantities. 00019 //____________________________________________________________________ 00020 00021 00022 class TConfidenceLevel : public TObject { 00023 public: 00024 TConfidenceLevel(); 00025 TConfidenceLevel(Int_t mc, bool onesided = kTRUE); 00026 virtual ~TConfidenceLevel(); 00027 inline void SetTSD(Double_t in) { fTSD = in; } 00028 void SetTSB(Double_t * in); 00029 void SetTSS(Double_t * in); 00030 inline void SetLRS(Double_t * in) { fLRS = in; } 00031 inline void SetLRB(Double_t * in) { fLRB = in; } 00032 inline void SetBtot(Double_t in) { fBtot = in; } 00033 inline void SetStot(Double_t in) { fStot = in; } 00034 inline void SetDtot(Int_t in) { fDtot = in; } 00035 inline Double_t GetStatistic() const { return -2 * (fTSD - fStot); } 00036 void Draw(const Option_t *option=""); 00037 Double_t GetExpectedStatistic_b(Int_t sigma = 0) const; 00038 Double_t GetExpectedStatistic_sb(Int_t sigma = 0) const; 00039 Double_t CLb(bool use_sMC = kFALSE) const; 00040 Double_t CLsb(bool use_sMC = kFALSE) const; 00041 Double_t CLs(bool use_sMC = kFALSE) const; 00042 Double_t GetExpectedCLb_sb(Int_t sigma = 0) const; 00043 Double_t GetExpectedCLb_b(Int_t sigma = 0) const; 00044 Double_t GetExpectedCLsb_b(Int_t sigma = 0) const; 00045 inline Double_t GetExpectedCLs_b(Int_t sigma = 0) const { return (GetExpectedCLsb_b(sigma) / GetExpectedCLb_b(sigma)); } 00046 Double_t GetAverageCLs() const; 00047 Double_t GetAverageCLsb() const; 00048 Double_t Get3sProbability() const; 00049 Double_t Get5sProbability() const; 00050 inline Int_t GetDtot() const { return fDtot; } 00051 inline Double_t GetStot() const { return fStot; } 00052 inline Double_t GetBtot() const { return fBtot; } 00053 private: 00054 // data members used for the limits calculation 00055 Int_t fNNMC; 00056 Int_t fDtot; 00057 Double_t fStot; 00058 Double_t fBtot; 00059 Double_t fTSD; 00060 Double_t fNMC; 00061 Double_t fMCL3S; 00062 Double_t fMCL5S; 00063 Double_t *fTSB; //[fNNMC] 00064 Double_t *fTSS; //[fNNMC] 00065 Double_t *fLRS; //[fNNMC] 00066 Double_t *fLRB; //[fNNMC] 00067 Int_t *fISS; //[fNNMC] 00068 Int_t *fISB; //[fNNMC] 00069 // cumulative probabilities for defining the bands on plots 00070 static const Double_t fgMCLM2S; 00071 static const Double_t fgMCLM1S; 00072 static const Double_t fgMCLMED; 00073 static const Double_t fgMCLP1S; 00074 static const Double_t fgMCLP2S; 00075 static const Double_t fgMCL3S1S; 00076 static const Double_t fgMCL5S1S; 00077 static const Double_t fgMCL3S2S; 00078 static const Double_t fgMCL5S2S; 00079 ClassDef(TConfidenceLevel, 1) // output for TLimit functions 00080 }; 00081 00082 #endif 00083