Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGraph2DAsymmErrors.cxx
Go to the documentation of this file.
1// @(#)root/hist:$Id: TGraph2DAsymmErrors.cxx,v 1.00
2// Author: Olivier Couet
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#include <iostream>
13#include "TBuffer.h"
14#include "TGraph2DAsymmErrors.h"
15#include "TMath.h"
16#include "TH2.h"
17#include "TVirtualPad.h"
18#include "TVirtualFitter.h"
19#include "THLimitsFinder.h"
20
22
23/** \class TGraph2DAsymmErrors
24 \ingroup Graphs
25Graph 2D class with errors.
26
27A TGraph2DAsymmErrors is a TGraph2D with asymmetric errors. It behaves like a TGraph2D and has
28the same drawing options.
29
30The **"ERR"** drawing option allows to display the error bars. The
31following example shows how to use it:
32
33Begin_Macro(source)
34{
35 auto c = new TCanvas("c","TGraph2DAsymmErrors example",0,0,600,600);
36 Double_t P = 6.;
37 Int_t np = 200;
38
39 Double_t *rx=0, *ry=0, *rz=0;
40 Double_t *exl=0, *exh=0, *eyl=0, *eyh=0, *ezl=0, *ezh=0;
41
42 rx = new Double_t[np];
43 ry = new Double_t[np];
44 rz = new Double_t[np];
45 exl = new Double_t[np];
46 exh = new Double_t[np];
47 eyl = new Double_t[np];
48 eyh = new Double_t[np];
49 ezl = new Double_t[np];
50 ezh = new Double_t[np];
51
52 auto r = new TRandom();
53
54 for (Int_t N=0; N<np;N++) {
55 rx[N] = 2*P*(r->Rndm(N))-P;
56 ry[N] = 2*P*(r->Rndm(N))-P;
57 rz[N] = rx[N]*rx[N]-ry[N]*ry[N];
58 rx[N] = 10.+rx[N];
59 ry[N] = 10.+ry[N];
60 rz[N] = 40.+rz[N];
61 exl[N] = r->Rndm(N);
62 exh[N] = r->Rndm(N);
63 eyl[N] = r->Rndm(N);
64 eyh[N] = r->Rndm(N);
65 ezl[N] = 10*r->Rndm(N);
66 ezh[N] = 10*r->Rndm(N);
67 }
68
69 auto g = new TGraph2DAsymmErrors(np, rx, ry, rz, exl, exh, eyl, eyh, ezl, ezh);
70 g->SetTitle("TGraph2D with asymmetric error bars: option \"ERR\"");
71 g->SetFillColor(29);
72 g->SetMarkerSize(0.8);
73 g->SetMarkerStyle(20);
74 g->SetMarkerColor(kRed);
75 g->SetLineColor(kBlue-3);
76 g->SetLineWidth(2);
77 gPad->SetLogy(1);
78 g->Draw("err p0");
79}
80End_Macro
81*/
82
83
84////////////////////////////////////////////////////////////////////////////////
85/// TGraph2DAsymmErrors default constructor
86
88{
89}
90
91
92////////////////////////////////////////////////////////////////////////////////
93/// TGraph2DAsymmErrors normal constructor
94/// the arrays are preset to zero
95
97 : TGraph2D(n)
98{
99 if (n <= 0) {
100 Error("TGraph2DAsymmErrors", "Invalid number of points (%d)", n);
101 return;
102 }
103
104 fEXlow = new Double_t[n];
105 fEXhigh = new Double_t[n];
106 fEYlow = new Double_t[n];
107 fEYhigh = new Double_t[n];
108 fEZlow = new Double_t[n];
109 fEZhigh = new Double_t[n];
110
111 for (Int_t i=0;i<n;i++) {
112 fEXlow[i] = 0;
113 fEXhigh[i] = 0;
114 fEYlow[i] = 0;
115 fEYhigh[i] = 0;
116 fEZlow[i] = 0;
117 fEZhigh[i] = 0;
118 }
119}
120
121
122////////////////////////////////////////////////////////////////////////////////
123/// TGraph2DAsymmErrors constructor with doubles vectors as input.
124
126 :TGraph2D(n, x, y, z)
127{
128 if (n <= 0) {
129 Error("TGraph2DAsymmErrorsErrors", "Invalid number of points (%d)", n);
130 return;
131 }
132
133 fEXlow = new Double_t[n];
134 fEXhigh = new Double_t[n];
135 fEYlow = new Double_t[n];
136 fEYhigh = new Double_t[n];
137 fEZlow = new Double_t[n];
138 fEZhigh = new Double_t[n];
139
140 for (Int_t i=0;i<n;i++) {
141 if (exl) fEXlow[i] = exl[i];
142 else fEXlow[i] = 0;
143 if (exh) fEXhigh[i] = exh[i];
144 else fEXhigh[i] = 0;
145 if (eyl) fEYlow[i] = eyl[i];
146 else fEYlow[i] = 0;
147 if (eyh) fEYhigh[i] = eyh[i];
148 else fEYhigh[i] = 0;
149 if (ezl) fEZlow[i] = ezl[i];
150 else fEZlow[i] = 0;
151 if (ezh) fEZhigh[i] = ezh[i];
152 else fEZhigh[i] = 0;
153 }
154}
155
156
157////////////////////////////////////////////////////////////////////////////////
158/// TGraph2DAsymmErrors destructor.
159
161{
162 delete [] fEXlow;
163 delete [] fEXhigh;
164 delete [] fEYlow;
165 delete [] fEYhigh;
166 delete [] fEZlow;
167 delete [] fEZhigh;
168}
169
170////////////////////////////////////////////////////////////////////////////////
171/// Copy constructor.
172/// Copy everything except list of functions
173
175: TGraph2D(g), fEXlow(nullptr), fEXhigh(nullptr), fEYlow(nullptr), fEYhigh(nullptr), fEZlow(nullptr), fEZhigh(nullptr)
176{
177 if (fSize > 0) {
178 fEXlow = new Double_t[fSize];
179 fEXhigh = new Double_t[fSize];
180 fEYlow = new Double_t[fSize];
181 fEYhigh = new Double_t[fSize];
182 fEZlow = new Double_t[fSize];
183 fEZhigh = new Double_t[fSize];
184 for (Int_t n = 0; n < fSize; n++) {
185 fEXlow[n] = g.fEXlow[n];
186 fEXhigh[n] = g.fEXhigh[n];
187 fEYlow[n] = g.fEYlow[n];
188 fEYhigh[n] = g.fEYhigh[n];
189 fEZlow[n] = g.fEZlow[n];
190 fEZhigh[n] = g.fEZhigh[n];
191 }
192 }
193}
194
195////////////////////////////////////////////////////////////////////////////////
196/// Assignment operator
197/// Copy everything except list of functions
198
200{
201 if (this == &g) return *this;
202
203 // call operator= on TGraph2D
204 this->TGraph2D::operator=(static_cast<const TGraph2D&>(g) );
205
206 // delete before existing contained objects
207 if (fEXlow) delete [] fEXlow;
208 if (fEXhigh) delete [] fEXhigh;
209 if (fEYlow) delete [] fEYlow;
210 if (fEYhigh) delete [] fEYhigh;
211 if (fEZlow) delete [] fEZlow;
212 if (fEZhigh) delete [] fEZhigh;
213
214 fEXlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
215 fEXhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
216 fEYlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
217 fEYhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
218 fEZlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
219 fEZhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
220
221
222 // copy error arrays
223 for (Int_t n = 0; n < fSize; n++) {
224 fEXlow[n] = g.fEXlow[n];
225 fEXhigh[n] = g.fEXhigh[n];
226 fEYlow[n] = g.fEYlow[n];
227 fEYhigh[n] = g.fEYhigh[n];
228 fEZlow[n] = g.fEZlow[n];
229 fEZhigh[n] = g.fEZhigh[n];
230 }
231 return *this;
232}
233
234////////////////////////////////////////////////////////////////////////////////
235/// Add a 3D point with asymmetric errorbars to an existing graph
236
238 Double_t eyh, Double_t ezl, Double_t ezh)
239{
240 AddPoint(x, y, z);
241 SetPointError(fNpoints - 1, exl, exh, eyl, eyh, ezl, ezh);
242}
243
244////////////////////////////////////////////////////////////////////////////////
245/// Returns the combined error along X at point i by computing the average
246/// of the lower and upper variance.
247
249{
250 if (i < 0 || i >= fNpoints) return -1;
251 if (!fEXlow && !fEXhigh) return -1;
252 Double_t elow=0, ehigh=0;
253 if (fEXlow) elow = fEXlow[i];
254 if (fEXhigh) ehigh = fEXhigh[i];
255 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
256}
257
258////////////////////////////////////////////////////////////////////////////////
259/// Returns the low error along X at point i.
260
262{
263 if (i < 0 || i >= fNpoints) return -1;
264 if (fEXlow) return fEXlow[i];
265 return -1;
266}
267
268////////////////////////////////////////////////////////////////////////////////
269/// Returns the high error along X at point i.
270
272{
273 if (i < 0 || i >= fNpoints) return -1;
274 if (fEXhigh) return fEXhigh[i];
275 return -1;
276}
277
278////////////////////////////////////////////////////////////////////////////////
279/// Returns the combined error along Y at point i by computing the average
280/// of the lower and upper variance.
281
283{
284 if (i < 0 || i >= fNpoints) return -1;
285 if (!fEYlow && !fEYhigh) return -1;
286 Double_t elow=0, ehigh=0;
287 if (fEYlow) elow = fEYlow[i];
288 if (fEYhigh) ehigh = fEYhigh[i];
289 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
290}
291
292
293////////////////////////////////////////////////////////////////////////////////
294/// Returns the low error along Y at point i.
295
297{
298 if (i < 0 || i >= fNpoints) return -1;
299 if (fEYlow) return fEYlow[i];
300 return -1;
301}
302
303////////////////////////////////////////////////////////////////////////////////
304/// Returns the high error along Y at point i.
305
307{
308 if (i < 0 || i >= fNpoints) return -1;
309 if (fEYhigh) return fEYhigh[i];
310 return -1;
311}
312
313////////////////////////////////////////////////////////////////////////////////
314/// Returns the combined error along Z at point i by computing the average
315/// of the lower and upper variance.
316
318{
319 if (i < 0 || i >= fNpoints) return -1;
320 if (!fEZlow && !fEZhigh) return -1;
321 Double_t elow=0, ehigh=0;
322 if (fEZlow) elow = fEZlow[i];
323 if (fEZhigh) ehigh = fEZhigh[i];
324 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
325}
326
327////////////////////////////////////////////////////////////////////////////////
328/// Returns the low error along Z at point i.
329
331{
332 if (i < 0 || i >= fNpoints) return -1;
333 if (fEZlow) return fEZlow[i];
334 return -1;
335}
336
337////////////////////////////////////////////////////////////////////////////////
338/// Returns the high error along Z at point i.
339
341{
342 if (i < 0 || i >= fNpoints) return -1;
343 if (fEZhigh) return fEZhigh[i];
344 return -1;
345}
346
347
348////////////////////////////////////////////////////////////////////////////////
349/// Returns the X maximum with errors.
350
352{
353 Double_t v = fX[0]+fEXhigh[0];
354 for (Int_t i=1; i<fNpoints; i++) if (fX[i]+fEXhigh[i]>v) v=fX[i]+fEXhigh[i];
355 return v;
356}
357
358
359////////////////////////////////////////////////////////////////////////////////
360/// Returns the X minimum with errors.
361
363{
364 Double_t v = fX[0]-fEXlow[0];
365 for (Int_t i=1; i<fNpoints; i++) if (fX[i]-fEXlow[i]<v) v=fX[i]-fEXlow[i];
366 return v;
367}
368
369
370////////////////////////////////////////////////////////////////////////////////
371/// Returns the Y maximum with errors.
372
374{
375 Double_t v = fY[0]+fEYhigh[0];
376 for (Int_t i=1; i<fNpoints; i++) if (fY[i]+fEYhigh[i]>v) v=fY[i]+fEYhigh[i];
377 return v;
378}
379
380
381////////////////////////////////////////////////////////////////////////////////
382/// Returns the Y minimum with errors.
383
385{
386 Double_t v = fY[0]-fEYlow[0];
387 for (Int_t i=1; i<fNpoints; i++) if (fY[i]-fEYlow[i]<v) v=fY[i]-fEYlow[i];
388 return v;
389}
390
391
392////////////////////////////////////////////////////////////////////////////////
393/// Returns the Z maximum with errors.
394
396{
397 Double_t v = fZ[0]+fEZhigh[0];
398 for (Int_t i=1; i<fNpoints; i++) if (fZ[i]+fEZhigh[i]>v) v=fZ[i]+fEZhigh[i];
399 return v;
400}
401
402
403////////////////////////////////////////////////////////////////////////////////
404/// Returns the Z minimum with errors.
405
407{
408 Double_t v = fZ[0]-fEZlow[0];
409 for (Int_t i=1; i<fNpoints; i++) if (fZ[i]-fEZlow[i]<v) v=fZ[i]-fEZlow[i];
410 return v;
411}
412
413
414////////////////////////////////////////////////////////////////////////////////
415/// Print 2D graph and errors values.
416
418{
419 for (Int_t i = 0; i < fNpoints; i++) {
420 printf("x[%d]=%g, y[%d]=%g, z[%d]=%g, exl[%d]=%g, exh[%d]=%g, eyl[%d]=%g, eyh[%d]=%g, ezl[%d]=%g, ezh[%d]=%g\n",
421 i, fX[i], i, fY[i], i, fZ[i], i, fEXlow[i], i, fEXhigh[i], i, fEYlow[i], i, fEYhigh[i], i, fEZlow[i], i, fEZhigh[i]);
422 }
423}
424
425////////////////////////////////////////////////////////////////////////////////
426/// Multiply the values and errors of a TGraph2DAsymmErrors by a constant c1.
427///
428/// If option contains "x" the x values and errors are scaled
429/// If option contains "y" the y values and errors are scaled
430/// If option contains "z" the z values and errors are scaled
431/// If option contains "xyz" all three x, y and z values and errors are scaled
432
434{
436 TString opt = option; opt.ToLower();
437 if (opt.Contains("x") && GetEXlow()) {
438 for (Int_t i=0; i<GetN(); i++)
439 GetEXlow()[i] *= c1;
440 }
441 if (opt.Contains("x") && GetEXhigh()) {
442 for (Int_t i=0; i<GetN(); i++)
443 GetEXhigh()[i] *= c1;
444 }
445 if (opt.Contains("y") && GetEYlow()) {
446 for (Int_t i=0; i<GetN(); i++)
447 GetEYlow()[i] *= c1;
448 }
449 if (opt.Contains("y") && GetEYhigh()) {
450 for (Int_t i=0; i<GetN(); i++)
451 GetEYhigh()[i] *= c1;
452 }
453 if (opt.Contains("z") && GetEZlow()) {
454 for (Int_t i=0; i<GetN(); i++)
455 GetEZlow()[i] *= c1;
456 }
457 if (opt.Contains("z") && GetEZhigh()) {
458 for (Int_t i=0; i<GetN(); i++)
459 GetEZhigh()[i] *= c1;
460 }
461}
462
463////////////////////////////////////////////////////////////////////////////////
464/// Set number of points in the 2D graph.
465/// Existing coordinates are preserved.
466/// New coordinates above fNpoints are preset to 0.
467
469{
470 if (n < 0) n = 0;
471 if (n == fNpoints) return;
472 if (n > fNpoints) SetPointError(n,0,0,0,0,0,0);
473 fNpoints = n;
474}
475
476////////////////////////////////////////////////////////////////////////////////
477/// Deletes point number ipoint
478
480{
481 if (ipoint < 0) return -1;
482 if (ipoint >= fNpoints) return -1;
483
484 fNpoints--;
485 Double_t *newX = new Double_t[fNpoints];
486 Double_t *newY = new Double_t[fNpoints];
487 Double_t *newZ = new Double_t[fNpoints];
488 Double_t *newEXlow = new Double_t[fNpoints];
489 Double_t *newEXhigh = new Double_t[fNpoints];
490 Double_t *newEYlow = new Double_t[fNpoints];
491 Double_t *newEYhigh = new Double_t[fNpoints];
492 Double_t *newEZlow = new Double_t[fNpoints];
493 Double_t *newEZhigh = new Double_t[fNpoints];
494
495 Int_t j = -1;
496 for (Int_t i = 0; i < fNpoints + 1; i++) {
497 if (i == ipoint) continue;
498 j++;
499 newX[j] = fX[i];
500 newY[j] = fY[i];
501 newZ[j] = fZ[i];
502 newEXlow[j] = fEXlow[i];
503 newEXhigh[j] = fEXhigh[i];
504 newEYlow[j] = fEYlow[i];
505 newEYhigh[j] = fEYhigh[i];
506 newEZlow[j] = fEZlow[i];
507 newEZhigh[j] = fEZhigh[i];
508 }
509 delete [] fX;
510 delete [] fY;
511 delete [] fZ;
512 delete [] fEXlow;
513 delete [] fEXhigh;
514 delete [] fEYlow;
515 delete [] fEYhigh;
516 delete [] fEZlow;
517 delete [] fEZhigh;
518 fX = newX;
519 fY = newY;
520 fZ = newZ;
521 fEXlow = newEXlow;
522 fEXhigh = newEXhigh;
523 fEYlow = newEYlow;
524 fEYhigh = newEYhigh;
525 fEZlow = newEZlow;
526 fEZhigh = newEZhigh;
527 fSize = fNpoints;
528 if (fHistogram) {
529 delete fHistogram;
530 fHistogram = nullptr;
531 fDelaunay = nullptr;
532 }
533 return ipoint;
534}
535
536////////////////////////////////////////////////////////////////////////////////
537/// Set x, y and z values for point number i
538
540{
541 if (i < 0) return;
542 if (i >= fNpoints) {
543 // re-allocate the object
544 Double_t *savex = new Double_t[i+1];
545 Double_t *savey = new Double_t[i+1];
546 Double_t *savez = new Double_t[i+1];
547 Double_t *saveexl = new Double_t[i+1];
548 Double_t *saveexh = new Double_t[i+1];
549 Double_t *saveeyl = new Double_t[i+1];
550 Double_t *saveeyh = new Double_t[i+1];
551 Double_t *saveezl = new Double_t[i+1];
552 Double_t *saveezh = new Double_t[i+1];
553 if (fNpoints > 0) {
554 memcpy(savex, fX, fNpoints*sizeof(Double_t));
555 memcpy(savey, fY, fNpoints*sizeof(Double_t));
556 memcpy(savez, fZ, fNpoints*sizeof(Double_t));
557 memcpy(saveexl,fEXlow, fNpoints*sizeof(Double_t));
558 memcpy(saveexh,fEXhigh,fNpoints*sizeof(Double_t));
559 memcpy(saveeyl,fEYlow, fNpoints*sizeof(Double_t));
560 memcpy(saveeyh,fEYhigh,fNpoints*sizeof(Double_t));
561 memcpy(saveezl,fEZlow, fNpoints*sizeof(Double_t));
562 memcpy(saveezh,fEZhigh,fNpoints*sizeof(Double_t));
563 }
564 if (fX) delete [] fX;
565 if (fY) delete [] fY;
566 if (fZ) delete [] fZ;
567 if (fEXlow) delete [] fEXlow;
568 if (fEXhigh) delete [] fEXhigh;
569 if (fEYlow) delete [] fEYlow;
570 if (fEYhigh) delete [] fEYhigh;
571 if (fEZlow) delete [] fEZlow;
572 if (fEZhigh) delete [] fEZhigh;
573 fX = savex;
574 fY = savey;
575 fZ = savez;
576 fEXlow = saveexl;
577 fEXhigh = saveexh;
578 fEYlow = saveeyl;
579 fEYhigh = saveeyh;
580 fEZlow = saveezl;
581 fEZhigh = saveezh;
582 fNpoints = i+1;
583 }
584 fX[i] = x;
585 fY[i] = y;
586 fZ[i] = z;
587}
588
589
590////////////////////////////////////////////////////////////////////////////////
591/// Set ex, ey and ez values for point number i
592
594{
595 if (i < 0) return;
596 if (i >= fNpoints) {
597 // re-allocate the object
599 }
600 fEXlow[i] = exl;
601 fEXhigh[i] = exh;
602 fEYlow[i] = eyl;
603 fEYhigh[i] = eyh;
604 fEZlow[i] = ezl;
605 fEZhigh[i] = ezh;
606}
607
608
609////////////////////////////////////////////////////////////////////////////////
610/// Stream an object of class TGraph2DAsymmErrors.
611
613{
614 if (b.IsReading()) {
615 UInt_t R__s, R__c;
616 Version_t R__v = b.ReadVersion(&R__s, &R__c);
617 b.ReadClassBuffer(TGraph2DAsymmErrors::Class(), this, R__v, R__s, R__c);
618 } else {
619 b.WriteClassBuffer(TGraph2DAsymmErrors::Class(),this);
620 }
621}
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
short Version_t
Definition RtypesCore.h:65
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
Option_t Option_t option
Buffer base class used for serializing objects.
Definition TBuffer.h:43
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.
void Streamer(TBuffer &) override
Stream an object of class TGraph2DAsymmErrors.
Double_t GetErrorYhigh(Int_t i) const
Returns the high error along Y at point i.
virtual void AddPointError(Double_t x, Double_t y, Double_t z, Double_t exl=0., Double_t exh=0., Double_t eyl=0., Double_t eyh=0., Double_t ezl=0., Double_t ezh=0.)
Add a 3D point with asymmetric errorbars to an existing graph.
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
static TClass * Class()
~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
Int_t fNpoints
Number of points in the data set.
Definition TGraph2D.h:45
Double_t * fZ
[fNpoints]
Definition TGraph2D.h:52
TH2D * fHistogram
!2D histogram of z values linearly interpolated on the triangles
Definition TGraph2D.h:58
TObject * fDelaunay
! Pointer to Delaunay interpolator object
Definition TGraph2D.h:59
Int_t GetN() const
Definition TGraph2D.h:122
TGraph2D & operator=(const TGraph2D &)
Graph2D operator "=".
Definition TGraph2D.cxx:565
Double_t * fX
[fNpoints]
Definition TGraph2D.h:50
Double_t * fY
[fNpoints] Data set to be plotted
Definition TGraph2D.h:51
virtual void Scale(Double_t c1=1., Option_t *option="z")
Multiply the values of a TGraph2D by a constant c1.
virtual void AddPoint(Double_t x, Double_t y, Double_t z)
Append a new point to the graph.
Definition TGraph2D.h:93
Int_t fSize
!Real size of fX, fY and fZ
Definition TGraph2D.h:49
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:987
Basic string class.
Definition TString.h:139
void ToLower()
Change string to lower-case.
Definition TString.cxx:1182
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:632
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
Double_t Sqrt(Double_t x)
Returns the square root of x.
Definition TMath.h:662