Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:12

0001 // @(#)root/hist:$Id$
0002 // Author: Christophe.Delaere@cern.ch   21/08/2002
0003 
0004 #ifndef ROOT_TLimitDataSource
0005 #define ROOT_TLimitDataSource
0006 
0007 #include "TObjArray.h"
0008 
0009 #include "TVectorDfwd.h"
0010 
0011 class TH1;
0012 
0013 //_______________________________________________________________________
0014 //
0015 // TLimitDataSource
0016 //
0017 // This class serves as input for the TLimit::ComputeLimit method.
0018 // It takes the signal, background and data histograms to form a channel.
0019 // More channels can be added using AddChannel(), as well as different
0020 // systematics sources.
0021 //_______________________________________________________________________
0022 
0023 
0024 class TLimitDataSource : public TObject{
0025 public:
0026    TLimitDataSource();
0027    ~TLimitDataSource() override {}
0028    TLimitDataSource(TH1* s,TH1* b,TH1* d);
0029    TLimitDataSource(TH1* s,TH1* b,TH1* d, TVectorD* es,TVectorD* eb,TObjArray* names);
0030    virtual void AddChannel(TH1*,TH1*,TH1*);
0031    virtual void AddChannel(TH1*,TH1*,TH1*,TVectorD*, TVectorD*, TObjArray*);
0032    inline virtual TObjArray* GetSignal() { return &fSignal;}
0033    inline virtual TObjArray* GetBackground() { return &fBackground;}
0034    inline virtual TObjArray* GetCandidates() { return &fCandidates;}
0035    inline virtual TObjArray* GetErrorOnSignal() { return &fErrorOnSignal;}
0036    inline virtual TObjArray* GetErrorOnBackground() { return &fErrorOnBackground;}
0037    inline virtual TObjArray* GetErrorNames() { return &fIds;}
0038    virtual void SetOwner(bool swtch=kTRUE);
0039 private:
0040    /// @name Arrays used to store the packed inputs
0041    ///@{
0042    TObjArray fSignal;            ///< Packed input signal
0043    TObjArray fBackground;        ///< Packed input background
0044    TObjArray fCandidates;        ///< Packed input candidates (data)
0045    TObjArray fErrorOnSignal;     ///< Packed error sources for signal
0046    TObjArray fErrorOnBackground; ///< Packed error sources for background
0047    TObjArray fIds;               ///< Packed IDs for the different error sources
0048    ///@}
0049 
0050    /// Dummy objects the class will use and delete
0051    ///@{
0052    TObjArray fDummyTA;           ///< Array of dummy object (used for bookeeping)
0053    TObjArray fDummyIds;          ///< Array of dummy object (used for bookeeping)
0054    ///@}
0055 
0056    ClassDefOverride(TLimitDataSource, 2 ) // Input for TLimit routines
0057 };
0058 
0059 #endif