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/// TGraph2DAsymmErrors normal constructor
92/// the arrays are preset to zero
93
95 : TGraph2D(n)
96{
97 if (n <= 0) {
98 Error("TGraph2DAsymmErrors", "Invalid number of points (%d)", n);
99 return;
100 }
101
102 fEXlow = new Double_t[n];
103 fEXhigh = new Double_t[n];
104 fEYlow = new Double_t[n];
105 fEYhigh = new Double_t[n];
106 fEZlow = new Double_t[n];
107 fEZhigh = new Double_t[n];
108
109 for (Int_t i=0;i<n;i++) {
110 fEXlow[i] = 0;
111 fEXhigh[i] = 0;
112 fEYlow[i] = 0;
113 fEYhigh[i] = 0;
114 fEZlow[i] = 0;
115 fEZhigh[i] = 0;
116 }
117}
118
119
120////////////////////////////////////////////////////////////////////////////////
121/// TGraph2DAsymmErrors constructor with doubles vectors as input.
122
124 :TGraph2D(n, x, y, z)
125{
126 if (n <= 0) {
127 Error("TGraph2DAsymmErrorsErrors", "Invalid number of points (%d)", n);
128 return;
129 }
130
131 fEXlow = new Double_t[n];
132 fEXhigh = new Double_t[n];
133 fEYlow = new Double_t[n];
134 fEYhigh = new Double_t[n];
135 fEZlow = new Double_t[n];
136 fEZhigh = new Double_t[n];
137
138 for (Int_t i=0;i<n;i++) {
139 if (exl) fEXlow[i] = exl[i];
140 else fEXlow[i] = 0;
141 if (exh) fEXhigh[i] = exh[i];
142 else fEXhigh[i] = 0;
143 if (eyl) fEYlow[i] = eyl[i];
144 else fEYlow[i] = 0;
145 if (eyh) fEYhigh[i] = eyh[i];
146 else fEYhigh[i] = 0;
147 if (ezl) fEZlow[i] = ezl[i];
148 else fEZlow[i] = 0;
149 if (ezh) fEZhigh[i] = ezh[i];
150 else fEZhigh[i] = 0;
151 }
152}
153
154
155////////////////////////////////////////////////////////////////////////////////
156/// TGraph2DAsymmErrors destructor.
157
159{
160 delete [] fEXlow;
161 delete [] fEXhigh;
162 delete [] fEYlow;
163 delete [] fEYhigh;
164 delete [] fEZlow;
165 delete [] fEZhigh;
166}
167
168////////////////////////////////////////////////////////////////////////////////
169/// Copy constructor.
170/// Copy everything except list of functions
171
173: TGraph2D(g), fEXlow(nullptr), fEXhigh(nullptr), fEYlow(nullptr), fEYhigh(nullptr), fEZlow(nullptr), fEZhigh(nullptr)
174{
175 if (fSize > 0) {
176 fEXlow = new Double_t[fSize];
177 fEXhigh = new Double_t[fSize];
178 fEYlow = new Double_t[fSize];
179 fEYhigh = new Double_t[fSize];
180 fEZlow = new Double_t[fSize];
181 fEZhigh = new Double_t[fSize];
182 for (Int_t n = 0; n < fSize; n++) {
183 fEXlow[n] = g.fEXlow[n];
184 fEXhigh[n] = g.fEXhigh[n];
185 fEYlow[n] = g.fEYlow[n];
186 fEYhigh[n] = g.fEYhigh[n];
187 fEZlow[n] = g.fEZlow[n];
188 fEZhigh[n] = g.fEZhigh[n];
189 }
190 }
191}
192
193////////////////////////////////////////////////////////////////////////////////
194/// Assignment operator
195/// Copy everything except list of functions
196
198{
199 if (this == &g) return *this;
200
201 // call operator= on TGraph2D
202 this->TGraph2D::operator=(static_cast<const TGraph2D&>(g) );
203
204 // delete before existing contained objects
205 if (fEXlow) delete [] fEXlow;
206 if (fEXhigh) delete [] fEXhigh;
207 if (fEYlow) delete [] fEYlow;
208 if (fEYhigh) delete [] fEYhigh;
209 if (fEZlow) delete [] fEZlow;
210 if (fEZhigh) delete [] fEZhigh;
211
212 fEXlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
213 fEXhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
214 fEYlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
215 fEYhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
216 fEZlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
217 fEZhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
218
219
220 // copy error arrays
221 for (Int_t n = 0; n < fSize; n++) {
222 fEXlow[n] = g.fEXlow[n];
223 fEXhigh[n] = g.fEXhigh[n];
224 fEYlow[n] = g.fEYlow[n];
225 fEYhigh[n] = g.fEYhigh[n];
226 fEZlow[n] = g.fEZlow[n];
227 fEZhigh[n] = g.fEZhigh[n];
228 }
229 return *this;
230}
231
232////////////////////////////////////////////////////////////////////////////////
233/// Add a 3D point with asymmetric errorbars to an existing graph
234
236 Double_t eyh, Double_t ezl, Double_t ezh)
237{
238 AddPoint(x, y, z);
239 SetPointError(fNpoints - 1, exl, exh, eyl, eyh, ezl, ezh);
240}
241
242////////////////////////////////////////////////////////////////////////////////
243/// Returns the combined error along X at point i by computing the average
244/// of the lower and upper variance.
245
247{
248 if (i < 0 || i >= fNpoints) return -1;
249 if (!fEXlow && !fEXhigh) return -1;
250 Double_t elow=0, ehigh=0;
251 if (fEXlow) elow = fEXlow[i];
252 if (fEXhigh) ehigh = fEXhigh[i];
253 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
254}
255
256////////////////////////////////////////////////////////////////////////////////
257/// Returns the low error along X at point i.
258
260{
261 if (i < 0 || i >= fNpoints) return -1;
262 if (fEXlow) return fEXlow[i];
263 return -1;
264}
265
266////////////////////////////////////////////////////////////////////////////////
267/// Returns the high error along X at point i.
268
270{
271 if (i < 0 || i >= fNpoints) return -1;
272 if (fEXhigh) return fEXhigh[i];
273 return -1;
274}
275
276////////////////////////////////////////////////////////////////////////////////
277/// Returns the combined error along Y at point i by computing the average
278/// of the lower and upper variance.
279
281{
282 if (i < 0 || i >= fNpoints) return -1;
283 if (!fEYlow && !fEYhigh) return -1;
284 Double_t elow=0, ehigh=0;
285 if (fEYlow) elow = fEYlow[i];
286 if (fEYhigh) ehigh = fEYhigh[i];
287 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
288}
289
290
291////////////////////////////////////////////////////////////////////////////////
292/// Returns the low error along Y at point i.
293
295{
296 if (i < 0 || i >= fNpoints) return -1;
297 if (fEYlow) return fEYlow[i];
298 return -1;
299}
300
301////////////////////////////////////////////////////////////////////////////////
302/// Returns the high error along Y at point i.
303
305{
306 if (i < 0 || i >= fNpoints) return -1;
307 if (fEYhigh) return fEYhigh[i];
308 return -1;
309}
310
311////////////////////////////////////////////////////////////////////////////////
312/// Returns the combined error along Z at point i by computing the average
313/// of the lower and upper variance.
314
316{
317 if (i < 0 || i >= fNpoints) return -1;
318 if (!fEZlow && !fEZhigh) return -1;
319 Double_t elow=0, ehigh=0;
320 if (fEZlow) elow = fEZlow[i];
321 if (fEZhigh) ehigh = fEZhigh[i];
322 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
323}
324
325////////////////////////////////////////////////////////////////////////////////
326/// Returns the low error along Z at point i.
327
329{
330 if (i < 0 || i >= fNpoints) return -1;
331 if (fEZlow) return fEZlow[i];
332 return -1;
333}
334
335////////////////////////////////////////////////////////////////////////////////
336/// Returns the high error along Z at point i.
337
339{
340 if (i < 0 || i >= fNpoints) return -1;
341 if (fEZhigh) return fEZhigh[i];
342 return -1;
343}
344
345
346////////////////////////////////////////////////////////////////////////////////
347/// Returns the X maximum with errors.
348
350{
351 Double_t v = fX[0]+fEXhigh[0];
352 for (Int_t i=1; i<fNpoints; i++) if (fX[i]+fEXhigh[i]>v) v=fX[i]+fEXhigh[i];
353 return v;
354}
355
356
357////////////////////////////////////////////////////////////////////////////////
358/// Returns the X minimum with errors.
359
361{
362 Double_t v = fX[0]-fEXlow[0];
363 for (Int_t i=1; i<fNpoints; i++) if (fX[i]-fEXlow[i]<v) v=fX[i]-fEXlow[i];
364 return v;
365}
366
367
368////////////////////////////////////////////////////////////////////////////////
369/// Returns the Y maximum with errors.
370
372{
373 Double_t v = fY[0]+fEYhigh[0];
374 for (Int_t i=1; i<fNpoints; i++) if (fY[i]+fEYhigh[i]>v) v=fY[i]+fEYhigh[i];
375 return v;
376}
377
378
379////////////////////////////////////////////////////////////////////////////////
380/// Returns the Y minimum with errors.
381
383{
384 Double_t v = fY[0]-fEYlow[0];
385 for (Int_t i=1; i<fNpoints; i++) if (fY[i]-fEYlow[i]<v) v=fY[i]-fEYlow[i];
386 return v;
387}
388
389
390////////////////////////////////////////////////////////////////////////////////
391/// Returns the Z maximum with errors.
392
394{
395 Double_t v = fZ[0]+fEZhigh[0];
396 for (Int_t i=1; i<fNpoints; i++) if (fZ[i]+fEZhigh[i]>v) v=fZ[i]+fEZhigh[i];
397 return v;
398}
399
400
401////////////////////////////////////////////////////////////////////////////////
402/// Returns the Z minimum with errors.
403
405{
406 Double_t v = fZ[0]-fEZlow[0];
407 for (Int_t i=1; i<fNpoints; i++) if (fZ[i]-fEZlow[i]<v) v=fZ[i]-fEZlow[i];
408 return v;
409}
410
411
412////////////////////////////////////////////////////////////////////////////////
413/// Print 2D graph and errors values.
414
416{
417 for (Int_t i = 0; i < fNpoints; i++) {
418 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",
419 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]);
420 }
421}
422
423////////////////////////////////////////////////////////////////////////////////
424/// Multiply the values and errors of a TGraph2DAsymmErrors by a constant c1.
425///
426/// If option contains "x" the x values and errors are scaled
427/// If option contains "y" the y values and errors are scaled
428/// If option contains "z" the z values and errors are scaled
429/// If option contains "xyz" all three x, y and z values and errors are scaled
430
432{
434 TString opt = option; opt.ToLower();
435 if (opt.Contains("x") && GetEXlow()) {
436 for (Int_t i=0; i<GetN(); i++)
437 GetEXlow()[i] *= c1;
438 }
439 if (opt.Contains("x") && GetEXhigh()) {
440 for (Int_t i=0; i<GetN(); i++)
441 GetEXhigh()[i] *= c1;
442 }
443 if (opt.Contains("y") && GetEYlow()) {
444 for (Int_t i=0; i<GetN(); i++)
445 GetEYlow()[i] *= c1;
446 }
447 if (opt.Contains("y") && GetEYhigh()) {
448 for (Int_t i=0; i<GetN(); i++)
449 GetEYhigh()[i] *= c1;
450 }
451 if (opt.Contains("z") && GetEZlow()) {
452 for (Int_t i=0; i<GetN(); i++)
453 GetEZlow()[i] *= c1;
454 }
455 if (opt.Contains("z") && GetEZhigh()) {
456 for (Int_t i=0; i<GetN(); i++)
457 GetEZhigh()[i] *= c1;
458 }
459}
460
461////////////////////////////////////////////////////////////////////////////////
462/// Set number of points in the 2D graph.
463/// Existing coordinates are preserved.
464/// New coordinates above fNpoints are preset to 0.
465
467{
468 if (n < 0) n = 0;
469 if (n == fNpoints) return;
470 if (n > fNpoints) SetPointError(n,0,0,0,0,0,0);
471 fNpoints = n;
472}
473
474////////////////////////////////////////////////////////////////////////////////
475/// Deletes point number ipoint
476
478{
479 if (ipoint < 0) return -1;
480 if (ipoint >= fNpoints) return -1;
481
482 fNpoints--;
483 Double_t *newX = new Double_t[fNpoints];
484 Double_t *newY = new Double_t[fNpoints];
485 Double_t *newZ = new Double_t[fNpoints];
486 Double_t *newEXlow = new Double_t[fNpoints];
487 Double_t *newEXhigh = new Double_t[fNpoints];
488 Double_t *newEYlow = new Double_t[fNpoints];
489 Double_t *newEYhigh = new Double_t[fNpoints];
490 Double_t *newEZlow = new Double_t[fNpoints];
491 Double_t *newEZhigh = new Double_t[fNpoints];
492
493 Int_t j = -1;
494 for (Int_t i = 0; i < fNpoints + 1; i++) {
495 if (i == ipoint) continue;
496 j++;
497 newX[j] = fX[i];
498 newY[j] = fY[i];
499 newZ[j] = fZ[i];
500 newEXlow[j] = fEXlow[i];
501 newEXhigh[j] = fEXhigh[i];
502 newEYlow[j] = fEYlow[i];
503 newEYhigh[j] = fEYhigh[i];
504 newEZlow[j] = fEZlow[i];
505 newEZhigh[j] = fEZhigh[i];
506 }
507 delete [] fX;
508 delete [] fY;
509 delete [] fZ;
510 delete [] fEXlow;
511 delete [] fEXhigh;
512 delete [] fEYlow;
513 delete [] fEYhigh;
514 delete [] fEZlow;
515 delete [] fEZhigh;
516 fX = newX;
517 fY = newY;
518 fZ = newZ;
519 fEXlow = newEXlow;
520 fEXhigh = newEXhigh;
521 fEYlow = newEYlow;
522 fEYhigh = newEYhigh;
523 fEZlow = newEZlow;
524 fEZhigh = newEZhigh;
525 fSize = fNpoints;
526 if (fHistogram) {
527 delete fHistogram;
528 fHistogram = nullptr;
529 fDelaunay = nullptr;
530 }
531 return ipoint;
532}
533
534////////////////////////////////////////////////////////////////////////////////
535/// Set x, y and z values for point number i
536
538{
539 if (i < 0) return;
540 if (i >= fNpoints) {
541 // re-allocate the object
542 Double_t *savex = new Double_t[i+1];
543 Double_t *savey = new Double_t[i+1];
544 Double_t *savez = new Double_t[i+1];
545 Double_t *saveexl = new Double_t[i+1];
546 Double_t *saveexh = new Double_t[i+1];
547 Double_t *saveeyl = new Double_t[i+1];
548 Double_t *saveeyh = new Double_t[i+1];
549 Double_t *saveezl = new Double_t[i+1];
550 Double_t *saveezh = new Double_t[i+1];
551 if (fNpoints > 0) {
552 memcpy(savex, fX, fNpoints*sizeof(Double_t));
553 memcpy(savey, fY, fNpoints*sizeof(Double_t));
554 memcpy(savez, fZ, fNpoints*sizeof(Double_t));
555 memcpy(saveexl,fEXlow, fNpoints*sizeof(Double_t));
556 memcpy(saveexh,fEXhigh,fNpoints*sizeof(Double_t));
557 memcpy(saveeyl,fEYlow, fNpoints*sizeof(Double_t));
558 memcpy(saveeyh,fEYhigh,fNpoints*sizeof(Double_t));
559 memcpy(saveezl,fEZlow, fNpoints*sizeof(Double_t));
560 memcpy(saveezh,fEZhigh,fNpoints*sizeof(Double_t));
561 }
562 if (fX) delete [] fX;
563 if (fY) delete [] fY;
564 if (fZ) delete [] fZ;
565 if (fEXlow) delete [] fEXlow;
566 if (fEXhigh) delete [] fEXhigh;
567 if (fEYlow) delete [] fEYlow;
568 if (fEYhigh) delete [] fEYhigh;
569 if (fEZlow) delete [] fEZlow;
570 if (fEZhigh) delete [] fEZhigh;
571 fX = savex;
572 fY = savey;
573 fZ = savez;
574 fEXlow = saveexl;
575 fEXhigh = saveexh;
576 fEYlow = saveeyl;
577 fEYhigh = saveeyh;
578 fEZlow = saveezl;
579 fEZhigh = saveezh;
580 fNpoints = i+1;
581 }
582 fX[i] = x;
583 fY[i] = y;
584 fZ[i] = z;
585}
586
587
588////////////////////////////////////////////////////////////////////////////////
589/// Set ex, ey and ez values for point number i
590
592{
593 if (i < 0) return;
594 if (i >= fNpoints) {
595 // re-allocate the object
597 }
598 fEXlow[i] = exl;
599 fEXhigh[i] = exh;
600 fEYlow[i] = eyl;
601 fEYhigh[i] = eyh;
602 fEZlow[i] = ezl;
603 fEZhigh[i] = ezh;
604}
605
606
607////////////////////////////////////////////////////////////////////////////////
608/// Stream an object of class TGraph2DAsymmErrors.
609
611{
612 if (b.IsReading()) {
613 UInt_t R__s, R__c;
614 Version_t R__v = b.ReadVersion(&R__s, &R__c);
615 b.ReadClassBuffer(TGraph2DAsymmErrors::Class(), this, R__v, R__s, R__c);
616 } else {
617 b.WriteClassBuffer(TGraph2DAsymmErrors::Class(),this);
618 }
619}
#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:382
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:557
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:1005
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:666