ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/DataFormats/interface/TH2DAsymErr.h
Revision: 1.3
Committed: Wed Oct 21 15:04:06 2009 UTC (15 years, 6 months ago) by sixie
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012
Changes since 1.2: +4 -4 lines
Log Message:
style change

File Contents

# User Rev Content
1 phedex 1.1 //--------------------------------------------------------------------------------------------------
2 sixie 1.3 // $Id: TH2DAsymErr.h,v 1.2 2009/08/11 09:02:24 loizides Exp $
3 phedex 1.1 //
4     // TH2DAsymErr
5     //
6 loizides 1.2 // Histogram that stores separate asymmetric statistical and systematic errors. It is
7     // derived from TH2D.
8 phedex 1.1 //
9     // Authors: S.Xie
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITCOMMON_DATAFORMATS_HIST2DASYMERROR_H
13     #define MITCOMMON_DATAFORMATS_HIST2DASYMERROR_H
14    
15     #include <TH2D.h>
16    
17     namespace mithep
18     {
19     class TH2DAsymErr : public TH2D
20     {
21     public:
22 loizides 1.2 enum EErrType {
23     kStatErrLow = 0,
24     kStatErrHigh,
25     kSysErrLow,
26     kSysErrHigh
27 phedex 1.1 };
28    
29     TH2DAsymErr() {}
30 loizides 1.2 TH2DAsymErr(const char *name, const char *title,
31     Int_t nbinsx, Double_t xlow, Double_t xup,
32     Int_t nbinsy, Double_t ylow, Double_t yup);
33 phedex 1.1 TH2DAsymErr(const TH2D &h2d);
34     ~TH2DAsymErr() {}
35    
36 loizides 1.2 using TH2D::GetBinContent;
37     Double_t GetError(Double_t x, Double_t y, EErrType t);
38 sixie 1.3 Double_t GetStatErrorLow(Double_t x, Double_t y) { return GetError(x,y,kStatErrLow); }
39 loizides 1.2 Double_t GetStatErrorHigh(Double_t x, Double_t y) { return GetError(x,y,kStatErrHigh); }
40 sixie 1.3 Double_t GetSysErrorLow(Double_t x, Double_t y) { return GetError(x,y,kSysErrLow); }
41     Double_t GetSysErrorHigh(Double_t x, Double_t y) { return GetError(x,y,kSysErrHigh); }
42 phedex 1.1 using TH2D::SetBinContent;
43 loizides 1.2 void SetBinContent(Int_t binx, Int_t biny, Double_t value,
44     Double_t statErrorLow, Double_t statErrorHigh,
45     Double_t sysErrorLow, Double_t sysErrorHigh);
46     void SetBinError(Int_t binx, Int_t biny,
47     Double_t statErrorLow, Double_t statErrorHigh,
48     Double_t sysErrorLow, Double_t sysErrorHigh);
49 phedex 1.1
50     protected:
51    
52 loizides 1.2 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 phedex 1.1
57 loizides 1.2 ClassDef(TH2DAsymErr, 1) // Histogram for storage of seperate asymmetric errors
58 phedex 1.1 };
59     }
60     #endif