12#ifndef ROOT_TGraphMultiErrors
13#define ROOT_TGraphMultiErrors
81 std::vector<std::vector<Float_t>> eyL, std::vector<std::vector<Float_t>> eyH,
84 const Float_t *exL,
const Float_t *exH, std::vector<std::vector<Float_t>> eyL,
87 std::vector<std::vector<Double_t>> eyL, std::vector<std::vector<Double_t>> eyH,
90 const Double_t *exL,
const Double_t *exH, std::vector<std::vector<Double_t>> eyL,
96 const Float_t *exL,
const Float_t *exH, std::vector<TArrayF> eyL, std::vector<TArrayF> eyH,
101 const Double_t *exL,
const Double_t *exH, std::vector<TArrayD> eyL, std::vector<TArrayD> eyH,
#define ClassDef(name, id)
static unsigned int total
Array of doubles (64 bits per element).
Array of floats (32 bits per element).
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha)
Set a transparent fill color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
Set a transparent line color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
TGraph with asymmetric error bars and multiple y error dimensions.
virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Compute Range.
virtual void Print(Option_t *chopt="") const
Print graph and errors values.
Double_t * fEyLSum
! array of summed Y low errors for fitting
Int_t GetSumErrorsMode() const
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual Double_t * GetEXhigh() const
virtual void FillZero(Int_t begin, Int_t end, Bool_t from_ctor=kTRUE)
Set zero values for point arrays in the range [begin, end)
virtual void SetPointError(Double_t exL, Double_t exH, Double_t eyL1, Double_t eyH1, Double_t eyL2=0., Double_t eyH2=0., Double_t eyL3=0., Double_t eyH3=0.)
Set ex and ey values for point pointed by the mouse.
virtual TAttLine * GetAttLine(Int_t e)
Get AttLine pointer for specified error dimension.
virtual void SetFillColorAlpha(Int_t e, Color_t fcolor, Float_t falpha)
Set Fill Color and Alpha of error e (-1 = Global and x errors)
virtual Color_t GetLineColor() const
Return the line color.
void Divide(const TH1 *pass, const TH1 *total, Option_t *opt="cp")
This function was adapted from the TGraphAsymmErrors class.
virtual void Apply(TF1 *f)
Apply a function to all data points y = f(x,y)
std::vector< TAttLine > fAttLine
the AttLine attributes of the different errors
virtual void AddYError(Int_t np, const Double_t *eyL=nullptr, const Double_t *eyH=nullptr)
Add a new y error to the graph and fill it with the values from eyL and eyH.
TGraphMultiErrors()
TGraphMultiErrors default constructor.
virtual void SetEY(Int_t e, Int_t np, const Double_t *eyL, const Double_t *eyH)
Set error e ey values.
virtual void SetSumErrorsMode(Int_t m)
Set the sum errors mode and recalculate summed errors.
virtual ~TGraphMultiErrors()
TGraphMultiErrors default destructor.
virtual void BayesDivide(const TH1 *pass, const TH1 *total, Option_t *opt="")
This function is only kept for backward compatibility.
TGraphMultiErrors & operator=(const TGraphMultiErrors &tgme)
TGraphMultiErrors assignment operator.
virtual Double_t GetErrorXhigh(Int_t i) const
Get high error on x coordinate for point i.
virtual Bool_t DoMerge(const TGraph *tg)
protected function to perform the merge operation of a graph with multiple asymmetric errors
Int_t fSumErrorsMode
How y errors are summed: kOnlyFirst = Only First; kSquareSum = Squared Sum; kSum = Absolute Addition.
virtual Width_t GetLineWidth() const
Return the line width.
virtual Bool_t CopyPoints(Double_t **arrays, Int_t ibegin, Int_t iend, Int_t obegin)
Copy errors from fE*** to arrays[] or to f Copy points.
virtual Double_t GetErrorY(Int_t i) const
Get error on y coordinate for point i The multiple errors of the dimensions are summed according to f...
@ kAbsSum
Calculate the absolute sum of all errors.
@ kSquareSum
Calculate the square sum of all errors.
@ kOnlyFirst
Only take errors from first dimension.
virtual Double_t GetErrorYlow(Int_t i) const
Get low error on y coordinate for point i The multiple errors of the dimensions are summed according ...
virtual Double_t * GetEYhigh() const
Get all high errors on y coordinates as an array summed according to fSumErrorsMode.
virtual TAttFill * GetAttFill(Int_t e)
Get AttFill pointer for specified error dimension.
virtual void SetLineStyle(Int_t e, Style_t lstyle)
Set Line Style of error e (-1 = Global and x errors)
virtual void SetPointEXhigh(Int_t i, Double_t exH)
Set exH value for point i.
Double_t * fExL
[fNpoints] array of X low errors
virtual Double_t ** Allocate(Int_t size)
Allocate internal data structures for size points.
virtual void SetLineWidth(Int_t e, Width_t lwidth)
Set Line Width of error e (-1 = Global and x errors)
std::vector< TArrayD > fEyH
two dimensional array of Y high errors
virtual Style_t GetLineStyle() const
Return the line style.
virtual void SetPointEX(Int_t i, Double_t exL, Double_t exH)
Set ex values for point i.
virtual void SetPointEYlow(Int_t i, Int_t ne, const Double_t *eyL)
Set eyL values for point i.
virtual Double_t * GetEXlow() const
virtual void SetLineColorAlpha(Int_t e, Color_t lcolor, Float_t lalpha)
Set Line Color and Alpha of error e (-1 = Global and x errors)
virtual void SetFillColor(Int_t e, Color_t fcolor)
Set Fill Color of error e (-1 = Global and x errors)
void CalcYErrorsSum() const
Recalculates the summed y error arrays.
virtual void SetAttLine(Int_t e, TAttLine *tal)
Set TAttLine parameters of error e by copying from another TAttLine (-1 = Global and x errors)
Double_t * fEyHSum
! array of summed Y high errors for fitting
virtual void DeleteYError(Int_t e)
Deletes the y error with the index e Note that you must keep at least 1 error.
virtual Double_t * GetEYlow() const
Get all low errors on y coordinates as an array summed according to fSumErrorsMode.
virtual Double_t GetErrorX(Int_t i) const
Get error on x coordinate for point i In case of asymmetric errors the mean of the square sum is retu...
virtual void SetFillStyle(Int_t e, Style_t fstyle)
Set Fill Style of error e (-1 = Global and x errors)
virtual void SetEYhigh(Int_t e, Int_t np, const Double_t *eyH)
Set error e eyH values.
virtual Double_t GetErrorXlow(Int_t i) const
Get low error on x coordinate for point i.
Int_t GetNYErrors() const
virtual void SetAttFill(Int_t e, TAttFill *taf)
Set TAttFill parameters of error e by copying from another TAttFill (-1 = Global and x errors)
virtual void SetEYlow(Int_t e, Int_t np, const Double_t *eyL)
Set error e eyL values.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
std::vector< TAttFill > fAttFill
the AttFill attributes of the different errors
Bool_t CtorAllocate()
Should be called from ctors after fNpoints has been set Note: This function should be called only fro...
Double_t * fExH
[fNpoints] array of X high errors
virtual void SwapPoints(Int_t pos1, Int_t pos2)
Swap points.
virtual void SetPointEY(Int_t i, Int_t ne, const Double_t *eyL, const Double_t *eyH)
Set ey values for point i.
virtual void SetLineColor(Int_t e, Color_t lcolor)
Set Line Color of error e (-1 = Global and x errors)
virtual void SetPointEXlow(Int_t i, Double_t exL)
Set exL value for point i.
virtual void SetPointEYhigh(Int_t i, Int_t ne, const Double_t *eyH)
Set eyH values for point i.
Int_t fNYErrors
The amount of different y-errors.
std::vector< TArrayD > fEyL
two dimensional array of Y low errors
virtual void CopyAndRelease(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
Copy and release.
virtual Double_t GetErrorYhigh(Int_t i) const
Get high error on y coordinate for point i The multiple errors of the dimensions are summed according...
A TGraph is an object made of two arrays X and Y with npoints each.
TH1 is the base class of all histogram classes in ROOT.