Logo ROOT  
Reference Guide
TGraph2DAsymmErrors.h
Go to the documentation of this file.
1// @(#)root/hist:$Id: TGraph2DAsymmErrors.h,v 1.00
2// Author: Olivier Couet 07/04/2022
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGraph2DAsymmErrors
13#define ROOT_TGraph2DAsymmErrors
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TGraph2DAsymmErrors //
19// //
20// a 2D Graph with asymmetric error bars //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TGraph2D.h"
25
27
28private:
29
30
31protected:
32 Double_t *fEXlow{nullptr}; ///<[fNpoints] array of X low errors
33 Double_t *fEXhigh{nullptr}; ///<[fNpoints] array of X high errors
34 Double_t *fEYlow{nullptr}; ///<[fNpoints] array of Y low errors
35 Double_t *fEYhigh{nullptr}; ///<[fNpoints] array of Y high errors
36 Double_t *fEZlow{nullptr}; ///<[fNpoints] array of Z low errors
37 Double_t *fEZhigh{nullptr}; ///<[fNpoints] array of Z high errors
38
39public:
43 Double_t *exl = nullptr, Double_t *exh = nullptr,
44 Double_t *eyl = nullptr, Double_t *eyh = nullptr,
45 Double_t *ezl = nullptr, Double_t *ezh = nullptr,
46 Option_t *option = "");
49 ~TGraph2DAsymmErrors() override;
50 Double_t GetErrorX(Int_t bin) const override;
51 Double_t GetErrorY(Int_t bin) const override;
52 Double_t GetErrorZ(Int_t bin) const override;
59 Double_t *GetEXlow() const override {return fEXlow;}
60 Double_t *GetEXhigh() const override {return fEXhigh;}
61 Double_t *GetEYlow() const override {return fEYlow;}
62 Double_t *GetEYhigh() const override {return fEYhigh;}
63 Double_t *GetEZlow() const override {return fEZlow;}
64 Double_t *GetEZhigh() const override {return fEZhigh;}
65 Double_t GetXmaxE() const override;
66 Double_t GetXminE() const override;
67 Double_t GetYmaxE() const override;
68 Double_t GetYminE() const override;
69 Double_t GetZmaxE() const override;
70 Double_t GetZminE() const override;
71 void Print(Option_t *chopt="") const override;
72 Int_t RemovePoint(Int_t ipoint); // *MENU*
73 void Scale(Double_t c1=1., Option_t *option="z") override; // *MENU*
74 void Set(Int_t n) override;
75 void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override;
76 virtual void SetPointError(Int_t i, Double_t exl, Double_t exh, Double_t eyl, Double_t eyh, Double_t ezl, Double_t ezh);
77
78 ClassDefOverride(TGraph2DAsymmErrors,1) //A 2D graph with error bars
79};
80
81#endif
int Int_t
Definition: RtypesCore.h:45
double Double_t
Definition: RtypesCore.h:59
const char Option_t
Definition: RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t option
Graph 2D class with errors.
Double_t GetErrorY(Int_t bin) const override
Returns the combined error along Y at point i by computing the average of the lower and upper varianc...
Double_t * GetEYlow() const override
Double_t * fEYlow
[fNpoints] array of Y low errors
Double_t GetYminE() const override
Returns the Y minimum with errors.
Double_t GetErrorZlow(Int_t i) const
Returns the low error along Z at point i.
virtual void SetPointError(Int_t i, Double_t exl, Double_t exh, Double_t eyl, Double_t eyh, Double_t ezl, Double_t ezh)
Set ex, ey and ez values for point number i.
Double_t * GetEYhigh() const override
Double_t * fEZlow
[fNpoints] array of Z low errors
Double_t GetErrorZhigh(Int_t i) const
Returns the high error along Z at point i.
Double_t GetYmaxE() const override
Returns the Y maximum with errors.
Double_t * fEXlow
[fNpoints] array of X low errors
Double_t GetErrorZ(Int_t bin) const override
Returns the combined error along Z at point i by computing the average of the lower and upper varianc...
Double_t GetErrorYlow(Int_t i) const
Returns the low error along Y at point i.
Double_t GetZmaxE() const override
Returns the Z maximum with errors.
Double_t * GetEZhigh() const override
Double_t * fEXhigh
[fNpoints] array of X high errors
Int_t RemovePoint(Int_t ipoint)
Deletes point number ipoint.
Double_t * fEZhigh
[fNpoints] array of Z high errors
Double_t * GetEXhigh() const override
Double_t * GetEZlow() const override
Double_t * fEYhigh
[fNpoints] array of Y high errors
Double_t GetErrorX(Int_t bin) const override
Returns the combined error along X at point i by computing the average of the lower and upper varianc...
Double_t GetErrorXhigh(Int_t i) const
Returns the high error along X at point i.
Double_t GetErrorYhigh(Int_t i) const
Returns the high error along Y at point i.
Double_t GetErrorXlow(Int_t i) const
Returns the low error along X at point i.
void Set(Int_t n) override
Set number of points in the 2D graph.
void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override
Set x, y and z values for point number i.
TGraph2DAsymmErrors()
TGraph2DAsymmErrors default constructor.
Double_t GetXminE() const override
Returns the X minimum with errors.
void Print(Option_t *chopt="") const override
Print 2D graph and errors values.
void Scale(Double_t c1=1., Option_t *option="z") override
Multiply the values and errors of a TGraph2DAsymmErrors by a constant c1.
Double_t GetXmaxE() const override
Returns the X maximum with errors.
TGraph2DAsymmErrors & operator=(const TGraph2DAsymmErrors &)
Assignment operator Copy everything except list of functions.
Double_t GetZminE() const override
Returns the Z minimum with errors.
Double_t * GetEXlow() const override
~TGraph2DAsymmErrors() override
TGraph2DAsymmErrors destructor.
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition: TGraph2D.h:41
Double_t y[n]
Definition: legend1.C:17
return c1
Definition: legend1.C:41
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16