ROOT logo
// @(#)root/hist:$Id$
// Author: Christophe.Delaere@cern.ch   21/08/2002

#ifndef ROOT_TLimitDataSource
#define ROOT_TLimitDataSource

#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif

#include "TVectorDfwd.h"
   
class TH1;

//_______________________________________________________________________
//
// TLimitDataSource
//
// This class serves as input for the TLimit::ComputeLimit method.
// It takes the signal, background and data histograms to form a channel. 
// More channels can be added using AddChannel(), as well as different
// systematics sources. 
//_______________________________________________________________________


class TLimitDataSource : public TObject{
public:
   TLimitDataSource();
   virtual ~TLimitDataSource() {}
   TLimitDataSource(TH1* s,TH1* b,TH1* d);
   TLimitDataSource(TH1* s,TH1* b,TH1* d, TVectorD* es,TVectorD* eb,TObjArray* names);
   virtual void AddChannel(TH1*,TH1*,TH1*);
   virtual void AddChannel(TH1*,TH1*,TH1*,TVectorD*, TVectorD*, TObjArray*);
   inline virtual TObjArray* GetSignal() { return &fSignal;}
   inline virtual TObjArray* GetBackground() { return &fBackground;}
   inline virtual TObjArray* GetCandidates() { return &fCandidates;}
   inline virtual TObjArray* GetErrorOnSignal() { return &fErrorOnSignal;}
   inline virtual TObjArray* GetErrorOnBackground() { return &fErrorOnBackground;}
   inline virtual TObjArray* GetErrorNames() { return &fIds;}
   virtual void SetOwner(bool swtch=kTRUE);
private:
   // The arrays used to store the packed inputs
   TObjArray fSignal;            //packed input signal
   TObjArray fBackground;        //packed input background
   TObjArray fCandidates;        //packed input candidates (data)
   TObjArray fErrorOnSignal;     //packed error sources for signal
   TObjArray fErrorOnBackground; //packed error sources for background
   TObjArray fIds;               //packed IDs for the different error sources
   // some dummy objects that the class will use and delete
   TObjArray fDummyTA;         //array of dummy object (used for bookeeping)
   TObjArray fDummyIds;          //array of dummy object (used for bookeeping)

   ClassDef(TLimitDataSource, 2 ) // input for TLimit routines
};

#endif
 TLimitDataSource.h:1
 TLimitDataSource.h:2
 TLimitDataSource.h:3
 TLimitDataSource.h:4
 TLimitDataSource.h:5
 TLimitDataSource.h:6
 TLimitDataSource.h:7
 TLimitDataSource.h:8
 TLimitDataSource.h:9
 TLimitDataSource.h:10
 TLimitDataSource.h:11
 TLimitDataSource.h:12
 TLimitDataSource.h:13
 TLimitDataSource.h:14
 TLimitDataSource.h:15
 TLimitDataSource.h:16
 TLimitDataSource.h:17
 TLimitDataSource.h:18
 TLimitDataSource.h:19
 TLimitDataSource.h:20
 TLimitDataSource.h:21
 TLimitDataSource.h:22
 TLimitDataSource.h:23
 TLimitDataSource.h:24
 TLimitDataSource.h:25
 TLimitDataSource.h:26
 TLimitDataSource.h:27
 TLimitDataSource.h:28
 TLimitDataSource.h:29
 TLimitDataSource.h:30
 TLimitDataSource.h:31
 TLimitDataSource.h:32
 TLimitDataSource.h:33
 TLimitDataSource.h:34
 TLimitDataSource.h:35
 TLimitDataSource.h:36
 TLimitDataSource.h:37
 TLimitDataSource.h:38
 TLimitDataSource.h:39
 TLimitDataSource.h:40
 TLimitDataSource.h:41
 TLimitDataSource.h:42
 TLimitDataSource.h:43
 TLimitDataSource.h:44
 TLimitDataSource.h:45
 TLimitDataSource.h:46
 TLimitDataSource.h:47
 TLimitDataSource.h:48
 TLimitDataSource.h:49
 TLimitDataSource.h:50
 TLimitDataSource.h:51
 TLimitDataSource.h:52
 TLimitDataSource.h:53
 TLimitDataSource.h:54
 TLimitDataSource.h:55
 TLimitDataSource.h:56