ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/DataFormats/interface/TH2DAsymErr.h
Revision: 1.1
Committed: Mon Aug 10 16:04:51 2009 UTC (15 years, 8 months ago) by phedex
Content type: text/plain
Branch: MAIN
Log Message:
Add custom 2D histogram class that stores asymmetric statistical and systematic errors. Used for Fake Rate calculations.

File Contents

# User Rev Content
1 phedex 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id $
3     //
4     // TH2DAsymErr
5     //
6     // Histogram that stores separate asymmetric statistical and systematic errors
7     //
8     // Authors: S.Xie
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITCOMMON_DATAFORMATS_HIST2DASYMERROR_H
12     #define MITCOMMON_DATAFORMATS_HIST2DASYMERROR_H
13    
14     #include <TH2D.h>
15     class TCollection;
16    
17     namespace mithep
18     {
19     class TH2DAsymErr : public TH2D
20     {
21     public:
22     enum ErrorType {
23     kStatErrorLow = 0,
24     kStatErrorHigh,
25     kSysErrorLow,
26     kSysErrorHigh
27     };
28    
29     TH2DAsymErr() {}
30     TH2DAsymErr(const char *name, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup,
31     Int_t nbinsy, Double_t ylow, Double_t yup);
32     TH2DAsymErr(const TH2D &h2d);
33     ~TH2DAsymErr() {}
34    
35     void SetBinContent(Int_t binx, Int_t biny, Double_t value,
36     Double_t statErrorLow, Double_t statErrorHigh,
37     Double_t sysErrorLow, Double_t sysErrorHigh);
38     void SetBinError(Int_t binx, Int_t biny, Double_t statErrorLow,
39     Double_t statErrorHigh, Double_t sysErrorLow,
40     Double_t sysErrorHigh);
41    
42     Double_t GetStatErrorLow(Double_t x, Double_t y);
43     Double_t GetStatErrorHigh(Double_t x, Double_t y);
44     Double_t GetSysErrorLow(Double_t x, Double_t y);
45     Double_t GetSysErrorHigh(Double_t x, Double_t y);
46    
47     using TH2D::SetBinContent;
48     using TH2D::GetBinContent;
49    
50     protected:
51    
52     TArrayD fStatErrorLow; //Array to store statistical low errors
53     TArrayD fStatErrorHigh; //Array to store statistical high errors
54     TArrayD fSysErrorLow; //Array to store systematic low errors
55     TArrayD fSysErrorHigh; //Array to store systematic high errors
56    
57     ClassDef(TH2DAsymErr, 1) // Histogram ratio class in 1D
58     };
59     }
60    
61    
62     #endif