121 :
TGraph(np,
x,
y), fNYErrors(1), fSumErrorsMode(
m)
169 :
TGraph(np,
x,
y), fNYErrors(1), fSumErrorsMode(
m)
177 memcpy(
fExL, exL,
n);
181 memcpy(
fExH, exH,
n);
218 const Float_t *exH, std::vector<std::vector<Float_t>> eyL,
219 std::vector<std::vector<Float_t>> eyH,
Int_t m)
220 :
TGraph(np,
x,
y), fNYErrors(ne), fSumErrorsMode(
m)
236 if (
Int_t(eyL.size()) > j &&
Int_t(eyL[j].size()) > i)
237 fEyL[j][i] = eyL[j][i];
240 if (
Int_t(eyH.size()) > j &&
Int_t(eyH[j].size()) > i)
241 fEyH[j][i] = eyH[j][i];
258 std::vector<std::vector<Float_t>> eyL, std::vector<std::vector<Float_t>> eyH,
272 const Double_t *exH, std::vector<std::vector<Double_t>> eyL,
273 std::vector<std::vector<Double_t>> eyH,
Int_t m)
274 :
TGraph(np,
x,
y), fNYErrors(ne), fSumErrorsMode(
m)
282 memcpy(
fExL, exL,
n);
286 memcpy(
fExH, exH,
n);
292 if (
Int_t(eyL.size()) > j &&
Int_t(eyL[j].size()) > i)
293 fEyL[j][i] = eyL[j][i];
296 if (
Int_t(eyH.size()) > j &&
Int_t(eyH[j].size()) > i)
297 fEyH[j][i] = eyH[j][i];
314 std::vector<std::vector<Double_t>> eyL, std::vector<std::vector<Double_t>> eyH,
328 const Float_t *exH, std::vector<TArrayF> eyL, std::vector<TArrayF> eyH,
Int_t m)
329 :
TGraph(np,
x,
y), fNYErrors(ne), fSumErrorsMode(
m)
345 if (
Int_t(eyL.size()) > j && eyL[j].GetSize() > i)
346 fEyL[j][i] = eyL[j][i];
349 if (
Int_t(eyH.size()) > j && eyH[j].GetSize() > i)
350 fEyH[j][i] = eyH[j][i];
367 std::vector<TArrayF> eyH,
Int_t m)
380 const Double_t *exH, std::vector<TArrayD> eyL, std::vector<TArrayD> eyH,
Int_t m)
381 :
TGraph(np,
x,
y), fNYErrors(ne), fSumErrorsMode(
m)
389 memcpy(
fExL, exL,
n);
393 memcpy(
fExH, exH,
n);
399 if (
Int_t(eyL.size()) > j && eyL[j].GetSize() > i)
400 fEyL[j][i] = eyL[j][i];
403 if (
Int_t(eyH.size()) > j && eyH[j].GetSize() > i)
404 fEyH[j][i] = eyH[j][i];
421 std::vector<TArrayD> eyL, std::vector<TArrayD> eyH,
Int_t m)
437 :
TGraph(), fNYErrors(1), fSumErrorsMode(
m)
455 fX[i] = tvX(itvXL + i);
456 fY[i] = tvY(itvYL + i);
457 fExL[i] = tvExL(itvExLL + i);
458 fExH[i] = tvExH(itvExHL + i);
459 fEyL[0][i] = tvEyL(itvEyLL + i);
460 fEyH[0][i] = tvEyH(itvEyHL + i);
476 :
TGraph(), fNYErrors(1), fSumErrorsMode(
m)
494 fX[i] = tvX(i + itvXL);
495 fY[i] = tvY(i + itvYL);
496 fExL[i] = tvExL(i + itvExLL);
497 fExH[i] = tvExH(i + itvExHL);
498 fEyL[0][i] = tvEyL(i + itvEyLL);
499 fEyH[0][i] = tvEyH(i + itvEyHL);
514 :
TGraph(), fNYErrors(ne), fSumErrorsMode(
m)
530 fX[i] = tvX(i + itvXL);
531 fY[i] = tvY(i + itvYL);
532 fExL[i] = tvExL(i + itvExLL);
533 fExH[i] = tvExH(i + itvExHL);
535 for (
Int_t j = 0; j < ne; j++) {
553 :
TGraph(), fNYErrors(ne), fSumErrorsMode(
m)
569 fX[i] = tvX(i + itvXL);
570 fY[i] = tvY(i + itvYL);
571 fExL[i] = tvExL(i + itvExLL);
572 fExH[i] = tvExH(i + itvExHL);
574 for (
Int_t j = 0; j < ne; j++) {
660 fEyL[0][i] =
h->GetBinError(i + 1);
661 fEyH[0][i] =
h->GetBinError(i + 1);
682 if (!pass || !
total) {
683 Error(
"TGraphMultiErrors",
"Invalid histogram pointers");
690 std::string sname =
"divide_" + std::string(pass->
GetName()) +
"_by_" + std::string(
total->GetName());
695 pass->TAttLine::Copy(*
this);
696 pass->TAttFill::Copy(*
this);
697 pass->TAttMarker::Copy(*
this);
795 memmove(&arrays[2][obegin], &
fExL[ibegin],
n);
796 memmove(&arrays[3][obegin], &
fExH[ibegin],
n);
797 memmove(&arrays[4][obegin], &
fEyLSum[ibegin],
n);
798 memmove(&arrays[5][obegin], &
fEyHSum[ibegin],
n);
800 memmove(&
fExL[obegin], &
fExL[ibegin],
n);
801 memmove(&
fExH[obegin], &
fExH[ibegin],
n);
820 memset(
fExL + begin, 0,
n);
821 memset(
fExH + begin, 0,
n);
826 memset(
fEyL[j].GetArray() + begin, 0,
n);
827 memset(
fEyH[j].GetArray() + begin, 0,
n);
858 for (
Int_t i = 0; i < tgme->GetN(); i++) {
861 tgme->GetPoint(i,
x,
y);
863 SetPointEX(ipoint, tgme->GetErrorXlow(i), tgme->GetErrorXhigh(i));
864 for (
Int_t j = 0; j < tgme->GetNYErrors(); j++)
865 SetPointEY(ipoint, j, tgme->GetErrorYlow(i, j), tgme->GetErrorYhigh(i, j));
870 Warning(
"DoMerge",
"Merging a %s is not compatible with a TGraphMultiErrors - Errors will be ignored",
899 fEyL.emplace_back(np, eyL);
900 fEyH.emplace_back(np, eyH);
946 if (
f->Eval(
x,
y - eyL) <
f->Eval(
x,
y + eyH)) {
982 if (!pass || !
total) {
983 Error(
"Divide",
"one of the passed pointers is zero");
989 Error(
"Divide",
"passed histograms are not one-dimensional");
995 Bool_t bEffective =
false;
1001 for (
int i = 0; i < pass->
GetNbinsX(); ++i) {
1014 if (
total->GetSumw2()->fN > 0) {
1015 for (
int i = 0; i <
total->GetNbinsX(); ++i) {
1016 tsumw +=
total->GetBinContent(i);
1017 tsumw2 +=
total->GetSumw2()->At(i);
1020 tsumw =
total->GetSumOfWeights();
1044 Bool_t bIsBayesian =
false;
1053 Info(
"Divide",
"weight will be considered in the Histogram Ratio");
1060 sscanf(strstr(option.
Data(),
"cl="),
"cl=%lf", &level);
1061 if ((level > 0) && (level < 1))
1064 Warning(
"Divide",
"given confidence level %.3lf is invalid", level);
1106 sscanf(strstr(option.
Data(),
"b("),
"b(%lf,%lf)", &
a, &
b);
1110 Warning(
"Divide",
"given shape parameter for alpha %.2lf is invalid",
a);
1114 Warning(
"Divide",
"given shape parameter for beta %.2lf is invalid",
b);
1120 Bool_t usePosteriorMode =
false;
1121 if (bIsBayesian && option.
Contains(
"mode")) {
1122 usePosteriorMode =
true;
1126 Bool_t plot0Bins =
false;
1132 Bool_t useShortestInterval =
false;
1133 if (bIsBayesian && (option.
Contains(
"sh") || (usePosteriorMode && !option.
Contains(
"cen")))) {
1134 useShortestInterval =
true;
1138 Bool_t bPoissonRatio =
false;
1140 bPoissonRatio =
true;
1147 Warning(
"Divide",
"Histograms have weights: only Normal or Bayesian error calculation is supported");
1148 Info(
"Divide",
"Using now the Normal approximation for weighted histograms");
1151 if (bPoissonRatio) {
1153 Error(
"Divide",
"passed histograms are not of the same dimension");
1158 Error(
"Divide",
"passed histograms are not consistent");
1164 Error(
"Divide",
"passed histograms are not consistent");
1182 Double_t tw = 0, tw2 = 0, pw = 0, pw2 = 0, wratio = 1;
1184 for (
Int_t b = 1;
b <= nbins; ++
b) {
1186 Double_t eff = 0., low = 0., upper = 0.;
1190 tw =
total->GetBinContent(
b);
1191 tw2 = (
total->GetSumw2()->fN > 0) ?
total->GetSumw2()->At(
b) : tw;
1195 if (bPoissonRatio) {
1201 if (pw == 0 && pw2 == 0)
1204 p = (pw * pw) / pw2;
1206 if (tw == 0 && tw2 == 0)
1209 t = (tw * tw) / tw2;
1211 if (pw > 0 && tw > 0)
1213 wratio = (pw * t) / (p * tw);
1214 else if (pw == 0 && tw > 0)
1217 wratio = (psumw2 * t) / (psumw * tw);
1218 else if (tw == 0 && pw > 0)
1221 wratio = (pw * tsumw) / (p * tsumw2);
1232 }
else if (tw <= 0 && !plot0Bins)
1248 if (t == 0. && !plot0Bins)
1254 if ((bEffective && !bPoissonRatio) && tw2 <= 0) {
1262 if (bEffective && !bPoissonRatio) {
1264 double norm = tw / tw2;
1265 aa = pw * norm + alpha;
1266 bb = (tw - pw) * norm +
beta;
1268 aa = double(p) + alpha;
1269 bb = double(t - p) +
beta;
1271 if (usePosteriorMode)
1276 if (useShortestInterval) {
1286 if (bEffective && !bPoissonRatio) {
1295 double variance = (pw2 * (1. - 2 * eff) + tw2 * eff * eff) / (tw * tw);
1298 double prob = 0.5 * (1. - conf);
1301 upper = eff + delta;
1312 low = pBound(t, p, conf,
false);
1313 upper = pBound(t, p, conf,
true);
1317 if (bPoissonRatio) {
1320 low = low / (1. - low);
1321 upper = upper / (1. - upper);
1335 SetPointEY(npoint, 0, eff - low, upper - eff);
1342 Warning(
"Divide",
"Number of graph points is different than histogram bins - %d points have been skipped",
1346 Info(
"Divide",
"made a graph with %d points from %d bins", npoint, nbins);
1347 Info(
"Divide",
"used confidence level: %.2lf\n", conf);
1349 Info(
"Divide",
"used prior probability ~ beta(%.2lf,%.2lf)", alpha,
beta);
1381 if (
fY[i] - eyLMax <
ymin) {
1391 if (
fY[i] + eyHMax >
ymax)
1582 return fEyL[
e].GetArray();
1593 return fEyH[
e].GetArray();
1689 printf(
"x[%d]=%g, y[%d]=%g", i,
fX[i], i,
fY[i]);
1691 printf(
", exl[%d]=%g", i,
fExL[i]);
1693 printf(
", exh[%d]=%g", i,
fExH[i]);
1696 printf(
", eyl[%d][%d]=%g", j, i,
fEyL[j][i]);
1699 printf(
", eyh[%d][%d]=%g", j, i,
fEyH[j][i]);
1710 out <<
" " << std::endl;
1715 out <<
" TGraphMultiErrors* ";
1717 out <<
"tgme = new TGraphMultiErrors(" <<
fNpoints <<
", " <<
fNYErrors <<
");" << std::endl;
1718 out <<
" tgme->SetName(" << quote <<
GetName() << quote <<
");" << std::endl;
1719 out <<
" tgme->SetTitle(" << quote <<
GetTitle() << quote <<
");" << std::endl;
1726 fAttFill[j].SaveFillAttributes(out,
Form(
"tgme->GetAttFill(%d)", j), 0, 1001);
1727 fAttLine[j].SaveLineAttributes(out,
Form(
"tgme->GetAttLine(%d)", j), 1, 1, 1);
1731 out <<
" tgme->SetPoint(" << i <<
", " <<
fX[i] <<
", " <<
fY[i] <<
");" << std::endl;
1732 out <<
" tgme->SetPointEX(" << i <<
", " <<
fExL[i] <<
", " <<
fExH[i] <<
");" << std::endl;
1735 out <<
" tgme->SetPointEY(" << i <<
", " << j <<
", " <<
fEyL[j][i] <<
", " <<
fEyH[j][i] <<
");"
1739 static Int_t frameNumber = 0;
1743 hname += frameNumber;
1747 out <<
" " << std::endl;
1753 while ((obj = next())) {
1756 out <<
" tgme->GetListOfFunctions()->Add(ptstats);" << std::endl;
1757 out <<
" ptstats->SetParent(tgme->GetListOfFunctions());" << std::endl;
1759 out <<
" tgme->GetListOfFunctions()->Add(" << obj->
GetName() <<
");" << std::endl;
1762 const char *
l = strstr(option,
"multigraph");
1764 out <<
" multigraph->Add(tgme, " << quote <<
l + 10 << quote <<
");" << std::endl;
1766 out <<
" tgme->Draw(" << quote << option << quote <<
");" << std::endl;
1788 if (dpx * dpx + dpy * dpy < 25) {
1998 taf->TAttFill::Copy(*
this);
2009 taf->TAttLine::Copy(*
this);
2033 fAttFill[
e].SetFillColorAlpha(fcolor, falpha);
2066 fAttLine[
e].SetLineColorAlpha(lcolor, lalpha);
static unsigned int total
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
Array of doubles (64 bits per element).
Double_t At(Int_t i) const
Fill Area Attributes class.
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
static Double_t BetaMode(Double_t alpha, Double_t beta)
Compute the mode of the beta distribution.
static Bool_t BetaShortestInterval(Double_t level, Double_t alpha, Double_t beta, Double_t &lower, Double_t &upper)
Calculates the boundaries for a shortest confidence interval for a Beta distribution.
static Double_t BetaMean(Double_t alpha, Double_t beta)
Compute the mean (average) of the beta distribution.
static Double_t AgrestiCoull(Double_t total, Double_t passed, Double_t level, Bool_t bUpper)
Calculates the boundaries for the frequentist Agresti-Coull interval.
static Double_t FeldmanCousins(Double_t total, Double_t passed, Double_t level, Bool_t bUpper)
Calculates the boundaries for the frequentist Feldman-Cousins interval.
static Bool_t CheckBinning(const TH1 &pass, const TH1 &total)
Checks binning for each axis.
static Double_t BetaCentralInterval(Double_t level, Double_t alpha, Double_t beta, Bool_t bUpper)
Calculates the boundaries for a central confidence interval for a Beta distribution.
static Double_t Normal(Double_t total, Double_t passed, Double_t level, Bool_t bUpper)
Returns the confidence limits for the efficiency supposing that the efficiency follows a normal distr...
static Double_t Wilson(Double_t total, Double_t passed, Double_t level, Bool_t bUpper)
Calculates the boundaries for the frequentist Wilson interval.
static Bool_t CheckConsistency(const TH1 &pass, const TH1 &total, Option_t *opt="")
Checks the consistence of the given histograms.
static Double_t ClopperPearson(Double_t total, Double_t passed, Double_t level, Bool_t bUpper)
Calculates the boundaries for the frequentist Clopper-Pearson interval.
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
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
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 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.
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 Graph is a graphics object made of two arrays X and Y with npoints each.
Int_t fNpoints
Number of points <= fMaxSize.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
Int_t fMaxSize
!Current dimension of arrays fX and fY
TH1F * fHistogram
Pointer to histogram used for drawing axis.
virtual void SetName(const char *name="")
Set graph name.
virtual void SetNameTitle(const char *name="", const char *title="")
Set graph name and title.
virtual void SetTitle(const char *title="")
Change (i.e.
Double_t * fY
[fNpoints] array of Y points
Bool_t CtorAllocate()
In constructors set fNpoints than call this method.
virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Compute the x/y range of the points in this graph.
Double_t ** AllocateArrays(Int_t Narrays, Int_t arraySize)
Allocate arrays.
TList * fFunctions
Pointer to list of functions (fits and user)
static void SwapValues(Double_t *arr, Int_t pos1, Int_t pos2)
Swap values.
virtual Bool_t DoMerge(const TGraph *g)
protected function to perform the merge operation of a graph
virtual void SwapPoints(Int_t pos1, Int_t pos2)
Swap points.
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) Should be redefined in descendant classes.
Double_t * fX
[fNpoints] array of X points
virtual void Set(Int_t n)
Set number of points in the graph Existing coordinates are preserved New coordinates above fNpoints a...
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
virtual Bool_t CopyPoints(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
Copy points from fX and fY to arrays[0] and arrays[1] or to fX and fY if arrays == 0 and ibegin !...
TGraph & operator=(const TGraph &)
Equal operator for this graph.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
virtual Int_t GetDimension() const
virtual Int_t GetNbinsX() const
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual void SetName(const char *name)
Change the name of this histogram.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual TArrayD * GetSumw2()
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void ToLower()
Change string to lower-case.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Float_t GetErrorX() const
double normal_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
double beta(double x, double y)
Calculates the beta function.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Int_t Finite(Double_t x)
Check if it is finite with a mask in order to be consistent in presence of fast math.
Double_t Sqrt(Double_t x)
Short_t Min(Short_t a, Short_t b)
static long int sum(long int i)