ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/DataFormats/interface/TH3DAsymErr.h
Revision: 1.1
Committed: Sat Mar 27 13:18:19 2010 UTC (15 years, 1 month ago) by sixie
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, HEAD
Branch point for: Mit_025c_branch
Log Message:
Add 3D hists with systematics

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: TH3DAsymErr.h,v 1.3 2009/10/21 15:04:06 sixie Exp $
3     //
4     // TH3DAsymErr
5     //
6     // Histogram that stores separate asymmetric statistical and systematic errors. It is
7     // derived from TH3D.
8     //
9     // Authors: S.Xie
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITCOMMON_DATAFORMATS_HIST3DASYMERROR_H
13     #define MITCOMMON_DATAFORMATS_HIST3DASYMERROR_H
14    
15     #include <TH3D.h>
16     #include "TH2DAsymErr.h"
17    
18     namespace mithep
19     {
20     class TH3DAsymErr : public TH3D
21     {
22     public:
23    
24     TH3DAsymErr() {}
25     TH3DAsymErr(const char *name, const char *title,
26     Int_t nbinsx, Double_t xlow, Double_t xup,
27     Int_t nbinsy, Double_t ylow, Double_t yup,
28     Int_t nbinsz, Double_t zlow, Double_t zup);
29     TH3DAsymErr(const TH3D &h3d);
30     ~TH3DAsymErr() {}
31    
32     using TH3D::GetBinContent;
33     Double_t GetError(Double_t x, Double_t y, Double_t z, TH2DAsymErr::EErrType t);
34     Double_t GetBinError(Int_t b, Int_t c, Int_t d, TH2DAsymErr::EErrType t);
35     Double_t GetStatErrorLow(Double_t x, Double_t y, Double_t z);
36     Double_t GetBinStatErrorLow(Int_t b, Int_t c, Int_t d);
37     Double_t GetStatErrorHigh(Double_t x, Double_t y, Double_t z);
38     Double_t GetBinStatErrorHigh(Int_t b, Int_t c, Int_t d);
39     Double_t GetSysErrorLow(Double_t x, Double_t y, Double_t z);
40     Double_t GetBinSysErrorLow(Int_t b, Int_t c, Int_t d);
41     Double_t GetSysErrorHigh(Double_t x, Double_t y, Double_t z);
42     Double_t GetBinSysErrorHigh(Int_t b, Int_t c, Int_t d);
43     using TH3D::SetBinContent;
44     void SetBinContent(Int_t binx, Int_t biny, Int_t binz, Double_t value,
45     Double_t statErrorLow, Double_t statErrorHigh,
46     Double_t sysErrorLow, Double_t sysErrorHigh);
47     using TH3D::SetBinError;
48     void SetBinError(Int_t binx, Int_t biny, Int_t binz,
49     Double_t statErrorLow, Double_t statErrorHigh,
50     Double_t sysErrorLow, Double_t sysErrorHigh);
51    
52     protected:
53    
54     TArrayD fStatErrorLow; //array to store statistical low errors
55     TArrayD fStatErrorHigh; //array to store statistical high errors
56     TArrayD fSysErrorLow; //array to store systematic low errors
57     TArrayD fSysErrorHigh; //array to store systematic high errors
58    
59     ClassDef(TH3DAsymErr, 1) // Histogram for storage of seperate asymmetric errors
60     };
61     }
62    
63     //--------------------------------------------------------------------------------------------------
64     inline Double_t mithep::TH3DAsymErr::GetStatErrorLow(Double_t x, Double_t y, Double_t z)
65     {
66     // Get Upper Statistical Uncertainty
67     return GetError(x,y,z,TH2DAsymErr::kStatErrLow);
68     }
69    
70     //--------------------------------------------------------------------------------------------------
71     inline Double_t mithep::TH3DAsymErr::GetStatErrorHigh(Double_t x, Double_t y, Double_t z)
72     {
73     // Get Upper Statistical Uncertainty
74     return GetError(x,y,z,TH2DAsymErr::kStatErrHigh);
75     }
76    
77     //--------------------------------------------------------------------------------------------------
78     inline Double_t mithep::TH3DAsymErr::GetBinStatErrorLow(Int_t b, Int_t c, Int_t d)
79     {
80     // Get Upper Statistical Uncertainty
81     return GetBinError(b,c,d,TH2DAsymErr::kStatErrLow);
82     }
83    
84     //--------------------------------------------------------------------------------------------------
85     inline Double_t mithep::TH3DAsymErr::GetBinStatErrorHigh(Int_t b, Int_t c, Int_t d)
86     {
87     // Get Upper Statistical Uncertainty
88     return GetBinError(b,c,d,TH2DAsymErr::kStatErrHigh);
89     }
90    
91     //--------------------------------------------------------------------------------------------------
92     inline Double_t mithep::TH3DAsymErr::GetSysErrorLow(Double_t x, Double_t y, Double_t z)
93     {
94     // Get Upper Sysistical Uncertainty
95     return GetError(x,y,z,TH2DAsymErr::kSysErrLow);
96     }
97    
98     //--------------------------------------------------------------------------------------------------
99     inline Double_t mithep::TH3DAsymErr::GetSysErrorHigh(Double_t x, Double_t y, Double_t z)
100     {
101     // Get Upper Sysistical Uncertainty
102     return GetError(x,y,z,TH2DAsymErr::kSysErrHigh);
103     }
104    
105     //--------------------------------------------------------------------------------------------------
106     inline Double_t mithep::TH3DAsymErr::GetBinSysErrorLow(Int_t b, Int_t c, Int_t d)
107     {
108     // Get Upper Sysistical Uncertainty
109     return GetBinError(b,c,d,TH2DAsymErr::kSysErrLow);
110     }
111    
112     //--------------------------------------------------------------------------------------------------
113     inline Double_t mithep::TH3DAsymErr::GetBinSysErrorHigh(Int_t b, Int_t c, Int_t d)
114     {
115     // Get Upper Sysistical Uncertainty
116     return GetBinError(b,c,d,TH2DAsymErr::kSysErrHigh);
117     }
118    
119     #endif