I have a question about filling the TGraphAsymmErrors object.
I set a gsyst to plot the statistic uncertainty band of h1. I set the code as:
gsyst = ROOT.TGraphAsymmErrors(h1)
for j in range (1,gsyst.GetN()+1):
total_unc = 0
total_unc += pow(h1.GetBinErrorj), 2)
total_unc = sqrt(total_unc)
What I am not sure is should I fill the gsyst with j or j-1? I mean should it be:
Welcome back to the ROOT Forum.
The first point of graphs, including TGraphAsymmErrors, is always indexed with zero.
do you mean I should use
And for h1 histogram, the first point is indexed with zero or one?
TGraphXXX classes deal with C++ vectors. So they are indexed from
N-1 if they have
N entries. In your example if
j starts at 1 and you want to index the first entry of your
TGraph, yes, in that case, you should use
Histogram classes deal with bins. If your histogram has
N bins they are numbered from
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.