107 :
TH1(
name,title,nbinsx,xlow,xup)
111 Warning(
"TH3",
"nbinsy is <=0 - set to nbinsy = 1");
115 Warning(
"TH3",
"nbinsz is <=0 - set to nbinsz = 1");
118 fYaxis.Set(nbinsy,ylow,yup);
119 fZaxis.Set(nbinsz,zlow,zup);
120 fNcells = (nbinsx+2)*(nbinsy+2)*(nbinsz+2);
151 if (nbinsy <= 0) {
Warning(
"TH3",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
152 if (nbinsz <= 0) nbinsz = 1;
153 if (ybins)
fYaxis.Set(nbinsy,ybins);
154 else fYaxis.Set(nbinsy,0,1);
155 if (zbins)
fZaxis.Set(nbinsz,zbins);
156 else fZaxis.Set(nbinsz,0,1);
157 fNcells = (nbinsx+2)*(nbinsy+2)*(nbinsz+2);
188 if (nbinsy <= 0) {
Warning(
"TH3",
"nbinsy is <=0 - set to nbinsy = 1"); nbinsy = 1; }
189 if (nbinsz <= 0) nbinsz = 1;
190 if (ybins)
fYaxis.Set(nbinsy,ybins);
191 else fYaxis.Set(nbinsy,0,1);
192 if (zbins)
fZaxis.Set(nbinsz,zbins);
193 else fZaxis.Set(nbinsz,0,1);
194 fNcells = (nbinsx+2)*(nbinsy+2)*(nbinsz+2);
236 if (!nbentries)
return 0;
239 if (action == 0)
return 0;
240 nbentries = -nbentries;
245 const bool xbinAuto =
fXaxis.GetXmax() <=
fXaxis.GetXmin();
246 const bool ybinAuto =
fYaxis.GetXmax() <=
fYaxis.GetXmin();
247 const bool zbinAuto =
fZaxis.GetXmax() <=
fZaxis.GetXmin();
249 if (extend || xbinAuto || ybinAuto || zbinAuto) {
257 for (
Int_t i=1;i<nbentries;i++) {
258 if (extend || xbinAuto) {
263 if (extend || ybinAuto) {
268 if (extend || zbinAuto) {
270 if (z < zmin) zmin = z;
271 if (z > zmax) zmax = z;
274 if (xbinAuto || ybinAuto || zbinAuto) {
277 ybinAuto ? 0 :
fYaxis.GetNbins(), zbinAuto ? 0 :
fZaxis.GetNbins());
293 for (
Int_t i=0;i<nbentries;i++) {
294 Fill(buffer[4*i+2],buffer[4*i+3],buffer[4*i+4],buffer[4*i+1]);
321 nbentries = -nbentries;
347 Error(
"Fill",
"Invalid signature - do nothing");
362 Int_t binx, biny, binz, bin;
367 if (binx <0 || biny <0 || binz<0)
return -1;
368 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
371 if (binx == 0 || binx >
fXaxis.GetNbins()) {
375 if (biny == 0 || biny >
fYaxis.GetNbins()) {
378 if (binz == 0 || binz >
fZaxis.GetNbins()) {
410 Int_t binx, biny, binz, bin;
415 if (binx <0 || biny <0 || binz<0)
return -1;
416 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
420 if (binx == 0 || binx >
fXaxis.GetNbins()) {
423 if (biny == 0 || biny >
fYaxis.GetNbins()) {
426 if (binz == 0 || binz >
fZaxis.GetNbins()) {
443#ifdef TH3D_FILL_THREADSAFE
457 throw std::logic_error(
"TH3 cannot be filled atomically when buffer is active.");
459 throw std::logic_error(
460 "Weighted filling 'Sumw2()' needs to be activated before FillThreadSafe is called with weights");
465 const auto binx =
fXaxis.FindFixBin(
x);
466 const auto biny =
fYaxis.FindFixBin(
y);
467 const auto binz =
fZaxis.FindFixBin(z);
468 if (binx < 0 || biny < 0 || binz < 0)
470 const auto bin = binx + (
fXaxis.GetNbins() + 2) * (biny + (
fYaxis.GetNbins() + 2) * binz);
472 std::atomic_ref{
fSumw2.fArray[bin]} +=
w *
w;
475 std::atomic_ref{
fArray[bin]} +=
w;
477 if (binx == 0 || binx >
fXaxis.GetNbins() || biny == 0 || biny >
fYaxis.GetNbins() || binz == 0 ||
478 binz >
fZaxis.GetNbins()) {
508 Int_t binx, biny, binz, bin;
510 binx =
fXaxis.FindBin(namex);
511 biny =
fYaxis.FindBin(namey);
512 binz =
fZaxis.FindBin(namez);
513 if (binx <0 || biny <0 || binz<0)
return -1;
514 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
518 if (binx == 0 || binx >
fXaxis.GetNbins())
return -1;
519 if (biny == 0 || biny >
fYaxis.GetNbins())
return -1;
520 if (binz == 0 || binz >
fZaxis.GetNbins())
return -1;
556 Int_t binx, biny, binz, bin;
558 binx =
fXaxis.FindBin(namex);
560 binz =
fZaxis.FindBin(namez);
561 if (binx <0 || biny <0 || binz<0)
return -1;
562 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
566 if (binx == 0 || binx >
fXaxis.GetNbins())
return -1;
567 if (biny == 0 || biny >
fYaxis.GetNbins()) {
570 if (binz == 0 || binz >
fZaxis.GetNbins())
return -1;
604 Int_t binx, biny, binz, bin;
606 binx =
fXaxis.FindBin(namex);
607 biny =
fYaxis.FindBin(namey);
609 if (binx <0 || biny <0 || binz<0)
return -1;
610 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
614 if (binx == 0 || binx >
fXaxis.GetNbins())
return -1;
615 if (biny == 0 || biny >
fYaxis.GetNbins())
return -1;
616 if (binz == 0 || binz >
fZaxis.GetNbins()) {
652 Int_t binx, biny, binz, bin;
655 biny =
fYaxis.FindBin(namey);
656 binz =
fZaxis.FindBin(namez);
657 if (binx <0 || biny <0 || binz<0)
return -1;
658 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
662 if (binx == 0 || binx >
fXaxis.GetNbins()) {
665 if (biny == 0 || biny >
fYaxis.GetNbins())
return -1;
666 if (binz == 0 || binz >
fZaxis.GetNbins())
return -1;
700 Int_t binx, biny, binz, bin;
702 binx =
fXaxis.FindBin(namex);
705 if (binx < 0 || biny < 0 || binz < 0)
707 bin = binx + (
fXaxis.GetNbins() + 2) * (biny + (
fYaxis.GetNbins() + 2) * binz);
713 if (binx == 0 || binx >
fXaxis.GetNbins()) {
716 if (biny == 0 || biny >
fYaxis.GetNbins()) {
720 if (binz == 0 || binz >
fZaxis.GetNbins()) {
754 Int_t binx, biny, binz, bin;
757 biny =
fYaxis.FindBin(namey);
759 if (binx <0 || biny <0 || binz<0)
return -1;
760 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
764 if (binx == 0 || binx >
fXaxis.GetNbins()) {
767 if (biny == 0 || biny >
fYaxis.GetNbins())
return -1;
768 if (binz == 0 || binz >
fZaxis.GetNbins()) {
803 Int_t binx, biny, binz, bin;
807 binz =
fZaxis.FindBin(namez);
808 if (binx <0 || biny <0 || binz<0)
return -1;
809 bin = binx + (
fXaxis.GetNbins()+2)*(biny + (
fYaxis.GetNbins()+2)*binz);
813 if (binx == 0 || binx >
fXaxis.GetNbins()) {
816 if (biny == 0 || biny >
fYaxis.GetNbins()) {
819 if (binz == 0 || binz >
fZaxis.GetNbins())
return -1;
865 Int_t bin, binx, biny, binz, ibin, loop;
867 TF3 *
f1 =
dynamic_cast<TF3*
>( fobj );
868 if (!
f1) {
Error(
"FillRandom",
"Function: %s is not a TF3, is a %s",fobj->
GetName(),fobj->
IsA()->
GetName());
return; }
878 Info(
"FillRandom",
"Using function axis and range ([%g,%g],[%g,%g],[%g,%g])",
xmin,
xmax,
ymin,
ymax,zmin,zmax);
888 Int_t nxy = nbinsx*nbinsy;
889 Int_t nbins = nbinsx*nbinsy*nbinsz;
895 for (binz=1;binz<=nbinsz;binz++) {
897 for (biny=1;biny<=nbinsy;biny++) {
899 for (binx=1;binx<=nbinsx;binx++) {
907 integral[ibin] = integral[ibin-1] + fint;
913 if (integral[nbins] == 0 ) {
915 Error(
"FillRandom",
"Integral = zero");
return;
917 for (bin=1;bin<=nbins;bin++) integral[bin] /= integral[nbins];
922 for (loop=0;loop<ntimes;loop++) {
926 biny = (ibin - nxy*binz)/nbinsx;
927 binx = 1 + ibin - nbinsx*(biny + nbinsy*binz);
957 if (!
h) {
Error(
"FillRandom",
"Null histogram");
return; }
959 Error(
"FillRandom",
"Histograms with different dimensions");
return;
962 if (
h->ComputeIntegral() == 0)
return;
967 for (loop=0;loop<ntimes;loop++) {
1012 auto computeFirstAndLastBin = [](
const TAxis & outerAxis,
Int_t &firstbin,
Int_t &lastbin) {
1016 lastbin = outerAxis.
GetLast();
1020 if (firstbin == 0 && lastbin == 0) {
1025 if (firstbin < 0) firstbin = 0;
1026 if (lastbin < 0 || lastbin > nbins + 1) lastbin = nbins + 1;
1027 if (lastbin < firstbin) {firstbin = 0; lastbin = nbins + 1;}
1030 computeFirstAndLastBin(
fXaxis, binminx, binmaxx);
1031 computeFirstAndLastBin(
fYaxis, binminy, binmaxy);
1034 auto computeAxisLimits = [](
const TAxis & outerAxis,
Int_t firstbin,
Int_t lastbin,
1036 Int_t firstOutBin = std::max(firstbin,1);
1037 Int_t lastOutBin = std::min(lastbin,outerAxis.
GetNbins() ) ;
1038 nBins = lastOutBin-firstOutBin+1;
1046 Int_t firstBinXaxis = computeAxisLimits(
fXaxis, binminx, binmaxx, nbinsX, xMin, xMax);
1049 Int_t firstBinYaxis = computeAxisLimits(
fYaxis, binminy, binmaxy, nbinsY, yMin, yMax);
1052 if (
f1 ==
nullptr) {
1057 const char *fname =
f1->GetName();
1060 f1->GetParameters(parsave);
1066 std::vector<TH1*> hlist(npar+1);
1069 for (ipar=0;ipar<= npar;ipar++) {
1073 title =
TString::Format(
"Fitted value of par[%d]=%s",ipar,
f1->GetParName(ipar));
1077 title =
"chisquare";
1079 if (xbins->fN == 0 && ybins->
fN == 0) {
1080 hlist[ipar] =
new TH2D(
name, title,
1082 nbinsY, yMin, yMax);
1083 }
else if (xbins->fN > 0 && ybins->
fN > 0 ) {
1084 hlist[ipar] =
new TH2D(
name, title,
1085 nbinsX, &xbins->fArray[firstBinXaxis],
1086 nbinsY, &ybins->
fArray[firstBinYaxis]);
1091 hlist[ipar]->GetXaxis()->SetTitle(
fXaxis.GetTitle());
1092 hlist[ipar]->GetYaxis()->SetTitle(
fYaxis.GetTitle());
1094 TH1 * hchi2 = hlist.back();
1097 TH1D *hpz =
nullptr;
1102 for (
Int_t biny=binminy; biny<=binmaxy; biny++) {
1103 for (
Int_t binx=binminx; binx<=binmaxx; binx++) {
1110 Info(
"FitSlicesZ",
"Slice (%d,%d) skipped, the number of entries is zero or smaller than the given cut value, n=%f",binx,biny,
nentries);
1113 f1->SetParameters(parsave);
1114 Int_t bin = hlist[0]->FindBin(
fXaxis.GetBinCenter(binx),
fYaxis.GetBinCenter(biny) );
1116 int ibx,iby,ibz = 0;
1117 hlist[0]->GetBinXYZ(bin,ibx,iby,ibz);
1122 Int_t npfits =
f1->GetNumberFitPoints();
1123 if (npfits > npar && npfits >= cut) {
1124 for (ipar=0;ipar<npar;ipar++) {
1125 hlist[ipar]->SetBinContent(bin,
f1->GetParameter(ipar));
1126 hlist[ipar]->SetBinError(bin,
f1->GetParError(ipar));
1132 Info(
"FitSlicesZ",
"Fitted slice (%d,%d) skipped, the number of fitted points is too small, n=%d",binx,biny,npfits);
1147 if (biny < 0) biny = 0;
1148 if (biny > ofy) biny = ofy;
1151 if (binz < 0) binz = 0;
1152 if (binz > ofz) binz = ofz;
1188 Error(
"GetBinWithContent3",
"function is only valid for 3-D histograms");
1191 if (firstx <= 0) firstx = 1;
1192 if (lastx < firstx) lastx =
fXaxis.GetNbins();
1193 if (firsty <= 0) firsty = 1;
1194 if (lasty < firsty) lasty =
fYaxis.GetNbins();
1195 if (firstz <= 0) firstz = 1;
1196 if (lastz < firstz) lastz =
fZaxis.GetNbins();
1197 Int_t binminx = 0, binminy=0, binminz=0;
1199 for (
Int_t k=firstz;k<=lastz;k++) {
1200 for (
Int_t j=firsty;j<=lasty;j++) {
1201 for (
Int_t i=firstx;i<=lastx;i++) {
1203 if (diff <= 0) {binx = i; biny=j; binz=k;
return diff;}
1204 if (diff < curmax && diff <= maxdiff) {curmax = diff, binminx=i; binminy=j;binminz=k;}
1220 if (axis1 < 1 || axis2 < 1 || axis1 > 3 || axis2 > 3) {
1221 Error(
"GetCorrelationFactor",
"Wrong parameters");
1224 if (axis1 == axis2)
return 1;
1226 if (stddev1 == 0)
return 0;
1228 if (stddev2 == 0)
return 0;
1238 if (axis1 < 1 || axis2 < 1 || axis1 > 3 || axis2 > 3) {
1239 Error(
"GetCovariance",
"Wrong parameters");
1255 if (sumw == 0)
return 0;
1256 if (axis1 == 1 && axis2 == 1) {
1257 return TMath::Abs(sumwx2/sumw - sumwx*sumwx/(sumw*sumw));
1259 if (axis1 == 2 && axis2 == 2) {
1260 return TMath::Abs(sumwy2/sumw - sumwy*sumwy/(sumw*sumw));
1262 if (axis1 == 3 && axis2 == 3) {
1263 return TMath::Abs(sumwz2/sumw - sumwz*sumwz/(sumw*sumw));
1265 if ((axis1 == 1 && axis2 == 2) || (axis1 == 2 && axis2 == 1)) {
1266 return sumwxy/sumw - sumwx*sumwy/(sumw*sumw);
1268 if ((axis1 == 1 && axis2 == 3) || (axis1 == 3 && axis2 == 1)) {
1269 return sumwxz/sumw - sumwx*sumwz/(sumw*sumw);
1271 if ((axis1 == 2 && axis2 == 3) || (axis1 == 3 && axis2 == 2)) {
1272 return sumwyz/sumw - sumwy*sumwz/(sumw*sumw);
1292 Int_t nxy = nbinsx*nbinsy;
1293 Int_t nbins = nxy*nbinsz;
1303 if (integral == 0 ) {
x = 0;
y = 0; z = 0;
return;}
1310 Int_t binz = ibin/nxy;
1311 Int_t biny = (ibin - nxy*binz)/nbinsx;
1312 Int_t binx = ibin - nbinsx*(biny + nbinsy*binz);
1313 x =
fXaxis.GetBinLowEdge(binx+1);
1340 Int_t bin, binx, biny, binz;
1344 for (bin=0;bin<11;bin++) stats[bin] = 0;
1355 if (firstBinX == 1) firstBinX = 0;
1356 if (lastBinX ==
fXaxis.GetNbins() ) lastBinX += 1;
1359 if (firstBinY == 1) firstBinY = 0;
1360 if (lastBinY ==
fYaxis.GetNbins() ) lastBinY += 1;
1363 if (firstBinZ == 1) firstBinZ = 0;
1364 if (lastBinZ ==
fZaxis.GetNbins() ) lastBinZ += 1;
1373 for (binz = firstBinZ; binz <= lastBinZ; binz++) {
1374 z = (!labelZaxis) ?
fZaxis.GetBinCenter(binz) : 0;
1375 for (biny = firstBinY; biny <= lastBinY; biny++) {
1376 y = (!labelYaxis) ?
fYaxis.GetBinCenter(biny) : 0;
1377 for (binx = firstBinX; binx <= lastBinX; binx++) {
1378 bin =
GetBin(binx,biny,binz);
1379 x = (!labelXaxis) ?
fXaxis.GetBinCenter(binx) : 0;
1384 stats[1] += err*err;
1462 Error(
"Interpolate",
"This function must be called with 3 arguments for a TH3");
1472 Error(
"Interpolate",
"This function must be called with 3 arguments for a TH3");
1489 if (
x <
fXaxis.GetBinCenter(ubx) ) ubx -= 1;
1490 Int_t obx = ubx + 1;
1493 if (
y <
fYaxis.GetBinCenter(uby) ) uby -= 1;
1494 Int_t oby = uby + 1;
1497 if ( z <
fZaxis.GetBinCenter(ubz) ) ubz -= 1;
1498 Int_t obz = ubz + 1;
1521 auto GetBinContentNoOverflow = [
this](
int ix,
int iy,
int iz) {
1531 Double_t v[] = {GetBinContentNoOverflow(ubx, uby, ubz), GetBinContentNoOverflow(ubx, uby, obz),
1532 GetBinContentNoOverflow(ubx, oby, ubz), GetBinContentNoOverflow(ubx, oby, obz),
1533 GetBinContentNoOverflow(obx, uby, ubz), GetBinContentNoOverflow(obx, uby, obz),
1534 GetBinContentNoOverflow(obx, oby, ubz), GetBinContentNoOverflow(obx, oby, obz)};
1542 Double_t w1 = i1 * (1 - yd) + i2 * yd;
1543 Double_t w2 = j1 * (1 - yd) + j2 * yd;
1579 if (h2 ==
nullptr)
return 0;
1580 const TAxis *xaxis1 =
h1->GetXaxis();
1582 const TAxis *yaxis1 =
h1->GetYaxis();
1584 const TAxis *zaxis1 =
h1->GetZaxis();
1595 Error(
"KolmogorovTest",
"Histograms must be 3-D\n");
1601 Error(
"KolmogorovTest",
"Number of channels in X is different, %d and %d\n",ncx1,ncx2);
1605 Error(
"KolmogorovTest",
"Number of channels in Y is different, %d and %d\n",ncy1,ncy2);
1609 Error(
"KolmogorovTest",
"Number of channels in Z is different, %d and %d\n",ncz1,ncz2);
1619 if (diff1 > difprec || diff2 > difprec) {
1620 Error(
"KolmogorovTest",
"histograms with different binning along X");
1625 if (diff1 > difprec || diff2 > difprec) {
1626 Error(
"KolmogorovTest",
"histograms with different binning along Y");
1631 if (diff1 > difprec || diff2 > difprec) {
1632 Error(
"KolmogorovTest",
"histograms with different binning along Z");
1637 Int_t ibeg = 1, jbeg = 1, kbeg = 1;
1638 Int_t iend = ncx1, jend = ncy1, kend = ncz1;
1639 if (opt.
Contains(
"U")) {ibeg = 0; jbeg = 0; kbeg = 0;}
1640 if (opt.
Contains(
"O")) {iend = ncx1+1; jend = ncy1+1; kend = ncz1+1;}
1647 for (i = ibeg; i <= iend; i++) {
1648 for (j = jbeg; j <= jend; j++) {
1649 for (k = kbeg; k <= kend; k++) {
1650 bin =
h1->GetBin(i,j,k);
1651 sum1 +=
h1->GetBinContent(bin);
1664 Error(
"KolmogorovTest",
"Integral is zero for h1=%s\n",
h1->GetName());
1668 Error(
"KolmogorovTest",
"Integral is zero for h2=%s\n",h2->
GetName());
1676 esum1 = sum1 * sum1 / w1;
1681 esum2 = sum2 * sum2 / w2;
1685 if (afunc2 && afunc1) {
1686 Error(
"KolmogorovTest",
"Errors are zero for both histograms\n");
1692 int order[3] = {0,1,2};
1696 binbeg[0] = ibeg; binbeg[1] = jbeg; binbeg[2] = kbeg;
1697 binend[0] = iend; binend[1] = jend; binend[2] = kend;
1706 for (i = binbeg[order[0] ]; i <= binend[order[0] ]; i++) {
1707 for ( j = binbeg[order[1] ]; j <= binend[order[1] ]; j++) {
1708 for ( k = binbeg[order[2] ]; k <= binend[order[2] ]; k++) {
1709 ibin[ order[0] ] = i;
1710 ibin[ order[1] ] = j;
1711 ibin[ order[2] ] = k;
1712 bin =
h1->GetBin(ibin[0],ibin[1],ibin[2]);
1713 rsum1 +=
s1*
h1->GetBinContent(bin);
1719 vdfmax[icomb] = dmax;
1738 if (opt.
Contains(
"N") && !(afunc1 || afunc2 ) ) {
1742 Double_t chi2 = d12*d12/(esum1+esum2);
1745 if (prb > 0 && prb2 > 0) prb = prb*prb2*(1-
TMath::Log(prb*prb2));
1751 printf(
" Kolmo Prob h1 = %s, sum1=%g\n",
h1->GetName(),sum1);
1752 printf(
" Kolmo Prob h2 = %s, sum2=%g\n",h2->
GetName(),sum2);
1753 printf(
" Kolmo Probabil = %f, Max Dist = %g\n",prb,dfmax);
1755 printf(
" Kolmo Probabil = %f for shape alone, =%f for normalisation alone\n",prb1,prb2);
1758 if (
TMath::Abs(rsum1-1) > 0.002)
Warning(
"KolmogorovTest",
"Numerical problems with h1=%s\n",
h1->GetName());
1761 if (opt.
Contains(
"M"))
return dfmax;
1903 computeErrors =
kTRUE;
1908 originalRange =
kTRUE;
1940 bool computeErrors,
bool originalRange,
1941 bool useUF,
bool useOF,
bool useWidth)
const
1950 Int_t nx = ixmax-ixmin+1;
1956 Error(
"DoProject1D",
"Histogram with name %s must be a TH1D and is a %s",
name,h1obj->
ClassName());
1963 if ( originalRange )
1965 if (bins->
fN == 0) {
1971 if (bins->
fN == 0) {
1974 h1->SetBins(nx,&bins->
fArray[ixmin-1]);
1981 if ( originalRange )
1983 if (bins->
fN == 0) {
1989 if (bins->
fN == 0) {
1998 h1->GetXaxis()->ImportAttributes(projX);
2015 if ( computeErrors && (
h1->GetSumw2N() !=
h1->GetNcells() ) )
h1->Sumw2();
2019 if (out1 ==
nullptr && out2 ==
nullptr) {
2031 R__ASSERT(out1 !=
nullptr && out2 !=
nullptr);
2033 Int_t *refX =
nullptr, *refY =
nullptr, *refZ =
nullptr;
2034 Int_t ixbin, out1bin, out2bin;
2050 R__ASSERT (refX !=
nullptr && refY !=
nullptr && refZ !=
nullptr);
2071 if ( labels && extendable )
h1->GetXaxis()->SetCanExtend(
kFALSE);
2072 for (ixbin=0;ixbin<=1+projX->
GetNbins();ixbin++) {
2079 for (out1bin = out1min; out1bin <= out1max; out1bin++) {
2080 for (out2bin = out2min; out2bin <= out2max; out2bin++) {
2087 if (computeErrors) {
2094 h1->SetBinContent(ix ,cont);
2100 if ( labels )
h1->GetXaxis()->SetCanExtend(extendable);
2106 bool resetStats =
true;
2107 double eps = 1.E-12;
2111 bool resetEntries = resetStats;
2113 resetEntries |= !useUF || !useOF;
2120 stats[2] = stats[4];
2121 stats[3] = stats[5];
2124 stats[2] = stats[7];
2125 stats[3] = stats[8];
2127 h1->PutStats(stats);
2138 if (computeErrors) entries =
h1->GetEffectiveEntries();
2139 h1->SetEntries( entries );
2154 bool computeErrors,
bool originalRange,
2155 bool useUF,
bool useOF,
bool useWidth)
const
2165 Int_t nx = ixmax-ixmin+1;
2166 Int_t ny = iymax-iymin+1;
2174 Error(
"DoProject2D",
"Histogram with name %s must be a TH2D and is a %s",
name,h2obj->
ClassName());
2182 if ( originalRange ) {
2204 if ( originalRange )
2206 if (xbins->fN == 0 && ybins->
fN == 0) {
2209 }
else if (ybins->
fN == 0) {
2211 ,projX->
GetNbins(),&xbins->fArray[ixmin-1]);
2212 }
else if (xbins->fN == 0) {
2219 if (xbins->fN == 0 && ybins->
fN == 0) {
2222 }
else if (ybins->
fN == 0) {
2224 ,nx,&xbins->fArray[ixmin-1]);
2225 }
else if (xbins->fN == 0) {
2229 h2 =
new TH2D(
name,title,ny,&ybins->
fArray[iymin-1],nx,&xbins->fArray[ixmin-1]);
2269 const TAxis* out =
nullptr;
2278 Int_t *refX =
nullptr, *refY =
nullptr, *refZ =
nullptr;
2279 Int_t ixbin, iybin, outbin;
2280 if ( projX ==
GetXaxis() && projY ==
GetYaxis() ) { refX = &ixbin; refY = &iybin; refZ = &outbin; }
2281 if ( projX ==
GetYaxis() && projY ==
GetXaxis() ) { refX = &iybin; refY = &ixbin; refZ = &outbin; }
2282 if ( projX ==
GetXaxis() && projY ==
GetZaxis() ) { refX = &ixbin; refY = &outbin; refZ = &iybin; }
2283 if ( projX ==
GetZaxis() && projY ==
GetXaxis() ) { refX = &iybin; refY = &outbin; refZ = &ixbin; }
2284 if ( projX ==
GetYaxis() && projY ==
GetZaxis() ) { refX = &outbin; refY = &ixbin; refZ = &iybin; }
2285 if ( projX ==
GetZaxis() && projY ==
GetYaxis() ) { refX = &outbin; refY = &iybin; refZ = &ixbin; }
2286 R__ASSERT (refX !=
nullptr && refY !=
nullptr && refZ !=
nullptr);
2295 if (outmin == 0 && outmax == 0) { outmin = 1; outmax = out->
GetNbins(); }
2300 for (ixbin=0;ixbin<=1+projX->
GetNbins();ixbin++) {
2304 for (iybin=0;iybin<=1+projY->
GetNbins();iybin++) {
2312 for (outbin = outmin; outbin <= outmax; outbin++) {
2317 double step = useWidth ? out->
GetBinWidth(outbin) : 1;
2319 if (computeErrors) {
2337 bool resetStats =
true;
2338 double eps = 1.E-12;
2342 bool resetEntries = resetStats;
2344 resetEntries |= !useUF || !useOF;
2349 for (
Int_t i = 0; i <
kNstat; ++i) { oldst[i] = 0; }
2351 std::copy(oldst,oldst+
kNstat,stats);
2355 stats[4] = oldst[7];
2356 stats[5] = oldst[8];
2357 stats[6] = oldst[9];
2360 stats[2] = oldst[4];
2361 stats[3] = oldst[5];
2363 stats[4] = oldst[2];
2364 stats[5] = oldst[3];
2367 stats[4] = oldst[7];
2368 stats[5] = oldst[8];
2369 stats[6] = oldst[10];
2373 stats[2] = oldst[7];
2374 stats[3] = oldst[8];
2376 stats[4] = oldst[2];
2377 stats[5] = oldst[3];
2378 stats[6] = oldst[9];
2381 stats[4] = oldst[4];
2382 stats[5] = oldst[5];
2383 stats[6] = oldst[10];
2398 if (!computeErrors) entries =
TMath::Floor( entries + 0.5);
2467 Int_t underscore = extra_name.
Last(
'_');
2468 if (underscore > 0) {
2469 extra_name.
Remove(underscore,extra_name.
Length()-underscore);
2470 opt.
Remove(0,underscore+1);
2473 bool useWidth = opt.
Contains(
"width");
2476 if (opt.
Contains(
"x")) { pcase = 1; ptype =
"x"; }
2477 if (opt.
Contains(
"y")) { pcase = 2; ptype =
"y"; }
2478 if (opt.
Contains(
"z")) { pcase = 3; ptype =
"z"; }
2479 if (opt.
Contains(
"xy")) { pcase = 4; ptype =
"xy"; }
2480 if (opt.
Contains(
"yx")) { pcase = 5; ptype =
"yx"; }
2481 if (opt.
Contains(
"xz")) { pcase = 6; ptype =
"xz"; }
2482 if (opt.
Contains(
"zx")) { pcase = 7; ptype =
"zx"; }
2483 if (opt.
Contains(
"yz")) { pcase = 8; ptype =
"yz"; }
2484 if (opt.
Contains(
"zy")) { pcase = 9; ptype =
"zy"; }
2487 Error(
"Project3D",
"No projection axis specified - return a NULL pointer");
2494 computeErrors =
kTRUE;
2511 originalRange =
kTRUE;
2521 if (underscore > 0) {
2526 title +=
" "; title += ptype; title +=
" projection";
2532 computeErrors, originalRange, useUF, useOF, useWidth);
2538 computeErrors, originalRange, useUF, useOF, useWidth);
2544 computeErrors, originalRange, useUF, useOF, useWidth);
2550 computeErrors, originalRange, useUF, useOF, useWidth);
2556 computeErrors, originalRange, useUF, useOF, useWidth);
2562 computeErrors, originalRange, useUF, useOF, useWidth);
2568 computeErrors, originalRange, useUF, useOF, useWidth);
2574 computeErrors, originalRange, useUF, useOF, useWidth);
2580 computeErrors, originalRange, useUF, useOF, useWidth);
2611 if (useWeights && binSumw2.
fN <= 0) useWeights =
false;
2618 if (outBin <0)
return;
2620 if ( useWeights ) tmp = binSumw2.
fArray[outBin];
2621 p2->
Fill( u ,
v,
w, cont);
2622 if (useWeights ) binSumw2.
fArray[outBin] = tmp +
fSumw2.fArray[inBin];
2631 bool originalRange,
bool useUF,
bool useOF,
bool useWidth)
const
2639 Int_t nx = ixmax-ixmin+1;
2640 Int_t ny = iymax-iymin+1;
2650 Error(
"DoProjectProfile2D",
"Histogram with name %s must be a TProfile2D and is a %s",
name,p2obj->
ClassName());
2658 if ( originalRange ) {
2679 if ( originalRange ) {
2680 if (xbins->fN == 0 && ybins->
fN == 0) {
2683 }
else if (ybins->
fN == 0) {
2685 ,projX->
GetNbins(),&xbins->fArray[ixmin-1]);
2686 }
else if (xbins->fN == 0) {
2693 if (xbins->fN == 0 && ybins->
fN == 0) {
2696 }
else if (ybins->
fN == 0) {
2698 ,nx,&xbins->fArray[ixmin-1]);
2699 }
else if (xbins->fN == 0) {
2733 const TAxis* outAxis =
nullptr;
2748 Int_t *refX =
nullptr, *refY =
nullptr, *refZ =
nullptr;
2749 Int_t ixbin, iybin, outbin;
2750 if ( projX ==
GetXaxis() && projY ==
GetYaxis() ) { refX = &ixbin; refY = &iybin; refZ = &outbin; }
2751 if ( projX ==
GetYaxis() && projY ==
GetXaxis() ) { refX = &iybin; refY = &ixbin; refZ = &outbin; }
2752 if ( projX ==
GetXaxis() && projY ==
GetZaxis() ) { refX = &ixbin; refY = &outbin; refZ = &iybin; }
2753 if ( projX ==
GetZaxis() && projY ==
GetXaxis() ) { refX = &iybin; refY = &outbin; refZ = &ixbin; }
2754 if ( projX ==
GetYaxis() && projY ==
GetZaxis() ) { refX = &outbin; refY = &ixbin; refZ = &iybin; }
2755 if ( projX ==
GetZaxis() && projY ==
GetYaxis() ) { refX = &outbin; refY = &iybin; refZ = &ixbin; }
2756 R__ASSERT (refX !=
nullptr && refY !=
nullptr && refZ !=
nullptr);
2766 if (useWeights && binSumw2.
fN <= 0) useWeights =
false;
2770 for (ixbin=0;ixbin<=1+projX->
GetNbins();ixbin++) {
2772 for ( iybin=0;iybin<=1+projY->
GetNbins();iybin++) {
2777 if (poutBin <0)
continue;
2779 for (outbin = outmin; outbin <= outmax; outbin++) {
2784 double step = useWidth ? outAxis->
GetBinWidth(outbin) : 1;
2786 if (!cont)
continue;
2790 if ( useWeights ) tmp = binSumw2.
fArray[poutBin];
2792 if (useWeights ) binSumw2.
fArray[poutBin] = tmp +
fSumw2.fArray[bin];
2800 bool resetStats =
true;
2811 if (!useWeights) entries =
TMath::Floor( entries + 0.5);
2870 if (opt.
Contains(
"xy")) { pcase = 4; ptype =
"xy"; }
2871 if (opt.
Contains(
"yx")) { pcase = 5; ptype =
"yx"; }
2872 if (opt.
Contains(
"xz")) { pcase = 6; ptype =
"xz"; }
2873 if (opt.
Contains(
"zx")) { pcase = 7; ptype =
"zx"; }
2874 if (opt.
Contains(
"yz")) { pcase = 8; ptype =
"yz"; }
2875 if (opt.
Contains(
"zy")) { pcase = 9; ptype =
"zy"; }
2878 Error(
"Project3D",
"No projection axis specified - return a NULL pointer");
2896 originalRange =
kTRUE;
2905 title +=
" profile "; title += ptype; title +=
" projection";
2967 return Rebin3D(ngroup, 1, 1, newname);
2977 return Rebin3D(1, ngroup, 1, newname);
2987 return Rebin3D(1, 1, ngroup, newname);
3018 Int_t i,j,k,xbin,ybin,zbin;
3028 if ((nxgroup <= 0) || (nxgroup > nxbins)) {
3029 Error(
"Rebin",
"Illegal value of nxgroup=%d",nxgroup);
3032 if ((nygroup <= 0) || (nygroup > nybins)) {
3033 Error(
"Rebin",
"Illegal value of nygroup=%d",nygroup);
3036 if ((nzgroup <= 0) || (nzgroup > nzbins)) {
3037 Error(
"Rebin",
"Illegal value of nzgroup=%d",nzgroup);
3041 Int_t newxbins = nxbins/nxgroup;
3042 Int_t newybins = nybins/nygroup;
3043 Int_t newzbins = nzbins/nzgroup;
3055 oldSumw2[ibin] =
fSumw2.fArray[ibin];
3061 if (newname && strlen(newname)) {
3069 bool resetStat =
false;
3073 if (newxbins*nxgroup != nxbins) {
3074 xmax =
fXaxis.GetBinUpEdge(newxbins*nxgroup);
3077 if (newybins*nygroup != nybins) {
3078 ymax =
fYaxis.GetBinUpEdge(newybins*nygroup);
3081 if (newzbins*nzgroup != nzbins) {
3082 zmax =
fZaxis.GetBinUpEdge(newzbins*nzgroup);
3123 if (nxgroup != 1 || nygroup != 1 || nzgroup != 1) {
3124 if (
fXaxis.GetXbins()->GetSize() > 0 ||
fYaxis.GetXbins()->GetSize() > 0 ||
fZaxis.GetXbins()->GetSize() > 0) {
3127 for (i = 0; i <= newxbins; ++i) xbins[i] =
fXaxis.GetBinLowEdge(1+i*nxgroup);
3129 for (i = 0; i <= newybins; ++i) ybins[i] =
fYaxis.GetBinLowEdge(1+i*nygroup);
3131 for (i = 0; i <= newzbins; ++i) zbins[i] =
fZaxis.GetBinLowEdge(1+i*nzgroup);
3132 hnew->
SetBins(newxbins,xbins, newybins, ybins, newzbins, zbins);
3145 for (xbin = 1; xbin <= newxbins; xbin++) {
3148 for (ybin = 1; ybin <= newybins; ybin++) {
3150 for (zbin = 1; zbin <= newzbins; zbin++) {
3153 for (i = 0; i < nxgroup; i++) {
3154 if (oldxbin+i > nxbins)
break;
3155 for (j =0; j < nygroup; j++) {
3156 if (oldybin+j > nybins)
break;
3157 for (k =0; k < nzgroup; k++) {
3158 if (oldzbin+k > nzbins)
break;
3160 bin = oldxbin + i + (oldybin + j)*(nxbins + 2) + (oldzbin + k)*(nxbins + 2)*(nybins + 2);
3161 binContent += oldBins[bin];
3162 if (oldSumw2) binSumw2 += oldSumw2[bin];
3177 for (
Int_t xover = 0; xover <= 1; xover++) {
3178 for (
Int_t yover = 0; yover <= 1; yover++) {
3179 for (
Int_t zover = 0; zover <= 1; zover++) {
3183 for (xbin = xover*oldxbin; xbin <= xover*(nxbins+1); xbin++) {
3184 for (ybin = yover*oldybin; ybin <= yover*(nybins+1); ybin++) {
3185 for (zbin = zover*oldzbin; zbin <= zover*(nzbins+1); zbin++) {
3186 bin =
GetBin(xbin,ybin,zbin);
3187 binContent += oldBins[bin];
3188 if (oldSumw2) binSumw2 += oldSumw2[bin];
3193 yover*(newybins+1), zover*(newzbins+1) );
3200 Double_t binContent0, binContent2, binContent3, binContent4;
3201 Double_t binError0, binError2, binError3, binError4;
3202 Int_t oldxbin2, oldybin2, oldzbin2;
3203 Int_t ufbin, ofbin, ofbin2, ofbin3, ofbin4;
3209 for (xbin = 1; xbin<=newxbins; xbin++) {
3211 for (zbin = 1; zbin<=newzbins; zbin++) {
3212 binContent0 = binContent2 = 0;
3213 binError0 = binError2 = 0;
3214 for (i=0; i<nxgroup; i++) {
3215 if (oldxbin2+i > nxbins)
break;
3216 for (k=0; k<nzgroup; k++) {
3217 if (oldzbin2+k > nzbins)
break;
3219 ufbin = oldxbin2 + i + (nxbins+2)*(nybins+2)*(oldzbin2+k);
3220 binContent0 += oldBins[ufbin];
3221 if (oldSumw2) binError0 += oldSumw2[ufbin];
3222 for (ybin = oldybin; ybin <= nybins + 1; ybin++) {
3224 ofbin = ufbin + ybin*(nxbins+2);
3225 binContent2 += oldBins[ofbin];
3226 if (oldSumw2) binError2 += oldSumw2[ofbin];
3236 oldzbin2 += nzgroup;
3238 oldxbin2 += nxgroup;
3245 for (ybin = 1; ybin<=newybins; ybin++) {
3247 for (zbin = 1; zbin<=newzbins; zbin++) {
3248 binContent0 = binContent2 = 0;
3249 binError0 = binError2 = 0;
3250 for (j=0; j<nygroup; j++) {
3251 if (oldybin2+j > nybins)
break;
3252 for (k=0; k<nzgroup; k++) {
3253 if (oldzbin2+k > nzbins)
break;
3255 ufbin = (oldybin2 + j)*(nxbins+2) + (nxbins+2)*(nybins+2)*(oldzbin2+k);
3256 binContent0 += oldBins[ufbin];
3257 if (oldSumw2) binError0 += oldSumw2[ufbin];
3258 for (xbin = oldxbin; xbin <= nxbins + 1; xbin++) {
3260 ofbin = ufbin + xbin;
3261 binContent2 += oldBins[ofbin];
3262 if (oldSumw2) binError2 += oldSumw2[ofbin];
3272 oldzbin2 += nzgroup;
3274 oldybin2 += nygroup;
3281 for (xbin = 1; xbin<=newxbins; xbin++) {
3283 for (ybin = 1; ybin<=newybins; ybin++) {
3284 binContent0 = binContent2 = 0;
3285 binError0 = binError2 = 0;
3286 for (i=0; i<nxgroup; i++) {
3287 if (oldxbin2+i > nxbins)
break;
3288 for (j=0; j<nygroup; j++) {
3289 if (oldybin2+j > nybins)
break;
3291 ufbin = oldxbin2 + i + (nxbins+2)*(oldybin2+j);
3292 binContent0 += oldBins[ufbin];
3293 if (oldSumw2) binError0 += oldSumw2[ufbin];
3294 for (zbin = oldzbin; zbin <= nzbins + 1; zbin++) {
3296 ofbin = ufbin + (nxbins+2)*(nybins+2)*zbin;
3297 binContent2 += oldBins[ofbin];
3298 if (oldSumw2) binError2 += oldSumw2[ofbin];
3308 oldybin2 += nygroup;
3310 oldxbin2 += nxgroup;
3317 for (xbin = 1; xbin<=newxbins; xbin++) {
3326 for (i=0; i<nxgroup; i++) {
3327 if (oldxbin2+i > nxbins)
break;
3328 ufbin = oldxbin2 + i;
3329 binContent0 += oldBins[ufbin];
3330 if (oldSumw2) binError0 += oldSumw2[ufbin];
3331 for (ybin = oldybin; ybin <= nybins + 1; ybin++) {
3332 ofbin3 = ufbin+ybin*(nxbins+2);
3333 binContent3 += oldBins[ ofbin3 ];
3334 if (oldSumw2) binError3 += oldSumw2[ofbin3];
3335 for (zbin = oldzbin; zbin <= nzbins + 1; zbin++) {
3337 ofbin4 = oldxbin2 + i + ybin*(nxbins+2) + (nxbins+2)*(nybins+2)*zbin;
3338 binContent4 += oldBins[ofbin4];
3339 if (oldSumw2) binError4 += oldSumw2[ofbin4];
3342 for (zbin = oldzbin; zbin <= nzbins + 1; zbin++) {
3343 ofbin2 = ufbin+zbin*(nxbins+2)*(nybins+2);
3344 binContent2 += oldBins[ ofbin2 ];
3345 if (oldSumw2) binError2 += oldSumw2[ofbin2];
3351 hnew->
SetBinContent(xbin,newybins+1,newzbins+1,binContent4);
3358 oldxbin2 += nxgroup;
3365 for (zbin = 1; zbin<=newzbins; zbin++) {
3374 for (i=0; i<nzgroup; i++) {
3375 if (oldzbin2+i > nzbins)
break;
3376 ufbin = (oldzbin2 + i)*(nxbins+2)*(nybins+2);
3377 binContent0 += oldBins[ufbin];
3378 if (oldSumw2) binError0 += oldSumw2[ufbin];
3379 for (ybin = oldybin; ybin <= nybins + 1; ybin++) {
3380 ofbin3 = ufbin+ybin*(nxbins+2);
3381 binContent3 += oldBins[ ofbin3 ];
3382 if (oldSumw2) binError3 += oldSumw2[ofbin3];
3383 for (xbin = oldxbin; xbin <= nxbins + 1; xbin++) {
3385 ofbin4 = ufbin + xbin + ybin*(nxbins+2);
3386 binContent4 += oldBins[ofbin4];
3387 if (oldSumw2) binError4 += oldSumw2[ofbin4];
3390 for (xbin = oldxbin; xbin <= nxbins + 1; xbin++) {
3391 ofbin2 = xbin +(oldzbin2+i)*(nxbins+2)*(nybins+2);
3392 binContent2 += oldBins[ ofbin2 ];
3393 if (oldSumw2) binError2 += oldSumw2[ofbin2];
3399 hnew->
SetBinContent(newxbins+1,newybins+1,zbin,binContent4);
3406 oldzbin2 += nzgroup;
3413 for (ybin = 1; ybin<=newybins; ybin++) {
3422 for (i=0; i<nygroup; i++) {
3423 if (oldybin2+i > nybins)
break;
3424 ufbin = (oldybin2 + i)*(nxbins+2);
3425 binContent0 += oldBins[ufbin];
3426 if (oldSumw2) binError0 += oldSumw2[ufbin];
3427 for (xbin = oldxbin; xbin <= nxbins + 1; xbin++) {
3428 ofbin3 = ufbin+xbin;
3429 binContent3 += oldBins[ ofbin3 ];
3430 if (oldSumw2) binError3 += oldSumw2[ofbin3];
3431 for (zbin = oldzbin; zbin <= nzbins + 1; zbin++) {
3433 ofbin4 = xbin + (nxbins+2)*(nybins+2)*zbin+(oldybin2+i)*(nxbins+2);
3434 binContent4 += oldBins[ofbin4];
3435 if (oldSumw2) binError4 += oldSumw2[ofbin4];
3438 for (zbin = oldzbin; zbin <= nzbins + 1; zbin++) {
3439 ofbin2 = (oldybin2+i)*(nxbins+2)+zbin*(nxbins+2)*(nybins+2);
3440 binContent2 += oldBins[ ofbin2 ];
3441 if (oldSumw2) binError2 += oldSumw2[ofbin2];
3447 hnew->
SetBinContent(newxbins+1,ybin,newzbins+1,binContent4);
3454 oldybin2 += nygroup;
3459 fXaxis.SetNdivisions(nXdivisions);
3460 fXaxis.SetAxisColor(xAxisColor);
3461 fXaxis.SetLabelColor(xLabelColor);
3462 fXaxis.SetLabelFont(xLabelFont);
3463 fXaxis.SetLabelOffset(xLabelOffset);
3464 fXaxis.SetLabelSize(xLabelSize);
3465 fXaxis.SetTickLength(xTickLength);
3466 fXaxis.SetTitleOffset(xTitleOffset);
3467 fXaxis.SetTitleSize(xTitleSize);
3468 fXaxis.SetTitleColor(xTitleColor);
3469 fXaxis.SetTitleFont(xTitleFont);
3471 fYaxis.SetNdivisions(nYdivisions);
3472 fYaxis.SetAxisColor(yAxisColor);
3473 fYaxis.SetLabelColor(yLabelColor);
3474 fYaxis.SetLabelFont(yLabelFont);
3475 fYaxis.SetLabelOffset(yLabelOffset);
3476 fYaxis.SetLabelSize(yLabelSize);
3477 fYaxis.SetTickLength(yTickLength);
3478 fYaxis.SetTitleOffset(yTitleOffset);
3479 fYaxis.SetTitleSize(yTitleSize);
3480 fYaxis.SetTitleColor(yTitleColor);
3481 fYaxis.SetTitleFont(yTitleFont);
3483 fZaxis.SetNdivisions(nZdivisions);
3484 fZaxis.SetAxisColor(zAxisColor);
3485 fZaxis.SetLabelColor(zLabelColor);
3486 fZaxis.SetLabelFont(zLabelFont);
3487 fZaxis.SetLabelOffset(zLabelOffset);
3488 fZaxis.SetLabelSize(zLabelSize);
3489 fZaxis.SetTickLength(zTickLength);
3490 fZaxis.SetTitleOffset(zTitleOffset);
3491 fZaxis.SetTitleSize(zTitleSize);
3492 fZaxis.SetTitleColor(zTitleColor);
3493 fZaxis.SetTitleFont(zTitleFont);
3497 if (!resetStat) hnew->
PutStats(stat);
3500 if (oldSumw2)
delete [] oldSumw2;
3531 if (bin < 0)
return;
3564 bool originalRange,
bool useUF,
bool useOF,
bool useWidth)
3566 return h.DoProject1D(
name, title, projX,
nullptr,
nullptr, computeErrors, originalRange, useUF, useOF, useWidth);
3573 bool computeErrors,
bool originalRange,
bool useUF,
bool useOF,
bool useWidth)
3575 return h.DoProject2D(
name, title, projX, projY, computeErrors, originalRange, useUF, useOF, useWidth);
3610 :
TH3(
name,title,nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz,zlow,zup)
3626 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
3640 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
3653 h3c.TH3C::Copy(*
this);
3675 if (newval > -128 && newval < 128) {
fArray[bin] =
Char_t(newval);
return;}
3676 if (newval < -127)
fArray[bin] = -127;
3677 if (newval > 127)
fArray[bin] = 127;
3781 h3c.TH3C::Copy(*
this);
3878 :
TH3(
name,title,nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz,zlow,zup)
3894 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
3908 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
3921 h3s.TH3S::Copy(*
this);
3943 if (newval > -32768 && newval < 32768) {
fArray[bin] =
Short_t(newval);
return;}
3944 if (newval < -32767)
fArray[bin] = -32767;
3945 if (newval > 32767)
fArray[bin] = 32767;
4020 h3s.TH3S::Copy(*
this);
4117 :
TH3(
name,title,nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz,zlow,zup)
4133 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4147 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4160 h3i.TH3I::Copy(*
this);
4182 if (newval > -INT_MAX && newval < INT_MAX) {
fArray[bin] =
Int_t(newval);
return;}
4183 if (newval < -INT_MAX)
fArray[bin] = -INT_MAX;
4184 if (newval > INT_MAX)
fArray[bin] = INT_MAX;
4226 h3i.TH3I::Copy(*
this);
4323 :
TH3(
name,title,nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz,zlow,zup)
4339 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4353 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4366 h3l.TH3L::Copy(*
this);
4388 if (newval > -LLONG_MAX && newval < LLONG_MAX) {
fArray[bin] = newval;
return;}
4389 if (newval < -LLONG_MAX)
fArray[bin] = -LLONG_MAX;
4390 if (newval > LLONG_MAX)
fArray[bin] = LLONG_MAX;
4432 h3l.TH3L::Copy(*
this);
4529 :
TH3(
name,title,nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz,zlow,zup)
4545 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4559 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4572 h3f.TH3F::Copy(*
this);
4647 h3f.TH3F::Copy(*
this);
4744 :
TH3(
name,title,nbinsx,xlow,xup,nbinsy,ylow,yup,nbinsz,zlow,zup)
4760 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4774 :
TH3(
name,title,nbinsx,xbins,nbinsy,ybins,nbinsz,zbins)
4935 return (
TH1 *)
gROOT->ProcessLineFast(
4936 TString::Format(
"TSpectrum3::StaticBackground((TH1*)0x%zx,%d,%d,%d,\"%s\")", (
size_t)
this, nIterX, nIterY, nIterZ,
option)
short Style_t
Style number (short)
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
short Color_t
Color number (short)
short Version_t
Class version identifier (short)
char Char_t
Character 1 byte (char)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char)
if(isa< VarDecl >(D)||isa< FieldDecl >(D)||isa< EnumConstantDecl >(D))
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
TH3C operator-(TH3C const &h1, TH3C const &h2)
Operator -.
TH3C operator+(TH3C const &h1, TH3C const &h2)
Operator +.
TH3C operator/(TH3C const &h1, TH3C const &h2)
Operator /.
TH3C operator*(Float_t c1, TH3C const &h3c)
Operator *.
R__EXTERN TRandom * gRandom
TArrayC()
Default TArrayC ctor.
void Streamer(TBuffer &) override
Stream a TArrayC object.
void Set(Int_t n) override
Set size of this array to n chars.
Array of doubles (64 bits per element).
void Streamer(TBuffer &) override
Stream a TArrayD object.
void Set(Int_t n) override
Set size of this array to n doubles.
TArrayD()
Default TArrayD ctor.
TArrayF()
Default TArrayF ctor.
void Set(Int_t n) override
Set size of this array to n floats.
void Streamer(TBuffer &) override
Stream a TArrayF object.
void Set(Int_t n) override
Set size of this array to n ints.
TArrayI()
Default TArrayI ctor.
void Set(Int_t n) override
Set size of this array to n long64s.
TArrayL64()
Default TArrayL64 ctor.
void Set(Int_t n) override
Set size of this array to n shorts.
TArrayS()
Default TArrayS ctor.
void Streamer(TBuffer &) override
Stream a TArrayS object.
virtual void Set(Int_t n)=0
virtual void Streamer(TBuffer &)
virtual Color_t GetFillColor() const
Return the fill area color.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
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 void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Class to manage histogram axis.
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
const TArrayD * GetXbins() const
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 Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void ImportAttributes(const TAxis *axis)
Copy axis attributes to this.
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
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t GetVersionOwner() const =0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TClass * IsA() const override
TF3 defines a 3D Function with Parameters.
1-D histogram with a double per channel (see TH1 documentation)
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
Double_t * fBuffer
[fBufferSize] entry buffer
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
Int_t fNcells
Number of bins(1D), cells (2D) +U/Overflows.
void Copy(TObject &hnew) const override
Copy this histogram structure to newth1.
Double_t fTsumw
Total Sum of weights.
Double_t fTsumw2
Total Sum of squares of weights.
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).
virtual Int_t GetNbinsY() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetNbinsZ() const
virtual Int_t GetDimension() const
void Streamer(TBuffer &) override
Stream a class object.
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted.
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
virtual Int_t GetNcells() const
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
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 Int_t GetNbinsX() const
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),...
Int_t fBufferSize
fBuffer size
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...
static Int_t fgBufferSize
! Default buffer size for automatic histograms
virtual void SetBuffer(Int_t bufsize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
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
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 Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
virtual Double_t GetEntries() const
Return the current number of entries.
virtual Double_t RetrieveBinContent(Int_t bin) const =0
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
void SetName(const char *name) override
Change the name of this histogram.
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculated from bin cont...
@ kNstat
Size of statistics data (up to TProfile3D)
Double_t fEntries
Number of entries.
TAxis fZaxis
Z axis descriptor.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
TAxis fXaxis
X axis descriptor.
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
TArrayD fSumw2
Array of sum of squares of weights.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false, Option_t *option="")
Compute integral (normalized cumulative sum of bins) w/o under/overflows The result is stored in fInt...
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
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
TAxis fYaxis
Y axis descriptor.
TVirtualHistPainter * fPainter
! Pointer to histogram painter
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
virtual void SetEntries(Double_t n)
static Bool_t fgDefaultSumw2
! Flag to call TH1::Sumw2 automatically at histogram creation time
virtual void UpdateBinContent(Int_t bin, Double_t content)=0
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Double_t fTsumwx
Total Sum of weight*X.
2-D histogram with a double per channel (see TH1 documentation)
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
void PutStats(Double_t *stats) override
Replace current statistics with the values in array stats.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
TClass * IsA() const override
~TH3C() override
Destructor.
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
TH3C & operator=(const TH3C &h1)
Operator =.
void Streamer(TBuffer &) override
Stream an object of class TH3C.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TClass * IsA() const override
void Streamer(TBuffer &) override
Stream an object of class TH3D.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3D() override
Destructor.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TH3D & operator=(const TH3D &h1)
Operator =.
TH3F & operator=(const TH3F &h1)
Operator =.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3F() override
Destructor.
void Streamer(TBuffer &) override
Stream an object of class TH3F.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TClass * IsA() const override
TH3I & operator=(const TH3I &h1)
Operator =.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3I() override
Destructor.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TH3L & operator=(const TH3L &h1)
Operator =.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
~TH3L() override
Destructor.
void Streamer(TBuffer &) override
Stream an object of class TH3S.
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
void AddBinContent(Int_t bin) override
Increment bin content by 1.
~TH3S() override
Destructor.
void Copy(TObject &hnew) const override
Copy this 3-D histogram structure to newth3.
TClass * IsA() const override
TH3S & operator=(const TH3S &h1)
Operator =.
virtual TH3 * Rebin3D(Int_t nxgroup=2, Int_t nygroup=2, Int_t nzgroup=2, const char *newname="")
Rebin this histogram grouping nxgroup/nygroup/nzgroup bins along the xaxis/yaxis/zaxis together.
Int_t BufferEmpty(Int_t action=0) override
Fill histogram with all entries in the buffer.
Double_t fTsumwy
Total Sum of weight*Y.
Double_t fTsumwy2
Total Sum of weight*Y*Y.
virtual Double_t GetCovariance(Int_t axis1=1, Int_t axis2=2) const
Return covariance between axis1 and axis2.
void GetStats(Double_t *stats) const override
Fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
void Copy(TObject &hnew) const override
Copy.
Double_t fTsumwxz
Total Sum of weight*X*Z.
Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const override
Statistical test of compatibility in shape between THIS histogram and h2, using Kolmogorov test.
virtual TH1D * ProjectionY(const char *name="_py", Int_t ixmin=0, Int_t ixmax=-1, Int_t izmin=0, Int_t izmax=-1, Option_t *option="") const
Project a 3-D histogram into a 1-D histogram along Y (integration along X and Z).
Double_t Interpolate(Double_t x, Double_t y) const override
Not yet implemented.
void AddBinContent(Int_t binx, Int_t biny, Int_t binz)
Increment 3D bin content by 1.
void Reset(Option_t *option="") override
Reset this histogram: contents, errors, etc.
~TH3() override
Destructor.
Int_t Fill(Double_t) override
Invalid Fill method.
virtual TH3 * RebinY(Int_t ngroup=2, const char *newname="")
Rebin only the Y axis see Rebin3D.
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Int_t binz1, Int_t binz2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [binx1,binx2],[biny1,biny2],[binz1,binz2] for a 3-D histogra...
virtual TH1D * ProjectionZ(const char *name="_pz", Int_t ixmin=0, Int_t ixmax=-1, Int_t iymin=0, Int_t iymax=-1, Option_t *option="") const
Project a 3-D histogram into a 1-D histogram along Z (integration along X and Y).
virtual TH1D * ProjectionX(const char *name="_px", Int_t iymin=0, Int_t iymax=-1, Int_t izmin=0, Int_t izmax=-1, Option_t *option="") const
Project a 3-D histogram into a 1-D histogram along X (integration along Y and Z).
virtual TProfile2D * Project3DProfile(Option_t *option="xy") const
Project a 3-d histogram into a 2-d profile histograms depending on the option parameter option may co...
Double_t fTsumwz2
Total Sum of weight*Z*Z.
Double_t fTsumwxy
Total Sum of weight*X*Y.
virtual TH1 * Project3D(Option_t *option="x") const
Project a 3-d histogram into 1 or 2-d histograms depending on the option parameter,...
virtual Double_t GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstx=0, Int_t lastx=0, Int_t firsty=0, Int_t lasty=0, Int_t firstz=0, Int_t lastz=0, Double_t maxdiff=0) const
Compute first cell (binx,biny,binz) in the range [firstx,lastx](firsty,lasty][firstz,...
virtual TH2D * DoProject2D(const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool computeErrors, bool originalRange, bool useUF, bool useOF, bool useWidth) const
internal method performing the projection to a 2D histogram called from TH3::Project3D
void DoFillProfileProjection(TProfile2D *p2, const TAxis &a1, const TAxis &a2, const TAxis &a3, Int_t bin1, Int_t bin2, Int_t bin3, Int_t inBin, Bool_t useWeights) const
internal function to fill the bins of the projected profile 2D histogram called from DoProjectProfile...
virtual TH3 * RebinZ(Int_t ngroup=2, const char *newname="")
Rebin only the Z axis see Rebin3D.
void Streamer(TBuffer &) override
Stream an object of class TH3.
Double_t Integral(Option_t *option="") const override
Return integral of bin contents.
virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t w)
Accumulate arguments in buffer.
void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr) override
Fill histogram following distribution in function fname.
virtual void GetRandom3(Double_t &x, Double_t &y, Double_t &, TRandom *rng=nullptr, Option_t *option="")
Return 3 random numbers along axis x, y and z distributed according to the cell-contents of this 3-di...
TClass * IsA() const override
virtual void SetShowProjection(const char *option="xy", Int_t nbins=1)
When the mouse is moved in a pad containing a 3-d view of this histogram a second canvas shows a proj...
TH3 * RebinX(Int_t ngroup=2, const char *newname="") override
Rebin only the X axis see Rebin3D.
virtual Double_t GetCorrelationFactor(Int_t axis1=1, Int_t axis2=2) const
Return correlation factor between axis1 and axis2.
virtual TH1D * DoProject1D(const char *name, const char *title, int imin1, int imax1, int imin2, int imax2, const TAxis *projAxis, const TAxis *axis1, const TAxis *axis2, Option_t *option) const
internal method performing the projection to 1D histogram called from TH3::Project3D
Double_t fTsumwz
Total Sum of weight*Z.
Double_t GetBinContent(Int_t binx, Int_t biny, Int_t binz) const override
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
Double_t fTsumwyz
Total Sum of weight*Y*Z.
TH3()
Default constructor.
Int_t GetBin(Int_t binx, Int_t biny, Int_t binz) const override
See comments in TH1::GetBin.
virtual void FitSlicesZ(TF1 *f1=nullptr, Int_t binminx=1, Int_t binmaxx=0, Int_t binminy=1, Int_t binmaxy=0, Int_t cut=0, Option_t *option="QNR")
Project slices along Z in case of a 3-D histogram, then fit each slice with function f1 and make a 2-...
virtual TH1 * ShowBackground3D(Int_t nIterX=20, Int_t nIterY=20, Int_t nIterZ=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
virtual TProfile2D * DoProjectProfile2D(const char *name, const char *title, const TAxis *projX, const TAxis *projY, bool originalRange, bool useUF, bool useOF, bool useWidth) const
internal method to project to a 2D Profile called from TH3::Project3DProfile
void PutStats(Double_t *stats) override
Replace current statistics with the values in array stats.
static THLimitsFinder * GetLimitsFinder()
Return pointer to the current finder.
virtual Int_t FindGoodLimitsXYZ(TH1 *h, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t newbinsx=0, Int_t newbinsy=0, Int_t newbinsz=0)
Compute the best axis limits and bins for the X, Y and Z axis if the corresponding newbins variable i...
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Collectable string class.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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 TClass * IsA() const
TObject()
TObject constructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Profile2D histograms are used to display the mean value of Z and its error for each cell in X,...
void PutStats(Double_t *stats) override
Replace current statistics with the values in array stats.
Int_t Fill(const Double_t *v)
void Sumw2(Bool_t flag=kTRUE) override
Create/Delete structure to store sum of squares of weights per bin.
void SetBins(const Int_t *nbins, const Double_t *range)
virtual TArrayD * GetBinSumw2()
void Reset(Option_t *option="") override
Reset contents of a Profile2D histogram.
This is the base class for the ROOT Random number generators.
Double_t Rndm() override
Machine independent random number generator.
void ToLower()
Change string to lower-case.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
Ssiz_t Last(char c) const
Find last occurrence of a character c.
void ToUpper()
Change string to upper case.
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
small helper class to store/restore gPad context in TPad methods
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and 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...
Bool_t Permute(Int_t n, Int_t *a)
Simple recursive algorithm to find the permutations of n natural numbers, not necessarily all distinc...
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754.
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Mean(Long64_t n, const T *a, const Double_t *w=nullptr)
Returns the weighted mean of an array a with length n.
Double_t KolmogorovProb(Double_t z)
Calculates the Kolmogorov distribution function,.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.