688   if (nbins <= 0) {
Warning(
"TH1",
"nbins is <=0 - set to nbins = 1"); nbins = 1; }
 
  710   if (nbins <= 0) {
Warning(
"TH1",
"nbins is <=0 - set to nbins = 1"); nbins = 1; }
 
  732   if (nbins <= 0) {
Warning(
"TH1",
"nbins is <=0 - set to nbins = 1"); nbins = 1; }
 
  761   Draw(
b ? 
b->GetDrawOption() : 
"");
 
  826      Error(
"Add",
"Attempt to add a non-existing function");
 
  846   for (
Int_t i = 0; i < 10; ++i) 
s1[i] = 0;
 
  852   Int_t bin, binx, biny, binz;
 
  857   for (binz = 0; binz < ncellsz; ++binz) {
 
  859      for (biny = 0; biny < ncellsy; ++biny) {
 
  861         for (binx = 0; binx < ncellsx; ++binx) {
 
  865            bin = binx + ncellsx * (biny + ncellsy * binz);
 
  917      Error(
"Add",
"Attempt to add a non-existing histogram");
 
  930         Info(
"Add",
"Attempt to add histograms with different number of bins - trying to use TH1::Merge");
 
  932         Error(
"Add",
"Attempt to add histograms with different number of bins : nbins h1 = %d , nbins h2 =  %d",
GetNbinsX(), 
h1->
GetNbinsX());
 
  937         Info(
"Add",
"Attempt to add histograms with different axis limits - trying to use TH1::Merge");
 
  939         Warning(
"Add",
"Attempt to add histograms with different axis limits");
 
  942         Info(
"Add",
"Attempt to add histograms with different bin limits - trying to use TH1::Merge");
 
  944         Warning(
"Add",
"Attempt to add histograms with different bin limits");
 
  948         Info(
"Add",
"Attempt to add histograms with different labels - trying to use TH1::Merge");
 
  950         Info(
"Warning",
"Attempt to add histograms with different labels");
 
  998         if (e1sq) w1 = 1. / e1sq;
 
 1003               double sf = (s2[0] != 0) ? s2[1]/s2[0] : 1;
 
 1007         if (e2sq) w2 = 1. / e2sq;
 
 1012               double sf = (
s1[0] != 0) ? 
s1[1]/
s1[0] : 1;
 
 1017         double y =  (w1*y1 + w2*y2)/(w1 + w2);
 
 1020            double err2 =  1./(w1 + w2);
 
 1021            if (err2 < 1.E-200) err2 = 0;  
 
 1037         if (i == 1) 
s1[i] += 
c1*
c1*s2[i];
 
 1038         else        s1[i] += 
c1*s2[i];
 
 1085      Error(
"Add",
"Attempt to add a non-existing histogram");
 
 1093   if (
h1 == h2 && 
c2 < 0) {
c2 = 0; normWidth = 
kTRUE;}
 
 1104            Info(
"Add",
"Attempt to add histograms with different number of bins - trying to use TH1::Merge");
 
 1106            Error(
"Add",
"Attempt to add histograms with different number of bins : nbins h1 = %d , nbins h2 =  %d",
GetNbinsX(), 
h1->
GetNbinsX());
 
 1111            Info(
"Add",
"Attempt to add histograms with different axis limits - trying to use TH1::Merge");
 
 1113            Warning(
"Add",
"Attempt to add histograms with different axis limits");
 
 1116            Info(
"Add",
"Attempt to add histograms with different bin limits - trying to use TH1::Merge");
 
 1118            Warning(
"Add",
"Attempt to add histograms with different bin limits");
 
 1122            Info(
"Add",
"Attempt to add histograms with different labels - trying to use TH1::Merge");
 
 1124            Info(
"Warning",
"Attempt to add histograms with different labels");
 
 1131         l.Add(
const_cast<TH1*
>(h2));
 
 1153   Bool_t resetStats = (
c1*
c2 < 0) || normWidth;
 
 1160         if (i == 1) s3[i] = 
c1*
c1*
s1[i] + 
c2*
c2*s2[i];
 
 1162         else        s3[i] = 
c1*
s1[i] + 
c2*s2[i];
 
 1178      Int_t bin, binx, biny, binz;
 
 1179      for (binz = 0; binz < nbinsz; ++binz) {
 
 1181         for (biny = 0; biny < nbinsy; ++biny) {
 
 1183            for (binx = 0; binx < nbinsx; ++binx) {
 
 1185               bin = 
GetBin(binx, biny, binz);
 
 1206         if (e1sq) w1 = 1./ e1sq;
 
 1210               double sf = (
s1[0] != 0) ? 
s1[1]/
s1[0] : 1;
 
 1214         if (e2sq) w2 = 1./ e2sq;
 
 1218               double sf = (s2[0] != 0) ? s2[1]/s2[0] : 1;
 
 1223         double y =  (w1*y1 + w2*y2)/(w1 + w2);
 
 1226            double err2 =  1./(w1 + w2);
 
 1227            if (err2 < 1.E-200) err2 = 0;  
 
 1301   return ((next && 
x > 0.) || (!next && 
x <= 0.)) ? std::ldexp(std::copysign(1., f2), nn)
 
 1302                                                   : std::ldexp(std::copysign(1., f2), --nn);
 
 1315      return (
Int_t)std::ldexp(1., nn);
 
 1355   Double_t rr = (xhma - xhmi) / (xma - xmi);
 
 1365   Int_t nbup = (xhma - xma) / bw;
 
 1368   if (nbup != nbside) {
 
 1370      xhma -= bw * (nbup - nbside);
 
 1371      nb -= (nbup - nbside);
 
 1375   Int_t nblw = (xmi - xhmi) / bw;
 
 1378   if (nblw != nbside) {
 
 1380      xhmi += bw * (nblw - nbside);
 
 1381      nb -= (nblw - nbside);
 
 1411   if (nbentries == 0) {
 
 1421   if (nbentries < 0 && action == 0) 
return 0;    
 
 1424   if (nbentries < 0) {
 
 1425      nbentries  = -nbentries;
 
 1437      for (
Int_t i=1;i<nbentries;i++) {
 
 1447                       "inconsistency found by power-of-2 autobin algorithm: fallback to standard method");
 
 1465   DoFillN(nbentries,&buffer[2],&buffer[1],2);
 
 1499   if (nbentries < 0) {
 
 1502      nbentries  = -nbentries;
 
 1534      if ( h2Array->
fN != fN ) {
 
 1539         for ( 
int i = 0; i < fN; ++i ) {
 
 1573   for (
int i = 1; i <= a1->
GetNbins(); ++i) {
 
 1576      if (label1 != label2) {
 
 1608      ::Info(
"CheckEqualAxes",
"Axes have different number of bins : nbin1 = %d nbin2 = %d",a1->
GetNbins(),a2->
GetNbins() );
 
 1614      ::Info(
"CheckEqualAxes",
"Axes have different limits");
 
 1620      ::Info(
"CheckEqualAxes",
"Axes have different bin limits");
 
 1628      ::Info(
"CheckEqualAxes",
"Axes have different labels");
 
 1643   Int_t nbins1   = lastBin1-firstBin1 + 1;
 
 1651   if (firstBin2 <  lastBin2) {
 
 1653      nbins2   = lastBin1-firstBin1 + 1;
 
 1658   if (nbins1 != nbins2 ) {
 
 1659      ::Info(
"CheckConsistentSubAxes",
"Axes have different number of bins");
 
 1667      ::Info(
"CheckConsistentSubAxes",
"Axes have different limits");
 
 1679   if (
h1 == h2) 
return true;
 
 1694       (dim > 1 && nbinsy != h2->
GetNbinsY())  ||
 
 1695       (dim > 2 && nbinsz != h2->
GetNbinsZ()) ) {
 
 2011   Int_t ndf = 0, igood = 0;
 
 2019      printf(
"Chi2 = %f, Prob = %g, NDF = %d, igood = %d\n", chi2,prob,ndf,igood);
 
 2022      if (ndf == 0) 
return 0;
 
 2070   Int_t i_start, i_end;
 
 2071   Int_t j_start, j_end;
 
 2072   Int_t k_start, k_end;
 
 2101      Error(
"Chi2TestX",
"Histograms have different dimensions.");
 
 2106   if (nbinx1 != nbinx2) {
 
 2107      Error(
"Chi2TestX",
"different number of x channels");
 
 2109   if (nbiny1 != nbiny2) {
 
 2110      Error(
"Chi2TestX",
"different number of y channels");
 
 2112   if (nbinz1 != nbinz2) {
 
 2113      Error(
"Chi2TestX",
"different number of z channels");
 
 2117   i_start = j_start = k_start = 1;
 
 2148   ndf = (i_end - i_start + 1) * (j_end - j_start + 1) * (k_end - k_start + 1) - 1;
 
 2155   if (scaledHistogram && !comparisonUU) {
 
 2156      Info(
"Chi2TestX", 
"NORM option should be used together with UU option. It is ignored");
 
 2163   Double_t effEntries1 = (s[1] ? s[0] * s[0] / s[1] : 0.0);
 
 2167   Double_t effEntries2 = (s[1] ? s[0] * s[0] / s[1] : 0.0);
 
 2169   if (!comparisonUU && !comparisonUW && !comparisonWW ) {
 
 2171      if (
TMath::Abs(sumBinContent1 - effEntries1) < 1) {
 
 2172         if ( 
TMath::Abs(sumBinContent2 - effEntries2) < 1) comparisonUU = 
true;
 
 2173         else comparisonUW = 
true;
 
 2175      else comparisonWW = 
true;
 
 2179      if (
TMath::Abs(sumBinContent1 - effEntries1) >= 1) {
 
 2180         Warning(
"Chi2TestX",
"First histogram is not unweighted and option UW has been requested");
 
 2183   if ( (!scaledHistogram && comparisonUU)   ) {
 
 2184      if ( ( 
TMath::Abs(sumBinContent1 - effEntries1) >= 1) || (
TMath::Abs(sumBinContent2 - effEntries2) >= 1) ) {
 
 2185         Warning(
"Chi2TestX",
"Both histograms are not unweighted and option UU has been requested");
 
 2191   if (comparisonUU && scaledHistogram) {
 
 2192      for (
Int_t i = i_start; i <= i_end; ++i) {
 
 2193         for (
Int_t j = j_start; j <= j_end; ++j) {
 
 2194            for (
Int_t k = k_start; k <= k_end; ++k) {
 
 2203               if (e1sq > 0.0) cnt1 = 
TMath::Floor(cnt1 * cnt1 / e1sq + 0.5); 
 
 2206               if (e2sq > 0.0) cnt2 = 
TMath::Floor(cnt2 * cnt2 / e2sq + 0.5); 
 
 2217      if (sumw1 <= 0.0 || sumw2 <= 0.0) {
 
 2218         Error(
"Chi2TestX", 
"Cannot use option NORM when one histogram has all zero errors");
 
 2223      for (
Int_t i = i_start; i <= i_end; ++i) {
 
 2224         for (
Int_t j = j_start; j <= j_end; ++j) {
 
 2225            for (
Int_t k = k_start; k <= k_end; ++k) {
 
 2239   if (sum1 == 0.0 || sum2 == 0.0) {
 
 2240      Error(
"Chi2TestX",
"one histogram is empty");
 
 2244   if ( comparisonWW  && ( sumw1 <= 0.0 && sumw2 <= 0.0 ) ){
 
 2245      Error(
"Chi2TestX",
"Hist1 and Hist2 have both all zero errors\n");
 
 2255      for (
Int_t i = i_start; i <= i_end; ++i) {
 
 2256         for (
Int_t j = j_start; j <= j_end; ++j) {
 
 2257            for (
Int_t k = k_start; k <= k_end; ++k) {
 
 2264               if (scaledHistogram) {
 
 2269                  if (e1sq > 0) cnt1 = 
TMath::Floor(cnt1 * cnt1 / e1sq + 0.5); 
 
 2272                  if (e2sq > 0) cnt2 = 
TMath::Floor(cnt2 * cnt2 / e2sq + 0.5); 
 
 2276               if (
Int_t(cnt1) == 0 && 
Int_t(cnt2) == 0) --ndf;  
 
 2283                  if (res) res[i - i_start] = (cnt1 - nexp1) / 
TMath::Sqrt(nexp1);
 
 2292                  Double_t delta = sum2 * cnt1 - sum1 * cnt2;
 
 2293                  chi2 += delta * delta / cntsum;
 
 2298      chi2 /= sum1 * sum2;
 
 2303         Info(
"Chi2TestX",
"There is a bin in h1 with less than 1 event.\n");
 
 2307         Info(
"Chi2TestX",
"There is a bin in h2 with less than 1 event.\n");
 
 2318   if ( comparisonUW ) {
 
 2319      for (
Int_t i = i_start; i <= i_end; ++i) {
 
 2320         for (
Int_t j = j_start; j <= j_end; ++j) {
 
 2321            for (
Int_t k = k_start; k <= k_end; ++k) {
 
 2330               if (cnt1 * cnt1 == 0 && cnt2 * cnt2 == 0) {
 
 2336               if (cnt2 * cnt2 == 0 && e2sq == 0) {
 
 2340                     e2sq = sumw2 / sum2;
 
 2345                     Error(
"Chi2TestX",
"Hist2 has in bin (%d,%d,%d) zero content and zero errors\n", i, j, k);
 
 2351               if (e2sq > 0 && cnt2 * cnt2 / e2sq < 10) 
n++;
 
 2353               Double_t var1 = sum2 * cnt2 - sum1 * e2sq;
 
 2354               Double_t var2 = var1 * var1 + 4. * sum2 * sum2 * cnt1 * e2sq;
 
 2359               while (var1 * var1 + cnt1 == 0 || var1 + var2 == 0) {
 
 2362                  var1 = sum2 * cnt2 - sum1 * e2sq;
 
 2363                  var2 = var1 * var1 + 4. * sum2 * sum2 * cnt1 * e2sq;
 
 2367               while (var1 + var2 == 0) {
 
 2370                  var1 = sum2 * cnt2 - sum1 * e2sq;
 
 2371                  var2 = var1 * var1 + 4. * sum2 * sum2 * cnt1 * e2sq;
 
 2372                  while (var1 * var1 + cnt1 == 0 || var1 + var2 == 0) {
 
 2375                     var1 = sum2 * cnt2 - sum1 * e2sq;
 
 2376                     var2 = var1 * var1 + 4. * sum2 * sum2 * cnt1 * e2sq;
 
 2381               Double_t probb = (var1 + var2) / (2. * sum2 * sum2);
 
 2389               chi2 += delta1 * delta1 / nexp1;
 
 2392                  chi2 += delta2 * delta2 / e2sq;
 
 2397                     Double_t temp1 = sum2 * e2sq / var2;
 
 2398                     Double_t temp2 = 1.0 + (sum1 * e2sq - sum2 * cnt2) / var2;
 
 2399                     temp2 = temp1 * temp1 * sum1 * probb * (1.0 - probb) + temp2 * temp2 * e2sq / 4.0;
 
 2412         Info(
"Chi2TestX",
"There is a bin in h1 with less than 1 event.\n");
 
 2416         Info(
"Chi2TestX",
"There is a bin in h2 with less than 10 effective events.\n");
 
 2426      for (
Int_t i = i_start; i <= i_end; ++i) {
 
 2427         for (
Int_t j = j_start; j <= j_end; ++j) {
 
 2428            for (
Int_t k = k_start; k <= k_end; ++k) {
 
 2438                if (cnt1 * cnt1 == 0 && cnt2 * cnt2 == 0) {
 
 2443                if (e1sq == 0 && e2sq == 0) {
 
 2445                  Error(
"Chi2TestX",
"h1 and h2 both have bin %d,%d,%d with all zero errors\n", i,j,k);
 
 2450               Double_t delta = sum2 * cnt1 - sum1 * cnt2;
 
 2451               chi2 += delta * delta / 
sigma;
 
 2454                  Double_t temp = cnt1 * sum1 * e2sq + cnt2 * sum2 * e1sq;
 
 2467                  res[i - i_start] = z;
 
 2470               if (e1sq > 0 && cnt1 * cnt1 / e1sq < 10) 
m++;
 
 2471               if (e2sq > 0 && cnt2 * cnt2 / e2sq < 10) 
n++;
 
 2477         Info(
"Chi2TestX",
"There is a bin in h1 with less than 10 effective events.\n");
 
 2481         Info(
"Chi2TestX",
"There is a bin in h2 with less than 10 effective events.\n");
 
 2498      Error(
"Chisquare",
"Function pointer is Null - return -1");
 
 2544   Int_t nbins  = nbinsx * nbinsy * nbinsz;
 
 2549   for (
Int_t binz=1; binz <= nbinsz; ++binz) {
 
 2550      for (
Int_t biny=1; biny <= nbinsy; ++biny) {
 
 2551         for (
Int_t binx=1; binx <= nbinsx; ++binx) {
 
 2554            if (onlyPositive && 
y < 0) {
 
 2555                 Error(
"ComputeIntegral",
"Bin content is negative - return a NaN value");
 
 2566      Error(
"ComputeIntegral", 
"Integral = zero"); 
return 0;
 
 2621   hintegrated->
Reset();
 
 2625      for (
Int_t binz = firstZ; binz <= lastZ; ++binz) {
 
 2626         for (
Int_t biny = firstY; biny <= lastY; ++biny) {
 
 2627            for (
Int_t binx = firstX; binx <= lastX; ++binx) {
 
 2628               const Int_t bin = hintegrated->
GetBin(binx, biny, binz);
 
 2639      for (
Int_t binz = lastZ; binz >= firstZ; --binz) {
 
 2640         for (
Int_t biny = lastY; biny >= firstY; --biny) {
 
 2641            for (
Int_t binx = lastX; binx >= firstX; --binx) {
 
 2642               const Int_t bin = hintegrated->
GetBin(binx, biny, binz);
 
 2673      ((
TH1&)obj).fDirectory = 0;
 
 2687      delete []  ((
TH1&)obj).fBuffer;
 
 2688      ((
TH1&)obj).fBuffer = 0;
 
 2694      ((
TH1&)obj).fBuffer    = buf;
 
 2720   ((
TH1&)obj).fXaxis.SetParent(&obj);
 
 2721   ((
TH1&)obj).fYaxis.SetParent(&obj);
 
 2722   ((
TH1&)obj).fZaxis.SetParent(&obj);
 
 2732      ((
TH1&)obj).fFunctions->UseRWLock();
 
 2745   TH1* obj = (
TH1*)IsA()->GetNew()(0);
 
 2760         oldparent = oldstats->GetParent();
 
 2761         oldstats->SetParent(
nullptr);
 
 2767         oldstats->SetParent(oldparent);
 
 2779   if(newname && strlen(newname) ) {
 
 2834      Error(
"Divide",
"Attempt to divide by a non-existing function");
 
 2852   Int_t bin, binx, biny, binz;
 
 2857   for (binz = 0; binz < nz; ++binz) {
 
 2859      for (biny = 0; biny < ny; ++biny) {
 
 2861         for (binx = 0; binx < nx; ++binx) {
 
 2865            bin = binx + nx * (biny + ny * binz);
 
 2902      Error(
"Divide", 
"Input histogram passed does not exist (NULL).");
 
 2912      Error(
"Divide",
"Cannot divide histograms with different number of bins");
 
 2915      Warning(
"Divide",
"Dividing histograms with different axis limits");
 
 2917      Warning(
"Divide",
"Dividing histograms with different bin limits");
 
 2919      Warning(
"Divide",
"Dividing histograms with different labels");
 
 2974      Error(
"Divide", 
"At least one of the input histograms passed does not exist (NULL).");
 
 2985      Error(
"Divide",
"Cannot divide histograms with different number of bins");
 
 2988      Warning(
"Divide",
"Dividing histograms with different axis limits");
 
 2990      Warning(
"Divide",
"Dividing histograms with different bin limits");
 
 2992      Warning(
"Divide",
"Dividing histograms with different labels");
 
 2997      Error(
"Divide",
"Coefficient of dividing histogram cannot be zero");
 
 3034            fSumw2.
fArray[i] = c1sq * c2sq * (e1sq * b2sq + e2sq * b1sq) / (c2sq * c2sq * b2sq * b2sq);
 
 3087         if (index>indb && index<indk) index = -1;
 
 3093      if (!
gPad->IsEditable()) 
gROOT->MakeDefCanvas();
 
 3095         if (
gPad->GetX1() == 0   && 
gPad->GetX2() == 1 &&
 
 3096             gPad->GetY1() == 0   && 
gPad->GetY2() == 1 &&
 
 3097             gPad->GetListOfPrimitives()->GetSize()==0) opt2.
Remove(index,4);
 
 3104      gPad->IncrementPaletteColor(1, opt1);
 
 3106      if (index>=0) opt2.
Remove(index,4);
 
 3132   if (
gPad) 
gPad->IncrementPaletteColor(1, opt);
 
 3157      Error(
"DrawNormalized",
"Sum of weights is null. Cannot normalize histogram: %s",
GetName());
 
 3169      if (opt.
IsNull() || opt == 
"SAME") opt += 
"HIST";
 
 3204   Int_t range, stat, add;
 
 3224   for (
Int_t binz = 1; binz <= nbinsz; ++binz) {
 
 3226      for (
Int_t biny = 1; biny <= nbinsy; ++biny) {
 
 3228         for (
Int_t binx = 1; binx <= nbinsx; ++binx) {
 
 3328   for (
Int_t binx = 1; binx<=ndim[0]; binx++) {
 
 3329      for (
Int_t biny=1; biny<=ndim[1]; biny++) {
 
 3330         for (
Int_t binz=1; binz<=ndim[2]; binz++) {
 
 3360   if (bin <0) 
return -1;
 
 3393   if (bin <0) 
return -1;
 
 3426   if (bin <0) 
return -1;
 
 3462      for (i=0;i<ntimes;i+=stride) {
 
 3468      if (i < ntimes && 
fBuffer==0) {
 
 3469         auto weights = w ? &w[i] : 
nullptr;
 
 3470         DoFillN((ntimes-i)/stride,&
x[i],weights,stride);
 
 3490   for (i=0;i<ntimes;i+=stride) {
 
 3492      if (bin <0) 
continue;
 
 3497      if (bin == 0 || bin > nbins) {
 
 3530   Int_t bin, binx, ibin, loop;
 
 3534   if (!
f1) { 
Error(
"FillRandom", 
"Unknown function: %s",fname); 
return; }
 
 3544      Info(
"FillRandom",
"Using function axis and range [%g,%g]",
xmin, 
xmax);
 
 3554   for (binx=1;binx<=nbinsx;binx++) {
 
 3556      integral[binx] = integral[binx-1] + fint;
 
 3560   if (integral[nbinsx] == 0 ) {
 
 3562      Error(
"FillRandom", 
"Integral = zero"); 
return;
 
 3564   for (bin=1;bin<=nbinsx;bin++)  integral[bin] /= integral[nbinsx];
 
 3567   for (loop=0;loop<ntimes;loop++) {
 
 3573             +xAxis->
GetBinWidth(ibin+
first)*(r1-integral[ibin])/(integral[ibin+1] - integral[ibin]);
 
 3601   if (!
h) { 
Error(
"FillRandom", 
"Null histogram"); 
return; }
 
 3603      Error(
"FillRandom", 
"Histograms with different dimensions"); 
return;
 
 3605   if (std::isnan(
h->ComputeIntegral(
true))) {
 
 3606      Error(
"FillRandom", 
"Histograms contains negative bins, does not represent probabilities");
 
 3615   if (ntimes > 10*nbins) {
 
 3619         if (sumw == 0) 
return;
 
 3622            Double_t mean = 
h->RetrieveBinContent(bin)*ntimes/sumw;
 
 3633         if (sumgen < ntimes) {
 
 3635            for (i = 
Int_t(sumgen+0.5); i < ntimes; ++i)
 
 3641         else if (sumgen > ntimes) {
 
 3643            i =  
Int_t(sumgen+0.5);
 
 3644            while( i > ntimes) {
 
 3659      catch(std::exception&) {}  
 
 3663   if (
h->ComputeIntegral() ==0) 
return;
 
 3666   for (loop=0;loop<ntimes;loop++) {
 
 3692      return  binx + nx*biny;
 
 3700      return  binx + nx*(biny +ny*binz);
 
 3725      return  binx + nx*biny;
 
 3733      return  binx + nx*(biny +ny*binz);
 
 3751      Warning(
"FindFirstBinAbove",
"Invalid axis number : %d, axis x assumed\n",axis);
 
 3765      for (
Int_t binx = firstBin; binx <= lastBin; binx++) {
 
 3766         for (
Int_t biny = 1; biny <= nbinsy; biny++) {
 
 3767            for (
Int_t binz = 1; binz <= nbinsz; binz++) {
 
 3773   else if (axis == 2) {
 
 3777      for (
Int_t biny = firstBin; biny <= lastBin; biny++) {
 
 3778         for (
Int_t binx = 1; binx <= nbinsx; binx++) {
 
 3779            for (
Int_t binz = 1; binz <= nbinsz; binz++) {
 
 3785   else if (axis == 3) {
 
 3789      for (
Int_t binz = firstBin; binz <= lastBin; binz++) {
 
 3790         for (
Int_t binx = 1; binx <= nbinsx; binx++) {
 
 3791            for (
Int_t biny = 1; biny <= nbinsy; biny++) {
 
 3815      Warning(
"FindFirstBinAbove",
"Invalid axis number : %d, axis x assumed\n",axis);
 
 3829      for (
Int_t binx = lastBin; binx >= firstBin; binx--) {
 
 3830         for (
Int_t biny = 1; biny <= nbinsy; biny++) {
 
 3831            for (
Int_t binz = 1; binz <= nbinsz; binz++) {
 
 3837   else if (axis == 2) {
 
 3841      for (
Int_t biny = lastBin; biny >= firstBin; biny--) {
 
 3842         for (
Int_t binx = 1; binx <= nbinsx; binx++) {
 
 3843            for (
Int_t binz = 1; binz <= nbinsz; binz++) {
 
 3849   else if (axis == 3) {
 
 3853      for (
Int_t binz = lastBin; binz >= firstBin; binz--) {
 
 3854         for (
Int_t binx = 1; binx <= nbinsx; binx++) {
 
 3855            for (
Int_t biny = 1; biny <= nbinsy; biny++) {
 
 3898   linear= (
char*)strstr(fname, 
"++");
 
 3902         TF1 f1(fname, fname, xxmin, xxmax);
 
 3903         return Fit(&
f1,option,goption,xxmin,xxmax);
 
 3906         TF2 f2(fname, fname);
 
 3907         return Fit(&f2,option,goption,xxmin,xxmax);
 
 3910         TF3 f3(fname, fname);
 
 3911         return Fit(&f3,option,goption,xxmin,xxmax);
 
 3916      if (!
f1) { 
Printf(
"Unknown function: %s",fname); 
return -1; }
 
 3917      return Fit(
f1,option,goption,xxmin,xxmax);
 
 4253      gROOT->MakeDefCanvas();
 
 4256      Error(
"FitPanel", 
"Unable to create a default canvas");
 
 4263   if (handler && handler->
LoadPlugin() != -1) {
 
 4265         Error(
"FitPanel", 
"Unable to create the FitPanel");
 
 4268         Error(
"FitPanel", 
"Unable to find the FitPanel plug-in");
 
 4325   asym->
Divide(top,bottom);
 
 4339         for(
Int_t k=1; k<= zmax; k++){
 
 4418   return (s[1] ? s[0]*s[0]/s[1] : 
TMath::Abs(s[0]) );
 
 4429      Info(
"SetHighlight", 
"Supported only 1-D or 2-D histograms");
 
 4434      Info(
"SetHighlight", 
"Need to draw histogram first");
 
 4448   return ((
TH1*)
this)->GetPainter()->GetObjectInfo(px,py);
 
 4549      Error(
"GetQuantiles",
"Only available for 1-d histograms");
 
 4559   Int_t nq = nprobSum;
 
 4564      for (i=1;i<nq;i++) {
 
 4569   for (i = 0; i < nq; i++) {
 
 4571      while (ibin < nbins-1 && 
fIntegral[ibin+1] == prob[i]) {
 
 4572         if (
fIntegral[ibin+2] == prob[i]) ibin++;
 
 4580   if (!probSum) 
delete [] prob;
 
 4598   Double_t allcha, sumx, sumx2, 
x, val, stddev, mean;
 
 4609   allcha = sumx = sumx2 = 0;
 
 4610   for (bin=hxfirst;bin<=hxlast;bin++) {
 
 4613      if (val > valmax) valmax = val;
 
 4618   if (allcha == 0) 
return;
 
 4620   stddev  = sumx2/allcha - mean*mean;
 
 4623   if (stddev == 0) stddev = binwidx*(hxlast-hxfirst+1)/4;
 
 4630   Double_t constant = 0.5*(valmax+binwidx*allcha/(sqrtpi*stddev));
 
 4638   if ((mean < xmin || mean > 
xmax) && stddev > (
xmax-
xmin)) {
 
 4659   Int_t nchanx  = hxlast - hxfirst + 1;
 
 4680   Int_t nchanx  = hxlast - hxfirst + 1;
 
 4683   if (nchanx <=1 || npar == 1) {
 
 4706   const Int_t idim = 20;
 
 4717   if (
m > idim || 
m > 
n) 
return;
 
 4720   for (
l = 2; 
l <= 
m; ++
l) {
 
 4722      b[
m + 
l*20 - 21] = zero;
 
 4729   for (k = hxfirst; k <= hxlast; ++k) {
 
 4734      for (
l = 2; 
l <= 
m; ++
l) {
 
 4737         da[
l-1] += power*yk;
 
 4739      for (
l = 2; 
l <= 
m; ++
l) {
 
 4741         b[
m + 
l*20 - 21] += power;
 
 4744   for (i = 3; i <= 
m; ++i) {
 
 4745      for (k = i; k <= 
m; ++k) {
 
 4746         b[k - 1 + (i-1)*20 - 21] = 
b[k + (i-2)*20 - 21];
 
 4751   for (i=0; i<
m; ++i) 
a[i] = da[i];
 
 4771   xbar  = ybar  = x2bar = xybar = 0;
 
 4776   for (i = hxfirst; i <= hxlast; ++i) {
 
 4780         if (yk <= 0) yk = 1
e-9;
 
 4789   det   = fn*x2bar - xbar*xbar;
 
 4797   a0 = (x2bar*ybar - xbar*xybar) / det;
 
 4798   a1 = (fn*xybar - xbar*ybar) / det;
 
 4809   Int_t a_dim1, a_offset, b_dim1, b_offset;
 
 4811   Int_t im1, jp1, nm1, nmi;
 
 4817   b_offset = b_dim1 + 1;
 
 4820   a_offset = a_dim1 + 1;
 
 4823   if (idim < 
n) 
return;
 
 4826   for (j = 1; j <= 
n; ++j) {
 
 4827      if (
a[j + j*a_dim1] <= 0) { ifail = -1; 
return; }
 
 4828      a[j + j*a_dim1] = one / 
a[j + j*a_dim1];
 
 4829      if (j == 
n) 
continue;
 
 4831      for (
l = jp1; 
l <= 
n; ++
l) {
 
 4832         a[j + 
l*a_dim1] = 
a[j + j*a_dim1] * 
a[
l + j*a_dim1];
 
 4833         s1 = -
a[
l + (j+1)*a_dim1];
 
 4834         for (i = 1; i <= j; ++i) { 
s1 = 
a[
l + i*a_dim1] * 
a[i + (j+1)*a_dim1] + 
s1; }
 
 4835         a[
l + (j+1)*a_dim1] = -
s1;
 
 4840   for (
l = 1; 
l <= k; ++
l) {
 
 4841      b[
l*b_dim1 + 1] = 
a[a_dim1 + 1]*
b[
l*b_dim1 + 1];
 
 4844   for (
l = 1; 
l <= k; ++
l) {
 
 4845      for (i = 2; i <= 
n; ++i) {
 
 4847         s21 = -
b[i + 
l*b_dim1];
 
 4848         for (j = 1; j <= im1; ++j) {
 
 4849            s21 = 
a[i + j*a_dim1]*
b[j + 
l*b_dim1] + s21;
 
 4851         b[i + 
l*b_dim1] = -
a[i + i*a_dim1]*s21;
 
 4854      for (i = 1; i <= nm1; ++i) {
 
 4856         s22 = -
b[nmi + 
l*b_dim1];
 
 4857         for (j = 1; j <= i; ++j) {
 
 4859            s22 = 
a[nmi + nmjp1*a_dim1]*
b[nmjp1 + 
l*b_dim1] + s22;
 
 4861         b[nmi + 
l*b_dim1] = -s22;
 
 4899   if (binx < 0) binx = 0;
 
 4900   if (binx > ofx) binx = ofx;
 
 4915      binx = binglobal%nx;
 
 4921      binx = binglobal%nx;
 
 4922      biny = ((binglobal-binx)/nx)%ny;
 
 4927      binx = binglobal%nx;
 
 4928      biny = ((binglobal-binx)/nx)%ny;
 
 4929      binz = ((binglobal-binx)/nx -biny)/ny;
 
 4948      Error(
"GetRandom",
"Function only valid for 1-d histograms");
 
 4958      integral = ((
TH1*)
this)->ComputeIntegral(
true);
 
 4960   if (integral == 0) 
return 0;
 
 4999   if (bin < 0) bin = 0;
 
 5025      Error(
"GetBinWithContent",
"function is only valid for 1-D histograms");
 
 5031   if (firstx <= 0) firstx = 1;
 
 5035   for (
Int_t i=firstx;i<=lastx;i++) {
 
 5037      if (diff <= 0) {binx = i; 
return diff;}
 
 5038      if (diff < curmax && diff <= maxdiff) {curmax = diff, binminx=i;}
 
 5073      return y0 + (
x-x0)*((y1-y0)/(
x1-x0));
 
 5082   Error(
"Interpolate",
"This function must be called with 1 argument for a TH1");
 
 5091   Error(
"Interpolate",
"This function must be called with 1 argument for a TH1");
 
 5119   Int_t binx, biny, binz;
 
 5141   Error(
"IsBinOverflow",
"Invalid axis value");
 
 5151   Int_t binx, biny, binz;
 
 5158         return (binx <= 0 || biny <= 0);
 
 5160         return (binx <= 0 || biny <= 0 || binz <= 0);
 
 5171   Error(
"IsBinUnderflow",
"Invalid axis value");
 
 5188      Error(
"LabelsDeflate",
"Invalid axis option %s",ax);
 
 5199   while ((obj = next())) {
 
 5201      if (ibin > nbins) nbins = ibin;
 
 5203   if (nbins < 1) nbins = 1;
 
 5206   if (nbins==axis->
GetNbins()) 
return;
 
 5208   TH1 *hold = (
TH1*)IsA()->New();
 
 5231   Int_t bin,binx,biny,binz;
 
 5232   for (bin=0; bin < hold->
fNcells; ++bin) {
 
 5259   TH1 *hold = (
TH1*)IsA()->New();
 
 5281   Int_t bin,ibin,binx,biny,binz;
 
 5282   for (ibin =0; ibin < hold->
fNcells; ibin++) {
 
 5285      bin = 
GetBin(binx,biny,binz);
 
 5331      Warning(
"LabelsOption", 
"Axis %s has no labels!",axis->
GetName());
 
 5374         Error(
"LabelsOption", 
"%s is an invalid label placement option!",opt.
Data());
 
 5388      Int_t lastLabelBin = -1;
 
 5389      for (
Int_t i = 0; i < 
n; ++i) {
 
 5391         if (bin < firstLabelBin) firstLabelBin = bin;
 
 5392         if (bin > lastLabelBin) lastLabelBin = bin;
 
 5394      if (firstLabelBin != 1 || lastLabelBin-firstLabelBin +1 != 
n) {
 
 5395         Error(
"LabelsOption", 
"%s of Histogram %s contains bins without labels. Sorting will not work correctly - return",
 
 5401      Warning(
"LabelsOption", 
"axis %s of Histogram %s has extra following bins without labels. Sorting will work only for first label bins",
 
 5404   std::vector<Int_t> 
a(
n);
 
 5405   std::vector<Int_t> 
b(
n);
 
 5409   std::vector<Double_t> cont;
 
 5410   std::vector<Double_t> errors2;
 
 5412   TIter nextold(labels);
 
 5427         for (i = 0; i < 
n; i++) {
 
 5429            if (!errors2.empty())
 
 5438         for (i = 0; i < 
n; i++) {
 
 5442               Info(
"LabelsOption",
"setting bin %d value %f from bin %d label %s at pos %d ",
 
 5444            if (!errors2.empty())
 
 5447         for (i = 0; i < 
n; i++) {
 
 5448            obj = labold->
At(
a[i]);
 
 5453         std::vector<Double_t> pcont(
n + 2);
 
 5456         cont.resize((nx + 2) * (ny + 2));
 
 5458            errors2.resize((nx + 2) * (ny + 2));
 
 5459         for (i = 0; i < nx; i++) {
 
 5460            for (j = 0; j < ny; j++) {
 
 5463               if (!errors2.empty())
 
 5469               if (k >= 0 && k < 
n) { 
 
 5470                  pcont[k] += cont[i + nx * j];
 
 5479         for (i = 0; i < 
n; i++) {
 
 5483            while ((obj = next())) {
 
 5491               R__ASSERT(
"LabelsOption - No corresponding bin found when ordering labels");
 
 5497               std::cout << 
" set label " << obj->
GetName() << 
" to bin " << i + 1 << 
" from order " << 
a[i] << 
" bin " 
 5498                         << 
b[
a[i]] << 
"content " << pcont[
a[i]] << std::endl;
 
 5502         for (i = 0; i < 
n; i++) {
 
 5507            for (i = 0; i < 
n; i++) {
 
 5509               for (j = 0; j < ny; j++) {
 
 5512                  if (!errors2.empty())
 
 5518            for (i = 0; i < nx; i++) {
 
 5519               for (j = 0; j < 
n; j++) {
 
 5523                  if (!errors2.empty())
 
 5530         std::vector<Double_t> pcont(
n + 2);
 
 5535         cont.resize((nx + 2) * (ny + 2) * (nz + 2));
 
 5537            errors2.resize((nx + 2) * (ny + 2) * (nz + 2));
 
 5538         for (i = 0; i < nx; i++) {
 
 5539            for (j = 0; j < ny; j++) {
 
 5540               for (k = 0; k < nz; k++) {
 
 5549                  if (
l >= 0 && 
l < 
n) { 
 
 5553                  cont[i + nx * (j + ny * k)] = 
c;
 
 5554                  if (!errors2.empty())
 
 5563         for (i = 0; i < 
n; i++) {
 
 5568            while ((obj = next())) {
 
 5576               R__ASSERT(
"LabelsOption - No corresponding bin found when ordering labels");
 
 5581               std::cout << 
" set label " << obj->
GetName() << 
" to bin " << i + 1 << 
" from bin " << 
a[i] << 
"content " 
 5582                         << pcont[
a[i]] << std::endl;
 
 5587         for (i = 0; i < 
n; i++) {
 
 5592            for (i = 0; i < 
n; i++) {
 
 5594               for (j = 0; j < ny; j++) {
 
 5595                  for (k = 0; k < nz; k++) {
 
 5598                     if (!errors2.empty())
 
 5605            for (i = 0; i < nx; i++) {
 
 5606               for (j = 0; j < 
n; j++) {
 
 5608                  for (k = 0; k < nz; k++) {
 
 5611                     if (!errors2.empty())
 
 5618            for (i = 0; i < nx; i++) {
 
 5619               for (j = 0; j < ny; j++) {
 
 5620                  for (k = 0; k < 
n; k++) {
 
 5624                     if (!errors2.empty())
 
 5635      std::vector<std::string> vecLabels(
n);
 
 5636      for (i = 0; i < 
n; i++) {
 
 5637         vecLabels[i] = labold->
At(i)->
GetName();
 
 5644      for (i = 0; i < 
n; i++) {
 
 5646         labels->
Add(labold->
At(
a[i]));
 
 5650            std::cout << 
"bin " << i + 1 << 
" setting new labels for axis " << labold->
At(
a[i])->
GetName() << 
" from " 
 5651                      << 
b[
a[i]] << std::endl;
 
 5657            errors2.resize(
n + 2);
 
 5658         for (i = 0; i < 
n; i++) {
 
 5660            if (!errors2.empty())
 
 5663         for (i = 0; i < 
n; i++) {
 
 5665            if (!errors2.empty())
 
 5671         cont.resize(nx * ny);
 
 5673            errors2.resize(nx * ny);
 
 5676         for (i = 0; i < nx; i++) {
 
 5677            for (j = 0; j < ny; j++) { 
 
 5680               if (!errors2.empty())
 
 5685            for (i = 0; i < 
n; i++) {
 
 5686               for (j = 0; j < ny; j++) {
 
 5689                  if (!errors2.empty())
 
 5694            for (i = 0; i < nx; i++) {
 
 5695               for (j = 0; j < 
n; j++) {
 
 5698                  if (!errors2.empty())
 
 5708         cont.resize(nx * ny * nz);
 
 5710            errors2.resize(nx * ny * nz);
 
 5711         for (i = 0; i < nx; i++) {
 
 5712            for (j = 0; j < ny; j++) {
 
 5713               for (k = 0; k < nz; k++) {
 
 5716                  if (!errors2.empty())
 
 5723            for (i = 0; i < 
n; i++) { 
 
 5724               for (j = 0; j < ny; j++) {
 
 5725                  for (k = 0; k < nz; k++) {
 
 5728                     if (!errors2.empty())
 
 5735            for (i = 0; i < nx; i++) {
 
 5736               for (j = 0; j < 
n; j++) {
 
 5737                  for (k = 0; k < nz; k++) {
 
 5740                     if (!errors2.empty())
 
 5747            for (i = 0; i < nx; i++) {
 
 5748               for (j = 0; j < ny; j++) {
 
 5749                  for (k = 0; k < 
n; k++) {
 
 5752                     if (!errors2.empty())
 
 5762   bool labelsAreSorted = 
kFALSE;
 
 5763   for (i = 0; i < 
n; ++i) {
 
 5765         labelsAreSorted = 
kTRUE;
 
 5769   if (labelsAreSorted) {
 
 5777      } 
else if (iaxis == 2) {
 
 5782      } 
else if (iaxis == 3) {
 
 5818   bool isEquidistant = 
true;
 
 5820   for (
int i = 1; i < axis.
GetNbins(); ++i) {
 
 5823      isEquidistant &= match;
 
 5827   return isEquidistant;
 
 5853   if (width1 == 0 || width2 == 0)
 
 5899      printf(
"TH1::RecomputeAxisLimits - Impossible\n");
 
 5987      Error(
"Multiply",
"Attempt to multiply by a non-existing function");
 
 6009   for (
Int_t binz = 0; binz < nz; ++binz) {
 
 6011      for (
Int_t biny = 0; biny < ny; ++biny) {
 
 6013         for (
Int_t binx = 0; binx < nx; ++binx) {
 
 6017            Int_t bin = binx + nx * (biny + ny *binz);
 
 6049      Error(
"Multiply",
"Attempt to multiply by a non-existing histogram");
 
 6059      Error(
"Multiply",
"Attempt to multiply histograms with different number of bins");
 
 6062      Warning(
"Multiply",
"Attempt to multiply histograms with different axis limits");
 
 6064      Warning(
"Multiply",
"Attempt to multiply histograms with different bin limits");
 
 6066      Warning(
"Multiply",
"Attempt to multiply histograms with different labels");
 
 6111      Error(
"Multiply",
"Attempt to multiply by a non-existing histogram");
 
 6122      Error(
"Multiply",
"Attempt to multiply histograms with different number of bins");
 
 6125      Warning(
"Multiply",
"Attempt to multiply histograms with different axis limits");
 
 6127      Warning(
"Multiply",
"Attempt to multiply histograms with different bin limits");
 
 6129      Warning(
"Multiply",
"Attempt to multiply histograms with different labels");
 
 6231   if ((ngroup <= 0) || (ngroup > nbins)) {
 
 6232      Error(
"Rebin", 
"Illegal value of ngroup=%d",ngroup);
 
 6237      Error(
"Rebin", 
"Operation valid on 1-D histograms only");
 
 6240   if (!newname && xbins) {
 
 6241      Error(
"Rebin",
"if xbins is specified, newname must be given");
 
 6245   Int_t newbins = nbins/ngroup;
 
 6247      Int_t nbg = nbins/ngroup;
 
 6248      if (nbg*ngroup != nbins) {
 
 6249         Warning(
"Rebin", 
"ngroup=%d is not an exact divider of nbins=%d.",ngroup,nbins);
 
 6269      for (bin=0;bin<nbins+2;bin++) oldErrors[bin] = 
GetBinError(bin);
 
 6274         Warning(
"Rebin",
"underflow entries will not be used when rebinning");
 
 6275      if (xbins[newbins] > 
fXaxis.
GetXmax() && oldBins[nbins+1] != 0 )
 
 6276         Warning(
"Rebin",
"overflow entries will not be used when rebinning");
 
 6282   if ((newname && strlen(newname) > 0) || xbins) {
 
 6292   bool resetStat = 
false;
 
 6294   if(!xbins && (newbins*ngroup != nbins)) {
 
 6342   Int_t oldbin = startbin;
 
 6344   for (bin = 1;bin<=newbins;bin++) {
 
 6347      Int_t imax = ngroup;
 
 6355         Warning(
"Rebin",
"Bin edge %d of rebinned histogram does not match any bin edges of the old histogram. Result can be inconsistent",bin);
 
 6357      for (i=0;i<ngroup;i++) {
 
 6358         if( (oldbin+i > nbins) ||
 
 6363         binContent += oldBins[oldbin+i];
 
 6364         if (oldErrors) binError += oldErrors[oldbin+i]*oldErrors[oldbin+i];
 
 6374   for (i = 0; i < startbin; ++i)  {
 
 6375      binContent += oldBins[i];
 
 6376      if (oldErrors) binError += oldErrors[i]*oldErrors[i];
 
 6383   for (i = oldbin; i <= nbins+1; ++i)  {
 
 6384      binContent += oldBins[i];
 
 6385      if (oldErrors) binError += oldErrors[i]*oldErrors[i];
 
 6394   if (!resetStat) hnew->
PutStats(stat);
 
 6396   if (oldErrors) 
delete [] oldErrors;
 
 6420   while (point < 
xmin) {
 
 6426   while (point >= 
xmax) {
 
 6471   TH1 *hold = (
TH1*)IsA()->New();
 
 6484   if (axis == &
fXaxis) iaxis = 1;
 
 6485   if (axis == &
fYaxis) iaxis = 2;
 
 6486   if (axis == &
fZaxis) iaxis = 3;
 
 6487   bool firstw = 
kTRUE;
 
 6488   Int_t binx,biny, binz = 0;
 
 6489   Int_t ix = 0,iy = 0,iz = 0;
 
 6492   for (
Int_t bin = 0; bin < ncells; ++bin) {
 
 6506      if (content == 0) 
continue;
 
 6509            Warning(
"ExtendAxis",
"Histogram %s has underflow or overflow in the axis that is extendable" 
 6510                    " their content will be lost",
GetName() );
 
 6570         if (i == 1)   s[i] = 
c1*
c1*s[i];
 
 6571         else          s[i] = 
c1*s[i];
 
 6579   if (ncontours == 0) 
return;
 
 6581   for (
Int_t i = 0; i < ncontours; ++i) levels[i] *= 
c1;
 
 6620   return oldExtendBitMask;
 
 6681      str1   = str1(isc+1, lns);
 
 6682      isc    = str1.
Index(
";");
 
 6685         str2.ReplaceAll(
"#semicolon",10,
";",1);
 
 6688         str1 = str1(isc+1, lns);
 
 6689         isc  = str1.
Index(
";");
 
 6692            str2.ReplaceAll(
"#semicolon",10,
";",1);
 
 6695            str1 = str1(isc+1, lns);
 
 6721      ::Error(
"SmoothArray",
"Need at least 3 points for smoothing: n = %d",nn);
 
 6728   std::vector<double> yy(nn);
 
 6729   std::vector<double> zz(nn);
 
 6730   std::vector<double> rr(nn);
 
 6732   for (
Int_t pass=0;pass<ntimes;pass++) {
 
 6734      std::copy(xx, xx+nn, zz.begin() );
 
 6736      for (
int noent = 0; noent < 2; ++noent) { 
 
 6739         for  (
int kk = 0; kk < 3; kk++)  {
 
 6740            std::copy(zz.begin(), zz.end(), yy.begin());
 
 6741            int medianType = (kk != 1)  ?  3 : 5;
 
 6742            int ifirst      = (kk != 1 ) ?  1 : 2;
 
 6743            int ilast       = (kk != 1 ) ? nn-1 : nn -2;
 
 6747            for  ( ii = ifirst; ii < ilast; ii++)  {
 
 6748               assert(ii - ifirst >= 0);
 
 6749               for  (
int jj = 0; jj < medianType; jj++)   {
 
 6750                  hh[jj] = yy[ii - ifirst + jj ];
 
 6759               hh[2] = 3*zz[1] - 2*zz[2];
 
 6764               hh[2] = 3*zz[nn - 2] - 2*zz[nn - 3];
 
 6769               for  (ii = 0; ii < 3; ii++) {
 
 6774               for  (ii = 0; ii < 3; ii++) {
 
 6775                  hh[ii] = yy[nn - 3 + ii];
 
 6782         std::copy ( zz.begin(), zz.end(), yy.begin() );
 
 6785         for (ii = 2; ii < (nn - 2); ii++) {
 
 6786            if  (zz[ii - 1] != zz[ii]) 
continue;
 
 6787            if  (zz[ii] != zz[ii + 1]) 
continue;
 
 6788            hh[0] = zz[ii - 2] - zz[ii];
 
 6789            hh[1] = zz[ii + 2] - zz[ii];
 
 6790            if  (hh[0] * hh[1] <= 0) 
continue;
 
 6793            yy[ii] = -0.5*zz[ii - 2*jk] + zz[ii]/0.75 + zz[ii + 2*jk] /6.;
 
 6794            yy[ii + jk] = 0.5*(zz[ii + 2*jk] - zz[ii - 2*jk]) + zz[ii];
 
 6799         for  (ii = 1; ii < nn - 1; ii++) {
 
 6800            zz[ii] = 0.25*yy[ii - 1] + 0.5*yy[ii] + 0.25*yy[ii + 1];
 
 6803         zz[nn - 1] = yy[nn - 1];
 
 6808            std::copy(zz.begin(), zz.end(), rr.begin());
 
 6811            for  (ii = 0; ii < nn; ii++)  {
 
 6812               zz[ii] = xx[ii] - zz[ii];
 
 6820      for  (ii = 0; ii < nn; ii++) {
 
 6821         if (
xmin < 0) xx[ii] = rr[ii] + zz[ii];
 
 6823         else  xx[ii] = 
TMath::Max((rr[ii] + zz[ii]),0.0 );
 
 6839      Error(
"Smooth",
"Smooth only supported for 1-d histograms");
 
 6844      Error(
"Smooth",
"Smooth only supported for histograms with >= 3 bins. Nbins = %d",nbins);
 
 6851   Int_t firstbin = 1, lastbin = nbins;
 
 6858   nbins = lastbin - firstbin + 1;
 
 6862   for (i=0;i<nbins;i++) {
 
 6868   for (i=0;i<nbins;i++) {
 
 6892   if (
b.IsReading()) {
 
 6894      Version_t R__v = 
b.ReadVersion(&R__s, &R__c);
 
 6898         b.ReadClassBuffer(TH1::Class(), 
this, R__v, R__s, R__c);
 
 6906         while ((obj=next())) {
 
 6912      TNamed::Streamer(
b);
 
 6913      TAttLine::Streamer(
b);
 
 6914      TAttFill::Streamer(
b);
 
 6915      TAttMarker::Streamer(
b);
 
 6931         Float_t maximum, minimum, norm;
 
 6936         Int_t n = 
b.ReadArray(contour);
 
 6950      b.CheckByteCount(R__s, R__c, TH1::IsA());
 
 6953      b.WriteClassBuffer(TH1::Class(),
this);
 
 6974   else if (opt.
Contains(
"range")) all = 1;
 
 6975   else if (opt.
Contains(
"base"))  all = 2;
 
 6978   Int_t bin, binx, biny, binz;
 
 6979   Int_t firstx=0,lastx=0,firsty=0,lasty=0,firstz=0,lastz=0;
 
 6991      printf(
"          Title = %s\n", 
GetTitle());
 
 7002      for (binx=firstx;binx<=lastx;binx++) {
 
 7006         if(
fSumw2.
fN) printf(
" fSumw[%d]=%g, x=%g, error=%g\n",binx,w,
x,
e);
 
 7007         else          printf(
" fSumw[%d]=%g, x=%g\n",binx,w,
x);
 
 7011      for (biny=firsty;biny<=lasty;biny++) {
 
 7013         for (binx=firstx;binx<=lastx;binx++) {
 
 7018            if(
fSumw2.
fN) printf(
" fSumw[%d][%d]=%g, x=%g, y=%g, error=%g\n",binx,biny,w,
x,
y,
e);
 
 7019            else          printf(
" fSumw[%d][%d]=%g, x=%g, y=%g\n",binx,biny,w,
x,
y);
 
 7024      for (binz=firstz;binz<=lastz;binz++) {
 
 7026         for (biny=firsty;biny<=lasty;biny++) {
 
 7028            for (binx=firstx;binx<=lastx;binx++) {
 
 7029               bin = 
GetBin(binx,biny,binz);
 
 7033               if(
fSumw2.
fN) printf(
" fSumw[%d][%d][%d]=%g, x=%g, y=%g, z=%g, error=%g\n",binx,biny,binz,w,
x,
y,z,
e);
 
 7034               else          printf(
" fSumw[%d][%d][%d]=%g, x=%g, y=%g, z=%g\n",binx,biny,binz,w,
x,
y,z);
 
 7092   if (opt == 
"ICES") 
return;
 
 7122   static Int_t nxaxis = 0;
 
 7123   static Int_t nyaxis = 0;
 
 7124   static Int_t nzaxis = 0;
 
 7125   TString sxaxis=
"xAxis",syaxis=
"yAxis",szaxis=
"zAxis";
 
 7136         if (i != 0) out << 
", ";
 
 7139      out << 
"}; " << std::endl;
 
 7152            if (i != 0) out << 
", ";
 
 7155         out << 
"}; " << std::endl;
 
 7168            if (i != 0) out << 
", ";
 
 7171         out << 
"}; " << std::endl;
 
 7175   out <<
"   "<<std::endl;
 
 7185   static Int_t hcounter = 0;
 
 7192      histName += hcounter;
 
 7195   const char *hname = histName.
Data();
 
 7196   if (!strlen(hname)) hname = 
"unnamed";
 
 7202   out << hname << 
" = new " << 
ClassName() << 
"(" << quote
 
 7203       << hname << quote << 
"," << quote<< t.
Data() << quote
 
 7206      out << 
", "<<sxaxis;
 
 7213         out << 
", "<<syaxis;
 
 7221         out << 
", "<<szaxis;
 
 7226   out << 
");" << std::endl;
 
 7230   for (bin=0;bin<
fNcells;bin++) {
 
 7233         out<<
"   "<<hname<<
"->SetBinContent("<<bin<<
","<<bc<<
");"<<std::endl;
 
 7239      for (bin=0;bin<
fNcells;bin++) {
 
 7242            out<<
"   "<<hname<<
"->SetBinError("<<bin<<
","<<be<<
");"<<std::endl;
 
 7259      out<<
"   "<<hname<<
"->SetBarOffset("<<
GetBarOffset()<<
");"<<std::endl;
 
 7262      out<<
"   "<<hname<<
"->SetBarWidth("<<
GetBarWidth()<<
");"<<std::endl;
 
 7265      out<<
"   "<<hname<<
"->SetMinimum("<<
fMinimum<<
");"<<std::endl;
 
 7268      out<<
"   "<<hname<<
"->SetMaximum("<<
fMaximum<<
");"<<std::endl;
 
 7271      out<<
"   "<<hname<<
"->SetNormFactor("<<
fNormFactor<<
");"<<std::endl;
 
 7274      out<<
"   "<<hname<<
"->SetEntries("<<
fEntries<<
");"<<std::endl;
 
 7277      out<<
"   "<<hname<<
"->SetDirectory(0);"<<std::endl;
 
 7280      out<<
"   "<<hname<<
"->SetStats(0);"<<std::endl;
 
 7283      out<<
"   "<<hname<<
"->SetOption("<<quote<<
fOption.
Data()<<quote<<
");"<<std::endl;
 
 7288   if (ncontours > 0) {
 
 7289      out<<
"   "<<hname<<
"->SetContour("<<ncontours<<
");"<<std::endl;
 
 7291      for (
Int_t bin=0;bin<ncontours;bin++) {
 
 7292         if (
gPad->GetLogz()) {
 
 7297         out<<
"   "<<hname<<
"->SetContourLevel("<<bin<<
","<<zlevel<<
");"<<std::endl;
 
 7304   static Int_t funcNumber = 0;
 
 7311         out << 
"   " << fname << 
"->SetParent(" << hname << 
");\n";
 
 7312         out<<
"   "<<hname<<
"->GetListOfFunctions()->Add(" 
 7313            << fname <<
");"<<std::endl;
 
 7315         out<<
"   "<<hname<<
"->GetListOfFunctions()->Add(ptstats);"<<std::endl;
 
 7316         out<<
"   ptstats->SetParent("<<hname<<
");"<<std::endl;
 
 7318         out<<
"   "<<hname<<
"->GetListOfFunctions()->Add(" 
 7319            <<
"pmarker ,"<<quote<<lnk->
GetOption()<<quote<<
");"<<std::endl;
 
 7321         out<<
"   "<<hname<<
"->GetListOfFunctions()->Add(" 
 7323            <<
","<<quote<<lnk->
GetOption()<<quote<<
");"<<std::endl;
 
 7338      out<<
"   "<<hname<<
"->Draw(" 
 7339         <<quote<<option<<quote<<
");"<<std::endl;
 
 7382   while ((obj = next())) {
 
 7414   if (axis<1 || (axis>3 && axis<11) || axis>13) 
return 0;
 
 7418   if (stats[0] == 0) 
return 0;
 
 7420      Int_t ax[3] = {2,4,7};
 
 7421      return stats[ax[axis-1]]/stats[0];
 
 7426      return ( neff > 0 ? stddev/
TMath::Sqrt(neff) : 0. );
 
 7486   if (axis<1 || (axis>3 && axis<11) || axis>13) 
return 0;
 
 7491   if (stats[0] == 0) 
return 0;
 
 7492   Int_t ax[3] = {2,4,7};
 
 7493   Int_t axm = ax[axis%10 - 1];
 
 7494   x    = stats[axm]/stats[0];
 
 7496   stddev2 = 
TMath::Max( stats[axm+1]/stats[0] -
x*
x, 0.0 );
 
 7503      return ( neff > 0 ? 
TMath::Sqrt(stddev2/(2*neff) ) : 0. );
 
 7551   if (axis > 0 && axis <= 3){
 
 7555      Double_t stddev3 = stddev*stddev*stddev;
 
 7566            if (firstBinX == 1) firstBinX = 0;
 
 7570            if (firstBinY == 1) firstBinY = 0;
 
 7574            if (firstBinZ == 1) firstBinZ = 0;
 
 7582      for (
Int_t  binx = firstBinX; binx <= lastBinX; binx++) {
 
 7583         for (
Int_t biny = firstBinY; biny <= lastBinY; biny++) {
 
 7584            for (
Int_t binz = firstBinZ; binz <= lastBinZ; binz++) {
 
 7590               sum+=w*(
x-mean)*(
x-mean)*(
x-mean);
 
 7597   else if (axis > 10 && axis <= 13) {
 
 7604      Error(
"GetSkewness", 
"illegal value of parameter");
 
 7623   if (axis > 0 && axis <= 3){
 
 7627      Double_t stddev4 = stddev*stddev*stddev*stddev;
 
 7638            if (firstBinX == 1) firstBinX = 0;
 
 7642            if (firstBinY == 1) firstBinY = 0;
 
 7646            if (firstBinZ == 1) firstBinZ = 0;
 
 7654      for (
Int_t binx = firstBinX; binx <= lastBinX; binx++) {
 
 7655         for (
Int_t biny = firstBinY; biny <= lastBinY; biny++) {
 
 7656            for (
Int_t binz = firstBinZ; binz <= lastBinZ; binz++) {
 
 7662               sum+=w*(
x-mean)*(
x-mean)*(
x-mean)*(
x-mean);
 
 7669   } 
else if (axis > 10 && axis <= 13) {
 
 7673      return ( neff > 0 ? 
TMath::Sqrt(24./neff ) : 0. );
 
 7676      Error(
"GetKurtosis", 
"illegal value of parameter");
 
 7723      for (bin=0;bin<4;bin++) stats[bin] = 0;
 
 7729         if (firstBinX == 1) firstBinX = 0;
 
 7732      for (binx = firstBinX; binx <= lastBinX; binx++) {
 
 7739         stats[1] += err*err;
 
 7798   Int_t bin,binx,biny,binz;
 
 7803            bin = 
GetBin(binx,biny,binz);
 
 7833   return DoIntegral(binx1,binx2,0,-1,0,-1,err,option);
 
 7860   if (binx1 < 0) binx1 = 0;
 
 7861   if (binx2 >= nx || binx2 < binx1) binx2 = nx - 1;
 
 7865      if (biny1 < 0) biny1 = 0;
 
 7866      if (biny2 >= ny || biny2 < biny1) biny2 = ny - 1;
 
 7868      biny1 = 0; biny2 = 0;
 
 7873      if (binz1 < 0) binz1 = 0;
 
 7874      if (binz2 >= nz || binz2 < binz1) binz2 = nz - 1;
 
 7876      binz1 = 0; binz2 = 0;
 
 7889   for (
Int_t binx = binx1; binx <= binx2; ++binx) {
 
 7891      for (
Int_t biny = biny1; biny <= biny2; ++biny) {
 
 7893         for (
Int_t binz = binz1; binz <= binz2; ++binz) {
 
 7946      printf(
" AndersonDarlingTest Prob     = %g, AD TestStatistic  = %g\n",pvalue,advalue);
 
 7948   if (opt.
Contains(
"T") ) 
return advalue;
 
 7959      Error(
"AndersonDarlingTest",
"Histograms must be 1-D");
 
 8059   if (h2 == 0) 
return 0;
 
 8067      Error(
"KolmogorovTest",
"Histograms must be 1-D\n");
 
 8073      Error(
"KolmogorovTest",
"Histograms have different number of bins, %d and %d\n",ncx1,ncx2);
 
 8083         Error(
"KolmogorovTest",
"Histograms are not consistent: they have different bin edges");
 
 8097   if (opt.
Contains(
"O")) ilast = ncx1 +1;
 
 8098   for (bin = ifirst; bin <= ilast; bin++) {
 
 8107      Error(
"KolmogorovTest",
"Histogram1 %s integral is zero\n",
h1->
GetName());
 
 8111      Error(
"KolmogorovTest",
"Histogram2 %s integral is zero\n",h2->
GetName());
 
 8120      esum1 = sum1 * sum1 / w1;
 
 8125      esum2 = sum2 * sum2 / w2;
 
 8129   if (afunc2 && afunc1) {
 
 8130      Error(
"KolmogorovTest",
"Errors are zero for both histograms\n");
 
 8139   Double_t dfmax =0, rsum1 = 0, rsum2 = 0;
 
 8141   for (bin=ifirst;bin<=ilast;bin++) {
 
 8148   Double_t z, prb1=0, prb2=0, prb3=0;
 
 8163   if (opt.
Contains(
"N") && !(afunc1 || afunc2 ) ) {
 
 8167      Double_t chi2   = d12*d12/(esum1+esum2);
 
 8170      if (prob > 0 && prb2 > 0) prob *= prb2*(1-
TMath::Log(prob*prb2));
 
 8174   const Int_t nEXPT = 1000;
 
 8175   if (opt.
Contains(
"X") && !(afunc1 || afunc2 ) ) {
 
 8184         Warning(
"KolmogorovTest", 
"Detected bins with negative weights, these have been ignored and output might be " 
 8185                                   "skewed. Reduce number of bins for histogram?");
 
 8194      for (
Int_t i=0; i < nEXPT; i++) {
 
 8200         if (dSEXPT>dfmax) prb3 += 1.0;
 
 8210      printf(
" Kolmo Prob  h1 = %s, sum bin content =%g  effective entries =%g\n",
h1->
GetName(),sum1,esum1);
 
 8211      printf(
" Kolmo Prob  h2 = %s, sum bin content =%g  effective entries =%g\n",h2->
GetName(),sum2,esum2);
 
 8212      printf(
" Kolmo Prob     = %g, Max Dist = %g\n",prob,dfmax);
 
 8214         printf(
" Kolmo Prob     = %f for shape alone, =%f for normalisation alone\n",prb1,prb2);
 
 8216         printf(
" Kolmo Prob     = %f with %d pseudo-experiments\n",prb3,nEXPT);
 
 8222   if(opt.
Contains(
"M"))      
return dfmax;
 
 8223   else if(opt.
Contains(
"X")) 
return prb3;
 
 8274   if (level <0 || level >= 
fContour.
fN) 
return 0;
 
 8281      if (zlevel <= 0) 
return 0;
 
 8297   if (buffersize <= 0) {
 
 8301   if (buffersize < 100) buffersize = 100;
 
 8328      for (level=0; level<nlevels; level++) 
fContour.
fArray[level] = levels[level];
 
 8333      if ((zmin == zmax) && (zmin != 0)) {
 
 8339         if (zmax <= 0) 
return;
 
 8340         if (zmin <= 0) zmin = 0.001*zmax;
 
 8343         dz   = (zmax-zmin)/
Double_t(nlevels);
 
 8345      for (level=0; level<nlevels; level++) {
 
 8356   if (level < 0 || level >= 
fContour.
fN) 
return;
 
 8384   Int_t bin, binx, biny, binz;
 
 8391   Double_t maximum = -FLT_MAX, value;
 
 8392   for (binz=zfirst;binz<=zlast;binz++) {
 
 8393      for (biny=yfirst;biny<=ylast;biny++) {
 
 8394         for (binx=xfirst;binx<=xlast;binx++) {
 
 8395            bin = 
GetBin(binx,biny,binz);
 
 8397            if (value > maximum && value < maxval) maximum = value;
 
 8411   Int_t locmax, locmay, locmaz;
 
 8423   Int_t bin, binx, biny, binz;
 
 8431   Double_t maximum = -FLT_MAX, value;
 
 8432   locm = locmax = locmay = locmaz = 0;
 
 8433   for (binz=zfirst;binz<=zlast;binz++) {
 
 8434      for (biny=yfirst;biny<=ylast;biny++) {
 
 8435         for (binx=xfirst;binx<=xlast;binx++) {
 
 8436            bin = 
GetBin(binx,biny,binz);
 
 8438            if (value > maximum) {
 
 8474   Int_t bin, binx, biny, binz;
 
 8482   for (binz=zfirst;binz<=zlast;binz++) {
 
 8483      for (biny=yfirst;biny<=ylast;biny++) {
 
 8484         for (binx=xfirst;binx<=xlast;binx++) {
 
 8485            bin = 
GetBin(binx,biny,binz);
 
 8487            if (value < minimum && value > minval) minimum = value;
 
 8499   Int_t locmix, locmiy, locmiz;
 
 8511   Int_t bin, binx, biny, binz;
 
 8520   locm = locmix = locmiy = locmiz = 0;
 
 8521   for (binz=zfirst;binz<=zlast;binz++) {
 
 8522      for (biny=yfirst;biny<=ylast;biny++) {
 
 8523         for (binx=xfirst;binx<=xlast;binx++) {
 
 8524            bin = 
GetBin(binx,biny,binz);
 
 8526            if (value < minimum) {
 
 8568   Int_t bin, binx, biny, binz;
 
 8578   for (binz=zfirst;binz<=zlast;binz++) {
 
 8579      for (biny=yfirst;biny<=ylast;biny++) {
 
 8580         for (binx=xfirst;binx<=xlast;binx++) {
 
 8581            bin = 
GetBin(binx,biny,binz);
 
 8583            if (value < min) min = value;
 
 8584            if (value > max) max = value;
 
 8602      Error(
"SetBins",
"Operation only valid for 1-d histograms");
 
 8629      Error(
"SetBins",
"Operation only valid for 1-d histograms");
 
 8655      Error(
"SetBins",
"Operation only valid for 2-D histograms");
 
 8683      Error(
"SetBins",
"Operation only valid for 2-D histograms");
 
 8710      Error(
"SetBins",
"Operation only valid for 3-D histograms");
 
 8719   fNcells = (nx+2)*(ny+2)*(nz+2);
 
 8740      Error(
"SetBins",
"Operation only valid for 3-D histograms");
 
 8749   fNcells = (nx+2)*(ny+2)*(nz+2);
 
 8862         Warning(
"Sumw2",
"Sum of squares of weights structure already created");
 
 8897   if (bin < 0) bin = 0;
 
 8917   if (bin < 0) bin = 0;
 
 8927      Warning(
"GetBinErrorLow",
"Histogram has negative bin content-force usage to normal errors");
 
 8932   if (
n == 0) 
return 0;
 
 8947   if (bin < 0) bin = 0;
 
 8957      Warning(
"GetBinErrorUp",
"Histogram has negative bin content-force usage to normal errors");
 
 8976   Error(
"GetBinCenter",
"Invalid method for a %d-d histogram - return a NaN",
fDimension);
 
 8987   Error(
"GetBinLowEdge",
"Invalid method for a %d-d histogram - return a NaN",
fDimension);
 
 8998   Error(
"GetBinWidth",
"Invalid method for a %d-d histogram - return a NaN",
fDimension);
 
 9025   Error(
"GetLowEdge",
"Invalid method for a %d-d histogram ",
fDimension);
 
 9040   if (bin < 0 || bin>= 
fNcells) 
return;
 
 9058   if (bin < 0) 
return;
 
 9122   return (
TH1*)
gROOT->ProcessLineFast(
Form(
"TSpectrum::StaticBackground((TH1*)0x%zx,%d,\"%s\")",
 
 9123                                            (
size_t)
this, niter, option));
 
 9136   return (
Int_t)
gROOT->ProcessLineFast(
Form(
"TSpectrum::StaticSearch((TH1*)0x%zx,%g,\"%s\",%g)",
 
 9137                                             (
size_t)
this, 
sigma, option, threshold));
 
 9154   if (!fft ||  !fft->
GetN() ) {
 
 9155      ::Error(
"TransformHisto",
"Invalid FFT transform class");
 
 9160      ::Error(
"TransformHisto",
"Only 1d and 2D transform are supported");
 
 9182      if (
type.Contains(
"2C") || 
type.Contains(
"2HC")) {
 
 9184         for (binx = 1; binx<=hout->
GetNbinsX(); binx++) {
 
 9185            for (biny=1; biny<=hout->
GetNbinsY(); biny++) {
 
 9186               ind[0] = binx-1; ind[1] = biny-1;
 
 9192         for (binx = 1; binx<=hout->
GetNbinsX(); binx++) {
 
 9193            for (biny=1; biny<=hout->
GetNbinsY(); biny++) {
 
 9194               ind[0] = binx-1; ind[1] = biny-1;
 
 9201      if (
type.Contains(
"2C") || 
type.Contains(
"2HC")) {
 
 9203         for (binx = 1; binx<=hout->
GetNbinsX(); binx++) {
 
 9204            for (biny=1; biny<=hout->
GetNbinsY(); biny++) {
 
 9205               ind[0] = binx-1; ind[1] = biny-1;
 
 9211         ::Error(
"TransformHisto",
"No complex numbers in the output");
 
 9216      if (
type.Contains(
"2C") || 
type.Contains(
"2HC")) {
 
 9218         for (binx = 1; binx<=hout->
GetNbinsX(); binx++) {
 
 9219            for (biny=1; biny<=hout->
GetNbinsY(); biny++) {
 
 9220               ind[0] = binx-1; ind[1] = biny-1;
 
 9226         for (binx = 1; binx<=hout->
GetNbinsX(); binx++) {
 
 9227            for (biny=1; biny<=hout->
GetNbinsY(); biny++) {
 
 9228               ind[0] = binx-1; ind[1] = biny-1;
 
 9235      if (
type.Contains(
"2C") || 
type.Contains(
"2HC")){
 
 9237         for (binx = 1; binx<=hout->
GetNbinsX(); binx++){
 
 9238            for (biny=1; biny<=hout->
GetNbinsY(); biny++){
 
 9239               ind[0] = binx-1; ind[1] = biny-1;
 
 9260         printf(
"Pure real output, no phase");
 
 9290std::string cling::printValue(
TH1 *val) {
 
 9291  std::ostringstream strm;
 
 9292  strm << cling::printValue((
TObject*)val) << 
" NbinsX: " << val->
GetNbinsX();
 
 9318: 
TH1(
name,title,nbins,xlow,xup)
 
 9381   if (newval > -128 && newval < 128) {
fArray[bin] = 
Char_t(newval); 
return;}
 
 9382   if (newval < -127) 
fArray[bin] = -127;
 
 9383   if (newval >  127) 
fArray[bin] =  127;
 
 9500: 
TH1(
name,title,nbins,xlow,xup)
 
 9563   if (newval > -32768 && newval < 32768) {
fArray[bin] = 
Short_t(newval); 
return;}
 
 9564   if (newval < -32767) 
fArray[bin] = -32767;
 
 9565   if (newval >  32767) 
fArray[bin] =  32767;
 
 9683: 
TH1(
name,title,nbins,xlow,xup)
 
 9746   if (newval > -INT_MAX && newval < INT_MAX) {
fArray[bin] = 
Int_t(newval); 
return;}
 
 9747   if (newval < -INT_MAX) 
fArray[bin] = -INT_MAX;
 
 9748   if (newval >  INT_MAX) 
fArray[bin] =  INT_MAX;
 
 9866: 
TH1(
name,title,nbins,xlow,xup)
 
 9904: 
TH1(
"TVectorF",
"",
v.GetNrows(),0,
v.GetNrows())
 
 9908   Int_t ivlow  = 
v.GetLwb();
 
10046: 
TH1(
name,title,nbins,xlow,xup)
 
10084: 
TH1(
"TVectorD",
"",
v.GetNrows(),0,
v.GetNrows())
 
10088   Int_t ivlow  = 
v.GetLwb();
 
10211   if(hid >= 0) hname.
Form(
"h%d",hid);
 
10212   else         hname.
Form(
"h_%d",hid);
 
static const double x1[5]
 
include TDocParser_001 C image html pict1_TDocParser_001 png width
 
static bool IsEquidistantBinning(const TAxis &axis)
Test if the binning is equidistant.
 
void H1LeastSquareLinearFit(Int_t ndata, Double_t &a0, Double_t &a1, Int_t &ifail)
Least square linear fit without weights.
 
void H1InitGaus()
Compute Initial values of parameters for a gaussian.
 
void H1InitExpo()
Compute Initial values of parameters for an exponential.
 
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
 
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
 
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
 
void H1LeastSquareSeqnd(Int_t n, Double_t *a, Int_t idim, Int_t &ifail, Int_t k, Double_t *b)
Extracted from CERN Program library routine DSEQN.
 
static Bool_t AlmostEqual(Double_t a, Double_t b, Double_t epsilon=0.00000001)
Test if two double are almost equal.
 
static Bool_t AlmostInteger(Double_t a, Double_t epsilon=0.00000001)
Test if a double is almost an integer.
 
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
 
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
 
void H1LeastSquareFit(Int_t n, Int_t m, Double_t *a)
Least squares lpolynomial fitting without weights.
 
void H1InitPolynom()
Compute Initial values of parameters for a polynom.
 
R__EXTERN TVirtualMutex * gROOTMutex
 
R__EXTERN TRandom * gRandom
 
char * Form(const char *fmt,...)
 
void Printf(const char *fmt,...)
 
R__EXTERN TStyle * gStyle
 
#define R__LOCKGUARD(mutex)
 
#define R__WRITE_LOCKGUARD(mutex)
 
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
 
class describing the range in the coordinates it supports multiple range in a coordinate.
 
void AndersonDarling2SamplesTest(Double_t &pvalue, Double_t &testStat) const
 
Array of chars or bytes (8 bits per element).
 
void Set(Int_t n)
Set size of this array to n chars.
 
void Copy(TArrayC &array) const
 
Array of doubles (64 bits per element).
 
Double_t GetAt(Int_t i) const
 
void Copy(TArrayD &array) const
 
void Set(Int_t n)
Set size of this array to n doubles.
 
const Double_t * GetArray() const
 
Array of floats (32 bits per element).
 
void Copy(TArrayF &array) const
 
void Set(Int_t n)
Set size of this array to n floats.
 
Array of integers (32 bits per element).
 
void Set(Int_t n)
Set size of this array to n ints.
 
void Copy(TArrayI &array) const
 
Array of shorts (16 bits per element).
 
void Set(Int_t n)
Set size of this array to n shorts.
 
void Copy(TArrayS &array) const
 
Abstract array base class.
 
virtual void Set(Int_t n)=0
 
virtual Color_t GetTitleColor() const
 
virtual Color_t GetLabelColor() const
 
virtual Int_t GetNdivisions() const
 
virtual Color_t GetAxisColor() const
 
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
 
virtual Style_t GetTitleFont() const
 
virtual Float_t GetLabelOffset() const
 
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
 
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
 
virtual Style_t GetLabelFont() const
 
virtual void SetTitleFont(Style_t font=62)
Set the title font.
 
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
 
virtual void SetLabelFont(Style_t font=62)
Set labels' font.
 
virtual void SetTitleSize(Float_t size=0.04)
Set size of axis title.
 
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
 
virtual Float_t GetTitleSize() const
 
virtual Float_t GetLabelSize() const
 
virtual Float_t GetTickLength() const
 
virtual void ResetAttAxis(Option_t *option="")
Reset axis attributes.
 
virtual Float_t GetTitleOffset() const
 
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
 
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
 
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
 
Fill Area Attributes class.
 
virtual Color_t GetFillColor() const
Return the fill area color.
 
void Copy(TAttFill &attfill) const
Copy this fill attributes to a new TAttFill.
 
virtual Style_t GetFillStyle() const
Return the fill area style.
 
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
 
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
 
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.
 
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 SetLineColor(Color_t lcolor)
Set the line color.
 
virtual Style_t GetLineStyle() const
Return the line style.
 
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.
 
virtual Style_t GetMarkerStyle() const
Return the marker style.
 
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
 
virtual Color_t GetMarkerColor() const
Return the marker color.
 
virtual Size_t GetMarkerSize() const
Return the marker size.
 
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
 
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
 
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
 
Class to manage histogram axis.
 
virtual void GetCenter(Double_t *center) const
Return an array with the center of all bins.
 
virtual Bool_t GetTimeDisplay() const
 
Bool_t IsAlphanumeric() const
 
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
 
virtual void SetParent(TObject *obj)
 
const TArrayD * GetXbins() const
 
void SetCanExtend(Bool_t canExtend)
 
virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname)
Save axis attributes as C++ statement(s) on output stream out.
 
const char * GetBinLabel(Int_t bin) const
Return label for bin.
 
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
 
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
 
virtual void SetTimeDisplay(Int_t value)
 
virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
 
virtual Int_t FindFixBin(Double_t x) const
Find bin number corresponding to abscissa x.
 
virtual void Copy(TObject &axis) const
Copy axis structure to another axis.
 
Int_t GetLast() const
Return last bin on the axis i.e.
 
virtual void SetLimits(Double_t xmin, Double_t xmax)
 
virtual void GetLowEdge(Double_t *edge) const
Return an array with the low edge of all bins.
 
virtual void SetRange(Int_t first=0, Int_t last=0)
Set the viewing range for the axis using bin numbers.
 
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
 
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
 
Int_t GetFirst() const
Return first bin on the axis i.e.
 
THashList * GetLabels() const
 
Using a TBrowser one can browse all ROOT objects.
 
Buffer base class used for serializing objects.
 
Collection abstract base class.
 
virtual bool UseRWLock(Bool_t enable=true)
Set this collection to use a RW lock upon access, making it thread safe.
 
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
 
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
 
virtual Bool_t IsEmpty() const
 
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
 
Describe directory structure in memory.
 
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
 
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
 
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
 
static void RejectPoint(Bool_t reject=kTRUE)
Static function to set the global flag to reject points the fgRejectPoint global flag is tested by al...
 
virtual TH1 * GetHistogram() const
Return a pointer to the histogram used to visualise the function Note that this histogram is managed ...
 
virtual Int_t GetNpar() const
 
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
 
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0)
Evaluate function with given coordinates and parameters.
 
virtual void InitArgs(const Double_t *x, const Double_t *params)
Initialize parameters addresses.
 
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
 
virtual void SetParLimits(Int_t ipar, Double_t parmin, Double_t parmax)
Set limits for parameter ipar.
 
static Bool_t RejectedPoint()
See TF1::RejectPoint above.
 
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
 
virtual void SetParameter(Int_t param, Double_t value)
 
virtual Bool_t IsInside(const Double_t *x) const
return kTRUE if the point is inside the function range
 
A 2-Dim function with parameters.
 
A 3-Dim function with parameters.
 
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
 
1-D histogram with a byte per channel (see TH1 documentation)
 
TH1C & operator=(const TH1C &h1)
Operator =.
 
virtual void Copy(TObject &hnew) const
Copy this to newth1.
 
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
 
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
 
virtual ~TH1C()
Destructor.
 
virtual void Reset(Option_t *option="")
Reset.
 
1-D histogram with a double per channel (see TH1 documentation)}
 
virtual void Copy(TObject &hnew) const
Copy this to newth1.
 
virtual ~TH1D()
Destructor.
 
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
 
TH1D & operator=(const TH1D &h1)
Operator =.
 
1-D histogram with a float per channel (see TH1 documentation)}
 
virtual Double_t RetrieveBinContent(Int_t bin) const
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
 
virtual ~TH1F()
Destructor.
 
TH1F & operator=(const TH1F &h1)
Operator =.
 
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
 
virtual void Copy(TObject &hnew) const
Copy this to newth1.
 
1-D histogram with an int per channel (see TH1 documentation)}
 
virtual void Copy(TObject &hnew) const
Copy this to newth1.
 
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
 
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
 
virtual ~TH1I()
Destructor.
 
TH1I & operator=(const TH1I &h1)
Operator =.
 
1-D histogram with a short per channel (see TH1 documentation)
 
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
 
virtual void SetBinsLength(Int_t n=-1)
Set total number of bins including under/overflow Reallocate bin contents array.
 
virtual ~TH1S()
Destructor.
 
TH1S & operator=(const TH1S &h1)
Operator =.
 
virtual void Copy(TObject &hnew) const
Copy this to newth1.
 
TH1 is the base class of all histogram classes in ROOT.
 
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
 
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
 
virtual void FitPanel()
Display a panel with all histogram fit options.
 
Double_t * fBuffer
[fBufferSize] entry buffer
 
virtual Int_t AutoP2FindLimits(Double_t min, Double_t max)
Buffer-based estimate of the histogram range using the power of 2 algorithm.
 
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
 
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
 
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
 
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
 
virtual void Print(Option_t *option="") const
Print some global quantities for this histogram.
 
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
 
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
 
virtual void SetBarOffset(Float_t offset=0.25)
Set the bar offset as fraction of the bin width for drawing mode "B".
 
static Bool_t fgStatOverflows
! Flag to use under/overflows in statistics
 
virtual Int_t FindLastBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold i...
 
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
 
virtual void Browse(TBrowser *b)
Browse the Histogram object.
 
@ kNoAxis
NOTE: Must always be 0 !!!
 
Int_t fNcells
Number of bins(1D), cells (2D) +U/Overflows.
 
virtual void GetStats(Double_t *stats) const
fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
 
Double_t fTsumw
Total Sum of weights.
 
virtual Float_t GetBarWidth() const
 
Double_t fTsumw2
Total Sum of squares of weights.
 
static void StatOverflows(Bool_t flag=kTRUE)
if flag=kTRUE, underflows and overflows are used by the Fill functions in the computation of statisti...
 
virtual Float_t GetBarOffset() const
 
virtual ~TH1()
Histogram default destructor.
 
TList * fFunctions
->Pointer to list of functions (fits and user)
 
static Bool_t fgAddDirectory
! Flag to add histograms to the directory
 
virtual Int_t GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0)
Compute Quantiles for this histogram Quantile x_q of a probability distribution Function F is defined...
 
static Int_t GetDefaultBufferSize()
Static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
 
virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t &err, Option_t *opt, Bool_t doerr=kFALSE) const
Internal function compute integral and optionally the error between the limits specified by the bin n...
 
Double_t fTsumwx2
Total Sum of weight*X*X.
 
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
 
TH1()
Histogram default constructor.
 
static TH1 * TransformHisto(TVirtualFFT *fft, TH1 *h_output, Option_t *option)
For a given transform (first parameter), fills the histogram (second parameter) with the transform ou...
 
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Sort bins with labels or set option(s) to draw axis with labels.
 
virtual Int_t GetNbinsY() const
 
Short_t fBarOffset
(1000*offset) for bar charts or legos
 
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Check bin limits.
 
virtual void AddBinContent(Int_t bin)
Increment bin content by 1.
 
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
 
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
Decode string choptin and fill fitOption structure.
 
virtual Int_t GetNbinsZ() const
 
virtual Double_t GetNormFactor() const
 
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
 
virtual Double_t GetSkewness(Int_t axis=1) const
 
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
 
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
 
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
 
@ kNeutral
Adapt to the global flag.
 
virtual Double_t Chi2TestX(const TH1 *h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option="UU", Double_t *res=0) const
The computation routine of the Chisquare test.
 
virtual Int_t GetDimension() const
 
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
 
@ kIsAverage
Bin contents are average (used by Add)
 
@ kUserContour
User specified contour levels.
 
@ kNoStats
Don't draw stats box.
 
@ kAutoBinPTwo
Use Power(2)-based algorithm for autobinning.
 
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted different than...
 
@ kIsHighlight
bit set if histo is highlight
 
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
 
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
 
TDirectory * fDirectory
! Pointer to directory holding this histogram
 
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
 
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
 
virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const
Return binx, biny, binz corresponding to the global bin number globalbin see TH1::GetBin function abo...
 
TH1 * GetCumulative(Bool_t forward=kTRUE, const char *suffix="_cumulative") const
Return a pointer to a histogram containing the cumulative content.
 
void UseCurrentStyle()
Copy current attributes from/to current style.
 
static Double_t AutoP2GetPower2(Double_t x, Bool_t next=kTRUE)
Auxiliary function to get the power of 2 next (larger) or previous (smaller) a given x.
 
virtual Int_t GetNcells() const
 
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
 
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
 
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
 
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
 
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
 
virtual void FillRandom(const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr)
Fill histogram following distribution in function fname.
 
static Bool_t GetDefaultSumw2()
Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
 
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold ...
 
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
 
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
 
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
 
virtual Int_t GetNbinsX() const
 
virtual void SetMaximum(Double_t maximum=-1111)
 
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
 
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
 
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
 
virtual Double_t Chi2Test(const TH1 *h2, Option_t *option="UU", Double_t *res=0) const
test for comparing weighted and unweighted histograms
 
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
 
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
 
Double_t fMaximum
Maximum value for plotting.
 
Int_t fBufferSize
fBuffer size
 
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of functions.
 
virtual Double_t RetrieveBinContent(Int_t bin) const
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
 
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [binx1,binx2] and its error.
 
Int_t fDimension
! Histogram dimension (1, 2 or 3 dim)
 
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
 
EBinErrorOpt fBinStatErrOpt
Option for bin statistical errors.
 
static Int_t fgBufferSize
! Default buffer size for automatic histograms
 
virtual void SetBinsLength(Int_t=-1)
 
Double_t fNormFactor
Normalization factor.
 
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
 
virtual TObject * FindObject(const char *name) const
Search object named name in the list of functions.
 
TArrayD fContour
Array to display contour levels.
 
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
 
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
 
virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option="")
Helper function for the SavePrimitive functions from TH1 or classes derived from TH1,...
 
Short_t fBarWidth
(1000*width) for bar charts or legos
 
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
 
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
 
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
 
virtual void SetMinimum(Double_t minimum=-1111)
 
Bool_t IsBinUnderflow(Int_t bin, Int_t axis=0) const
Return true if the bin is underflow.
 
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check that axis have same labels.
 
virtual Double_t Interpolate(Double_t x) const
Given a point x, approximates the value via linear interpolation based on the two nearest bin centers...
 
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
 
Bool_t IsBinOverflow(Int_t bin, Int_t axis=0) const
Return true if the bin is overflow.
 
UInt_t GetAxisLabelStatus() const
Internal function used in TH1::Fill to see which axis is full alphanumeric i.e.
 
Double_t * fIntegral
! Integral of bins used by GetRandom
 
Double_t fMinimum
Minimum value for plotting.
 
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
 
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
 
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
 
virtual void GetLowEdge(Double_t *edge) const
Fill array with low edge of bins for 1D histogram Better to use h1.GetXaxis()->GetLowEdge(edge)
 
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
 
void Build()
Creates histogram basic data structure.
 
virtual Double_t GetEntries() const
Return the current number of entries.
 
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
 
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
 
virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0, Double_t maxdiff=0) const
Compute first binx in the range [firstx,lastx] for which diff = abs(bin_content-c) <= maxdiff.
 
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
Make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
 
TList * GetListOfFunctions() const
 
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
 
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
 
Bool_t IsEmpty() const
Check if a histogram is empty (this is a protected method used mainly by TH1Merger )
 
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
 
virtual void Draw(Option_t *option="")
Draw this histogram with options.
 
virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const
Statistical test of compatibility in shape between this histogram and h2, using the Anderson-Darling ...
 
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculated from bin cont...
 
static void SetDefaultBufferSize(Int_t buffersize=1000)
Static function to set the default buffer size for automatic histograms.
 
virtual void SetBinErrorOption(EBinErrorOpt type)
 
virtual void SetBuffer(Int_t buffersize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
 
virtual void DrawPanel()
Display a panel with all histogram drawing options.
 
virtual Double_t GetRandom(TRandom *rng=nullptr) const
Return a random number distributed according the histogram bin contents.
 
virtual Double_t Chisquare(TF1 *f1, Option_t *option="") const
Compute and return the chisquare of this histogram with respect to a function The chisquare is comput...
 
virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
Internal method to fill histogram content from a vector called directly by TH1::BufferEmpty.
 
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
 
@ kNstat
Size of statistics data (up to TProfile3D)
 
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
 
static Int_t AutoP2GetBins(Int_t n)
Auxiliary function to get the next power of 2 integer value larger then n.
 
Double_t fEntries
Number of entries.
 
virtual Long64_t Merge(TCollection *list)
 
virtual void SetName(const char *name)
Change the name of this histogram.
 
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
 
TAxis fZaxis
Z axis descriptor.
 
EStatOverflows fStatOverflows
Per object flag to use under/overflows in statistics.
 
virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
Fill this histogram with an array x and weights w.
 
virtual void UpdateBinContent(Int_t bin, Double_t content)
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
 
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
 
@ kPoisson2
Errors from Poisson interval at 95% CL (~ 2 sigma)
 
@ kNormal
Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
 
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
 
TAxis fXaxis
X axis descriptor.
 
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
 
virtual Bool_t IsHighlight() const
 
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
 
virtual void SetNameTitle(const char *name, const char *title)
Change the name and title of this histogram.
 
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
 
static bool CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
 
TArrayD fSumw2
Array of sum of squares of weights.
 
TH1 * GetAsymmetry(TH1 *h2, Double_t c2=1, Double_t dc2=0)
Return a histogram containing the asymmetry of this histogram with h2, where the asymmetry is defined...
 
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
 
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disable) mode for the histogram by default highlight mode is disable.
 
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
 
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
 
virtual void Paint(Option_t *option="")
Control routine to paint any kind of histograms.
 
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
 
virtual Int_t GetSumw2N() const
 
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
 
Bool_t GetStatOverflowsBehaviour() const
 
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
 
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
 
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
 
static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0)
Check that two sub axis are the same.
 
TAxis fYaxis
Y axis descriptor.
 
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const
Statistical test of compatibility in shape between this histogram and h2, using Kolmogorov test.
 
virtual Double_t GetSumOfWeights() const
Return the sum of weights excluding under/overflows.
 
static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1)
Smooth array xx, translation of Hbook routine hsmoof.F based on algorithm 353QH twice presented by J.
 
virtual void GetCenter(Double_t *center) const
Fill array with center of bins for 1D histogram Better to use h1.GetXaxis()->GetCenter(center)
 
TVirtualHistPainter * fPainter
! Pointer to histogram painter
 
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
 
virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const
Return Global bin number corresponding to x,y,z.
 
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Redefines TObject::GetObjectInfo.
 
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
 
virtual void SetEntries(Double_t n)
 
virtual Bool_t FindNewAxisLimits(const TAxis *axis, const Double_t point, Double_t &newMin, Double_t &newMax)
finds new limits for the axis so that point is within the range and the limits are compatible with th...
 
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same.
 
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
 
static Bool_t fgDefaultSumw2
! Flag to call TH1::Sumw2 automatically at histogram creation time
 
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a line.
 
Double_t fTsumwx
Total Sum of weight*X.
 
virtual void LabelsDeflate(Option_t *axis="X")
Reduce the number of bins for the axis passed in the option to the number of bins having a label.
 
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false)
Compute integral (cumulative sum of bins) The result stored in fIntegral is used by the GetRandom fun...
 
TString fOption
Histogram options.
 
virtual Int_t GetContour(Double_t *levels=0)
Return contour values into array levels if pointer levels is non zero.
 
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
 
virtual void SetBarWidth(Float_t width=0.5)
Set the width of bars as fraction of the bin width for drawing mode "B".
 
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
 
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
 
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=0)
Rebin this histogram.
 
virtual Double_t GetKurtosis(Int_t axis=1) const
 
2-D histogram with a double per channel (see TH1 documentation)}
 
static THLimitsFinder * GetLimitsFinder()
Return pointer to the current finder.
 
virtual Int_t FindGoodLimits(TH1 *h, Double_t xmin, Double_t xmax)
Compute the best axis limits for the X axis.
 
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
 
void Clear(Option_t *option="")
Remove all objects from the list.
 
virtual void Add(TObject *obj)
 
virtual TObject * Remove(TObject *obj)
Remove object from the list.
 
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
 
virtual TObjLink * FirstLink() const
 
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
 
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
 
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
 
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
 
The TNamed class is the base class for all named ROOT classes.
 
virtual void Copy(TObject &named) const
Copy this to obj.
 
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
 
virtual void SetName(const char *name)
Set the name of the TNamed.
 
virtual const char * GetTitle() const
Returns title of object.
 
virtual const char * GetName() const
Returns name of object.
 
TObject * GetObject() const
 
Option_t * GetOption() const
 
Mother of all ROOT objects.
 
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual const char * GetName() const
Returns name of object.
 
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
 
virtual UInt_t GetUniqueID() const
Return the unique object id.
 
virtual const char * ClassName() const
Returns name of class to which the object belongs.
 
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
 
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
 
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
 
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 SetUniqueID(UInt_t uid)
Set the unique object id.
 
@ kCanDelete
if object in a list can be deleted
 
@ kInvalidObject
if object ctor succeeded but object should not be used
 
@ kMustCleanup
if object destructor must call RecursiveRemove()
 
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
 
Longptr_t ExecPlugin(int nargs, const T &... params)
 
Int_t LoadPlugin()
Load the plugin library for this handler.
 
This is the base class for the ROOT Random number generators.
 
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
 
virtual Double_t PoissonD(Double_t mean)
Generates a random number according to a Poisson law.
 
virtual Double_t Rndm()
Machine independent random number generator.
 
void ToLower()
Change string to lower-case.
 
void Clear()
Clear string without changing its capacity.
 
const char * Data() const
 
TString & ReplaceAll(const TString &s1, const TString &s2)
 
void ToUpper()
Change string to upper case.
 
TString & Remove(Ssiz_t pos)
 
TString & Append(const char *cs)
 
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
 
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
 
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
 
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
 
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
 
void SetHistFillColor(Color_t color=1)
 
Color_t GetHistLineColor() const
 
Float_t GetBarOffset() const
 
void SetHistLineStyle(Style_t styl=0)
 
Style_t GetHistFillStyle() const
 
Color_t GetHistFillColor() const
 
Float_t GetBarWidth() const
 
Bool_t GetCanvasPreferGL() const
 
void SetHistLineColor(Color_t color=1)
 
void SetBarOffset(Float_t baroff=0.5)
 
Style_t GetHistLineStyle() const
 
void SetBarWidth(Float_t barwidth=0.5)
 
void SetHistFillStyle(Style_t styl=0)
 
Width_t GetHistLineWidth() const
 
void SetHistLineWidth(Width_t width=1)
 
TVirtualFFT is an interface class for Fast Fourier Transforms.
 
static TVirtualFFT * FFT(Int_t ndim, Int_t *n, Option_t *option)
Returns a pointer to the FFT of requested size and type.
 
virtual Int_t GetNdim() const =0
 
static TVirtualFFT * SineCosine(Int_t ndim, Int_t *n, Int_t *r2rkind, Option_t *option)
Returns a pointer to a sine or cosine transform of requested size and kind.
 
virtual Option_t * GetType() const =0
 
virtual void Transform()=0
 
virtual void GetPointComplex(Int_t ipoint, Double_t &re, Double_t &im, Bool_t fromInput=kFALSE) const =0
 
virtual Int_t * GetN() const =0
 
virtual Double_t GetPointReal(Int_t ipoint, Bool_t fromInput=kFALSE) const =0
 
virtual void SetPoint(Int_t ipoint, Double_t re, Double_t im=0)=0
 
Abstract Base Class for Fitting.
 
virtual Int_t GetXlast() const
 
virtual TObject * GetObjectFit() const
 
virtual Int_t GetXfirst() const
 
static TVirtualFitter * GetFitter()
static: return the current Fitter
 
virtual TObject * GetUserFunc() const
 
Abstract interface to a histogram painter.
 
virtual void DrawPanel()=0
 
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)=0
Execute action corresponding to an event at (px,py).
 
virtual void Paint(Option_t *option="")=0
This method must be overridden if a class wants to paint itself.
 
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
 
virtual void SetHighlight()=0
 
static TVirtualHistPainter * HistPainter(TH1 *obj)
Static function returning a pointer to the current histogram painter.
 
virtual void SetParent(TObject *)=0
 
double gamma_quantile_c(double z, double alpha, double theta)
Inverse ( ) of the cumulative distribution function of the upper tail of the gamma distribution (gamm...
 
double gamma_quantile(double z, double alpha, double theta)
Inverse ( ) of the cumulative distribution function of the lower tail of the gamma distribution (gamm...
 
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
 
TFitResultPtr FitObject(TH1 *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
fitting function for a TH1 (called from TH1::Fit)
 
void FitOptionsMake(EFitObjectType type, const char *option, Foption_t &fitOption)
Decode list of options into fitOption.
 
void FillData(BinData &dv, const TH1 *hist, TF1 *func=0)
fill the data vector from a TH1.
 
double Chisquare(const TH1 &h1, TF1 &f1, bool useRange, bool usePL=false)
compute the chi2 value for an histogram given a function (see TH1::Chisquare for the documentation)
 
R__EXTERN TVirtualRWMutex * gCoreMutex
 
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)
 
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
 
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754
 
Double_t Floor(Double_t x)
 
Double_t Ceil(Double_t x)
 
T MinElement(Long64_t n, const T *a)
Return minimum of array a of length n.
 
Double_t Sqrt(Double_t x)
 
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
 
Short_t Min(Short_t a, Short_t b)
 
Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec)
 
Bool_t AreEqualAbs(Double_t af, Double_t bf, Double_t epsilon)
 
Double_t KolmogorovProb(Double_t z)
Calculates the Kolmogorov distribution function,.
 
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
 
Double_t Median(Long64_t n, const T *a, const Double_t *w=0, Long64_t *work=0)
Return the median of the array a where each entry i has weight w[i] .
 
Long64_t BinarySearch(Long64_t n, const T *array, T value)
 
Double_t Log10(Double_t x)
 
Double_t Infinity()
Returns an infinity as defined by the IEEE standard.
 
static uint64_t sum(uint64_t i)