Revision: | 1.4 |
Committed: | Sat Mar 27 13:18:42 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 |
Changes since 1.3: | +18 -12 lines |
Log Message: | Add some accessors to get bin content by bin number |
# | Content |
---|---|
1 | //-------------------------------------------------------------------------------------------------- |
2 | // $Id: TH2DAsymErr.h,v 1.3 2009/10/21 15:04:06 sixie Exp $ |
3 | // |
4 | // TH2DAsymErr |
5 | // |
6 | // Histogram that stores separate asymmetric statistical and systematic errors. It is |
7 | // derived from TH2D. |
8 | // |
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 | enum EErrType { |
23 | kStatErrLow = 0, |
24 | kStatErrHigh, |
25 | kSysErrLow, |
26 | kSysErrHigh |
27 | }; |
28 | |
29 | TH2DAsymErr() {} |
30 | 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 | TH2DAsymErr(const TH2D &h2d); |
34 | ~TH2DAsymErr() {} |
35 | |
36 | using TH2D::GetBinContent; |
37 | Double_t GetError(Double_t x, Double_t y, EErrType t); |
38 | Double_t GetBinError(Int_t b, Int_t c, EErrType t); |
39 | Double_t GetStatErrorLow(Double_t x, Double_t y) { return GetError(x,y,kStatErrLow); } |
40 | Double_t GetBinStatErrorLow(Int_t b, Int_t c) { return GetBinError(b,c,kStatErrLow); } |
41 | Double_t GetStatErrorHigh(Double_t x, Double_t y) { return GetError(x,y,kStatErrHigh); } |
42 | Double_t GetBinStatErrorHigh(Int_t b, Int_t c) { return GetBinError(b,c,kStatErrHigh); } |
43 | Double_t GetSysErrorLow(Double_t x, Double_t y) { return GetError(x,y,kSysErrLow); } |
44 | Double_t GetBinSysErrorLow(Int_t b, Int_t c) { return GetBinError(b,c,kSysErrLow); } |
45 | Double_t GetSysErrorHigh(Double_t x, Double_t y) { return GetError(x,y,kSysErrHigh); } |
46 | Double_t GetBinSysErrorHigh(Int_t b, Int_t c) { return GetBinError(b,c,kSysErrHigh); } |
47 | using TH2D::SetBinContent; |
48 | void SetBinContent(Int_t binx, Int_t biny, Double_t value, |
49 | Double_t statErrorLow, Double_t statErrorHigh, |
50 | Double_t sysErrorLow, Double_t sysErrorHigh); |
51 | using TH2D::SetBinError; |
52 | void SetBinError(Int_t binx, Int_t biny, |
53 | Double_t statErrorLow, Double_t statErrorHigh, |
54 | Double_t sysErrorLow, Double_t sysErrorHigh); |
55 | |
56 | protected: |
57 | |
58 | TArrayD fStatErrorLow; //array to store statistical low errors |
59 | TArrayD fStatErrorHigh; //array to store statistical high errors |
60 | TArrayD fSysErrorLow; //array to store systematic low errors |
61 | TArrayD fSysErrorHigh; //array to store systematic high errors |
62 | |
63 | ClassDef(TH2DAsymErr, 1) // Histogram for storage of seperate asymmetric errors |
64 | }; |
65 | } |
66 | #endif |