Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGraph2DErrors.h
Go to the documentation of this file.
1// @(#)root/hist:$Id: TGraph2DErrors.h,v 1.00
2// Author: Olivier Couet 26/11/2003
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_TGraph2DErrors
13#define ROOT_TGraph2DErrors
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TGraph2DErrors //
19// //
20// a 2D Graph with error bars //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TGraph2D.h"
25
26class TGraph2DErrors : public TGraph2D {
27
28protected:
29 Double_t *fEX{nullptr}; ///<[fNpoints] array of X errors
30 Double_t *fEY{nullptr}; ///<[fNpoints] array of Y errors
31 Double_t *fEZ{nullptr}; ///<[fNpoints] array of Z errors
32
33public:
37 Double_t *ex = nullptr, Double_t *ey = nullptr, Double_t *ez = nullptr, Option_t *option = "");
40 ~TGraph2DErrors() override;
41 Double_t GetErrorX(Int_t bin) const override;
42 Double_t GetErrorY(Int_t bin) const override;
43 Double_t GetErrorZ(Int_t bin) const override;
44 Double_t *GetEX() const override {return fEX;}
45 Double_t *GetEY() const override {return fEY;}
46 Double_t *GetEZ() const override {return fEZ;}
47 Double_t GetXmaxE() const override;
48 Double_t GetXminE() const override;
49 Double_t GetYmaxE() const override;
50 Double_t GetYminE() const override;
51 Double_t GetZmaxE() const override;
52 Double_t GetZminE() const override;
53 void Print(Option_t *chopt="") const override;
54 Int_t RemovePoint(Int_t ipoint); // *MENU*
55 void Scale(Double_t c1=1., Option_t *option="z") override; // *MENU*
56 void Set(Int_t n) override;
57 void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override;
58 virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez);
59
60 ClassDefOverride(TGraph2DErrors,1) //A 2D graph with error bars
61};
62
63#endif
64
65
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:341
Option_t Option_t option
Graph 2D class with errors.
Double_t GetErrorZ(Int_t bin) const override
This function is called by Graph2DFitChisquare.
~TGraph2DErrors() override
TGraph2DErrors destructor.
Double_t GetYminE() const override
Returns the Y minimum with errors.
Double_t GetXminE() const override
Returns the X minimum with errors.
Double_t * GetEZ() const override
Double_t * fEY
[fNpoints] array of Y errors
Double_t * GetEY() const override
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.
void Scale(Double_t c1=1., Option_t *option="z") override
Multiply the values and errors of a TGraph2DErrors by a constant c1.
Double_t * fEZ
[fNpoints] array of Z errors
Double_t * GetEX() const override
virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez)
Set ex, ey and ez values for point number i.
Double_t GetErrorX(Int_t bin) const override
This function is called by Graph2DFitChisquare.
void Print(Option_t *chopt="") const override
Print 2D graph and errors values.
Double_t GetZminE() const override
Returns the Z minimum with errors.
TGraph2DErrors & operator=(const TGraph2DErrors &)
Assignment operator Copy everything except list of functions.
Double_t GetErrorY(Int_t bin) const override
This function is called by Graph2DFitChisquare.
Double_t * fEX
[fNpoints] array of X errors
TGraph2DErrors()
TGraph2DErrors default constructor.
Double_t GetYmaxE() const override
Returns the Y maximum with errors.
Double_t GetXmaxE() const override
Returns the X maximum with errors.
Double_t GetZmaxE() const override
Returns the Z maximum with errors.
void Set(Int_t n) override
Set number of points in the 2D graph.
Int_t RemovePoint(Int_t ipoint)
Deletes point number ipoint.
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
Double_t ey[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t ex[n]
Definition legend1.C:17