TLimit.h

Go to the documentation of this file.
00001 // @(#)root/hist:$Id: TLimit.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Christophe.Delaere@cern.ch   21/08/2002
00003 
00004 #ifndef ROOT_TLimit
00005 #define ROOT_TLimit
00006 
00007 #ifndef ROOT_TObject
00008 #include "TObject.h"
00009 #endif
00010 
00011 #include "TVectorDfwd.h"
00012 
00013 class TConfidenceLevel;
00014 class TRandom;
00015 class TLimitDataSource;
00016 class TArrayD;
00017 class TOrdCollection;
00018 class TH1;
00019 
00020 //____________________________________________________________________
00021 //
00022 // TLimit
00023 //
00024 // This class computes 95% Confidence Levels.
00025 //
00026 // Implemented by C. Delaere from the mclimit code written by Tom Junk.
00027 // reference: HEP-EX/9902006
00028 // See http://cern.ch/thomasj/searchlimits/ecl.html for more details.
00029 //____________________________________________________________________
00030 
00031 class TLimit {
00032  protected:
00033    static bool Fluctuate(TLimitDataSource * input, TLimitDataSource * output, bool init,TRandom *, bool stat=false);
00034    static Double_t LogLikelihood(Double_t s, Double_t b, Double_t b2, Double_t d);
00035 
00036 public:
00037    TLimit() {}
00038    virtual ~TLimit() {}
00039    static TConfidenceLevel *ComputeLimit(TLimitDataSource * data,
00040                                          Int_t nmc =50000,
00041                                          bool stat = false,
00042                                          TRandom * generator = 0);
00043    static TConfidenceLevel *ComputeLimit(Double_t s, Double_t b, Int_t d,
00044                                          Int_t nmc =50000,
00045                                          bool stat = false,
00046                                          TRandom * generator = 0);
00047    static TConfidenceLevel *ComputeLimit(Double_t s, Double_t b, Int_t d, 
00048                                          TVectorD* se, TVectorD* be, TObjArray*,
00049                                          Int_t nmc =50000,
00050                                          bool stat = false,
00051                                          TRandom * generator = 0);
00052    static TConfidenceLevel *ComputeLimit(TH1* s, TH1* b, TH1* d,
00053                                          Int_t nmc =50000,
00054                                          bool stat = false,
00055                                          TRandom * generator = 0);
00056    static TConfidenceLevel *ComputeLimit(TH1* s, TH1* b, TH1* d, 
00057                                          TVectorD* se, TVectorD* be, TObjArray*,
00058                                          Int_t nmc =50000,
00059                                          bool stat = false,
00060                                          TRandom * generator = 0);
00061  private:
00062    static TArrayD *fgTable;              // a log table... just to speed up calculation
00063    static TOrdCollection *fgSystNames;   // Collection of systematics names
00064    ClassDef(TLimit, 2)          // Class to compute 95% CL limits
00065 };
00066 
00067 #endif
00068 

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