class description - source file - inheritance tree

class TLimit

static TLimitDataSource* Fluctuate(TLimitDataSource* input, bool init, TRandom*) static Double_t LogLikelihood(Double_t s, Double_t b, Double_t d) public:
TLimit TLimit() TLimit TLimit(const TLimit&) virtual void ~TLimit() static TClass* Class() static TConfidenceLevel* ComputeLimit(TLimitDataSource* data, Int_t nmc = 50000, TRandom* generator = NULL, Double_t (*) (Double_t, Double_t,Double_t) statistic = &(TLimit::LogLikelihood)) virtual TClass* IsA() const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

static TArrayF* fgTable a log table... just to speed up calculation static TOrdCollection* fgSystNames Collection of systematics names

Class Description


 Class to compute 95% CL limits

TConfidenceLevel* ComputeLimit(TLimitDataSource * data, Int_t nmc, TRandom * generator, Double_t(*statistic) (Double_t, Double_t, Double_t))
 class TLimit

 Algorithm to compute 95% C.L. limits using the Likelihood ratio
 semi-bayesian method.
 It takes signal, background and data histograms wrapped in a
 TLimitDataSource as input and runs a set of Monte Carlo experiments in
 order to compute the limits. If needed, inputs are fluctuated according
 to systematics. The output is a TConfidenceLevel.

 class TLimitDataSource

 Takes the signal, background and data histograms as well as different
 systematics sources to form the TLimit input.

  class TConfidenceLevel

 Final result of the TLimit algorithm. It is created just after the
 time-consuming part and can be stored in a TFile for further processing.
 It contains light methods to return CLs, CLb and other interesting

 The actual algorithm...
 From an input (TLimitDataSource) it produces an output TConfidenceLevel.
 For this, nmc Monte Carlo experiments are performed.
 As usual, the larger this number, the longer the compute time,
 but the better the result.


Supposing that there is a plotfile.root file containing 3 histograms (signal, background and data), you can imagine doing things like:

TFile* infile=new TFile("plotfile.root","READ"); infile->cd(); TH1F* sh=(TH1F*)infile->Get("signal"); TH1F* bh=(TH1F*)infile->Get("background"); TH1F* dh=(TH1F*)infile->Get("data"); TLimitDataSource* mydatasource = new TLimitDataSource(sh,bh,dh); TConfidenceLevel *myconfidence = TLimit::ComputeLimit(mydatasource,50000); cout << " CLs : " << myconfidence->CLs() << endl; cout << " CLsb : " << myconfidence->CLsb() << endl; cout << " CLb : " << myconfidence->CLb() << endl; cout << "< CLs > : " << myconfidence->GetExpectedCLs_b() << endl; cout << "< CLsb > : " << myconfidence->GetExpectedCLsb_b() << endl; cout << "< CLb > : " << myconfidence->GetExpectedCLb_b() << endl; delete myconfidence; delete mydatasource; infile->Close();

More informations can still be found on this page.

TLimitDataSource* Fluctuate(TLimitDataSource * input, bool init, TRandom * generator)
 initialisation: create a sorted list of all the names of systematics

Inline Functions

             TLimit TLimit()
           Double_t LogLikelihood(Double_t s, Double_t b, Double_t d)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
             TLimit TLimit(const TLimit&)
               void ~TLimit()

Author: 21/08/2002
Last update: root/hist:$Name: $:$Id: TLimit.cxx,v 1.4 2002/09/10 14:59:15 rdm Exp $

ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.