ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/Limits/TLimit.h
Revision: 1.2
Committed: Sun Mar 20 12:17:58 2011 UTC (14 years, 1 month ago) by auterman
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -1 lines
Error occurred while calculating annotation data.
Log Message:
Modification of CLs: Adding functunality to integrate until a given Test-statistic value, i.e. until a value determined by a no-signal hypotheses for expected observed

File Contents

# Content
1 // @(#)root/hist:$Name: $:$Id: TLimit.h,v 1.1.1.1 2011/01/26 14:37:51 auterman Exp $
2 // Author: Christophe.Delaere@cern.ch 21/08/2002
3
4 #ifndef ROOT_TLimit
5 #define ROOT_TLimit
6
7 #ifndef ROOT_TObject
8 #include "TObject.h"
9 #endif
10 #ifndef ROOT_TMath
11 #include "TMath.h"
12 #endif
13
14 class TConfidenceLevel;
15 class TRandom;
16 class TLimitDataSource;
17 class TArrayD;
18 class TOrdCollection;
19
20 //____________________________________________________________________
21 //
22 // TLimit
23 //
24 // This class computes 95% Confidence Levels using a given statistic.
25 // By default, the build-in LogLikelihood is used.
26 //
27 // Implemented by C. Delaere from the mclimit code written by Tom Junk.
28 // reference: HEP-EX/9902006
29 // See http://cern.ch/thomasj/searchlimits/ecl.html for more details.
30 //____________________________________________________________________
31
32 class TLimit {
33 public:
34 TLimit() {}
35 virtual ~TLimit() {}
36 static double GetTestStatistic(TLimitDataSource * data,Double_t pseudodata, Double_t(*statistic) (Double_t, Double_t,Double_t) =&(TLimit::LogLikelihood));
37 static TConfidenceLevel *ComputeLimit(TLimitDataSource * data,
38 Int_t nmc =50000,
39 bool stat = false,
40 TRandom * generator = NULL,
41 Double_t(*statistic) (Double_t, Double_t,Double_t) =&(TLimit::LogLikelihood));
42 protected:
43 static TLimitDataSource *Fluctuate(TLimitDataSource * input, bool init,TRandom *, bool stat=false);
44 inline static Double_t LogLikelihood(Double_t s, Double_t b, Double_t d) { return d * TMath::Log(1 + (s / b)); }
45 private:
46 static TArrayD *fgTable; // a log table... just to speed up calculation
47 static TOrdCollection *fgSystNames; // Collection of systematics names
48 ClassDef(TLimit, 2) // Class to compute 95% CL limits
49 };
50
51 #endif
52